Book of Knowledge #136

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

Aliases: Book of Knowledge, knowledgebook

2 verbs · 20 properties · 0 children

Verbs

VerbSpecFlagsDefinerLines
titlethis none thisrxd#1361
ca*stthis on top of/on/onto/upon anyrxd#13645

Properties

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

Ancestry

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

Children: none

Call graph

calls n136_1 #136:ca*st n6_18 #6:tell n136_1->n6_18 n136_0 #136:title n136_1->n136_0 n20_19 #20:match_object n136_1->n20_19 n52_0 #52:has_property n136_1->n52_0 n102_4 #102:title n136_1->n102_4 n63_1 #63:_recycle n136_1->n63_1

Source

title

Spec this none thisFlags rxdOwner #2Definer #136

Referenced by

Source

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

ca*st

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

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")) || (target == player))
12player:tell("You cannot target yourself with this spell!");
13return;
14endif
15if ((target == $failed_match) || (!$object_utils:has_property(parent(target), "learn")))
16player:tell("The target is invalid!");
17return;
18endif
19if (!parent(target).learn)
20player:tell("Target does not have any information!");
21return;
22endif
23if ((target in player.location.contents) && parent(target).learn)
24player:tell("You cast [yellow]Knowledge[normal] on ", target:title(), "!");
25player.location:announce(player:title(), " casts [yellow]Knowledge[normal] on ", target:title(), "!");
26target:tell(player:title(), " casts [yellow]Knowledge[normal] on you!");
27player.knowledge = setadd(player.knowledge, tostr("~ Knowledge of ", parent(target).name, " ~"));
28player:tell("");
29for b in (parent(target).learn)
30player.knowledge = setadd(player.knowledge, tostr(b));
31player:tell("[purple]", b, "[normal]");
32endfor
33player:tell("");
34player.knowledge = setadd(player.knowledge, tostr("~ End of Knowledge of ", parent(target).name, " ~"));
35player:tell("You gain knowledge of ", target:title(), "!");
36player.location:announce(target:title(), " gains knowledge of ", target:title(), "!");
37target:tell("You have gained knowledge of ", target:title(), "!");
38if (!this.f)
39this.spellcounter = this.spellcounter - 1;
40if (!this.spellcounter)
41player:tell("The ", this:title(), " crumbles into dust!");
42$recycler:_recycle(this);
43endif
44endif
45endif