generic monster #259
Aliases: generic monster, monster
70 verbs · 39 properties · 1 children
Verbs
Properties
| Property | Definer | Flags | Owner | Value |
|---|---|---|---|---|
locations | #259 | rc | — | {"head", "left arm", "right arm", "chest", "neck", "abdomen", "right hand", "left hand", "right leg", "left leg", "left foot", "right foot"} |
doll | #259 | r | — | #-1 |
alive | #259 | r | — | 0 |
body | #259 | r | — | #-3 |
animal | #259 | r | — | 0 |
cemetery | #259 | rc | — | #1131 |
gestate | #259 | rc | — | 1000 |
die_words | #259 | rc | — | 0 |
nat_prot | #259 | rc | — | 0 |
mine | #259 | r | — | {} |
mine_quality | #259 | rc | — | 100 |
corpse_msg | #259 | rc | — | "A stinking pile of flesh and bone meal. Worms crawl in and out of the hollow orbits of %p naked skull, squirming in the goo that was once %p mind." |
magic_resist | #259 | rc | — | 0 |
generic_equipment | #259 | r | — | {} |
special_equipment | #259 | r | — | {} |
default_cast_msg | #259 | rc | — | "%N %<waves> %p arms and %<mutters> weird syllables." |
spell_deflection_msg | #259 | rc | — | "%N %<deflects> the spell with an occult gesture." |
flags | #259 | r | — | {} |
initial_props | #259 | | — | not readable (E_PERM) |
initial_levels | #259 | | — | not readable (E_PERM) |
last_attacker | #259 | r | — | #2 |
money | #259 | | — | not readable (E_PERM) |
spell_immunities | #259 | | — | not readable (E_PERM) |
props_to_clear_upon_death | #259 | r | — | value (216 chars){"wielding", "wearing", "aggressor", "misc_notes", "combat_effects", "magic_effects", "connect_effects", "casting_effects", "freeze_effects", "view_effects", "armour_effects", "schedule", "att_schedule", "paralyzed"} |
item_get_msg | #259 | rc | — | "You fill the %[dname] with %[tvial_name] from the %t." |
item_oget_msg | #259 | rc | — | "%N fills the %[dname] with %[tvial_name] from the %t." |
item_get_empty_msg | #259 | rc | — | "You attempt to fill the %[dname] with %[tvial_name] from %t, but %t holds no more %[tvial_name]." |
item_oget_empty_msg | #259 | rc | — | "%N %<attempts> to fill the %[dname] with %[tvial_name] from %t, but %t holds no more %[tvial_name]." |
corpse_name | #259 | rc | — | 0 |
vial_item | #259 | rc | — | {#6468} |
seek_failed_msg | #259 | | — | "%n bounces off a topographical barrier." |
home2 | #259 | | — | #175 |
home | #259 | | — | #175 |
brief | #259 | | — | 1 |
simulating | #259 | | — | 0 |
listen_actions | #259 | | — | {} |
key | #259 | | — | not readable (E_PERM) |
aliases | #259 | | — | {"generic monster", "monster"} |
object_size | #259 | | — | {61307, 1141286558} |
Ancestry
Ancestors (nearest first): #7680 Generic Puppet
Children: #5430 Generic Follower
Call graph
Showing 48 of 49 verbs; 1 not shown.
Source
act
Referenced by
none
Source
1if (this.alive) 2 $local.rpg:secure(); 3 doll = this.doll; 4 if ((typeof(doll.aggressor) == LIST) && doll.aggressor) 5 return (!doll:cannot_attack()) && doll:hit_aggressor(); 6 else 7 return (!doll:cannot_move()) && this:procrastinate(); 8 endif 9endif 10return $nothing; 11"THX1138 15-Apr-1997 -- Upgraded security and saved a few ticks."; 12"Profane (#30788) - Tue Mar 9, 1999 - added paralysis checks.";
acceptable
Referenced by
none
Source
1{what} = args; 2rpg = $local.rpg; 3return (what in this.mine) || ((caller_perms() in rpg.gms) && rpg.object_db:is_thing(what)); 4"return (args[1] in this.mine) || ((caller_perms() in $local.rpg.gms) && $object_utils:isa(args[1], $local.rpg.thing));"; 5"THX (#105941) - Fri Apr 20, 2001 - Upgrade.";
duty
Referenced by
- #259:birth line 11:
this:duty
Source
1"Duty the monster."; 2"- check objects in minelist, returning unique ones and replacing others."; 3"- set condition of all weapons in the minelist."; 4"- wield any weapons and/or armour in the minelist."; 5"- dispose of the corpse (if any)."; 6"- send the monster to its home."; 7(rpg = $local.rpg):secure_x(); 8if (valid(doll = this.doll) && (parent(doll) != $garbage)) 9 doll.aggressor = doll.wielding = doll.wearing = {}; 10 rpg:s_i_n(); 11 this:check_mine(); 12 this:prime_mine(); 13 rpg:s_i_n(); 14 this:equip_mine(); 15 this:wealth_mine(); 16 this:rot_corpse(); 17 this.alive = 1; 18 this:go_home(); 19 if (!callers()) 20 player:tell($string_utils:nn(this), " on duty in ", $string_utils:nn(this.location), "."); 21 endif 22else 23 return E_NONE; 24endif
look_self
Referenced by
none
Source
1pass(@args); 2if (this.animal) 3 this:look_health(); 4 this:look_gear(); 5else 6 this:tell_contents(this:contents()); 7 this:look_health(); 8 this:look_gear(); 9endif 10"DR 04-AUG-94 -- Change in order to make NPCs look more like players.";
armour
Referenced by
none
Source
1":armour(penetration, hit-location[, attacker, weapon-used, damage])"; 2return (this.nat_prot * args[1]) + this.doll:protection(@args); 3"THX1138 15-Apr-1997 -- Copied old verb to armour(old) and sped the thing up.";
abort
Referenced by
- #259:recycle line 5:
this:abort
Source
1"abort <monster> -- Kill the monster's doll."; 2rpg = $local.rpg; 3who = callers() ? caller_perms() | player; 4if (caller == this) 5elseif (!(who in {@rpg.grand_masters, this.owner})) 6 return E_PERM; 7endif 8s_u = $string_utils; 9if (valid(doll = rpg:get_doll(this))) 10 rpg.recycler:_recycle(doll); 11 msg = s_u:nn(this) + " is no longer alive."; 12else 13 msg = s_u:nn(this) + " is not alive."; 14endif 15if (!callers()) 16 who:tell(msg); 17 check = $object_utils:all_contents(this); 18 for t in ({@this.mine, @this.special_equipment}) 19 check = setadd(check, t); 20 endfor 21 for t in (check) 22 `t.unique ! ANY => 0' || (check = setremove(check, t)); 23 endfor 24 check && who:tell(s_u:nn(this), " has unique items in its possession. Please check the following carefully: ", s_u:nn(check)); 25endif 26this.doll = $nothing; 27this.alive = 0;
recycle
Referenced by
none
Source
1"Abort a rebirth and recalculate list of monsters."; 2if ((caller != this) && (!$perm_utils:controls(caller_perms(), this))) 3 return E_PERM; 4endif 5this:abort(); 6if (this.owner in $local.rpg.gms) 7 fork (0) 8 $local.rpg.vacuum:update_monsters(); 9 endfork 10endif 11return pass(@args);
moveto
Referenced by
- #259:go_home line 10:
this:moveto - #259:go_home line 14:
this:moveto - #259:go_home line 17:
this:moveto - #259:go_home line 21:
this:moveto - #259:die line 43:
this:moveto - #5430:notify_exit line 8:
this:moveto
Source
1if ((rpg = $local.rpg):trusted(caller_perms())) 2elseif ((caller == this) || $perm_utils:controls(caller_perms(), this)) 3elseif (rpg:trusted(caller.owner) && (((typeof(source = `caller.source ! E_PROPNF, E_PERM => 0') == OBJ) && valid(source)) ? source == this.location | 1)) 4else 5 return E_PERM; 6endif 7p = pass(@args); 8if (this.alive) 9 this:ok_alive_loc(this.location) || this:go_home(); 10endif 11return p;
procrastinate
Referenced by
- #259:act line 7:
this:procrastinate
Source
1if ($local.rpg:trusted(caller_perms()) && valid(doll = this.doll)) 2 doll.act = 0; 3endif 4return $nothing;
look_gear
Referenced by
- #259:look_self line 4:
this:look_gear - #259:look_self line 8:
this:look_gear
Source
1if ((this.animal in {"phantom", "corpse"}) || (!this.animal)) 2 $local.rpg:look_gear(this, @args); 3endif
initialize
Referenced by
none
Source
1":initialize() -- Update the monster population in ~vacuum."; 2if ((caller != this) && (!$perm_utils:controls(caller_perms(), this))) 3 return E_PERM; 4endif 5rpg = $local.rpg; 6if (this.owner in rpg.gms) 7 fork (0) 8 rpg.vacuum:update_monsters(); 9 endfork 10endif 11this.doll = $nothing; 12"this.rebirth_task = 0;"; 13return pass(@args); 14"Profane 17-APR-97 -- ensure .doll is invalid";
notify_attack notify_aggression notify_death notify_arrival notify_exit notify_hit notify_miss notify_dodge notify_parry notify_bully notify_salute
Referenced by
- #5430:notify_exit line 3:
pass(
Source
1":notify_attack(OBJ attacker, OBJ defender[, OBJ weapon])"; 2"-- Whenever someone is attacked."; 3":notify_aggression(OBJ attacker, OBJ defender[, OBJ weapon])"; 4"-- The first time someone is attacked."; 5":notify_death(OBJ victim[, OBJ killer])"; 6"-- When someone is killed."; 7""; 8":notify_arrival(OBJ who, OBJ exit)"; 9":notify_exit(OBJ who, OBJ exit)"; 10"-- When someone enters or leaves the room. If they teleported, `exit' will be $nothing."; 11""; 12":notify_payment(OBJ from, NUM amount, STR denomination, NUM worth)"; 13"-- When someone gives money to your monster. `worth' is the unit worth of the given denomination. Multiple that value by `amount' to get the full worth of the transaction."; 14""; 15"notify_hit(OBJ attacker, OBJ defender, OBJ weapon, STR location, NUM|STR severity, NUM damage)"; 16"notify_miss(OBJ attacker, OBJ defender[, OBJ weapon])"; 17"notify_dodge(OBJ attacker, OBJ defender[, OBJ weapon])"; 18"notify_parry(OBJ attacker, OBJ defender[, OBJ weapon])"; 19"notify this monster that one of the above has occurred."; 20"notify_bully(OBJ bully, OBJ bully-ee, OBJ weapon)"; 21"-- When someone uses `bully monster with <weapon>'"; 22"notify_salute(OBJ saluter, OBJ salutee, OBJ armour)"; 23"-- When someone salutes this in some way with their headgear. For practical application, an example might be checking for the default salute_msg, which a monster might recognize as courtesy and react in kind."; 24return;
location
Referenced by
none
Source
1return this.location;
sub_mine
Referenced by
none
Source
1"HACKED by Quinn (a little too late) 22-APR-93. No longer needs wizperms."; 2if ((caller_perms() == #259.owner) && (p = args[1] in (mine = this.mine))) 3 this:set_mine(listset(mine, args[2], p)); 4endif
is_controllable_by
Referenced by
- #259:set_body line 14:
this:is_controllable_by - #259:set_generic_equipment line 5:
this:is_controllable_by - #259:set_special_equipment line 3:
this:is_controllable_by
Source
1":is_controllable_by(caller_perms())"; 2return $perm_utils:controls(p = args[1], this) || $local.rpg:is_grandmaster(p);
tell_contents
Referenced by
- #259:look_self line 6:
this:tell_contents
Source
1":tell_contents(list)"; 2"Called from :look_self()"; 3c = args[1]; 4if ($recycler:valid(doll = this.doll)) 5 "These things have already been shown by 'look_gear'"; 6 for each_thing in ({@doll:wielding(), @doll.wearing}) 7 c = setremove(c, each_thing); 8 endfor 9endif 10if (c) 11 longear = gear = {}; 12 width = player:linelen(); 13 half = width / 2; 14 player:tell("Carrying:"); 15 for thing in (c) 16 cx = tostr(" ", thing:title()); 17 if (length(cx) > half) 18 longear = {@longear, cx}; 19 else 20 gear = {@gear, cx}; 21 endif 22 endfor 23 player:tell_lines($string_utils:columnize(gear, 2, width)); 24 player:tell_lines(longear); 25endif 26"Profane 26-APR-97 1248PDT -- s/valid/$recycler:valid";
get_body_area_name
Referenced by
none
Source
1":get_body_area_name(OBJ body_area)"; 2if ((names = this.locations) == $local.rpg.monster.locations) 3 return E_NONE; 4elseif (i = args[1] in this.doll.body_areas) 5 return names[i]; 6else 7 return E_NONE; 8endif
go_home
Referenced by
- #259:duty line 18:
this:go_home - #259:moveto line 9:
this:go_home - #259:moveto(old) line 5:
this:go_home
Source
1":go_home() -- Send the monster home."; 2"If the home's an exit, :move it through. Else just move it into the room."; 3(rpg = $local.rpg):secure(); 4if (!valid(home = this.home)) 5 this.owner:tell(this.name, " (", this, ") is homeless."); 6elseif (this.location == home) 7 "It's *already* home, no need to do anything."; 8 return; 9elseif ($object_utils:isa(home, $exit)) 10 valid(this.location) || this:moveto(rpg.cemetery.turf[1]); 11 (this.location == `home.dest ! E_PERM') || home:move(this); 12else 13 try 14 home:acceptable(this) && this:moveto(home); 15 if (this.location != home) 16 this.owner:tell(this.name, " (", this, "):go_home() fails because its home is not accepting it. Player: ", #20:nn(player), " Callers: ", toliteral(callers(1)), " Current location: ", #20:nn(this.location)); 17 this:moveto(rpg.cemetery.turf[1]); 18 endif 19 except e (ANY) 20 this.owner:tell(this.name, " (", this, "):go_home() fails with ", e[2]); 21 this:moveto(rpg.cemetery.turf[1]); 22 endtry 23endif 24"Hannibal 9/9/99 - Added try statement and home:acceptable(this) check";
equip_mine
Referenced by
- #259:duty line 14:
this:equip_mine
Source
1":equip_mine()"; 2"Loop through the monster's mine list, wearing and wielding what it can."; 3(rpg = $local.rpg):secure(); 4hands = (doll = this.doll).hands; 5{weapon, armour, hand_and_a_half, natural_weapon, vacuum} = {rpg.weapon, rpg.armour, rpg.hand_and_a_half, rpg.natural_weapon, rpg.vacuum}; 6size = doll.size; 7for foo in (this.mine) 8 if (valid(foo) && (parent(foo) != $garbage)) 9 if (foo.location != this) 10 foo:moveto(this); 11 endif 12 anc = rpg:parents(foo); 13 if (hand_and_a_half in anc) 14 foo:((hands == 1) ? "one" | "two")(); 15 elseif ((natural_weapon in anc) && (this:get_iprop("natural_weapons") == E_PROPNF)) 16 doll.natural_weapons = setremove(doll.natural_weapons, rpg.fists); 17 doll.natural_weapons = setadd(doll.natural_weapons, foo); 18 endif 19 if ((weapon in anc) && (hands >= foo:hands(this, $nothing))) 20 hands = hands - foo:hands(this, $nothing); 21 doll.wielding = setadd(doll.wielding, foo); 22 foo:do_wield(this); 23 elseif (armour in anc) 24 doll.wearing = setadd(doll.wearing, foo); 25 foo:do_wear(this); 26 if (size != 10) 27 (vacuum:unique(foo) || ((foo.worn_area in {"necklace", "amulet"}) && (size > 5))) || (foo.size = (foo.size * size) / 10); 28 endif 29 endif 30 rpg:s_i_f_i_n(); 31 else 32 this.mine = setremove(this.mine, foo); 33 endif 34endfor 35"Profane (#30788) - Tue Apr 20, 1999 - changed .hands to :hands() line 18-19"; 36"THX (#105941) - Tue Apr 25, 2000 - Added a hickety hack to size the monster's armour up/down to its size as needed.";
prime_mine
Referenced by
- #259:duty line 12:
this:prime_mine
Source
1":prime_mine()"; 2"Prepare this monster's equipment to be readied. Right now, this just means setting the `condition' of everything to `mine_quality'."; 3(rpg = $local.rpg):secure(); 4qual = this.mine_quality; 5for foo in (this.mine) 6 if (((typeof(old = `foo.condition ! E_PROPNF => E_PROPNF') == NUM) && (old != qual)) && (!(foo.unique && (foo in this.generic_equipment)))) 7 foo:set_condition(qual); 8 endif 9endfor
rot_corpse
Referenced by
- #259:duty line 16:
this:rot_corpse
Source
1":rot_corpse() -- Rot this monster's corpse, if it exists and is a child of $local.rpg.corpse."; 2(rpg = $local.rpg):secure(); 3body = this.body; 4if (body in rpg.object_db.generic_corpses) 5elseif (!body.is_corpse) 6 this:set_body(valid(body) ? rpg.corpse | $failed_match); 7 return E_NONE; 8else 9 body:rot(); 10 this:set_body($recycler:valid(this.body) ? this.body | rpg.corpse); 11endif 12"Quinn 01-DEC-93 0244: Added."; 13"Quinn 03-DEC-93 0114: Added :set_body call so you get a corpse more than just once."; 14"StarDancer 16-DEC-95 added 'nother :set_body call so's a swept corpse 'll get put back too."; 15"THX (#105941) - Thu Apr 19, 2001 - Changed 1's to rpg.corpse";
announce_death
Referenced by
- #259:die line 41:
this:announce_death
Source
1":announce_death([killer])"; 2"Announce the die words of this beast to its location."; 3"Sub %N for dead monster and %D for killer (if given)."; 4rpg = $local.rpg; 5if ($list_utils:assoc(rpg.magic_db, callers(), 4)) 6 "Death occured as a result of a damage-dealing spell. These have their own death messages, therefore the monster doesn't need to spew it's own scene."; 7 return; 8elseif ((elm = $list_utils:assoc("critical_hit", callers(), 2)) && elm[1].handles_death_msg) 9 return; 10endif 11if (msg = this.die_words) 12 {?killer = $nothing} = args; 13 msg = $string_utils:pronoun_sub(msg, this, this, where = this.location, killer); 14 for line in ((typeof(msg) == LIST) ? msg | {msg}) 15 rpg:rpg_announce_all_but(where, {this}, line); 16 endfor 17endif 18"THX1138 15-Apr-1997 -- Scatter assignment, and saved a few ticks."; 19"Profane (#30788) - Sun Mar 28, 1999 - just exit if death occurs from spell. So incinerated monsters don't dance around and expire in a pool of blood, they just incinerate.";
corpse_msg
Referenced by
- #259:get_corpse(old) line 20:
this:corpse_msg
Source
1":corpse_msg()"; 2"-> What this monster's spawn of generic corpse should look like."; 3return $string_utils:pronoun_sub(this.corpse_msg, this);
get_corpse(19Apr2001)
Referenced by
none
Source
1":get_corpse([killer])"; 2"Get a corpse for this monster, dependant on the value of `body'."; 3"If body == #x and #x is valid and a child of $local.rpg.corpse, use that custom corpse."; 4"If body == 1 (or any true value), create a new corpse and describe it as `corpse_msg'."; 5"If a corpse is found, return {#corpse}. Else, return false."; 6"`killer' is who killed the beast. Provided for future customization."; 7{?killer = $nothing} = args; 8(rpg = $local.rpg):secure(); 9body = this.body; 10mama_corpse = rpg.corpse; 11if (`body.is_corpse ! E_PROPNF => 0') 12 "body.time_of_death = time();"; 13 "return {body};"; 14elseif ((body != 1) && (!valid(body))) 15 return E_NONE; 16elseif (typeof(body = rpg.recycler:_create(mama_corpse)) != OBJ) 17 return E_QUOTA; 18endif 19body:prep_corpse(this, killer); 20"body:set_name(name = \"corpse of \" + this.name);"; 21"body:set_aliases({name, \"corpse\", this.name, \"body\", \"cadaver\"});"; 22"body:set_description(this:corpse_msg());"; 23"body.victim = this;"; 24"body.time_of_death = time();"; 25"body.encumbrance = this.doll.size * 9;"; 26"if (((\"demon\" in (aliases = this.aliases)) || (\"avatar\" in aliases)) || (\"devil\" in aliases))"; 27" body.vial_item = this.fluids[2];"; 28" body.vial_name = body.vial_item.name;"; 29"elseif (\"golem\" in aliases)"; 30" body.vial_item = $nothing;"; 31"endif"; 32return {this.body = body}; 33"THX (#105941) - Thu Mar 22, 2001 - Moved configuration to body:prep_corpse(this, killer).";
deposit_remains
Referenced by
- #259:die line 40:
this:deposit_remains
Source
1":deposit_remains([killer])"; 2"If a corpse exists; get it, move all our loot inside it, and move it to this location."; 3"If no corpse; move this loot to this location."; 4"`killer' is who killed the beast, passed for the benefit of :deposit_loot."; 5$local.rpg:secure(); 6if (corpse = this:get_corpse()) 7 corpse = corpse[1]; 8 corpse:moveto(this.location); 9 return this:deposit_loot(corpse, @args); 10endif 11return this:deposit_loot(this.location, @args); 12"THX1138 15-Apr-1997 -- Copied old code to #259:deposit_remains(old) and rewrote with faster security and layout.";
deposit_loot
Referenced by
- #259:deposit_remains line 9:
this:deposit_loot - #259:deposit_remains line 11:
this:deposit_loot
Source
1":deposit_loot([location[, killer]])"; 2"Move all equipment (except those with a false .:keep_at_death) to the given location, which defaults to the monster's location."; 3"`killer' is who killed the beast. Provided for special occasions where, for example, you may want to deprive a dishonorable killer of the post-mortem prize. Similiarly passed to :keep_at_death."; 4$local.rpg:secure(); 5{?where = this.location, ?killer = $nothing} = args; 6for loot in (this:contents()) 7 if (!loot:keep_at_death(killer)) 8 loot:moveto(where); 9 if ((!(loot in this.special_equipment)) && `loot.condition != E_NONE ! ANY => 0') 10 loot.condition = (min(loot.condition, 100) * (random(3) + 5)) / 8; 11 endif 12 endif 13endfor 14"THX1138 - 15-Apr-1997 -- Upgraded security. Scatter assignment. Copied old verb to #259:deposit_loot(old)."; 15"dalton (#116601) - Mon Jul 7, 2003 - Dropped loot will be a little degraded. Make 'em get it repaired.";
set_body set_corpse
Referenced by
- #259:rot_corpse line 6:
this:set_body - #259:rot_corpse line 10:
this:set_body
Source
1":set_body(OBJ corpse)"; 2"Set the corpse to be deposited when this creature dies."; 3"#xxxxx -- If a caller-controlled kid of $local.rpg.corpse, use that object."; 4"1 -- Create a generic corpse described as this.corpse_msg."; 5"$failed_match -- No corpse."; 6{corpse} = args; 7rpg = $local.rpg; 8if (corpse == 1) 9 corpse = rpg.corpse; 10elseif (corpse == 0) 11 corpse = $failed_match; 12endif 13cp = caller_perms(); 14if ((caller != this) && (!this:is_controllable_by(cp))) 15 return E_PERM; 16elseif (typeof(corpse) != OBJ) 17 return E_TYPE; 18elseif (corpse == $failed_match) 19 return this.body = corpse; 20elseif (!corpse.is_corpse) 21 return E_INVARG; 22elseif ((corpse.owner == cp) || ((corpse.owner in rpg.gms) && (!corpse.is_specific))) 23 return this.body = corpse; 24else 25 return E_NACC; 26endif 27"THX (#105941) - Thu Apr 19, 2001 - Modified to convert old accepted INT arguments to new object-only arguments.";
description
Referenced by
none
Source
1"Runs the description through pronoun_sub."; 2rpg = $local.rpg; 3if ((this.alive && (callers()[$][2] in {"@exam", "@examine"})) && (!(player in {@rpg.gms, @rpg.wannabees}))) 4 player:tell("Use 'examine' rather than '@examine' to look at LambdaRPG monsters."); 5 kill_task(task_id()); 6endif 7name = this:titlec(); 8desc = $string_utils:pronoun_sub(this.description, this, this, this.location, player); 9desc = (typeof(desc) == LIST) ? desc | {desc}; 10desc = index(desc[1], name) ? desc | listinsert(desc, name, 1); 11(this == #79322) && (desc = desc[1]); 12return desc; 13"Copied from Almost Human Bastard (#6475):description by Quinn (#19845) Wed Mar 16 16:55:06 1994 PST"; 14"THX (#105941) - Tue Nov 24, 1998 - Hacked this to prepend the critter's name if it isn't already there."; 15"THX (#105941) - Tue Oct 3, 2000 - Hacked for dirt golem until Bartlebooth can fix it.";
magic_effect
Referenced by
none
Source
1":magic_effect(OBJ caster doll, OBJ target doll, NUM spell quality, OBJ spell skill) => NUM number directly SUBTRACTED from spell quality. i.e. magic resistance."; 2"A simple hack to replace the old direct property ref.."; 3{caster_doll, target_doll, quality, spell} = args; 4this = target_doll.character; 5if ((spell in this.spell_immunities) && (caller_perms() in $local.rpg.gms)) 6 return 999; 7elseif (spell.resist) 8 return this.doll.(spell.resist); 9endif 10return this.magic_resist || 0; 11"THX (#105941) - Tue Jan 4, 2000 - Added a spell_immunities property so that individual spells can be resisted easily without coding a whole verb.";
die
Referenced by
none
Source
1":die([killer]) -- KILL THE BEAST"; 2"- schedule a task to rebirth"; 3"- remove monster from aggressors list of all in vicinity"; 4"- clear monster's doll's wielding, wearing and aggressor lists"; 5"- announce the death to the corpse location"; 6"- deposit remains (corpse, loot, burial)"; 7(rpg = $local.rpg):secure(); 8cemetery = `this.cemetery ! E_PROPNF => rpg.cemetery'; 9if ((!this.alive) && (this.location == cemetery)) 10 return E_NONE; 11endif 12this.alive = 0; 13if (this.gestate > 0) 14 rpg.clock:add_death(this); 15endif 16for who in (this.location:contents()) 17 if (valid(doll = rpg:get_doll(who))) 18 doll.aggressor = setremove(doll.aggressor, this); 19 endif 20endfor 21doll = this.doll; 22for property in (this.props_to_clear_upon_death) 23 clear_property(doll, property); 24endfor 25claimed_stuff = doll.claimed_objects; 26fork (rpg.gm_lag / 2) 27 for item in (claimed_stuff) 28 "Remove claim data from objects."; 29 rpg:s_i_f_i_n(); 30 if ((valid(item) && rpg.object_db:is_thing(item)) && (item.claimed_by == this)) 31 item:unclaim_for(item.claimed_by); 32 if (item.claimed_by != this) 33 `doll.claimed_objects = setremove(doll.claimed_objects, item) ! ANY'; 34 endif 35 endif 36 endfor 37endfork 38{?killer = $nothing} = args; 39rpg:s_i_n(); 40this:deposit_remains(killer); 41this:announce_death(killer); 42rpg:s_i_n(); 43this:moveto(cemetery); 44fork (0) 45 rpg.death_db.slayer_db:notify_death(killer, this); 46endfork 47"Profane 17-MAR-95 13:28 -- Added (Well, changed from old :die() to use new resurrection queue)"; 48"Slither 29-JUN-95 00:16 -- Added erasing of claimed objects."; 49"THX1138 15-Apr-1997 -- Upgraded security, scatter assignment, and saved a few ticks."; 50"Profane (#30788) - Tue May 8, 2001 - Erm clear out them new effect properties, yah?"; 51"Profane (#30788) - Sun May 27, 2001 - Move all that resetting props into a for loop with a property reference, what a concept."; 52"Hannibal (#104762) - Monday May 13, 2002 - Only remove items from .claimed_objects that are no longer claimed."; 53"Hydros (#106189) - Sun Aug 28, 2005 - Added a couple :s_i_n() calls to tackle the `zombified' monster problem we've been having--id est, monsters becoming !.alive, without moving to their proper resting place."; 54"Hydros (#106189) - Tue Sep 20, 2005 - Added :notify_death call for Everin's Slayer Quests.";
cancel_rebirth
Referenced by
- #259:birth line 9:
this:cancel_rebirth
Source
1":cancel_rebirth() -- Kill this monster's rebirth task."; 2(rpg = $local.rpg):secure(); 3rpg.clock:remove_death(this); 4"Profane 17-MAR-95 13:30EST - Changed from old :cancel_rebirth to use new resurrection queue"; 5"THX1138 (#105941) - Mon Nov 16, 1998 - Rewrote with fewer ticks. Set the verb +d.";
set_generic_equipment
Referenced by
none
Source
1":set_generic_equipment(LIST objects)"; 2"Set the generic equipment list to a list of objects"; 3"Each object should be a RPG generic"; 4"Returns a list of created objects."; 5if (!((caller == this) || this:is_controllable_by(caller_perms()))) 6 return E_PERM; 7endif 8newequip = args[1]; 9"Rampant paranoia. But even paranoids get E_TYPE errors."; 10if (typeof(newequip) != LIST) 11 return E_INVARG; 12endif 13for item in (newequip) 14 if (typeof(item) != OBJ) 15 return E_INVARG; 16 endif 17 "Seven's a nice number"; 18 $command_utils:suspend_if_needed(7); 19endfor 20this.generic_equipment = newequip; 21return newequip; 22"5/28/95 Slither -- first version";
make_generic_equipment
Referenced by
- #259:check_mine line 6:
this:make_generic_equipment
Source
1":make_generic_equipment()"; 2"Creates clones of generic items based upon the contents of"; 3"this.generic_equipment. The items are moved into this, and"; 4"the list of created items is returned."; 5"See the comments in :set_generic_equipment for the data format"; 6(rpg = $local.rpg):secure(); 7dispenser = rpg.dispenser; 8stuff = {}; 9for parent in (this.generic_equipment) 10 if (valid(parent) && (parent(parent) != $garbage)) 11 new = dispenser:grab(parent, $nothing); 12 if ((typeof(new) == OBJ) && valid(new)) 13 this.mine = setadd(this.mine, new); 14 new.name = parent.name; 15 new:moveto(this); 16 stuff = {@stuff, new}; 17 endif 18 else 19 this.generic_equipment = setremove(this.generic_equipment, parent); 20 endif 21 rpg:s_i_f_i_n(); 22endfor 23return stuff;
set_special_equipment
Referenced by
none
Source
1":set_special_equipment(LIST objects)"; 2"Set the special equipment list to a list of objects"; 3if (!((caller == this) || this:is_controllable_by(caller_perms()))) 4 return E_PERM; 5endif 6newequip = args[1]; 7"make sure its really a list of objects."; 8if (typeof(newequip) != LIST) 9 return E_INVARG; 10endif 11for item in (newequip) 12 if (typeof(item) != OBJ) 13 return E_INVARG; 14 endif 15 $command_utils:suspend_if_needed(5); 16endfor 17this.special_equipment = newequip; 18return newequip; 19"5/28/95 Slither -- first version";
make_special_equipment
Referenced by
- #259:check_mine line 6:
this:make_special_equipment
Source
1":make_special_equipment()"; 2"Prepares the special equipment that the monster needs, based upon"; 3"the content's of the monster's .special_equipment property."; 4"This amounts to making sure that the equipment exists, and moving"; 5"it to the monster if necessary."; 6"The verb returns a list of the special equipment that was successfully gotten."; 7(rpg = $local.rpg):secure(); 8stuff = {}; 9trash = $garbage; 10for item in (this.special_equipment) 11 if (valid(item) && (parent(item) != trash)) 12 "Good, still exists"; 13 loc = item.location; 14 if ((loc != this) && (!children(item))) 15 "Stupid thing has escaped!"; 16 item:moveto(this); 17 (item.location == this) && loc:tell("The ", item.name, " taken from ", this.name, " disappears."); 18 elseif (children(item) && (item.owner == rpg.owner)) 19 item = rpg.recycler:_create(item); 20 item:moveto(this); 21 endif 22 if (item.location == this) 23 stuff = {@stuff, item}; 24 endif 25 else 26 this.special_equipment = setremove(this.special_equipment, item); 27 endif 28 rpg:s_i_f_i_n(); 29endfor 30return stuff; 31"5/28/95 Slither -- first version";
set_mine
Referenced by
- #259:sub_mine line 3:
this:set_mine - #259:check_mine line 7:
this:set_mine - #259:wealth_mine line 20:
this:set_mine
Source
1":set_mine(LIST objects)"; 2"Set the RPG equipment this monster will be dutied with."; 3"In its present form mainly for compatibility with old code."; 4$local.rpg:secure(); 5return this.mine = args[1];
check_mine
Referenced by
- #259:duty line 11:
this:check_mine
Source
1":check_mine()"; 2"Construct the monster's mine list from its components."; 3"Basically, mainly here for compatibility with old code."; 4"Returns new mine list."; 5$local.rpg:secure(); 6mine = {@this:make_generic_equipment(), @this:make_special_equipment()}; 7return this:set_mine(mine);
look_health
Referenced by
- #259:look_self line 3:
this:look_health - #259:look_self line 7:
this:look_health
Source
1$local.rpg:(verb)(this, @args);
set_iprop add_iprop
Referenced by
none
Source
1":add_ivalue(<property>, <value>) => Adds <property> to the list of ivalues on the monster. These are stored in a list, rather than individual properties, to save db space. Returns old value, if existed, 0 if none, or E_PROPNF if not on the doll."; 2(rpg = $local.rpg):secure(); 3if ((caller == this) || (caller_perms() in {this.owner, rpg.owner})) 4 doll = rpg.doll; 5 {prop, value} = args; 6 if (length(this.initial_levels) != length(this.initial_props)) 7 player:tell("Something is amiss. The .initial_props property is not the same length as the .initial_levels property"); 8 return E_INVARG; 9 elseif ($object_utils:defines_property(doll, prop)) 10 if (doll.(prop) == value) 11 this:remove_iprop(prop); 12 elseif (x = prop in this.initial_props) 13 old = this.initial_levels[x]; 14 this.initial_levels[x] = value; 15 return old; 16 else 17 this.initial_levels = {@this.initial_levels, value}; 18 this.initial_props = {@this.initial_props, prop}; 19 return 0; 20 endif 21 else 22 return E_PROPNF; 23 endif 24else 25 return E_PERM; 26endif 27"Mooshie (#106469) - Fri Jun 12, 1998 - Made this puppy +d. Plus changed the check for a valid prop from an error trapping check to an $object_utils:defines_property, that way we can avoid stuff that would bomb the birthing task, like trying to set !c properties defined on ancestors.";
remove_iprop
Referenced by
- #259:set_iprop line 11:
this:remove_iprop
Source
1":remove_iprop(<prop>) => removes prop from the list of initial values for the monster's doll. Returns value of item deleted, or E_PROPNF, if it wasn't found."; 2(rpg = $local.rpg):secure(); 3if (caller_perms() in {this.owner, rpg.owner}) 4 {prop} = args; 5 if (x = prop in this.initial_props) 6 old = this.initial_levels[x]; 7 this.initial_props = listdelete(this.initial_props, x); 8 this.initial_levels = listdelete(this.initial_levels, x); 9 return old; 10 else 11 return E_PROPNF; 12 endif 13else 14 return E_PERM; 15endif
init*ial_levels
Referenced by
none
Source
1(rpg = $local.rpg):secure_x(); 2{?values_only = 0} = args; 3if (values_only) 4 return {this.initial_props, this.initial_levels}; 5endif 6items = {}; 7for n in [1..length(this.initial_props)] 8 items = {@items, (this.initial_props[n] + ": ") + $string_utils:from_value(this.initial_levels[n], 1, 10)}; 9endfor 10l = $string_utils:columnize(items, 2, 76); 11player:tell($string_utils:center((tostr(this) + " ") + this.name, 76, "_")); 12for x in (l) 13 player:tell(x); 14endfor 15player:tell($string_utils:space(76, "-"));
flatline
Referenced by
none
Source
1{?state = 0} = args; 2$local.rpg:secure(); 3this.alive = state; 4"THX1138 - 23-Apr-1997 -- Added so gms can directly kill their critters at the beginning of the monster:die() that they write.";
pick_aggressor
Referenced by
none
Source
1return $nothing;
spell_deflection_msg
Referenced by
none
Source
1{?targ = this, ?by = player} = args; 2return $string_utils:pronoun_sub(this.(verb), targ, dobj = by); 3"THX (#105941) - Mon Sep 11, 2000 - Pass 'target' to pronoun_sub as first arg and 'by' as second instead of other way around. Also set dobj = by for messaging purposes. Altered all <monster>.spell_deflection_msg properties appropriately.";
whereare
Referenced by
none
Source
1"Copied from Generic Anklebiter (#8872):whereare by THX1138 (#105941) Wed Apr 9 16:43:57 1997 PDT"; 2sorted = {}; 3for t in ($set_utils:intersection(children(this), $local.rpg.pcs)) 4 sorted = {@sorted, {t, t.name}}; 5endfor 6sorted = $list_utils:sort_alist(sorted, 2); 7s_u = $string_utils; 8for t in (sorted) 9 {critnum, critter} = t; 10 player:tell(s_u:left(tostr(critter, " (", critnum, ")"), 32, " "), s_u:left(s_u:nn(critnum.location), 47)); 11endfor 12player:tell("Living monsters: ", length(sorted), " ... ", this.name, ":", verb, " complete.");
receive_damage_poison
Referenced by
none
Source
1"Copied from $local.rpg.monster (#1920):receive_damage_poison by Irin (#106049) Wed Mar 11 20:56:27 1998 PST"; 2":receive_damage_poison(OBJ source, OBJ poison, INT quality, LIST body areas)"; 3$local.rpg:secure(); 4{source, poison, qual, areas} = args; 5if (this.animal in {"golem", "corpse", "demon", "phantom", "plant"}) 6 return 0; 7else 8 return poison:effect(this.doll, source, qual, areas); 9endif
random_hit_location
Referenced by
none
Source
1return 0;
set_animal
Referenced by
none
Source
1(rpg = $local.rpg):secure(); 2if (caller_perms() in {rpg.owner, this.owner}) 3 {?animal = 0} = args; 4 if (animal in rpg.object_db.ok_animals) 5 elseif (!animal) 6 animal = 0; 7 else 8 return E_INVARG; 9 endif 10else 11 return E_PERM; 12endif 13if (parent(this).animal == animal) 14 clear_property(this, "animal"); 15else 16 this.animal = animal; 17endif 18return animal;
notify_forgive
Referenced by
none
Source
1":notify_forgive(OBJ who) => Who wishes to cease combat with the monster. If monsters wishes to cease combat with who, it should remove who from it's aggressor list, and remove itself from who's aggressor list, then print an appropriate message."; 2return 0;
get_iprop
Referenced by
- #259:equip_mine line 15:
this:get_iprop
Source
1(rpg = $local.rpg):secure(); 2{prop} = args; 3if (slot = prop in this.initial_props) 4 return this.initial_levels[slot]; 5else 6 return `rpg.doll.(prop) ! E_PROPNF => E_PROPNF'; 7endif
removal
Referenced by
none
Source
1for s in (this.command_ok) 2 if ((s in #46.gms) || (s == #97170)) 3 else 4 this.command_ok = setremove(this.command_ok, s); 5 endif 6endfor
get_value
Referenced by
none
Source
1if ($local.rpg:trusted(caller_perms())) 2 return this.(args[1]); 3else 4 return E_PERM; 5endif
set_value
Referenced by
none
Source
1":set_value(STR property_name, value) -- Sets this.(property_name) to `value'"; 2{prop, value} = args; 3rpg = $local.rpg; 4if (rpg:trusted(cp = caller_perms()) && ((cp in {this.owner, rpg.thing.owner}) || (caller == this))) 5 return this.(prop) = value; 6else 7 return E_PERM; 8endif 9"THX1138 22-MAR-1997 -- Scatter assignment and s /db/rpg/g 1-$ for commonality.";
reinitialize
Referenced by
- #259:birth line 10:
this:reinitialize
Source
1":reinitialize() triggers a reset of the critters stats to the setting in :init(1)."; 2if (caller == this) 3 doll = this.doll; 4 rpg_doll = (rpg = $local.rpg).doll; 5 doll_props = setremove(properties(rpg_doll), "character"); 6 rpg:s_i_n(); 7 initial_props = this.initial_props; 8 initial_levels = this.initial_levels; 9 for slot in [1..length(initial_props)] 10 att = initial_props[slot]; 11 stat = initial_levels[slot]; 12 if (stat != rpg_doll.(att)) 13 doll.(att) = stat; 14 doll_props = setremove(doll_props, att); 15 endif 16 endfor 17 for att in (doll_props) 18 clear_property(doll, att); 19 endfor 20 rpg:s_i_n(); 21endif 22"THX (#105941) - Wed Nov 4, 1998 - Added.";
birth
Referenced by
- #259:quietbirth line 2:
this:birth
Source
1":birth() -- Make it live!"; 2"If already alive, reset stats to initial state."; 3rpg = $local.rpg; 4if (!rpg:trusted((c = callers()) ? caller_perms() | player)) 5 return E_PERM; 6elseif (this.owner in rpg.gms) 7 this.doll = doll = rpg:create_pc(this); 8 "doll.free_will = 0;"; 9 this:cancel_rebirth(); 10 this:reinitialize(); 11 this:duty(); 12 if (!c) 13 player:tell($string_utils:nn(this), " has been reset with ", $string_utils:nn(doll), " as its doll."); 14 endif 15 return doll; 16else 17 return E_NACC; 18endif 19"Quinn 11-OCT-95 1150: Made verb !d, removed $object_util:has_property() check in att reset loop."; 20"Profane 28-JUN-96 2247EDT -- No fork, suspend."; 21"Profane 24-MAR-97 1043PST -- 1.8ify and PUT BACK THE DAMN SUSPEND AND YOU BETTER LEAVE IT THAT WAY GODDAMN YOU."; 22"THX (#105941) - Sun Jun 7, 1998 - Changed code to use initial_props and initial_levels instead of iprops. Clear all other props afterwards."; 23"THX (#105941) - Tue Nov 3rd, 1998 -- Moved the iprop stuff to :reinitialize()."; 24"THX (#105941) - Wed Nov 4, 1998 - Added. Use call to :reinitialize() instead of doing the iprop stuff in here.";
set_last_attacker
Referenced by
none
Source
1":set_last_attacker(attacker OBJ) => this.last_attacker sets the .last_attacker."; 2$local.rpg:secure(); 3return this.last_attacker = args[1];
ok_alive_loc
Referenced by
- #259:moveto line 9:
this:ok_alive_loc - #259:moveto(old) line 5:
this:ok_alive_loc
Source
1{where} = args; 2return valid(where) && (where.owner in {@$local.rpg.gms, @$local.rpg.object_db.grandparented});
moveto(old)
Referenced by
none
Source
1rpg = $local.rpg; 2(((caller == this) || $perm_utils:controls(caller_perms(), this)) || (rpg:trusted(caller.owner) && (((typeof(source = `caller.source ! E_PROPNF, E_PERM => 0') == OBJ) && valid(source)) ? source == this.location | 1))) || rpg:secure(); 3p = pass(@args); 4if (this.alive) 5 this:ok_alive_loc(this.location) || this:go_home(); 6endif 7return p; 8"these = {};"; 9"what = this;"; 10"monster = (rpg = $local.rpg).monster;"; 11"while (what != monster)"; 12" these = listappend(these, what.owner);"; 13" what = parent(what);"; 14"endwhile"; 15"p = rpg:trust(@these) ? pass(@args) | E_PERM;"; 16"Mooshie (#106469) - Thu Dec 24, 1998 - I don't think we need the elaborate :trust call, and the :go_home setup was causing infinite loops."; 17"THX1138 (#105941) - Thu Dec 31, 1998 - Re-enabled the :go_home() feature. Let's fix those infinite loops instead of sweeping them under the carpet.";
do_follow do_unfollow
Referenced by
none
Source
1"Copied from Helania (#4777):do_follow by THX1138 (#105941) Wed Sep 29 07:58:24 1999 PDT"; 2rpg = $local.rpg; 3if (rpg:is_grandmaster(caller_perms())) 4 {who} = args; 5 this:do((verb[4..$] + " ") + tostr(who)); 6endif
wealth_mine
Referenced by
- #259:duty line 15:
this:wealth_mine
Source
1":wealth_mine() => treasure list This verb takes the contents of the monster's .money property and creates the appropriate amount of wealth. Examples: {{0, 0}, {6, 1}} would have the critter start with no copper and random(6) silver. {{0, 0}, {3, 0}, {1, 0}, {4, 0}} would result in 3 silver, 1 gold, and a gem of value 40 gold."; 2loot = {}; 3if (this.money) 4 (rpg = $local.rpg):secure(); 5 baseline = rpg.object_db.obj_money; 6 n = 0; 7 for t in (this.money) 8 {amount, randomize} = t; 9 n = n + 1; 10 if (amount) 11 if (n < 4) 12 x = baseline[n]:mint(); 13 x:set_quantity(randomize ? random(amount) | amount); 14 else 15 x = rpg.user_utils.thx1138:jewel(amount, $nothing, !randomize); 16 endif 17 loot = {@loot, x}; 18 endif 19 endfor 20 loot && this:set_mine({@this.mine, @loot}); 21 for t in (loot) 22 t:moveto(this); 23 endfor 24endif 25return loot; 26"THX (#105941) - Mon Oct 18, 1999 - Added.";
make_fertile
Referenced by
none
Source
1"Usage: make_fertile() => Makes this temporarily fertile if permitted."; 2" make_fertile(1) => Resets this to unfertile."; 3$local.rpg:secure(); 4if (args) 5 this.f = 0; 6elseif (this.f) 7else 8 this.f = 1; 9 fork (0) 10 this.f = 0; 11 endfork 12endif
magic_effect(obsolete)
Referenced by
none
Source
1":magic_effect(OBJ caster doll, OBJ target doll, NUM spell quality, OBJ spell skill) => NUM number directly SUBTRACTED from spell quality. i.e. magic resistance."; 2"A simple hack to replace the old direct property ref.."; 3{caster_doll, target_doll, quality, spell} = args; 4this = target_doll.character; 5if ((spell in this.spell_immunities) && (caller_perms() in $local.rpg.gms)) 6 return 999; 7endif 8return this.magic_resist || 0; 9return this.doll.(spell.resist) || 0; 10"THX (#105941) - Tue Jan 4, 2000 - Added a spell_immunities property so that individual spells can be resisted easily without coding a whole verb.";
set_home
Referenced by
none
Source
1{where} = args; 2if (caller == this) 3 $local.rpg:secure(); 4 `this.home = where ! ANY'; 5endif
hidden_verbs
Referenced by
none
Source
1{who} = args; 2prev = pass(who); 3monster = (rpg = $local.rpg).monster; 4if (!rpg:trusted(who)) 5 ancestors = $object_utils:ancestors(this); 6 ancestors = ancestors[1..monster in ancestors]; 7 for t in (ancestors) 8 prev = {@prev, {t, "birth", {"this", "none", "none"}}}; 9 prev = {@prev, {t, "duty", {"this", "none", "none"}}}; 10 endfor 11 prev = {@prev, {monster, "whereare", {"this", "none", "none"}}}; 12endif 13if ((who != this.owner) && (!rpg:is_grandmaster(who))) 14 prev = {@prev, {monster, "abort", {"this", "none", "none"}}}; 15endif 16if (!this:command_ok(who)) 17 prev = {@prev, {$local.puppet, "com*mand", {"this", "at/to", "any"}}}; 18endif 19if (!this:monitor_ok(who)) 20 prev = {@prev, {$local.puppet, "mon*itor", {"this", "none", "none"}}}; 21endif 22if (!(who in this.tell_forward)) 23 prev = {@prev, {$local.puppet, "ign*ore", {"this", "none", "none"}}}; 24endif 25if (who != this.owner) 26 prev = {@prev, {$gendered_object, "@gen*der", {"this", "is", "any"}}}; 27endif 28return prev;
notify_iceshell
Referenced by
none
Source
1{type, announce} = args; 2return;
get_corpse(old)
Referenced by
none
Source
1":get_corpse([killer])"; 2"Get a corpse for this monster, dependant on the value of `body'."; 3"If body == #x and #x is valid and a child of $local.rpg.corpse, use that custom corpse."; 4"If body == 1 (or any true value), create a new corpse and describe it as `corpse_msg'."; 5"If a corpse is found, return {#corpse}. Else, return false."; 6"`killer' is who killed the beast. Provided for future customization."; 7(rpg = $local.rpg):secure(); 8body = this.body; 9mama_corpse = rpg.corpse; 10if (`body.is_corpse ! E_PROPNF => 0') 11 body.time_of_death = time(); 12 return {body}; 13elseif (!body) 14 return E_NONE; 15elseif (typeof(body = rpg.recycler:_create(mama_corpse)) != OBJ) 16 return E_QUOTA; 17endif 18body:set_name(name = "corpse of " + this.name); 19body:set_aliases({name, "corpse", this.name, "body", "cadaver"}); 20body:set_description(this:corpse_msg()); 21body.victim = this; 22body.time_of_death = time(); 23body.encumbrance = this.doll.size * 10; 24if ((("demon" in (aliases = this.aliases)) || ("avatar" in aliases)) || ("devil" in aliases)) 25 body.vial_item = this.fluids[2]; 26 body.vial_name = body.vial_item.name; 27elseif ("golem" in aliases) 28 body.vial_item = $nothing; 29endif 30return {this.body = body};
quietbirth
Referenced by
none
Source
1if (caller == $local.rpg.owner) 2 this:birth(); 3endif 4"THX (#105941) - Sun Apr 15, 2001 - Had to add this so G_M can force_input the births from the cemetery without getting spammed with afterbirth feedback.";
get_corpse
Referenced by
- #259:deposit_remains line 6:
this:get_corpse
Source
1":get_corpse([killer])"; 2"Get a corpse for this monster, dependant on the value of `body'."; 3"If body == #x and #x is valid and #x.is_specific => TRUE, use that custom corpse."; 4"If valid(body), create a new corpse and describe it as `corpse_msg'."; 5"If a corpse is found, return {#corpse}. Else, return false."; 6"`killer' is who killed the beast. Provided for future customization."; 7{?killer = $nothing} = args; 8(rpg = $local.rpg):secure(); 9body = this.body; 10if (`body.is_specific ! ANY => 0') 11elseif (valid(body)) 12 if (typeof(body = rpg.recycler:_create(body)) != OBJ) 13 return E_QUOTA; 14 endif 15else 16 return E_NONE; 17endif 18body:prep_corpse(this, killer); 19return {this.body = body}; 20"THX (#105941) - Thu Mar 22, 2001 - Moved configuration to body:prep_corpse(this, killer).";
choose_weaponry
Referenced by
none
Source
1if (caller == this) 2 doll = this.doll; 3 rpg = $local.rpg; 4 rank = weapon = 0; 5 for t in ($object_utils:all_contents(this)) 6 temp = rank; 7 rating = `rpg:rate_weapon(t, {this, this}) ! ANY => 0'; 8 if (rating && t:may_wield(this)) 9 rank = max(rank, rating * doll:total(t.skill)); 10 endif 11 weapon = (temp == rank) ? weapon | t; 12 endfor 13 wielded = {rank, weapon}; 14 for t in (doll.natural_weapons) 15 temp = rank; 16 rating = `rpg:rate_weapon(t, {this, this}) ! ANY => 0'; 17 if (rating) 18 rank = max(rank, rating * doll:total(t.skill)); 19 endif 20 weapon = (temp == rank) ? weapon | t; 21 endfor 22 if (rank > wielded[1]) 23 for t in (doll.wielding) 24 this:do(strsub(`this.dispose_weapon ! ANY => "unwield %weapon"', "%weapon", tostr(t))); 25 endfor 26 else 27 this:do(tostr("wield ", wielded[2])); 28 endif 29endif
purge_AHaB
Referenced by
none
Source
1"this:purge_relationships() => delete useless sets of relationship data."; 2rpg = $local.rpg; 3{doll, o_u, gms} = {rpg.doll, $object_utils, rpg.gms}; 4for set in (r = this:get_prop("relationships")) 5 d = set[1]; 6 (((o_u:isa(d, doll) && (typeof(char = d.character) == OBJ)) && is_player(char)) && (!(char in gms))) || (r = setremove(r, set)); 7 rpg:s_i_f_i_n(); 8endfor 9return this:set_prop("relationships", r);