generic corpse #2803

Parent #9338Owner Flags Source rpg_march_2006/corpse.txt

Aliases: generic corpse, corpse

8 verbs · 16 properties · 0 children

Verbs

VerbSpecFlagsDefinerLines
set_victimthis none this#28037
acceptthis none thisrx#28032
rot_msgthis none this#28032
look_selfthis none this#280324
tell_contentsthis none this#28037
rotthis none thisrx#280319
maybe_rotthis none thisrx#28037
notify_arrivalthis none thisrx#28033

Properties

PropertyDefinerFlagsOwnerValue
help_msg#2803rc
value (441 chars){" ", "-- Brief overview of properties and verbs.", " ", ".victim -- Who is this pile of worm meal?", ".time_of_death -- When victim expired.", " ", ":set_victim(victim) -- What it says.", ":accept(what) -- Only accept objects on victim's person.", ":rot() -- Get rid of the corpse.", ":look_self() -- Maybe show how long it's been dead.", ":tell_contents() -- Neat display of loot."}
victim#2803r#-1
time_of_death#2803r949683881
is_corpse#2803r1
lookers#2803not readable (E_PERM)
store_action#2803"store"
manufactured#2803923451666
worth#2803-1
condition#2803E_NONE
odrop_failed_msg#2803"%<tries> to drop %t but fails!"
odrop_succeeded_msg#2803"%<drops> %t."
otake_succeeded_msg#2803"%<picks> up %t."
key#2803not readable (E_PERM)
aliases#2803{"generic corpse", "corpse"}
description#2803"The prototype of all festering corpses. Man--it really stinks."
object_size#2803{6122, 1141286558}

Ancestry

Ancestors (nearest first): #9338 generic RPG container#2409 LRPG Adventuring Gear#112297 Generic Dyable LRPG Thing#517 Generic LRPG Thing

Children: none

Call graph

calls n2803_3 #2803:look_self n9338_3 #9338:look_self n2803_3->n9338_3 n2803_5 #2803:rot n2803_2 #2803:rot_msg n2803_5->n2803_2 n517_30 #517:moveto n2803_5->n517_30 n2803_6 #2803:maybe_rot n2803_6->n2803_5 n2803_7 #2803:notify_arrival n2803_7->n2803_6

Source

set_victim

Spec this none thisDefiner #2803

Referenced by

none

Source

1":set_victim(OBJ character)";
2"Set whose soul this corpse previously contained.";
3if (!$local.rpg:trusted(caller_perms()))
4  return E_PERM;
5else
6  return this.victim = args[1];
7endif

accept

Spec this none thisFlags rxDefiner #2803

Referenced by

none

Source

1"Accept items from `victim', or those belonging to victim's owner.";
2return ((!valid(victim = this.victim)) || (args[1].location == victim)) || $perm_utils:controls(victim.owner, args[1]);

rot_msg

Spec this none thisDefiner #2803

Referenced by

Source

1":rot_msg() -- Messaged displayed when this corpse rots.";
2return this:title() + " collapses into dust and blows away in the wind.";

look_self

Spec this none thisDefiner #2803

Referenced by

none

Source

1pass(@args);
2saw = 0;
3time = time();
4recent = 0;
5newlookers = {};
6for n in (this.lookers)
7  if (n[2] > (time - 600))
8    if (n[1] == player)
9      recent = 1;
10      saw = n[3];
11    else
12      newlookers = {@newlookers, n};
13    endif
14  endif
15endfor
16if ((!recent) && ($local.rpg:resolve(player, "notice", -35) > 0))
17  saw = 1;
18endif
19this.lookers = {@newlookers, {player, time, saw}};
20if (saw)
21  player:tell("Your master forensic sense tells you that the unfortunate victim has been dead for about ", $string_utils:from_seconds(time() - this.time_of_death), ".");
22else
23  player:tell("Thousands of hours of `Quincy' reruns tell you that the unfortunate victim has been dead for about ", $string_utils:from_seconds(random(time())), ".");
24endif

tell_contents

Spec this none thisDefiner #2803

Referenced by

none

Source

1":tell_contents([contents]) -- Show the loot.";
2if (c = args ? args[1] | this:contents())
3  player:tell("Scattered around and upon the dead body you spot ", $string_utils:title_list(c), ".");
4else
5  player:tell("Hmm.  No loot around.  Maybe you CAN take it with you.");
6endif
7"Quinn 01-DEC-93 0407: Added provision for no loot.";

rot

Spec this none thisFlags rxDefiner #2803

Referenced by

Source

1":rot_corpse() -- Rot this corpse and all it contains.";
2rpg = $local.rpg;
3if (!rpg:trusted(caller_perms()))
4  return E_PERM;
5endif
6rpg:rpg_announce_all(this.location, this:rot_msg());
7stickit = rpg.cemetery;
8for loot in (this:contents())
9  loot:moveto(stickit);
10endfor
11if (this.owner != rpg.owner)
12  this:moveto($nothing);
13elseif (verbs(this) || properties(this))
14  return E_NACC;
15else
16  rpg.recycler:_recycle(this);
17endif
18"StarDancer 2-DEC-95 changed line 7 so all the stuff on the corpse goes to #1131. Also put :room_announce inside a fork so's it won't die if there're too many Ahabs inna room.";
19"Profane 1-DEC-96 1225PST -- nuke fork, put in rpg_announce_all";

maybe_rot

Spec this none thisFlags rxDefiner #2803

Referenced by

Source

1":maybe_rot()";
2"Rot if the .victim belonging to this corpse is .alive.";
3if (this.victim.alive || (this.victim.body != this))
4  fork (0)
5    this:rot();
6  endfork
7endif

notify_arrival

Spec this none thisFlags rxDefiner #2803

Referenced by

none

Source

1":notify_arrival(who, exit)";
2this:maybe_rot();
3return pass(@args);