Book of Healing #111

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

Aliases: Book of Healing, healingbook

2 verbs · 20 properties · 0 children

Verbs

VerbSpecFlagsDefinerLines
ca*stthis on top of/on/onto/upon anyrxd#11139
titlethis none thisrxd#1111

Properties

PropertyDefinerFlagsOwnerValue
spellcounter#111rc#210
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#2100.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{"Book of Healing", "healingbook"}
description#1rc#2"[green]You see a book bound in leather with magical text.[normal] [Spell: Healing]"
object_size#1r#36{0, 0}

Ancestry

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

Children: none

Call graph

calls n111_0 #111:ca*st n6_18 #6:tell n111_0->n6_18 n111_1 #111:title n111_0->n111_1 n20_19 #20:match_object n111_0->n20_19 n52_0 #52:has_property n111_0->n52_0 n52_2 #52:has_verb n111_0->n52_2 n102_4 #102:title n111_0->n102_4 n63_1 #63:_recycle n111_0->n63_1

Source

ca*st

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

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"))
12target = player;
13endif
14if ((!$object_utils:has_property(target, "stats")) || (!$object_utils:has_verb(target, "take_health")))
15player:tell("The target is invalid!");
16return;
17endif
18if (target.stats_current[2][4] >= target.stats[2][4])
19player:tell("Target is at or above full health!");
20return;
21endif
22if ((target in player.location.contents) && (target.stats_current[2][4] < target.stats[2][4]))
23before = target.stats_current[2][4];
24target:take_health(10.0);
25healed = floatstr(target.stats_current[2][4] - before, 2);
26player:tell("You cast [yellow]Healing[normal] on ", target:title(), "!");
27player.location:announce(player:title(), " casts [yellow]Healing[normal] on ", target:title(), "!");
28target:tell(player:title(), " casts [yellow]Healing[normal] on you!");
29player:tell(target:title(), " gains ", healed, " health!");
30player.location:announce(target:title(), " gains ", healed, " health!");
31target:tell("You gain ", healed, " hit points!");
32if (!this.f)
33this.spellcounter = this.spellcounter - 1;
34if (!this.spellcounter)
35player:tell("The ", this:title(), " crumbles into dust!");
36$recycler:_recycle(this);
37endif
38endif
39endif

title

Spec this none thisFlags rxdOwner #2Definer #111

Referenced by

Source

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