Scroll of Enchantment #147

Parent #5Owner #2Flags read, fertileSource QuestCore.db

Aliases: Scroll of Enchantment, enchantmentscroll

2 verbs · 19 properties · 0 children

Verbs

VerbSpecFlagsDefinerLines
titlethis none thisrxd#1471
ca*stthis on top of/on/onto/upon anyrxd#14767

Properties

PropertyDefinerFlagsOwnerValue
drop_failed_msg#5rc#2<clear>
drop_succeeded_msg#5rc#2<clear>
odrop_failed_msg#5rc#2<clear>
odrop_succeeded_msg#5rc#2<clear>
otake_succeeded_msg#5rc#2<clear>
otake_failed_msg#5rc#2<clear>
take_succeeded_msg#5rc#2<clear>
take_failed_msg#5rc#2<clear>
value_base#102r#250.0
damage_base#102r#2<clear>
x_loc#102r#36<clear>
y_loc#102r#36<clear>
ansi_title#102r#36<clear>
obvious#102r#36<clear>
build_help#102rc#2<clear>
key#1c#20
aliases#1rc#2{"Scroll of Enchantment", "enchantmentscroll"}
description#1rc#2"[green]You see a paper scroll with magical writing on it.[normal] [Spell: Enchantment]"
object_size#1r#36{0, 0}

Ancestry

Ancestors (nearest first): #5 generic thing#102 subthing#1 Root Class

Children: none

Call graph

calls n147_1 #147:ca*st n6_18 #6:tell n147_1->n6_18 n147_0 #147:title n147_1->n147_0 n20_19 #20:match_object n147_1->n20_19 n52_0 #52:has_property n147_1->n52_0 n102_4 #102:title n147_1->n102_4 n63_1 #63:_recycle n147_1->n63_1

Source

title

Spec this none thisFlags rxdOwner #2Definer #147

Referenced by

Source

1return tostr("[yellow]", this.name, "[normal]");

ca*st

Spec this on top of/on/onto/upon anyFlags rxdOwner #2Definer #147

Referenced by

none

Source

1if ((this in player.contents) && (player.stats_current[2][3] >= 11.0))
2player:tell("You prepare to cast ", 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)
30player:tell("The ", this:title(), " vaporizes in your hand!");
31$recycler:_recycle(this);
32endif
33return;
34elseif (((target in player.contents) && $object_utils:has_property(target, "weapon")) && target.shoots)
35target.projectile_dam = target.projectile_dam + 1.0;
36target.enchant_level = target.enchant_level + 1;
37target.value_base = target.value_base + 20.0;
38player:tell("You cast [yellow]Enchantment[normal] on ", target:title(), "!");
39player.location:announce(player:title(), " casts [yellow]Enchantment[normal] on ", target:title(), "!");
40player:tell("Your ", target:title(), " gets +1.0 to Projectile Damage!");
41player.location:announce(player:title(), " enchants ", player.pp, " ", target:title(), "!");
42if (!this.f)
43player:tell("The ", this:title(), " vaporizes in your hand!");
44$recycler:_recycle(this);
45endif
46elseif (((target in player.contents) && $object_utils:has_property(target, "weapon")) && (!target.shoots))
47target.damage_base = target.damage_base + 1.0;
48target.enchant_level = target.enchant_level + 1;
49target.value_base = target.value_base + 20.0;
50player:tell("You cast [yellow]Enchantment[normal] on ", target:title(), "!");
51player.location:announce(player:title(), " casts [yellow]Enchantment[normal] on ", target:title(), "!");
52player:tell("Your ", target:title(), " gets +1.0 to Damage!");
53player.location:announce(player:title(), " enchants ", player.pp, " ", target:title(), "!");
54if (!this.f)
55player:tell("The ", this:title(), " vaporizes in your hand!");
56$recycler:_recycle(this);
57return;
58endif
59elseif (!valid(target))
60player:tell("The target is invalid.");
61player:tell("The target must be armor or a weapon, and you must be carrying it.");
62return;
63else
64player:tell("No effect. The ", this:title(), " is still in your inventory.");
65player:tell("The target must be armor or a weapon, and you must be carrying it.");
66return;
67endif