Book of Enchantment #148
Aliases: Book of Enchantment, enchantmentbook
2 verbs · 20 properties · 0 children
Verbs
| Verb | Spec | Flags | Definer | Lines |
|---|---|---|---|---|
title | this none this | rxd | #148 | 1 |
ca*st | this on top of/on/onto/upon any | rxd | #148 | 75 |
Properties
| Property | Definer | Flags | Owner | Value |
|---|---|---|---|---|
spellcounter | #148 | rc | #2 | 10 |
drop_failed_msg | #5 | rc | #2 | <clear> |
drop_succeeded_msg | #5 | rc | #2 | <clear> |
odrop_failed_msg | #5 | rc | #2 | <clear> |
odrop_succeeded_msg | #5 | rc | #2 | <clear> |
otake_succeeded_msg | #5 | rc | #2 | <clear> |
otake_failed_msg | #5 | rc | #2 | <clear> |
take_succeeded_msg | #5 | rc | #2 | <clear> |
take_failed_msg | #5 | rc | #2 | <clear> |
value_base | #102 | r | #2 | 250.0 |
damage_base | #102 | r | #2 | <clear> |
x_loc | #102 | r | #36 | <clear> |
y_loc | #102 | r | #36 | <clear> |
ansi_title | #102 | r | #36 | <clear> |
obvious | #102 | r | #36 | <clear> |
build_help | #102 | rc | #2 | <clear> |
key | #1 | c | #2 | 0 |
aliases | #1 | rc | #2 | {"Book of Enchantment", "enchantmentbook"} |
description | #1 | rc | #2 | "[green]You see a book bound in leather with magical text.[normal] [Spell: Enchantment]" |
object_size | #1 | r | #36 | {0, 0} |
Ancestry
Ancestors (nearest first): #5 generic thing → #102 subthing → #1 Root Class
Children: none
Call graph
Source
title
Referenced by
- #148:ca*st line 2:
this:title - #148:ca*st line 32:
this:title - #148:ca*st line 48:
this:title - #148:ca*st line 63:
this:title
Source
1return tostr("[yellow]", this.name, "[normal]");
ca*st
Referenced by
none
Source
1if ((this in player.contents) && (player.stats_current[2][3] >= 11.0)) 2player:tell("You prepare to cast from the ", this:title(), "[normal]..."); 3elseif (player.stats_current[2][3] < 11.0) 4player:tell("You do not have a high enough INT ability! This spell requires at least 11.0."); 5return; 6else 7player:tell("You are not carrying that."); 8return; 9endif 10target = $string_utils:match_object(iobjstr, player.location); 11if (((iobjstr == "me") || (iobjstr == "self")) || (iobjstr == "myself")) 12player:tell("The target must be armor or a weapon, and you must be carrying it."); 13return; 14endif 15if ($object_utils:has_property(target, "enchant_level")) 16if ((target.enchant_level + 1) > toint(player.stats_current[2][3])) 17player:tell("You cannot enchant ", target.name, " beyond your INT ability."); 18return; 19endif 20endif 21if ((target in player.contents) && $object_utils:has_property(target, "armor")) 22target.armor = target.armor + 1.0; 23target.enchant_level = target.enchant_level + 1; 24target.value_base = target.value_base + 20.0; 25player:tell("You cast [yellow]Enchantment[normal] on ", target.name, "!"); 26player.location:announce(player:title(), " casts [yellow]Enchantment[normal] on ", target.name, "!"); 27player:tell("Your ", target.name, " gets +1.0 to Armor!"); 28player.location:announce(player:title(), " enchants ", player.pp, " ", target.name, "!"); 29if (!this.f) 30this.spellcounter = this.spellcounter - 1; 31if (!this.spellcounter) 32player:tell("The ", this:title(), " crumbles into dust!"); 33$recycler:_recycle(this); 34endif 35endif 36return; 37elseif (((target in player.contents) && $object_utils:has_property(target, "weapon")) && target.shoots) 38target.projectile_dam = target.projectile_dam + 1.0; 39target.enchant_level = target.enchant_level + 1; 40target.value_base = target.value_base + 20.0; 41player:tell("You cast [yellow]Enchantment[normal] on ", target:title(), "!"); 42player.location:announce(player:title(), " casts [yellow]Enchantment[normal] on ", target:title(), "!"); 43player:tell("Your ", target:title(), " gets +1.0 to Projectile Damage!"); 44player.location:announce(player:title(), " enchants ", player.pp, " ", target:title(), "!"); 45if (!this.f) 46this.spellcounter = this.spellcounter - 1; 47if (!this.spellcounter) 48player:tell("The ", this:title(), " crumbles into dust!"); 49$recycler:_recycle(this); 50endif 51endif 52elseif (((target in player.contents) && $object_utils:has_property(target, "weapon")) && (!target.shoots)) 53target.damage_base = target.damage_base + 1.0; 54target.enchant_level = target.enchant_level + 1; 55target.value_base = target.value_base + 20.0; 56player:tell("You cast [yellow]Enchantment[normal] on ", target:title(), "!"); 57player.location:announce(player:title(), " casts [yellow]Enchantment[normal] on ", target:title(), "!"); 58player:tell("Your ", target:title(), " gets +1.0 to Damage!"); 59player.location:announce(player:title(), " enchants ", player.pp, " ", target:title(), "!"); 60if (!this.f) 61this.spellcounter = this.spellcounter - 1; 62if (!this.spellcounter) 63player:tell("The ", this:title(), " crumbles into dust!"); 64$recycler:_recycle(this); 65endif 66endif 67elseif (!valid(target)) 68player:tell("The target is invalid."); 69player:tell("The target must be armor or a weapon, and you must be carrying it."); 70return; 71else 72player:tell("No effect."); 73player:tell("The target must be armor or a weapon, and you must be carrying it."); 74return; 75endif