generic clothing #117

Parent #108Owner #36Flags read, fertileSource QuestCore.db

Aliases: generic clothing, clothing

10 verbs · 36 properties · 0 children

Verbs

VerbSpecFlagsDefinerLines
titlethis none thisrxd#1175
shield_ratingthis none thisrxd#1173
d*rop th*rowthis none nonerxd#1177
removethis none nonerxd#11710
don wear holdthis none nonerd#11716
set_wornnessthis none thisrxd#11710
valuethis none thisrxd#1171
wear_msg remove_msg wearing_msg curse_msgthis none thisrxd#1171
movetothis none thisrxd#1172
look_selfthis none thisrxd#11714

Properties

PropertyDefinerFlagsOwnerValue
wornness#117r#360
armor#117r#360.5
cursed#117r#360
body_area#117rc#36"torso"
wear_msg#117rc#36"%N %<puts> on %p %t."
remove_msg#117rc#36"%N %<removes> %p %t."
wearing_msg#117rc#36"%S %<is/are> wearing %p %t."
curse_msg#117rc#36"%N %<struggles> desperately to remove %t, but without success."
help_msg#117rc#36"You can 'wear' armor to equip it."
learn#117rc#36{}
enchant_level#117rc#360
returning#108rc#36<clear>
how_long#108rc#36<clear>
been_told#108rc#36<clear>
home#108rc#36<clear>
child_limit#108rc#3636
recycle_at_death#108rc#36<clear>
drop_failed_msg#5rc#36<clear>
drop_succeeded_msg#5rc#36<clear>
odrop_failed_msg#5rc#36<clear>
odrop_succeeded_msg#5rc#36<clear>
otake_succeeded_msg#5rc#36<clear>
otake_failed_msg#5rc#36<clear>
take_succeeded_msg#5rc#36<clear>
take_failed_msg#5rc#36<clear>
value_base#102r#2<clear>
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#36<clear>
key#1c#360
aliases#1rc#36{"generic clothing", "clothing"}
description#1rc#36<clear>
object_size#1r#36{5666, -1090650497}

Ancestry

Ancestors (nearest first): #108 generic replicating & returning thing#5 generic thing#102 subthing#1 Root Class

Children: none

Call graph

calls n117_2 #117:d*rop n117_3 #117:remove n117_2->n117_3 n5_1 #5:dr*op n117_2->n5_1 n6_18 #6:tell n117_3->n6_18 n117_0 #117:title n117_3->n117_0 n1_4 #1:titlec n117_3->n1_4 n35_1 #35:say_action n117_3->n35_1 n117_7 #117:wear_msg n117_3->n117_7 n102_3 #102:ansi_title n117_7->n102_3 n20_15 #20:capitalize n117_7->n20_15 n117_4 #117:don n117_4->n6_18 n117_4->n117_0 n117_4->n35_1 n117_4->n117_7 n1_29 #1:contents n117_4->n1_29 n117_5 #117:set_wornness n117_4->n117_5 n117_8 #117:moveto n5_2 #5:moveto n117_8->n5_2 n117_9 #117:look_self n117_9->n6_18 n1_9 #1:description n117_9->n1_9 n6_79 #6:tell_lines n117_9->n6_79

Source

title

Spec this none thisFlags rxdOwner #36Definer #117

Referenced by

Source

1if (this.enchant_level > 0)
2return tostr("[purple]Enchanted ", this.name, " [+", tostr(this.enchant_level), "][normal]");
3else
4return this.name;
5endif

shield_rating

Spec this none thisFlags rxdOwner #36Definer #117

Referenced by

none

Source

1"Useful only if worn.";
2rating = this.cursed ? -1.0 * this.armor | this.armor;
3return this.wornness ? rating | 0.0;

d*rop th*row

Spec this none noneFlags rxdOwner #36Definer #117

Referenced by

none

Source

1if ((this.location == player) && this.wornness)
2this:remove(@args);
3endif
4if ((this.location == player) && this.cursed)
5return;
6endif
7pass(@args);

remove

Spec this none noneFlags rxdOwner #36Definer #117

Referenced by

Source

1if (this.location != player)
2player:tell("You don't have ", this:title(), ".");
3elseif (this.wornness == 0)
4player:tell(this:titlec(), " is not being worn.");
5elseif (this.cursed)
6$you:say_action(this:curse_msg());
7else
8this.wornness = 0;
9$you:say_action(this:remove_msg());
10endif

don wear hold

Spec this none noneFlags rdOwner #36Definer #117

Referenced by

none

Source

1"Check for similar item already worn";
2for x in (player:contents())
3if (ba = `x.body_area ! E_PROPNF => ""')
4if (x.wornness && (this.body_area == ba))
5return player:tell("You are already wearing ", x.name, " on your ", ba, ".");
6endif
7endif
8endfor
9if (this.location != player)
10player:tell("You don't have ", this:title(), ".");
11elseif (this.wornness == 1)
12player:tell(this.name, " is already being worn!");
13else
14$you:say_action(this:wear_msg());
15this:set_wornness(1);
16endif

set_wornness

Spec this none thisFlags rxdOwner #36Definer #117

Referenced by

Source

1if (args[1])
2this.wornness = 1;
3fork (2)
4if (`!this.location.gender ! E_PROPNF => 1')
5this.wornness = 0;
6endif
7endfork
8else
9this.wornness = 0;
10endif

value

Spec this none thisFlags rxdOwner #36Definer #117

Referenced by

none

Source

1return tofloat(this.value_base);

wear_msg remove_msg wearing_msg curse_msg

Spec this none thisFlags rxdOwner #36Definer #117

Referenced by

Source

1return $string_utils:subst(this.(verb), {{"%t", this:ansi_title()}, {"%T", $string_utils:capitalize(this:ansi_title())}}, 1);

moveto

Spec this none thisFlags rxdOwner #36Definer #117

Referenced by

none

Source

1this.wornness = 0;
2pass(@args);

look_self

Spec this none thisFlags rxdOwner #2Definer #117

Referenced by

none

Source

1desc = this:description();
2if (desc)
3player:tell_lines(desc);
4if (this.enchant_level)
5player:tell("");
6player:tell("Enchantment Level ", tostr(this.enchant_level));
7endif
8else
9player:tell("You see nothing special.");
10if (this.enchant_level)
11player:tell("");
12player:tell("Enchantment Level ", tostr(this.enchant_level));
13endif
14endif