subthing #102

Parent #1Owner #2Flags read, fertileSource RPG Core/rpgcore-patched.db

Aliases: subthing

7 verbs · 12 properties · 4 children

Verbs

VerbSpecFlagsDefinerLines
valuethis none thisrxd#1021
init_for_corethis none thisrxd#1027
wieldthis none nonerxd#10222
ansi_titlethis none thisrxd#1021
titlethis none thisrxd#1021
help_msgthis none thisrxd#1029
command-list list-com*mands coml*ist comml*ist lc clnone none nonerd#1021

Properties

PropertyDefinerFlagsOwnerValue
value_base#102r#20.0
damage_base#102r#20.0
x_loc#102r#361
y_loc#102r#361
ansi_title#102r#36{}
obvious#102r#361
build_help#102rc#36{}
key#1c#20
aliases#1rc#2{"subthing"}
description#1rc#2<clear>
object_size#1r#36{4303, -1090650497}
html#1rc#2<clear>

Ancestry

Ancestors (nearest first): #1 Root Class

Children: #5 generic thing, #6 generic player, #94 Generic Gendered Object, #126 Generic Language

Call graph

calls n102_1 #102:init_for_core n1_28 #1:init_for_core n102_1->n1_28 n102_2 #102:wield n6_10 #6:notify n102_2->n6_10 n26_36 #26:round n102_2->n26_36 n35_1 #35:say_action n102_2->n35_1 n1_15 #1:moveto n102_2->n1_15 n6_18 #6:tell n102_2->n6_18 n102_3 #102:ansi_title n55_16 #55:slice n102_3->n55_16 n102_4 #102:title n102_4->n102_3 n102_6 #102:command-list n1_13 #1:tell_lines n102_6->n1_13 n20_4 #20:columnize n102_6->n20_4

Source

value

Spec this none thisFlags rxdOwner #2Definer #102

Referenced by

none

Source

1return this.value_base;

init_for_core

Spec this none thisFlags rxdOwner #2Definer #102

Referenced by

Source

1if (caller_perms().wizard)
2if (this == $subthing)
3this.value_base = 0.0;
4this.damage_base = 0.0;
5endif
6return pass(@args);
7endif

wield

Spec this none noneFlags rxdOwner #2Definer #102

Referenced by

none

Source

1if ((this in player.contents) || (this in player.location:contents()))
2if (``this.weapon ! E_PROPNF => 0' && valid(`player.wielded ! E_PROPNF') ! ANY => 0')
3if (player.wielded == this)
4player:notify("You're already wielding that.");
5elseif (((dex = player.stats_current[2][2]) < 3.0) && (random($math_utils:round(dex)) == 1))
6$you:say_action("%N %<attempts> to wield %t but %<drops> it instead, hurting %r in the process.");
7player:take_hit(this.damage_base * 0.5);
8else
9player.wielded = this;
10this:moveto(player);
11if (this in player.contents)
12$you:say_action("%N %<wields> %t.");
13else
14player:notify("You can't get that.");
15endif
16endif
17else
18player:notify("That would not make a useful weapon.");
19endif
20else
21player:tell("You find no \"", dobjstr, "\" around.");
22endif

ansi_title

Spec this none thisFlags rxdOwner #2Definer #102

Referenced by

Source

1return (x = this.name in $list_utils:slice(this.ansi_title, 1)) ? this.ansi_title[x][2] | this.name;

title

Spec this none thisFlags rxdOwner #2Definer #102

Referenced by

Source

1return this.ansi_title ? this:ansi_title() | this.name;

help_msg

Spec this none thisFlags rxdOwner #2Definer #102

Referenced by

Source

1msg = {};
2if (`this.help_msg ! E_PROPNF => 0')
3msg = (typeof(this.help_msg) == LIST) ? {@this.help_msg, "---"} | {this.help_msg, "---"};
4endif
5if (`this.build_help ! E_PROPNF => 0' && (!(parent(player) in {$rpgamer, $guest})))
6msg = (typeof(this.build_help) == LIST) ? {@msg, @this.build_help, "---"} | {@msg, this.build_help, "---"};
7endif
8msg = (`this.help_msg != parent(this).help_msg ! E_PROPNF => 0' || (`this.build_help != parent(this).build_help ! E_PROPNF => 0' && (!(parent(player) in {$rpgamer, $guest})))) ? {@msg, tostr("Try \"help ", parent(this), "\" also.")} | msg;
9return msg || 0;

command-list list-com*mands coml*ist comml*ist lc cl

Spec none none noneFlags rdOwner #36Definer #102

Referenced by

none

Source

1`this:tell_lines($string_utils:columnize($rpg_help.comlist, 2)) ! E_VERBNF => {""}';