Scroll of Power #166

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

Aliases: Scroll of Power, powerscroll

2 verbs · 19 properties · 0 children

Verbs

VerbSpecFlagsDefinerLines
titlethis none thisrxd#1661
ca*stthis on top of/on/onto/upon anyrxd#16637

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#260.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 Power", "powerscroll"}
description#1rc#2"[green]You see a paper scroll with magical writing on it.[normal] [Spell: Power]"
object_size#1r#36{0, 0}

Ancestry

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

Children: none

Call graph

calls n166_1 #166:ca*st n6_18 #6:tell n166_1->n6_18 n166_0 #166:title n166_1->n166_0 n20_19 #20:match_object n166_1->n20_19 n52_0 #52:has_property n166_1->n52_0 n102_4 #102:title n166_1->n102_4 n63_1 #63:_recycle n166_1->n63_1

Source

title

Spec this none thisFlags rxdOwner #2Definer #166

Referenced by

Source

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

ca*st

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

Referenced by

none

Source

1if ((this in player.contents) && (player.stats_current[2][3] >= 13.0))
2player:tell("You prepare to cast ", this:title(), "[normal]...");
3elseif (player.stats_current[2][3] < 13.0)
4player:tell("You do not have a high enough INT ability! This spell requires at least 13.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"))
12target = player;
13endif
14if (!$object_utils:has_property(target, "stats"))
15player:tell("The target is invalid!");
16return;
17endif
18if ((target in player.location.contents) && target.alive)
19before = target.stats_current[2][1];
20target.stats_current[2][1] = target.stats_current[2][1] + 4.0;
21player:tell("You cast [yellow]Power[normal] on ", target:title(), "!");
22player.location:announce(player:title(), " casts [yellow]Power[normal] on ", target:title(), "!");
23target:tell(player:title(), " casts [yellow]Power[normal] on you!");
24player:tell(target:title(), " receives +4 to Strength!");
25player.location:announce(target:title(), " receives +4 to Strength!");
26target:tell("You receive +4 to Strength!");
27fork (180)
28target.stats_current[2][1] = before;
29player:tell("The [yellow]Power[normal] spell cast on ", target:title(), " wears off!");
30target.location:announce("The [yellow]Power[normal] spell cast on ", target:title(), " wears off!");
31target.location:announce("The [yellow]Power[normal] spell ", player:title(), " cast on you wears off!");
32endfork
33if (!this.f)
34player:tell("The ", this:title(), " vaporizes in your hand!");
35$recycler:_recycle(this);
36endif
37endif