generic creature #107

Parent #92Owner #361Flags read, fertileSource hellcore/hellcore.db

Aliases: generic creature

179 verbs · 89 properties · 2 children

Verbs

VerbSpecFlagsDefinerLines
_wieldthis none thisrxd#10739
skill_modifier_forthis none thisrxd#10728
_unwieldthis none thisrxd#10720
exitfuncthis none thisrxd#10720
_heartbeat_disabledthis none thisrx#10716
heartbeatthis none thisrxd#10718
take_damagethis none thisrxd#10772
diethis none thisrxd#107195
dodge_or_parrythis none thisrxd#10757
dnamethis none thisrxd#1075
inamethis none thisrxd#1075
random_bodypartthis none thisrxd#1079
wearing_onthis none thisrxd#10714
encumbrancethis none thisrxd#10711
attackingthis none thisrxd#1077
weaponthis none thisrxd#1077
do_commandthis none thisrxd#10761
parse_commandthis none thisrxd#10776
at*tack kill shoot stab smash k murderany none nonerxd#10732
show_score_fullthis none thisrxd#107169
cant_takethis none thisrxd#10746
max_carrythis none thisrxd#1072
suggest_next_actionthis none thisrxd#1073
hear_event_fightthis none thisrxd#10711
movetothis none thisrx#10722
debug_tellthis none thisrxd#1071
hear_event_movethis none thisrxd#10722
start_fightingthis none thisrxd#10755
enter_roomthis none thisrxd#10716
followthis none nonerxd#10717
look_selfthis none thisrxd#10726
give_tothis none thisrxd#10718
got_giftthis none thisrxd#1074
hand_tothis none thisrxd#10710
saythis none thisrx#10743
_getthis none thisrxd#10725
_dropthis none thisrxd#1079
set_genderthis none thisrxd#10726
squeal_msgthis none thisrxd#10718
ingestthis none thisrxd#10779
sitnone none nonerxd#1077
l*ookany any anyrxd#10793
tell_healththis none thisrxd#10721
tellthis none thisrxd#1071
tell_holdingthis none thisrxd#10726
_fightthis none thisrxd#1076
show_statusthis none thisrxd#10736
_knockoutthis none thisrxd#10726
_wakethis none thisrxd#10729
get_giftthis none thisrxd#10716
clear_handsthis none thisrxd#10764
diag*noseany none nonerxd#10748
cure treatany on top of/on/onto/upon thisrxd#10713
remove_drugthis none thisrxd#1074
standnone none nonerxd#10721
is_deadthis none thisrxd#1071
recline relaxnone none nonerxd#10716
respawnthis none thisrxd#10726
doses_ofthis none thisrxd#1079
onset_ofthis none thisrxd#1079
_unwearthis none thisrxd#1071
disengage_from_combatthis none thisrxd#1077
stop_fightingthis none thisrxd#10715
tell_wearingthis none thisrxd#10756
_allowsthis none thisrxd#10739
real_namethis none thisrxd#1075
recyclethis none thisrxd#1072
verb_subthis none thisrxd#10712
xp_valuethis none thisrxd#10738
@setupthis none nonerxd#10719
tell_encumbrancethis none thisrxd#10713
posture_msgthis none thisrxd#1078
_hearthis none thisrxd#1071
killed_bythis none thisrxd#1074
_resistthis none thisrxd#10745
initializethis none thisrxd#1073
countany none nonerxd#10747
check_prefthis none thisrxd#1071
abbreviated_namethis none thisrxd#1077
tell_self_healththis none thisrxd#1076
oocany any anyrxd#10712
_get_manythis none thisrxd#10723
_get_from_containerthis none thisrxd#10713
get_allthis none thisrxd#10739
_putthis none thisrxd#10717
drop putany any anyrxd#10743
_suggest_next_actionthis none thisrxd#1071
sitting_onthis none thisrxd#10710
reclining_onthis none thisrxd#10710
base_dodgethis none thisrxd#10712
base_attackthis none thisrxd#10724
acceptablethis none thisrxd#1071
stow unwield sheath*e rem*ove holsterany none nonerxd#10722
rescuethis none nonerxd#10733
dressthis in/inside/into anyrxd#10711
thinkany any anyrxd#10716
tree_tagthis none thisrxd#1071
get takeany any anyrxd#10766
_threat_ratingthis none thisrxd#1076
wearing_on_coveringthis none thisrxd#10714
tell_contentsthis none thisrxd#10768
break_graspthis none thisrxd#1074
lose_thirstthis none thisrxd#1076
gain_stressthis none thisrxd#1071
threat_ratingthis none thisrxd#10758
_brainscanthis none thisrxd#10721
@brainscan @bsthis none nonerxd#1075
_whisperthis none thisrxd#1073
inform_of_deaththis none thisrxd#1077
tell_agethis none thisrxd#1070
soul_valuethis none thisrxd#1071
grenade_can_affectthis none thisrxd#1071
enterfuncthis none thisrxd#10712
debug_tell_roomthis none thisrxd#1076
cuts_withthis none thisrxd#10712
can_see_in_darkthis none thisrxd#1076
bolt unboltany none nonerxd#10710
get_wetthis none thisrxd#1075
my_huhthis none thisrxd#1070
last_huhthis none thisrxd#1070
death_listenersthis none thisrxd#1079
_show_statusthis none thisrxd#10750
skin_is_visible visible_skinthis none thisrxd#10710
tell_reclonethis none thisrxd#1071
diseasesthis none thisrxd#1077
default_respawnthis none thisrxd#1071
reachable_bythis none thisrxd#1078
@qpthis with/using anyrxd#10723
cooldown_checkthis none thisrxd#10731
combat_fatiguethis none thisrxd#1079
has_cooldownthis none thisrxd#10715
add_skill_mod_itemthis none thisrxd#10710
remove_skill_mod_itemthis none thisrxd#10710
nearby_creaturesthis none thisrxd#10715
_milkthis none thisrxd#1073
resume_fightingthis none thisrxd#1077
_learnthis none thisrxd#10743
felt_temperaturethis none thisrxd#10753
change_temperaturethis none thisrxd#1073
titlethis none thisrxd#1071
brandishnone at/to anyrxd#1076
process_bloodthis none thisrxd#1077
deadthis none thisrxd#1072
fighting_targetthis none thisrxd#1071
effective_targetthis none thisrxd#1077
attacking_cooldown_checkthis none thisrxd#1078
forbid_action_move forbid_action_climbthis none thisrxd#1076
_blockthis none thisrxd#1079
_walkthis none thisrxd#10711
_admitthis none thisrxd#1077
_fight_arithis none thisrxd#10713
sanitize_fightingthis none thisrxd#1077
move_actionthis none thisrxd#1077
on_movethis none thisrxd#1072
respawn_locationthis none thisrxd#1071
handsthis none thisrxd#10711
_thinkthis none thisrxd#1071
set_posturethis none thisrxd#10731
junkany none nonerxd#10728
systellthis none thisrxd#1070
spareany none nonerxd#10719
afterlifethis none thisrxd#1076
is_in_afterlifethis none thisrxd#1071
tell_carryingthis none thisrxd#10730
_sitthis none thisrxd#10713
is_wearingthis none thisrxd#10712
can_seethis none thisrxd#1075
text_sub filter_text speech_filterthis none thisrxd#10723
light_levelthis none thisrxd#1077
xmas_subthis none thisrxd#1073
cooldown_clearthis none thisrxd#10713
yell shout screamany any anyrxd#1072
unarmed_weaponthis none thisrxd#1075
hear_noisethis none thisrxd#1070
show_score_statsthis none thisrxd#10722
entombthis none thisrxd#1073
_yellthis none thisrxd#1072
is_fightingthis none thisrxd#1079
tell_implantsthis none thisrxd#1070

Properties

PropertyDefinerFlagsOwnerValue
hands#107rc#3612
wielding#107rc#361{}
health#107rc#36120
unarmed_weapon#107rc#361#193
size#107rc#3610
posture#107rc#361"standing"
gender#107rc#361"neuter"
respawn#107rc#361#273
corpse#107rc#361#104
has_proper_name#107rc#3610
die_msg#107rc#361"%DN crumples to the ground, gasps out %p last breath, and dies."
body_parts#107rc#361
list of 11{#348, #351, #286, #344, #315, #217, #242, #262, #234, #280, #368}
wearing#107rc#361{}
armor#107rc#361{{#308, 50, 100}}
last_swing_message#107rc#361{0, #-1}
health_max#107rc#36120
fighting#107rc#361{}
last_dodge_time#107rc#3610
following#107rc#361#-1
icon#107rc#361"~1b[1m~1b[37m<>~1b[0m"
say_msg#107rc#361"%DN says, \"%t\""
say_to_msg#107rc#361"%DN [to %dd]: %t"
afterlife#107rc#361#742
get_msg#107rc#361""
drop_msg#107rc#361""
blood#107rc#361{}
squeals#107rc#361#802
prc#107rc#361"Itself"
ppc#107rc#361"Its"
poc#107rc#361"It"
psc#107rc#361"It"
pr#107rc#361"itself"
pp#107rc#361"its"
po#107rc#361"it"
ps#107rc#361"it"
pq#107rc#361"its"
pqc#107rc#361"Its"
brief#107rc#3610
knockout#107rc#361#1067
knockout_msg#107rc#361"You feel your consciousness slipping away..."
body#107rc#361#-1
wake_msg#107rc#361"You feel your consciousness returning..."
owake_msg#107rc#361"%DN opens %p eyes."
oknockout_msg#107rc#361"%DN falls to the %<l:ground> and passes out."
friends#107rc#361{}
home#107rc#361#10
respawn_msg#107rc#361"%DN wanders in."
move_action#107rc#361#359
heart#107rc#361-1
last_heartbeat#107rc#3610
dead#107rc#3610
_tohit_next#107rc#3610
last_words_msg#107rc#361{}
attacked#107rc#361{}
opens_doors#107rc#3611
movable_by_explosion#107rc#3611
obscured#107rc#3610
obscured_desc_msg#107rc#361"You can't make out any details!"
cooldowns#107rc#361{}
combat_rounds#107rc#3610
encumbrance#107rc#361{0, 0}
respawn_handler#107rc#361#-1
distant_form_msg#107rc#361"human figure"
block_msg#107rc#361"%DN steps in front of %dd, blocking the way."
attack_on_block#107rc#3610
last_stunned#107rc#3610
nude_descs#107rc#361{}
skills#107rc#361
list of 17{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
explode_msg#107rc#361"%DN explodes, showering the area with blood and chunks of flesh."
death_listeners#107rc#361{}
queue#92r#361{}
preemptible#92r#3611
executing#92r#361{}
process_queue#92r#361<clear>
help_msg#92rc#361<clear>
last_action#92r#361<clear>
article#92rc#361<clear>
last_last_action#92rc#361<clear>
action_count#92rc#361<clear>
aliases#1rc#361{"generic creature"}
description#1rc#361<clear>
object_size#1r#29{218868, 1298433815}
hidden_verbs#1rc#361
list of 22{"command", "@behaviors", "@possess", "@setup", "fuck", "suck", "facefuck", "assfuck", "titfuck", "dress", "yiff", "rescue", "feed", "torture", "grab", "@brainscan", "@qp", "@setstat", "@setskill", "@bs", "heimlich", "scam"}
phelp_msg#1rc#361<clear>
weight#1rc#36175000
owner_verbs#1rc#361{"@possess", "@behaviors", "@setup"}
plural_name#1rc#361<clear>
client_image#1rc#361<clear>
listening#1rc#3611

Ancestry

Ancestors (nearest first): #92 generic actor#1 root

Children: #148 generic body, #154 generic living creature

Call graph

calls n107_0 #107:_wield n1_66 #1:announce_action_text n107_0->n1_66 n20_34 #20:pronoun_sub n107_0->n20_34 n107_155 #107:hands n107_0->n107_155 n107_43 #107:tell n107_0->n107_43 n107_50 #107:clear_hands n107_0->n107_50 n107_50->n1_66 n107_50->n107_155 n107_2 #107:_unwield n107_50->n107_2 n1_39 #1:dnamec n107_50->n1_39 n107_2->n1_66 n107_2->n20_34 n107_2->n107_43 n107_3 #107:exitfunc n107_3->n107_2 n107_60 #107:_unwear n107_3->n107_60 n107_4 #107:_heartbeat_disabled n107_5 #107:heartbeat n107_4->n107_5 n92_8 #92:jumpstart n107_5->n92_8 n107_141 #107:process_blood n107_5->n107_141 n107_6 #107:take_damage n107_6->n20_34 n107_6->n107_43 n107_162 #107:is_in_afterlife n107_6->n107_162 n107_12 #107:wearing_on n107_6->n107_12 n45_2 #45:has_verb n107_6->n45_2 n107_124 #107:diseases n107_6->n107_124 n103_47 #103:valid n107_6->n103_47 n107_7 #107:die n107_6->n107_7 n92_7 #92:cancel_current_action n107_6->n92_7 n107_7->n1_66 n107_7->n20_34 n107_7->n107_43 n107_7->n107_124 n107_7->n103_47 n107_7->n92_7 n107_142 #107:dead n107_7->n107_142 n107_61 #107:disengage_from_combat n107_7->n107_61 n92_6 #92:clear_queue n107_7->n92_6 n107_7->n1_39 n45_0 #45:has_property n107_7->n45_0 n107_24 #107:moveto n107_7->n107_24 n20_59 #20:name_and_number n107_7->n20_59 n107_34 #107:say n107_7->n107_34 n20_81 #20:msg n107_7->n20_81 n107_161 #107:afterlife n107_7->n107_161 n107_47 #107:_knockout n107_7->n107_47 n107_73 #107:killed_by n107_7->n107_73 n103_24 #103:report_error n107_7->n103_24 n107_120 #107:death_listeners n107_7->n107_120 n103_6 #103:notify_death n107_7->n103_6 n107_68 #107:xp_value n107_7->n107_68 n1_42 #1:occupants n107_7->n1_42 n103_2 #103:junk n107_7->n103_2 n107_24->n107_61 n107_24->n103_24 n107_34->n1_66 n107_34->n20_34 n107_34->n1_39 n107_47->n92_6 n107_47->n107_24 n107_10 #107:iname n107_73->n107_10 n107_8 #107:dodge_or_parry n107_8->n92_8 n107_8->n92_7 n107_8->n1_39 n107_15 #107:weapon n107_8->n107_15 n92_11 #92:is_doing n107_8->n92_11 n92_12 #92:cancel_if_possible n107_8->n92_12 n107_9 #107:dname n1_30 #1:name n107_9->n1_30 n107_10->n1_30 n92_14 #92:iname n107_10->n92_14 n107_13 #107:encumbrance

Showing 48 of 233 verbs; 185 not shown.

Source

_wield

Spec this none thisFlags rxdOwner #361Definer #107

Referenced by

Source

1":_wield(OBJ thing, INT dont_force [,INT silent])";
2"Hold thing in our hands.  Force if necessary, otherwise print handsfull message.";
3thing = args[1];
4dont_force = (length(args) > 1) ? args[2] | 0;
5silent = (length(args) > 2) ? args[3] | 0;
6if ((!is_player(this)) && (!is_a(thing, $weapon)))
7silent = 1;
8endif
9if (((thing in this.wielding) && is_a(thing, $weapon)) && (thing != this.wielding[1]))
10this.wielding = {thing, @setremove(this.wielding, thing)};
11this:aat($su:ps("%DN shifts %dt to %p primary hand.", this, thing));
12return;
13endif
14if (thing in this.wielding)
15return 1;
16elseif (!is_a(thing, $thing))
17return 0;
18elseif (thing.location != this)
19return 0;
20endif
21if (this:hands() < thing.handed)
22this:tell("You don't have enough functional hands to hold ", thing:iname(), "!");
23return 0;
24endif
25if (this:clear_hands(thing.handed, silent))
26if (!thing:try_wield(this))
27return 0;
28endif
29`thing:wielded_by(this) ! E_VERBNF';
30this.wielding = {thing, @this.wielding};
31if ((length(args) < 3) || (!args[3]))
32if (!this.fighting)
33this:announce_action_text($string_utils:pronoun_sub(thing.wield_msg, this, thing, thing));
34else
35this:tell("You get out your ", thing:name(), ".");
36endif
37endif
38return 1;
39endif

skill_modifier_for

Spec this none thisFlags rxdOwner #361Definer #107

Referenced by

Source

1":skill_modifier_for(OBJ skill)";
2"Total up any skill modifiers in effect for a skill, such as status effects, cybertech, etc.  Return a positive/negative value.";
3skill = args[1];
4mod = 0;
5for x in (this.blood)
6mod = mod + x[1]:skill_mod(skill, this, x[3]);
7endfor
8"for x in (this.implants)";
9"  mod = mod + `x:skill_mod(skill) ! ANY => 0';";
10"endfor";
11mod = mod + skill:modifier(this);
12"for x in (this.skill_mod_items)";
13"  if (x[1] == skill)";
14"    for y in (x[2])";
15"      if (y.location == this)";
16"        if (has_callable_verb(y, \"skill_modifier\"))";
17"          modlist = y:skill_modifier(this);";
18"          if (modlist[1] == skill)";
19"            mod = mod + modlist[2];";
20"          endif";
21"        elseif (gamevalid(y))";
22"          \"  $nets.prognet:announce(this, tostr($su:nn(y), \\\" is missing a :skill_modifier verb?\\\"), 1);\";";
23"        endif";
24"      endif";
25"    endfor";
26"  endif";
27"endfor";
28return mod;

_unwield

Spec this none thisFlags rxdOwner #361Definer #107

Referenced by

Source

1":_unwield(OBJ thing, INT silent)";
2"Stop holding an object.  Do so silently if args[2] == 1.";
3thing = args[1];
4if (!is_a(thing, #1))
5this.wielding = setremove(this.wielding, thing);
6return;
7endif
8if (thing in this.wielding)
9`thing:unwielded_by(this) ! E_VERBNF';
10this.wielding = setremove(this.wielding, thing);
11if ((length(args) < 2) || (!args[2]))
12if (is_player(this) || (random(10) < 3))
13if (!this.fighting)
14this:announce_action_text($string_utils:pronoun_sub(thing.unwield_msg, this, thing, thing));
15else
16this:tell("You put away your ", thing:name(), ".");
17endif
18endif
19endif
20endif

exitfunc

Spec this none thisFlags rxdOwner #361Definer #107

Referenced by

Source

1this.encumbrance = {0, 0};
2what = args[1];
3if (what in this.wielding)
4this:_unwield(what, 1);
5this.wielding = setremove(this.wielding, what);
6endif
7if (what in this.wearing)
8this:_unwear(what, 1);
9this.wearing = setremove(this.wearing, what);
10endif
11kill = {};
12for x in [1..length(this.skill_mod_items)]
13this.skill_mod_items[x][2] = setremove(this.skill_mod_items[x][2], what);
14if (!this.skill_mod_items[x][2])
15kill = listappend(kill, this.skill_mod_items[x]);
16endif
17endfor
18for x in (kill)
19this.skill_mod_items = setremove(this.skill_mod_items, x);
20endfor

_heartbeat_disabled

Spec this none thisFlags rxOwner #361Definer #107

Referenced by

none

Source

1"Keep the heartbeat running.";
2"No work is done here -- it's just a wrapper to keep :heartbeat() up.";
3set_task_perms(this.owner);
4if ((!task_valid(this.heartbeat_task)) && (!this.f))
5if (is_a(this, #109))
6fork task_id (($rpg.heartbeat_interval - 3) + random(6))
7if (is_a(this, $creature))
8this.heartbeat_task = 0;
9this:_heartbeat();
10endif
11endfork
12this.heartbeat_task = task_id;
13this:heartbeat();
14`this.location:creature_heartbeat(this) ! ANY => 0';
15endif
16endif

heartbeat

Spec this none thisFlags rxdOwner #361Definer #107

Referenced by

Source

1"The actual heartbeat.";
2"Apply drug effects and bleeding, and launch the process_queue if we don't have one.";
3"This probably shouldn't be overridden; do your AI processing in :suggest_next_action() if possible.";
4this.action_count = 0;
5if (!this.executing)
6this.preemptible = 1;
7endif
8if (!this.fighting)
9this.combat_rounds = 0;
10endif
11if (!is_player(this))
12this:jumpstart();
13endif
14this:process_blood();
15for item in (this.contents)
16`item:creature_heartbeat(this) ! E_VERBNF => 0';
17endfor
18return;

take_damage

Spec this none thisFlags rxdOwner #361Definer #107

Referenced by

Source

1":take_damage(OBJ type, INT amount, OBJ bodypart, OBJ attacker)";
2"Damage myself and let the damage type inflict specials.";
3"Return the actual amount of damage we took.";
4{type, amount, ?bodypart = $bodypart, ?attacker = #-1} = args;
5if (this:is_in_afterlife())
6return 0;
7endif
8if ((is_a(this, $body) && gamevalid(this.player)) && is_a(area(this.player), #1837))
9this.player:queue_action($actions.verb, {this.player:cyberdeck(), "do_jackout", {this.player, this}, 0.0, 0}, 1, "jack out");
10endif
11`type:damage_taken(this, amount, bodypart) ! E_VERBNF => 0';
12if (armor = this:wearing_on(bodypart))
13for x in (armor)
14if (amount > 0)
15amount = x:take_damage(type, amount);
16endif
17endfor
18endif
19if ($ou:has_verb(this, "armor"))
20armor = this:armor();
21else
22armor = {@this.armor, @`this.location.armor ! ANY => {}'};
23endif
24for x in (armor)
25{atype, amin, amax, ?frontmod = E_NONE} = x;
26if (is_a(type, atype))
27range = amax - amin;
28abx = amin + (max(0, range) ? random(range) | 0);
29if (frontmod)
30if ((!this.attacking) || (attacker != this.attacking[1]))
31abx = toint(tofloat(abx) * frontmod);
32endif
33endif
34amount = max(0, amount - abx);
35endif
36endfor
37if (amount)
38if (((is_player(this) && valid(attacker)) && is_player(attacker)) && (attacker != this))
39amount = max(1, amount / 2);
40endif
41amount = bodypart:take_damage(this, amount, type);
42this.health = max(0, min(this.health - amount, this.health_max));
43type:affect(this, amount, bodypart);
44if (amount > type.blood_min)
45if (valid(blood = this.bloodstain))
46if (random(100) < $rpg.bloodstain_chance)
47stainee = occupants(this.location, $creature)[random($)];
48if (stainee != this)
49blood:add_to(stainee, 1, this:diseases());
50stainee:tell($su:ps(blood.spray_blood_msg, this, blood));
51endif
52endif
53endif
54endif
55if (this.health <= 0)
56fork (0)
57if ($rpg:valid(this))
58$ou:has_verb(this, "die") && this:die(this, type);
59endif
60endfork
61this:cancel_current_action();
62elseif (this.executing)
63if (((amount > 0) && (amount > ($skills.cool:total(this) + random(this.health_max * 3)))) && (!`this.executing[1].unstoppable ! E_PROPNF => 0'))
64actname = this.executing[1]:action_name(this, @this.executing[2..$]);
65fork (0)
66this:tell($ansi.red, "OUCH! ", $ansi.reset, " The pain makes you fumble", (actname == "verb") ? "." | ((" your " + actname) + "."));
67endfork
68this:cancel_current_action();
69endif
70endif
71endif
72return amount;

die

Spec this none thisFlags rxdOwner #361Definer #107

Referenced by

Source

1":die(?[, OBJ dtype, INT noannounce]) Cause me to die.  If args[3], don't announce on gamenet.";
2if (this:dead() || is_a(this.body, $corpse))
3return;
4endif
5"Just to be sure...";
6this.health = 0;
7this.dead = time();
8dtype = (length(args) > 1) ? args[2] | $damage;
9if ((($rpg:valid(this.body) && is_a(this.body, $body)) && (!is_a(this.body, $corpse))) && this.body.health)
10"We died in a dream as our body is still alive.";
11if (is_a(area = area(this), $area) && `area:handle_creature_death(this) ! E_VERBNF => 0')
12return;
13endif
14this.dead = 0;
15this:disengage_from_combat();
16this:clear_queue();
17this.health = this.health_max;
18this:aat(this:dnamec(), " falls to the ground -- dead!");
19killers = {};
20for x in (occupants(this.location, $creature))
21if (this in x.fighting)
22killers = {@killers, x};
23endif
24endfor
25killer = killers ? killers[random($)] | #-1;
26`this.location:broadcast_event(0, $actions.die, this, {killer}) ! ANY => 0';
27if ($ou:has_property(area, "player_respawn"))
28this:moveto(area.player_respawn);
29endif
30return 0;
31endif
32"If we get here, WE DIE FOR REAL (unless the area decides otherwise).";
33"Store this here because a knockout may remove it.";
34fighting = this.fighting;
35"rrs = $drugs.recent_revival_syndrome:doses_for(this);";
36"Figure out how we died.";
37"Now figure out how we died.";
38deathtype = "unknown";
39if (is_a(this.body, $body) && (!is_a(this.body, $corpse)))
40"We died while being in a dream, drop any items we may have picked up.";
41for x in (this.contents)
42move(x, this.location);
43endfor
44where = this.body.location;
45this.location:announce_all_but({this}, $su:ps("%DN suddenly disappears with a popping sound.", this));
46if (is_a(area = area(where), $area) && `area:handle_creature_death(this) ! E_VERBNF => 0')
47return;
48endif
49unconscious = 1;
50elseif (!is_a(this.body, $body))
51"We died while awake.";
52where = this.location;
53if (is_a(area = area(where), $area) && `area:handle_creature_death(this) ! E_VERBNF => 0')
54return;
55endif
56unconscious = 0;
57else
58"WTF?  Killed while we already have a corpse?  This should never happen.";
59$nets.prognet:announce(me, "$creature:die fuckup ", $su:nn(this.body));
60where = this.body.location;
61unconscious = 1;
62endif
63if (this.listening)
64this:tell("");
65this:tell(($ansi.bold_on + "You feel an ethereal hand reaching down into your body and ripping your soul free of its corporeal prison.  You rise faster, faster, through infinite space rushing toward a tunnel of bright light...") + $ansi.reset);
66this:tell("");
67this:tell("");
68this:tell("");
69this:tell("");
70this:tell("");
71endif
72if (this.last_words_msg)
73this:say($su:msg(this.last_words_msg));
74endif
75if (unconscious)
76"We died while being in a dream, items have already been dropped, so just jump to the afterlife.";
77this:moveto(this:afterlife());
78else
79"We died while awake, knock us into the afterlife.";
80this:_knockout(this:afterlife(), dtype);
81endif
82if (is_a(this.body, $body))
83this.body:turn_to_corpse(dtype);
84endif
85killers = {};
86has_player_killer = 0;
87for x in (occupants(where, $creature))
88if ((this in x.fighting) || (this.body in x.fighting))
89killers = listappend(killers, x);
90if (is_a(x, $player))
91has_player_killer = 1;
92endif
93endif
94endfor
95if ((this.executing && (this.executing[1] == $actions.npcbeg)) && gamevalid(this.executing[2][1]))
96killers = setadd(killers, this.executing[2][1]);
97if (is_a(this.executing[2][1], $player))
98has_player_killer = 1;
99endif
100endif
101if (has_player_killer)
102for x in (killers)
103if (!is_a(x, $player))
104killers = setremove(killers, x);
105endif
106endfor
107endif
108killer = killers ? killers[random($)] | #-1;
109if (valid(killer))
110try
111this:killed_by(killer, killers);
112except e (ANY)
113$rpg:report_error(e, {"killers: " + $su:nn(killers)});
114endtry
115endif
116for x in (dl = this:death_listeners())
117try
118(valid(x) && has_callable_verb(x, "hear_death")) && x:hear_death(this, killer, #-1);
119except e (ANY)
120if (e[1] != E_NONE)
121extra_info = tostr("death listener ", $su:nn(x), " args: ", toliteral({this, killer, #-1}));
122$rpg:report_error(e, extra_info);
123endif
124endtry
125endfor
126paid = 0;
127for x in (`killer.employer.contents ! ANY => {}')
128if ((!paid) && (!(x in dl)))
129paid = `x:hear_death(this, killer, #-1) ! E_VERBNF => 0';
130endif
131endfor
132$rpg:notify_death(this, killer);
133"If we are not fighting anything, then we'll give the XP to everything that was fighting us.";
134"This matters if we were knocked unconscious before we died.";
135fighting = ((!unconscious) && fighting) || killers;
136"We're no longer disabling XP gain from fighting.  Crazy!";
137"fighting = {};";
138if (fighting)
139pfighting = {};
140for x in (fighting)
141if (is_player(x))
142pfighting = {@pfighting, x};
143endif
144endfor
145if (pfighting)
146ratio = 1.0 / tofloat(length(pfighting));
147if (ratio < 1.0)
148ratio = ratio * 1.8;
149endif
150for x in (pfighting)
151val = this:xp_value(x);
152"val = (!rrs) ? this:xp_value(x) | 0;";
153x:award_xp(toint(tofloat(val) * ratio));
154"if (val)";
155"  x:ingest(#541309, 1);";
156"endif";
157endfor
158endif
159endif
160this:disengage_from_combat();
161this:cancel_current_action();
162this:clear_queue();
163if ((length(args) < 3) || (!args[3]))
164"$nets.deathnet:announce_death(this, killer, dtype, unconscious);";
165endif
166die_msgprop = (dtype != $damages.explode) ? "die_msg" | "explode_msg";
167if (unconscious && is_a(this.body, $body))
168diemsg = $su:ps(this.body.(die_msgprop), this.body, this.body);
169else
170diemsg = $su:ps(this.(die_msgprop), this, this);
171endif
172where:announce_all((($ansi.bold_on + $ansi.red) + diemsg) + $ansi.reset);
173if (is_a(this.bloodstain, $decal) && valid(killer))
174this.bloodstain:add_to(where, 1, this:diseases());
175if (random(100) < $rpg.bloodstain_chance)
176killer:tell("Ugh! Some ", this.bloodstain:name(), " splashed on you.");
177this.bloodstain:add_to(killer, 1, this:diseases());
178endif
179endif
180"`where:broadcast_event(0, $actions.die, this, {killer}) ! ANY => 0';";
181which_body = is_a(this.body, $body) ? this.body | this;
182`x:died_on(this) ! E_VERBNF';
183`x.implanted_in = this ! E_PROPNF';
184"Some oddball creatures may not leave bodies when knocked out, try to accomodate them...";
185if (is_a(this.body, $body) && $rpg:valid(this.body))
186if (dtype == $damages.explode)
187this.body:explode(this, dtype);
188else
189this.body.killed_by = killers;
190endif
191else
192for decal in (this:occupants($decal))
193$rpg:junk(decal);
194endfor
195endif

dodge_or_parry

Spec this none thisFlags rxdOwner #361Definer #107

Referenced by

Source

1":dodge_or_parry(OBJ who, OBJ with, INT attack_bonus, OBJ bodypart)";
2"Attempt to actively defend against an incoming attack of quality attack_bonus.";
3"Return the attack_bonus back if we didn't completely avoid it.";
4"Return a message if we successfully avoided the attack.";
5attack = args[3];
6attacker = args[1];
7weapon = args[2];
8if (is_a(weapon, #284))
9return attack;
10endif
11this._tohit_next = this._tohit_next + `this:weapon().melee_defense_mod ! ANY => 0';
12if ((ld = time() - this.last_dodge_time) < 5)
13"...we just tried to defend a few seconds ago, so give a bonus...";
14attack = attack + 4;
15endif
16if ((!this.fighting) || (this.fighting[1] != attacker))
17"...we're not attacking the attacker, so give a bonus...";
18attack = attack + 3;
19endif
20if ((timemod = time() - this.last_dodge_time) < 5)
21timemod = timemod - 5;
22else
23timemod = 0;
24endif
25this.last_dodge_time = time();
26if (random(100) <= 6)
27"...lucky shot!  no dodge or parry this time...";
28return args[3];
29endif
30if ((myweapon = this:weapon()):can_parry(weapon) && ((!valid(doing = this:is_doing())) || `doing.can_parry ! ANY => 1'))
31"...try to parry...";
32parry = myweapon.skill:check(this, myweapon.parry_bonus + (timemod - ((attack * 3) / 2)));
33"parry = myweapon.skill:check(this, (myweapon.parry_bonus + (timemod - ((attack * 3) / 2))) + $rpg.fight_styles_defend[this.fight_style]);";
34if (parry >= 0)
35if (parry < 2)
36this:cancel_if_possible();
37return {"X", tostr(this:dnamec(), "'s ", myweapon:name(), " stops ", attacker:dname(), "'s ", weapon:name(), " in mid-swing.")};
38endif
39return {"x", tostr(this:dnamec(), " knocks aside ", attacker:dname(), "'s ", weapon:name(), "!")};
40else
41return args[3];
42endif
43else
44"...try to dodge...";
45dodge = $skills.dodge:check(this, (timemod + 1) - attack);
46"dodge = $skills.dodge:check(this, ((timemod + 1) - attack) + $rpg.fight_styles_defend[this.fight_style]);";
47if (dodge > 0)
48if (dodge < 3)
49this:cancel_current_action();
50this:jumpstart();
51return {">", tostr(this:dnamec(), " dodges away from ", attacker:dname(), "'s ", is_a(weapon, #284) ? "shot." | "attack.")};
52endif
53return {")", tostr(this:dnamec(), " smoothly dodges out of the way.")};
54else
55return args[3];
56endif
57endif

dname

Spec this none thisFlags rxdOwner #361Definer #107

Referenced by

Source

1if (!this.has_proper_name)
2return "the " + this:name();
3else
4return this:name();
5endif

iname

Spec this none thisFlags rxdOwner #361Definer #107

Referenced by

Source

1if (!this.has_proper_name)
2return pass(@args);
3else
4return this:name();
5endif

random_bodypart

Spec this none thisFlags rxdOwner #361Definer #107

Referenced by

none

Source

1r = random(100);
2total = 0;
3parts = this.body_parts;
4for x in (parts)
5if (r < (total = total + x.size))
6return x;
7endif
8endfor
9return parts[$];

wearing_on

Spec this none thisFlags rxdOwner #361Definer #107

Referenced by

Source

1":wearing_on(OBJ bodypart) => LIST what I'm wearing there.";
2part = args[1];
3s = {};
4for x in (this.wearing)
5if (is_a(x, $clothing))
6for y in (x.covers)
7if (is_a(part, y))
8s = setadd(s, x);
9break;
10endif
11endfor
12endif
13endfor
14return s;

encumbrance

Spec this none thisFlags rxdOwner #361Definer #107

Referenced by

Source

1"Returns skill modifier indicative of how much we're carrying.";
2if ((time() - this.encumbrance[2]) < 10)
3return this.encumbrance[1];
4endif
5maxcarry = this:max_carry();
6carried = this:weight() - this.weight;
7`carried = tonum(tofloat(carried) * area(this.location).gee) ! ANY => 0';
8per = maxcarry / 7;
9e = min(0, -6 + ((maxcarry - carried) / per));
10this.encumbrance = {e, time()};
11return e;

attacking

Spec this none thisFlags rxdOwner #361Definer #107

Referenced by

none

Source

1"Return creature we're currently attacking, if anyone.";
2if (this.executing)
3if (this.executing[1] == $actions.attack)
4return this.executing[2][1];
5endif
6endif
7return #-1;

weapon

Spec this none thisFlags rxdOwner #361Definer #107

Referenced by

Source

1"Return the weapon I'm wielding.";
2for x in (this.wielding)
3if (is_a(x, $weapon))
4return x;
5endif
6endfor
7return this:unarmed_weapon();

do_command

Spec this none thisFlags rxdOwner #361Definer #107

Referenced by

Source

1rawcmd = args[1];
2if (rawcmd[1] == "\"")
3rawcmd[1..1] = "say ";
4elseif (rawcmd[1] == ":")
5rawcmd[1..1] = "emote ";
6elseif (rawcmd[1] == "'")
7rawcmd[1..1] = "page ";
8elseif (rawcmd[1] == ";")
9player:eval(argstr = rawcmd[2..$]);
10return;
11elseif ((length(rawcmd) > 4) && (rawcmd[1..4] == "eval"))
12player:eval(argstr = rawcmd[5..$]);
13return;
14endif
15cmdwords = $su:explode(rawcmd);
16player = this;
17if (length(cmdwords) > 1)
18huhargs = cmdwords[2..$];
19else
20huhargs = {};
21endif
22{verbstr, dobjstr, prepstr, iobjstr, argstr} = this:parse_command(rawcmd);
23objlist = {@player:contents(), @player.location:contents(), @player.location:exits()};
24dobj = $match_utils:match(tdobjstr = $su:trim(dobjstr), objlist);
25iobj = $match_utils:match(tiobjstr = $su:trim(iobjstr), objlist);
26checklist = {player, player.location, #160, #60528};
27if (valid(dobj))
28checklist = {@checklist, dobj};
29endif
30if (valid(iobj))
31checklist = {@checklist, iobj};
32endif
33for x in (checklist)
34if (location = $ou:has_verb(x, verbstr))
35verbargs = verb_args(location[1], verbstr);
36if ((verbargs[1] == "none") && valid(dobj))
37continue;
38elseif ((verbargs[1] == "this") && (dobj != x))
39continue;
40elseif ((verbargs[3] == "none") && valid(iobj))
41continue;
42elseif ((verbargs[3] == "this") && (iobj != x))
43continue;
44elseif (((verbargs[2] != "none") && (verbargs[2] != "any")) && (!index(verbargs[2], prepstr)))
45continue;
46else
47"we have a winner";
48set_task_perms(caller_perms());
49player = this;
50x:(verbstr)(@huhargs);
51return 1;
52endif
53endif
54endfor
55"if we made it here, nothing matched.";
56"pass to the :huh verbs";
57if (player.location:huh(cmdwords[1], huhargs))
58return 1;
59else
60player:tell("I don't understand that.");
61endif

parse_command

Spec this none thisFlags rxdOwner #361Definer #107

Referenced by

Source

1":parse_command(STR command) => { STR verbstr, STR dobjstr, STR prepstr, STR iobjstr, STR argstr}";
2command = args[1];
3"first pick the verb string off the beginning";
4command = $su:triml(command);
5if (verbsep = index(command, " "))
6verbstr = command[1..verbsep - 1];
7argstr = command[verbsep + 1..$];
8subject = argstr;
9else
10"we only got a verb, no args";
11return {command, "", "", "", ""};
12endif
13"look for quoted text";
14encoding = 0;
15encoded_subject = "";
16for x in [1..length(subject)]
17if ((x != 1) && (subject[x - 1] == "\\"))
18char = subject[x];
19encoded_subject = encoded_subject[1..$ - 1];
20elseif (subject[x] == "~")
21encoded_subject = encoded_subject + "~";
22char = "~";
23"this will produce ~ which will come back as a single ~ in decode_binary() later";
24elseif (encoding && (subject[x] == "\""))
25encoding = 0;
26char = "\"";
27elseif (((!encoding) && (subject[x] == "\"")) && (x != length(subject)))
28"make sure we have a closing quote";
29for y in [x + 1..length(subject)]
30if ((subject[y] == "\"") && (subject[y - 1] != "\\"))
31encoding = 1;
32break;
33endif
34endfor
35char = "\"";
36elseif (encoding && (subject[x] == " "))
37char = " ";
38else
39char = subject[x];
40endif
41encoded_subject = encoded_subject + char;
42endfor
43preps = {"with", "using", "at", "to", "in front of", "in", "inside", "into", "on top of", "on", "onto", "upon", "out of", "from inside", "from", "over", "through", "under", "underneath", "beneath", "behind", "beside", "for", "about", "is", "as", "off of", "off"};
44for prep in (preps)
45if (prepidx = index(encoded_subject, prep))
46if (((prepidx == 1) && (length(argstr) > length(prep))) && (argstr[length(prep) + 1] != " "))
47continue;
48elseif ((prepidx != 1) && (argstr[prepidx - 1] != " "))
49continue;
50elseif ((((prepidx + length(prep)) - 1) != length(argstr)) && (argstr[prepidx + length(prep)] != " "))
51continue;
52endif
53prepstr = prep;
54prepend = (prepidx + length(prep)) - 1;
55if (prepidx > 1)
56dobjstr = argstr[1..prepidx - 2];
57dobjstr = $su:trim(dobjstr);
58dobjstr = $su:trim(dobjstr, "\"");
59else
60dobjstr = "";
61endif
62if ((prepend + 2) > length(argstr))
63iobjstr = "";
64else
65iobjstr = argstr[prepend + 2..$];
66iobjstr = $su:trim(iobjstr);
67iobjstr = $su:trim(iobjstr, "\"");
68endif
69return {verbstr, dobjstr, prepstr, iobjstr, argstr};
70endif
71endfor
72"if no prep was found, then the whole argstr is considered dobjstr";
73dobjstr = argstr;
74iobjstr = "";
75prepstr = "";
76return {verbstr, dobjstr, prepstr, iobjstr, argstr};

at*tack kill shoot stab smash k murder

Spec any none noneFlags rxdOwner #361Definer #107

Referenced by

none

Source

1if (dobjstr == "me")
2what = this;
3else
4targets = {};
5for x in (this.location.contents)
6if ((($api.attackable:is_on(x) && (x != this)) && (!is_a(x, $corpse))) && (!(is_a(x, #59951) && (!x.smashable))))
7targets = {@targets, x};
8endif
9$cu:sin();
10endfor
11what = $match_utils:match(dobjstr, targets);
12if (!valid(what))
13player:tell("Kill what?  There's no '", dobjstr, "' here to kill.");
14return;
15endif
16endif
17if (what.f)
18this:tell("I absolutely refuse!");
19return;
20endif
21if ((what != player) && `this.location.no_combat ! E_PROPNF => 0')
22no_combat_msg = `this.location.no_combat_msg ! E_PROPNF => "Somehow you just don't feel like it."';
23this:tell(no_combat_msg);
24return;
25endif
26if (is_a(this, $player))
27if (is_a(what, $player) && (player != what))
28what:_pvp_record({player}, "attacked");
29this.attacked = setadd(this.attacked, what);
30endif
31endif
32this:weapon():attack(what);

show_score_full

Spec this none thisFlags rxdOwner #361Definer #107

Referenced by

Source

1{?oneskill = #-1, ?command = "sc"} = args;
2player:tell("");
3i = {};
4command = command[1..2];
5if (command != "sk")
6if (!valid(oneskill))
7this:show_score_stats();
8player:tell("");
9"this:tell_implants();";
10if (is_a(this, $rpg_player))
11this:show_xp();
12player:tell("");
13endif
14endif
15endif
16if (command == "ss")
17return;
18endif
19player:tell(tostr($ansi.underline_on, $ansi.bold_on, $ansi.bg_blue, $ansi.white, "Skill      Raw    +   + Total Depends Improve ", $ansi.reset, "   "));
20weapon_skill = this:weapon().skill;
21if (valid(oneskill))
22all_skills = {oneskill};
23else
24all_skills = $ou:leaves_suspended($skill);
25skip_skills = {};
26all_skills = {$skills.dodge};
27all_skills = setadd(all_skills, weapon_skill);
28all_skills = {@all_skills, @setremove(setremove($ou:leaves_suspended($skill), $skills.dodge), weapon_skill)};
29endif
30if (0 && is_a(this, $player))
31focus_skills = this.focus_skills;
32elseif ((0 && is_a(this, $clone)) && is_a(this.player, $player))
33focus_skills = this.player.focus_skills;
34else
35focus_skills = {};
36endif
37skills = {};
38skip_count = 0;
39skip_skills = {$skills.dodge, weapon_skill};
40shortskills = player:check_pref("shortskills");
41for skill in (all_skills)
42yield;
43if ((!valid(oneskill)) && is_a(skill, $stat))
44continue;
45endif
46raw = skill:raw(this);
47ip = skill:ip(this);
48mod = this:skill_modifier_for(skill);
49if (!valid(oneskill))
50if (((!raw) && (!ip)) && (!mod))
51continue;
52endif
53endif
54total = skill:total(this);
55if ((valid(oneskill) || (!shortskills)) || (total > 8))
56skills = listappend(skills, {skill, skill:name(), raw, ip, mod, total});
57endif
58if (skill in skip_skills)
59skip_count = skip_count + 1;
60endif
61endfor
62if (skip_count)
63prefix_skills = skills[1..min(skip_count, $)];
64prefix_skills = $lu:sort_alist(prefix_skills, 6);
65prefix_skills = $lu:reverse(prefix_skills);
66skills = skills[skip_count + 1..$];
67endif
68skills = $lu:sort_alist(skills, 6);
69skills = $lu:reverse(skills);
70if (skip_count)
71skills = {@prefix_skills, @skills};
72endif
73lines = {};
74for skill in (skills)
75name = skill[2];
76raw = skill[3];
77ip = skill[4];
78mod = skill[5];
79total = skill[6];
80skill = skill[1];
81deps = "";
82for dep in (skill.depends_on)
83deps = tostr(deps, ",", dep.abbrev);
84endfor
85if (deps)
86deps = deps[2..$];
87endif
88if (skill in focus_skills)
89line = tostr($ansi.bold_on, $su:left(name, 11), $ansi.reset);
90else
91line = $su:left(name, 11);
92endif
93if ((raw < 0) && (ip > 0))
94raw = raw + 1;
95ip = 100 - ip;
96if (raw == 0)
97raw = "-0";
98endif
99endif
100raw = tostr(raw);
101ip = tostr(ip);
102if (length(ip) < 2)
103ip = "0" + ip;
104endif
105lcost = skill:learn_cost_for(this);
106if (toint(raw) < 15)
107icost = $su:right(tostr(lcost, "xp "), -8);
108else
109icost = $su:right("  ", -8);
110endif
111line = tostr(line, $ansi.bold_on, $su:right(raw, -2), $ansi.reset, ".", $su:left(ip, -3));
112rawitem = 0;
113totitem = 0;
114if (skill.depends_on)
115for dep in (skill.depends_on)
116rawitem = rawitem + dep:raw(this);
117totitem = totitem + dep:total(this);
118endfor
119$cu:sin(0);
120rawitem = rawitem / length(skill.depends_on);
121totitem = totitem / length(skill.depends_on);
122endif
123rawtot = totitem - rawitem;
124mod = this:skill_modifier_for(skill) + rawtot;
125if (mod > 0)
126line = tostr(line, $ansi.bold_on, $ansi.green, $su:right(tostr("+", mod), -3), " ", $ansi.reset);
127elseif (mod < 0)
128line = tostr(line, $ansi.bold_on, $ansi.red, $su:right(tostr(mod), -3), " ", $ansi.reset);
129else
130line = tostr(line, $su:space(4));
131endif
132if (is_a(this, #132))
133if (mutmod > 0)
134line = tostr(line, $ansi.bold_on, $ansi.purple, $su:right(tostr("+", mutmod), -3), " ", $ansi.reset);
135elseif (mutmod < 0)
136line = tostr(line, $ansi.bold_on, $ansi.red, $su:right(tostr(mutmod), -3), " ", $ansi.reset);
137else
138line = tostr(line, $su:space(4));
139endif
140else
141line = tostr(line, $su:space(4));
142endif
143if (total >= 0)
144line = tostr(line, $ansi.bold_on, "[", $ansi.cyan, $su:right(tostr(total), 2), $ansi.white, "] ", $ansi.reset);
145else
146line = tostr(line, $ansi.bold_on, "[", $ansi.red, $su:right(tostr(total), 2), $ansi.white, "] ", $ansi.reset);
147endif
148if (skill in focus_skills)
149line = tostr(line, $ansi.bold_on, $ansi.yellow, $su:left(deps, 7), $ansi.reset, " ");
150else
151line = tostr(line, $ansi.yellow, $su:left(deps, 7), $ansi.reset, " ");
152endif
153if (is_a(this, $rpg_player) && (lcost <= this.xp))
154icost = tostr($ansi.bold_on, $ansi.green, icost, $ansi.reset);
155endif
156line = tostr(line, icost);
157ln = skill:level_desc_for(this);
158if (skill in focus_skills)
159line = tostr(line, $ansi.bold_on, $ansi.yellow, $su:left(ln, -33), $ansi.reset);
160else
161line = tostr(line, $ansi.yellow, $su:left(ln, -33), $ansi.reset);
162endif
163lines = listappend(lines, line);
164suspend(0);
165endfor
166player:tell_lines(lines);
167if (is_player(this) && (!this.description))
168player:tell("You think you'd be a lot cooler if you had a description.  (@describe me as \"A guy who blah blah blah...\")");
169endif

cant_take

Spec this none thisFlags rxdOwner #361Definer #107

Referenced by

Source

1":cant_take(OBJ what [,OBJ from-whom])";
2"Is there any reason we can't accept 'what'?";
3"If so, return a message explaining why.  Otherwise return false.";
4what = args[1];
5who = (length(args) > 1) ? args[2] | #-1;
6if (valid(who) && (who != this))
7if (!this:_allows("gifts", who))
8return this:dname() + " doesn't want it";
9endif
10endif
11if (!is_a(what, $thing))
12return "that's impossible";
13elseif (is_a(what, $glob))
14return 0;
15elseif (has_property(what, "bolted") && what.bolted)
16return "it is bolted down";
17elseif (toint(ww = what:weight()) < 0)
18return what.get_fail_msg;
19elseif (ww > (mc = this:max_carry()))
20return "it's far too heavy for you to lift";
21elseif (length(this.contents) > 80)
22return this.ps + "'s already carrying too many things";
23elseif (((this:weight() - this.weight) + ww) > mc)
24return "you're already carrying too much";
25elseif (!this.hands)
26return this.ps + " HAS NO HANDS";
27elseif (what.f && (!`this.programmer ! ANY => 0'))
28return "a powerful shock of static arcs out from it";
29elseif ((is_a(what.location, $body) && is_a(what.location.player, $builder)) && (!`this.programmer ! ANY => 0'))
30fork (1)
31#67932:zap(this);
32endfork
33return tostr("you are overcome by fear of imminent death.");
34elseif ((valid(who) && has_callable_verb(who, "cant_get_from")) && (cgf = who:cant_get_from(this, what)))
35return cgf;
36elseif ((valid(what) && has_callable_verb(what, "cant_take")) && (ct = what:cant_take(this)))
37return ct;
38elseif (valid(who) && (who.location != this.location))
39if (is_a(who, #109))
40return who.ps + " doesn't have it";
41else
42return "it isn't there";
43endif
44else
45return 0;
46endif

max_carry

Spec this none thisFlags rxdOwner #361Definer #107

Referenced by

Source

1return 100000;
2"return max(3, $skills.brawn:total(this)) * 6000;";

suggest_next_action

Spec this none thisFlags rxdOwner #361Definer #107

Referenced by

Source

1if (r = this:_fight())
2return {r, 0};
3endif

hear_event_fight

Spec this none thisFlags rxdOwner #361Definer #107

Referenced by

Source

1if (args[1] && (args[4][1] == this))
2if (this.fighting)
3if (!(args[3] in this.fighting))
4this.fighting = {@this.fighting, args[3]};
5endif
6elseif (this.executing && (this.executing[1] == $actions.move))
7"";
8else
9this:start_fighting(args[3]);
10endif
11endif

moveto

Spec this none thisFlags rxOwner #361Definer #107

Referenced by

Source

1where = args[1];
2oldloc = this.location;
3r = pass(@args);
4if (!(oldloc in {this.location, where}))
5this:disengage_from_combat();
6if ((oldarea = area(oldloc)) != (newarea = area(this.location)))
7try
8oldarea:creature_exitfunc(this, newarea);
9except e (ANY)
10$rpg:report_error(e);
11endtry
12try
13newarea:creature_enterfunc(this, oldarea);
14except e (ANY)
15$rpg:report_error(e);
16endtry
17endif
18if (is_a(where, $room))
19this:enter_room(where, oldloc);
20endif
21endif
22return r;

debug_tell

Spec this none thisFlags rxdOwner #361Definer #107

Referenced by

Source

1

hear_event_move

Spec this none thisFlags rxdOwner #361Definer #107

Referenced by

Source

1"Copied from SocratesNex (#315254):hear_event_move by Gilmore (#98) Tue Feb  3 03:42:30 2009 CST";
2"Copied from generic creature (#109):hear_event_move by Gilmore (#98) Mon Feb  2 13:17:28 2009 CST";
3if (args[1] && (args[3] == this.following))
4smoke = 0;
5for x in (this.location.contents)
6if (is_a(x, #6703))
7smoke = x.accumulation;
8endif
9endfor
10exit = args[4][1];
11if ($ou:has_property(exit, "otherside"))
12if ((!smoke) || ($skills.senses:check(this, 0 - smoke) > 0))
13this:tell("You follow ", args[3]:dname(), ".");
14exit:invoke(this);
15return;
16endif
17endif
18this.following = #-1;
19if (valid(args[3]))
20this:tell($ansi.cyan, "[ You stop following ", args[3]:dname(), ". ]", $ansi.reset);
21endif
22endif

start_fighting

Spec this none thisFlags rxdOwner #361Definer #107

Referenced by

Source

1{who, ?force_refocus = 1} = args;
2who = is_a(who, $creature) ? who:fighting_target() | #-1;
3if (!is_a(who, $creature))
4return;
5endif
6target = who:effective_target(this);
7if (who == this)
8return;
9elseif (target.location != this.location)
10return;
11elseif (!this:area().combat_ok)
12return;
13elseif ((!target:reachable_by(this)) && (!is_a(this:weapon(), #284)))
14this:tell(target:dnamec(), " is out of reach.");
15endif
16oldfighting = this.fighting;
17if (this.fighting)
18if (force_refocus)
19if (who != this.fighting[1])
20ct = this:weapon():change_target(this);
21if ((typeof(ct) == INT) && (!ct))
22this:tell("You cannot change your target right now.");
23return;
24elseif ((typeof(ct) == STR) && ct)
25this:tell("You cannot change your target right now because ", ct, ".");
26return;
27endif
28endif
29endif
30else
31"$drugs.combat_fatigue:remove_from(this);";
32endif
33if (((who in this.fighting) && (who != this.fighting[1])) && force_refocus)
34this:tell("You re-focus your attacks on ", target:dname(), ".");
35this.fighting = {who, @setremove(this.fighting, who)};
36elseif (!(who in this.fighting))
37"this:tell((($ansi.bold_on + $ansi.red) + $su:ps($rpg.fight_styles_attack_msg[this.fight_style], target)) + $ansi.reset);";
38this:tell((((($ansi.bold_on + $ansi.red) + "You attack ") + target:dname()) + "!") + $ansi.reset);
39target:tell(((($ansi.red + $ansi.bold_on) + this:dnamec()) + " attacks you!") + $ansi.reset);
40f = 0;
41for x in (this.location:occupants($living))
42if (x.fighting)
43f = 1;
44break;
45endif
46endfor
47if (!f)
48this.location:make_noise($noises.fight, this);
49endif
50this.fighting = {who, @this.fighting};
51this.location:broadcast_event(1, $actions.fight, this, {target});
52endif
53if (((oldfighting && (this.fighting[1] == who)) || ((!this.executing) && (!this.queue))) && (r = this:_fight()))
54this:queue_action(@r);
55endif

enter_room

Spec this none thisFlags rxdOwner #361Definer #107

Referenced by

Source

1living = this.location:occupants($living);
2if ((!living) || (living == {this}))
3return;
4endif
5for creature in (living)
6if (this in creature.fighting)
7if (this.fighting)
8if (!(creature in this.fighting))
9this.fighting = {@this.fighting, creature};
10endif
11else
12this:start_fighting(creature);
13endif
14endif
15endfor
16return;

follow

Spec this none noneFlags rxdOwner #361Definer #107

Referenced by

none

Source

1if (player == this)
2if (!valid(this.following))
3player:tell("You aren't following anyone anyway.");
4return;
5endif
6player:tell("You stop following ", this.following:dname(), ".");
7this.following = #-1;
8elseif (player.following == this)
9player:tell("You're already following ", this:dname(), ".");
10elseif (this.following == player)
11player:tell("But ", this:dname(), " is already following YOU!  The blind leading the blind...");
12else
13player:tell("You start following ", this:dname(), ".");
14player.following = this;
15this:tell(player:dnamec(), " starts following you.");
16this.location:broadcast_event(1, $actions.follow, player, {this});
17endif

look_self

Spec this none thisFlags rxdOwner #361Definer #107

Referenced by

none

Source

1player:client_tell("#$#info");
2if (this.obscured)
3desc = this.obscured_desc_msg;
4desc = (typeof(desc) == LIST) ? desc | {desc};
5player:tell(@desc);
6this:tell_health();
7this:tell_holding();
8this:tell_wearing(this.wearing);
9player:client_tell("#$#/info");
10return;
11endif
12pass(@args);
13for x in (this.contents)
14if (is_a(x, $decal))
15x:tell_person(this);
16endif
17endfor
18"this:tell_health();";
19this:tell_holding();
20this:tell_wearing();
21this:tell_carrying();
22this:tell_age();
23if (doing = this:doing_msg())
24player:tell(this.psc, " is ", doing, ".");
25endif
26player:client_tell("#$#/info");

give_to

Spec this none thisFlags rxdOwner #361Definer #107

Referenced by

Source

1":give_to(OBJ what, OBJ who)";
2"Try to hand an object we're holding to 'who'.";
3what = args[1];
4who = args[2];
5this:_wield(what);
6if (what.location != this)
7return;
8endif
9if (m = who:cant_take(what, this))
10this:aat(this:dnamec(), " tries to hand ", what:iname(), " to ", who:dname(), ", but ", m, ".");
11return 0;
12else
13if (who:get_gift(what, this))
14this.location:broadcast_event(0, $actions.give, this, {what, who});
15this:aat(this:dnamec(), " hands ", who:dname(), " ", what:iname(), ".");
16return 1;
17endif
18endif

got_gift

Spec this none thisFlags rxdOwner #361Definer #107

Referenced by

Source

1":got_gift(OBJ what, OBJ who)";
2"Got a gift handed to us by who.  Or, we picked something up, if who is us.";
3this:_wield(args[1], 0, 1);
4return;

hand_to

Spec this none thisFlags rxdOwner #361Definer #107

Referenced by

none

Source

1who = args[1];
2what = args[2];
3if (m = who:cant_take(what))
4this:aat(player:name(), " tries to give ", who:dname(), " ", what:iname(), ", but ", m, ".");
5else
6what:moveto(who);
7this:tell("You hand ", what:iname(), " to ", who:dname(), ".");
8this.location:announce_all_but({this}, $su:capitalize(this:dname()), " hands ", what:iname(), " to ", who:dname(), ".");
9who:got_gift(what, this);
10endif

say

Spec this none thisFlags rxOwner #361Definer #107

Referenced by

Source

1txt = args[1];
2original = txt;
3if (!txt)
4txt = "...";
5endif
6(is_player(this) && ((!has_property(this, "say_escape")) || this.say_escape)) && (txt = $su:escape(txt));
7`txt = this:text_sub(txt) ! ANY';
8sayword = "";
9if (length(args) > 2)
10sayword = args[3];
11endif
12if (`this.location:forbid_say(this, txt) ! ANY')
13return 0;
14endif
15if ((((!is_player(this)) && txt) && (txt[$] == "~")) && (txt[$ - 1] != "~"))
16txt = txt + "~";
17endif
18if ((txt && (txt[1] == ":")) && (!is_player(this)))
19this:aat((this:dnamec() + " ") + txt[2..$]);
20elseif ((length(args) > 1) && valid(args[2]))
21to = args[2];
22if ((!is_a(this, $player)) && has_callable_verb(this, "translate_language"))
23txt = this:translate_language(txt);
24endif
25m = strsub(this.say_to_msg, "%t", txt);
26this:aat($su:ps(m, this, to, to, to, to));
27this.location:broadcast_event(0, $actions.say, this, {original, to});
28else
29"m = strsub(this.say_msg, %t, txt)";
30if ((!is_a(this, $player)) && has_callable_verb(this, "translate_language"))
31txt = this:translate_language(txt);
32endif
33m = $english_utils:quote(this, txt);
34if (sayword && (i = index(m, txt)))
35m = tostr(strsub(m[1..i - 1], "say", sayword), m[i..$]);
36endif
37if (!is_a(this, $player))
38this:aat($su:ps(m, this));
39else
40this:aat(m);
41endif
42this.location:broadcast_event(0, $actions.say, this, {original, #-1});
43endif

_get

Spec this none thisFlags rxdOwner #361Definer #107

Referenced by

none

Source

1what = args[1];
2container = what.location;
3if (is_a(container, $creature) && (!is_a(container, $body)))
4return 0;
5endif
6if (container == this.location)
7if (!(ctm = this:cant_take(what)))
8if (this:get_gift(what, this.location))
9this.location:broadcast_event(0, $actions.get, this, {what, container});
10return 1;
11endif
12else
13this:aat(this:dname(), " tries to pick up ", what:iname(), ", but ", $su:ps(ctm), ".");
14endif
15elseif ($api.container:is_on(container) && ((container.location == this) || (container.location == this.location)))
16if (!(ctm = this:cant_take(what)))
17if (this:get_gift(what, this.location))
18this.location:broadcast_event(0, $actions.get, this, {what, container});
19return 1;
20endif
21else
22this:aat(this:dname(), " tries to get ", what:iname(), "from ", this.pp, " ", container:name(), ", but ", $su:ps(ctm), ".");
23endif
24endif
25return 0;

_drop

Spec this none thisFlags rxdOwner #361Definer #107

Referenced by

Source

1what = args[1];
2if (what.location == this)
3if (!this:_wield(what))
4return;
5endif
6what:moveto(this.location);
7m = this.drop_msg ? this.drop_msg | (what.drop_msg ? what.drop_msg | this.location.drop_msg);
8this:aat($su:ps(m, this, what, what));
9endif

set_gender

Spec this none thisFlags rxdOwner #361Definer #107

Referenced by

Source

1"set_gender(newgender) attempts to change this.gender to newgender";
2"  => E_PERM   if you don't own this or aren't its parent";
3"  => Other return values as from $gender_utils:set.";
4if (!($perm_utils:controls(caller_perms(), this) || (this == caller)))
5return E_PERM;
6else
7force = (length(args) >= 2) ? args[2] | 0;
8result = $gender_utils:set(this, args[1]);
9this.gender = (typeof(result) == STR) ? result | args[1];
10if (is_a(this, $player))
11if (force)
12clear_property(this, "body_parts");
13endif
14if ((this.gender in {"male", "female"}) && ($bodyparts.groin in this.body_parts))
15if (this.gender == "male")
16$bodyparts.penis:add_to(this);
17elseif (this.gender == "female")
18$bodyparts.vagina:add_to(this);
19endif
20endif
21if ((this.gender == "female") && ($bodyparts.chest in this.body_parts))
22$bodyparts.breasts:add_to(this);
23endif
24endif
25return result;
26endif

squeal_msg

Spec this none thisFlags rxdOwner #361Definer #107

Referenced by

none

Source

1":damage_reaction_msg(INT damage, OBJ bodypart)";
2"Return this creature's reaction to receiving this damage, based on the damage actually done after armor.";
3{damage, bodypart, ?force = 0} = args;
4raw = tofloat(damage);
5total = tofloat(this.health + damage);
6if ((!force) && (random(100) > 25))
7return;
8endif
9if (raw > total)
10raw = total;
11endif
12if (total == 0.0)
13pct = 100.0;
14else
15pct = (raw / total) * 100.0;
16endif
17r = this.squeals:select("squeals", min(100, toint(pct)), bodypart);
18return (r == "NULL") ? 0 | r;

ingest

Spec this none thisFlags rxdOwner #361Definer #107

Referenced by

Source

1":ingest(OBJ substance, INT units [,OBJ drug_vector [, INT quiet]]) => add this many units of the substance to this creature's bloodstream. If quiet, don't show messages.";
2"(drug vector may be an int, for backwards compatibility: 0 = intravenous, 1 = mouth, 2 = skin (all armor), 3 = divine, 4 = inhalation)";
3{substance, units, ?vector = 0, ?quiet = 0} = args;
4resisted = 0;
5if (!is_a(substance, $drug))
6raise(E_INVARG, "argument 1 must be a $drug", substance);
7elseif (substance == $drug)
8raise(E_INVARG, "argument 1 cannot be $drug itself, YOU ARE RETARDED", substance);
9elseif (typeof(units) != INT)
10raise(E_INVARG, "argument 2 must be an int", units);
11elseif ((vector && (typeof(vector) != INT)) && (!is_a(vector, $drug_vector)))
12raise(E_INVARG, "argument 3 must be an int or a $drug_vector", vector);
13endif
14"check for cross-resistance";
15for drugspec in (this.blood)
16drug = drugspec[1];
17if ((drug != substance) && drug:resist_drug(substance, units, vector))
18return 0;
19endif
20endfor
21if (typeof(vector) == INT)
22vector = {$drug_vectors.intravenous, $drug_vectors.mouth, $drug_vectors.skin, $drug_vectors.divine, $drug_vectors.inhalation}[vector + 1];
23"vector = {$drug_vectors.intravenous, $drug_vectors.mouth, $drug_vectors.skin, $drug_vectors.divine, $drug_vectors.chest, $drug_vectors.abdomen, $drug_vectors.arm, $drug_vectors.leg}[vector + 1];";
24endif
25if ($api.mechanical:is_on(this) && (vector in $api.mechanical.closed_vectors))
26return 0;
27endif
28if (vector != $drug_vectors.divine)
29units = this:_resist(substance, units, vector, quiet);
30endif
31if (units < 1)
32return 0;
33endif
34if (is_a(substance.addiction, $drug))
35this:ingest(substance.addiction, substance:addiction_doses(units, this), $drug_vectors.intravenous, quiet);
36endif
37for skillmod in (substance.skill_mods)
38skillmod[1]:flush(this);
39endfor
40for i in [1..length(this.blood)]
41drugspec = this.blood[i];
42if (drugspec[1] == substance)
43{timestamp, oldlevel} = drugspec[2..3];
44newlevel = min(oldlevel + units, substance.max_doses);
45this.blood[i][3] = newlevel;
46fork (0)
47"Guard against recycling.";
48if (is_a(this, $creature))
49substance:reup(this, units, oldlevel, timestamp);
50endif
51endfork
52if (substance.tell_healthnet && is_a(this, $player))
53$nets.healthnet:announce_event(this, substance, "reupped");
54endif
55if (newlevel >= substance.overdosage)
56fork (0)
57if (is_a(this, $creature))
58substance:overdose(this, newlevel - substance.overdosage);
59endif
60endfork
61if (substance.tell_healthnet && is_a(this, $player))
62$nets.healthnet:announce_event(this, substance, "overdosed on");
63endif
64endif
65return units;
66endif
67endfor
68"if we get here, it wasn't in blood";
69drugspec = {substance, time(), min(units, substance.max_doses)};
70this.blood = {@this.blood, drugspec};
71fork (0)
72if (gamevalid(this) && is_a(this, $creature))
73substance:onset(this, units);
74endif
75endfork
76if (substance.tell_healthnet && is_a(this, $player))
77$nets.healthnet:announce_event(this, substance, "contracted");
78endif
79return units;

sit

Spec none none noneFlags rxdOwner #361Definer #107

Referenced by

none

Source

1if (this in this.location.covering)
2player:tell("You're taking cover; stand up if you want to sit down somewhere.  I know, that sounds so weird.");
3return;
4endif
5if (!this:_sit())
6player:tell("You don't see anything you can sit on here.");
7endif

l*ook

Spec any any anyFlags rxdOwner #361Definer #107

Referenced by

none

Source

1if ((valid(dobj) && is_a(dobj, $exit)) && (dobjstr != "sky"))
2dobj:look_self();
3return;
4endif
5if ((args && (dobjstr != "sky")) && (!this:can_see()))
6if (is_a(this.location, $room))
7this:tell(this.location.too_dark_msg);
8else
9this:tell("It's too dark to see much of anything.");
10endif
11return;
12endif
13pad = player:check_pref("lookpad");
14tit = player:check_pref("looktitle");
15obv = 1;
16if (is_a(dobj, #457204))
17obv = dobj:obvious();
18endif
19if (!valid(this.location))
20player:tell(($ansi.cyan + "[ Something's gone wrong. An administrator will be notified, please wait. ]") + $ansi.reset);
21$nets.prognet:announce(#-1, tostr("Warning: ", player.name, " is in #-1."), 1);
22return;
23elseif (this.location == #742)
24this.location:look_self();
25return;
26endif
27if ((dobjstr == "") && (!prepstr))
28this.location:look_self();
29elseif (dobjstr == "sky")
30pad && player:tell();
31this.location:look_sky();
32elseif ((prepstr != "in") && (prepstr != "on"))
33if ((!dobjstr) && (prepstr == "at"))
34dobjstr = iobjstr;
35iobjstr = "";
36else
37dobjstr = dobjstr + (prepstr && ((dobjstr && " ") + prepstr));
38dobjstr = dobjstr + (iobjstr && ((dobjstr && " ") + iobjstr));
39endif
40dobj = $match_utils:match(dobjstr, {@this.contents, @this.location.contents});
41if ((is_a(this.location, #43226) && valid(this.location.probe)) && is_a(this.location.probe.location, $room))
42dobj = $match_utils:match(dobjstr, this.location.probe.location.contents);
43endif
44if ((!valid(dobj)) && `player.location:look_override(@args) ! E_VERBNF')
45return;
46endif
47if (!$command_utils:object_match_failed(dobj, dobjstr))
48if (`!dobj:is_hidden(player) ! E_VERBNF => 1')
49(obv && pad) && player:tell();
50(obv && tit) && player:tell($ansi.bold_on, dobj:title(), $ansi.reset);
51dobj:look_self();
52else
53return player:tell("I see no \"", dobjstr, "\" here.");
54endif
55endif
56elseif (!iobjstr)
57player:tell(verb, " ", prepstr, " what?");
58else
59iobj = $match_utils:match(iobjstr, {@this.contents, @this.location.contents});
60if (!$command_utils:object_match_failed(iobj, iobjstr))
61if (dobjstr == "")
62if (`!iobj:is_hidden(player) ! E_VERBNF => 1')
63pad && player:tell();
64tit && player:tell($ansi.bold_on, iobj:title(), $ansi.reset);
65iobj:look_self();
66else
67return player:tell("I see no \"", iobjstr, "\" here.");
68endif
69elseif ((is_a(iobj, $container) && (iobj.open == 0)) && iobj.opaque)
70player:tell(iobj:dnamec(), " is closed - you can't tell what's inside it.");
71elseif ((is_a(iobj, $container) || `iobj:can_look_into(this) ! ANY => 0') && valid(thing = iobj:match_contents(dobjstr)))
72player:tell("You peer into ", iobj:dname(), "...");
73pad && player:tell();
74return thing:look_self();
75elseif ((thing = iobj:match(dobjstr)) == $failed_match)
76if (`!iobj:is_hidden(player) ! E_VERBNF => 0')
77player:tell("I don't see any \"", dobjstr, "\" ", prepstr, " ", iobj.name, ".");
78else
79return player:tell("I see no \"", dobjstr, "\" ", prepstr, " ", iobjstr, ".");
80endif
81elseif (thing == $ambiguous_match)
82player:tell("There are several things ", prepstr, " ", iobj.name, " one might call \"", dobjstr, "\".");
83else
84if (`!thing:is_hidden(player) ! E_VERBNF => 1')
85pad && player:tell();
86tit && player:tell($ansi.bold_on, thing:title(), $ansi.reset);
87thing:look_self();
88else
89return player:tell("I see no \"", dobjstr, "\" ", prepstr, " ", iobj.name, ".");
90endif
91endif
92endif
93endif

tell_health

Spec this none thisFlags rxdOwner #361Definer #107

Referenced by

Source

1m = max(this.health_max, this.health);
2h = m - this.health;
3h = (h * 100) / m;
4if (this.health < this.health_max)
5m = #635:select(`this.health_type ! ANY => "health"', h, $bodypart);
6else
7m = "";
8endif
9bodyparts = this.body_parts;
10visible_skin = this:visible_skin();
11for x in (this.blood)
12if (ls = x[1]:look_self_msg(this, x[1]:doses_for(this)))
13m = tostr(m, "  ", $su:ps(ls, this, x[1], x[1]));
14endif
15endfor
16if (player == this)
17player:tell($rpg:health_bar(this.health, this.health_max, 0));
18endif
19if (m)
20player:tell($su:ps($su:trim(m), this));
21endif

tell

Spec this none thisFlags rxdOwner #361Definer #107

Referenced by

Source

1notify(this, tostr(@args));

tell_holding

Spec this none thisFlags rxdOwner #361Definer #107

Referenced by

Source

1for x in (this.wielding)
2if (x.location != this)
3this.wielding = setremove(this.wielding, x);
4endif
5endfor
6w = this.wielding;
7if (typeof(this.unarmed_weapon) == OBJ)
8if (this.unarmed_weapon.unarmed_visible)
9w = {@w, this.unarmed_weapon};
10endif
11endif
12if (w)
13namelist = {};
14msg_db = $su:message_db(w, "iname");
15if (player == this)
16msg = "You're holding ";
17else
18is_holding = `this.is_holding_msg ! E_PROPNF => "is holding"';
19msg = (($su:capitalize(this.ps) + " ") + is_holding) + " ";
20endif
21for x in (msg_db)
22namelist = setadd(namelist, ((len = length(x[1])) > 1) ? x[1][1]:plural_name(len) | x[2]);
23endfor
24msg = (msg + $su:english_list(namelist)) + ".";
25player:tell(msg);
26endif

_fight

Spec this none thisFlags rxdOwner #361Definer #107

Referenced by

Source

1if (area(this).combat_ok)
2if (f = this:sanitize_fighting())
3w = this:weapon();
4return {w.attack_action, {f[1], w}, 1, "kill " + f[1]:name()};
5endif
6endif

show_status

Spec this none thisFlags rxdOwner #361Definer #107

Referenced by

Source

1player:tell("");
2player:tell($ansi.bold_on, "Health   ", $ansi.reset, $meter_utils:health_for(player, this.health, this.health_max, this.health_max));
3if (0 && is_a(this, $player))
4player:tell($ansi.bold_on, "Thirst   ", $ansi.reset, $meter_utils:thirst_for(player, toint(this.thirst), 500, 30));
5player:tell($ansi.bold_on, "Hunger   ", $ansi.reset, $meter_utils:hunger_for(player, $drugs.hunger:doses_for(this), 500, 30));
6player:tell($ansi.bold_on, "Stress   ", $ansi.reset, $meter_utils:stress_for(player, this.stress, 500, 30));
7this:tell_wanted();
8endif
9this:tell_self_health();
10this:tell_holding();
11ps = (player == this) ? "You're" | (this.psc + " is");
12pp = (player == this) ? "Your" | this.ppc;
13if (is_a(this.following, $creature))
14player:tell(ps, " following ", this.following:iname(), ".");
15endif
16"if (this.hunting)";
17"  player:tell(ps, \" hunting for '\", this.hunting, \"'.\");";
18"endif";
19"credits = this.credit;";
20"if (player != this)";
21"  player:tell(pp, \" credit chip shows \", $ansi.green, $ansi.bold_on, \"$\", $su:group_number(credits), $ansi.reset, \".\");";
22"endif";
23if (this:encumbrance() < 0)
24player:systell(("Edit $creature:" + verb) + " to remove this message and enable the credit display once money is set up.");
25this:tell_encumbrance("full");
26endif
27"if (this.fight_style != 3)";
28"  m = ((pp + \" fighting style is '\") + $rpg.fight_styles[this.fight_style]) + \"' (\";";
29"  m = (m + $su:bonus_num(-$rpg.fight_styles_speed[this.fight_style])) + \" speed, \";";
30"  m = (m + $su:bonus_num($rpg.fight_styles_attack[this.fight_style])) + \" tohit, \";";
31"  m = (m + $su:bonus_num($rpg.fight_styles_defend[this.fight_style])) + \" def).\";";
32"  player:tell(m);";
33"endif";
34if (is_a(this, $player))
35this:tell_reclone();
36endif

_knockout

Spec this none thisFlags rxdOwner #361Definer #107

Referenced by

Source

1{?destination = #-1, ?dtype = $damage} = args;
2"if (!valid(destination))";
3"  if (#798:doses_for(this))";
4"    destination = #3222;";
5"  elseif ($ou:has_property(this, \"dream\") && valid(this.dream))";
6"    destination = this.dream;";
7"  elseif ($ou:has_property(this.location, \"dream\") && valid(this.location.dream))";
8"    destination = this.location.dream;";
9"  else";
10"    destination = $rpg.random_dreams[random(length($rpg.random_dreams))];";
11"  endif";
12"endif";
13a = this:area();
14if (!a.knockout_ok)
15return;
16endif
17if (!is_a(this.body, $body))
18body = `this.generic_body ! ANY => $body';
19body = $rpg:spawn(body, $hacker);
20this.body = body;
21body:setup(this, destination);
22this.blood = {};
23this:clear_queue();
24this.following = #-1;
25endif
26this:moveto(destination);

_wake

Spec this none thisFlags rxdOwner #361Definer #107

Referenced by

Source

1if (!valid(this.body))
2return 1;
3endif
4loc = this.home;
5wasdead = 0;
6if (is_a(this.body, $body))
7this.body:breakdown();
8for x in (this.contents)
9move(x, this.location);
10endfor
11for x in (this.body.contents)
12move(x, this);
13endfor
14loc = this.body.location;
15if (this.body:dead())
16wasdead = 1;
17endif
18this.body.player = #-1;
19this.health = max(1, this.body.health);
20$heart:unregister(this.body);
21move(this.body, $tomb);
22endif
23this.body = #-1;
24this:moveto(loc);
25this:clear_queue();
26this.location:announce_all_but({this}, $su:ps(this.owake_msg, this, this));
27if (wasdead)
28this:ingest($drugs.recent_revival_syndrome, 5, $drug_vectors.divine);
29endif

get_gift

Spec this none thisFlags rxdOwner #361Definer #107

Referenced by

Source

1":get_gift(OBJ what, OBJ who)";
2"Get a gift handed to us by who.  Or, we picked something up, if who is us.";
3what = args[1];
4if (this:hands() < args[1].handed)
5this:tell("You don't have enough hands to hold ", args[1]:iname(), "!");
6return 0;
7endif
8if (!valid(gift = `what:give_as_gift() ! ANY => #-1'))
9gift = what;
10endif
11gift:moveto(this);
12if ((!this.wielding) || (!is_a(this.wielding[1], $weapon)))
13this:_wield(gift, 0, 1);
14endif
15$ou:has_verb(gift, "was_gifted") && gift:was_gifted(this, args[2]);
16return 1;

clear_hands

Spec this none thisFlags rxdOwner #361Definer #107

Referenced by

Source

1":clear_hands(INT number-of-hands [,INT silent)";
2"Make room in my hands.";
3noh = args[1];
4silent = (length(args) > 1) ? args[2] | 0;
5hands = this:hands();
6if (noh > hands)
7return 0;
8elseif (noh == hands)
9for x in (this.wielding)
10this:_unwield(x, silent);
11endfor
12this.wielding = {};
13return 1;
14else
15handsfree = hands;
16del = {};
17for x in (this.wielding)
18if (!is_a(x, $thing))
19del = setadd(del, x);
20else
21handsfree = handsfree - x.handed;
22endif
23endfor
24for x in (del)
25this.wielding = setremove(this.wielding, x);
26endfor
27if (!this.wielding)
28return 1;
29endif
30kill = {};
31cand = this.wielding;
32nwcand = {};
33for x in (cand)
34if (!is_a(x, $weapon))
35nwcand = {@nwcand, x};
36endif
37endfor
38while ((handsfree < noh) && cand)
39if (nwcand)
40tokill = nwcand[1];
41nwcand = listdelete(nwcand, 1);
42else
43tokill = cand[1];
44endif
45handsfree = handsfree + tokill.handed;
46kill = {@kill, tokill};
47cand = setremove(cand, tokill);
48endwhile
49if (!silent)
50if (length(kill) == 1)
51this:_unwield(kill[1], silent);
52elseif (length(kill) > 1)
53this:aat(this:dnamec(), " puts away ", this.pp, " ", $su:english_list($lu:map_prop(kill, "name")), ".");
54for x in (kill)
55this:_unwield(x, 1);
56endfor
57endif
58else
59for x in (kill)
60this:_unwield(x, silent);
61endfor
62endif
63return 1;
64endif

diag*nose

Spec any none noneFlags rxdOwner #361Definer #107

Referenced by

none

Source

1"Use your Medic skill to see what's wrong.";
2if (!dobjstr)
3dobj = this;
4endif
5if (!valid(dobj))
6dobj = $match_utils:match(dobjstr, player.location:occupants($living));
7endif
8if (!valid(dobj))
9player:tell("You don't see any '", dobjstr, "' to diagnose here.");
10return;
11elseif (has_callable_verb(dobj, "do_diagnosis"))
12dobj:do_diagnosis(player);
13return;
14elseif (!is_a(dobj, $creature))
15player:tell(dobj:dnamec(), " isn't even alive, genius.");
16return;
17elseif ((this.location:darkness(1, player) > 1) && (!player:can_see_in_dark()))
18player:tell("It's too dark to get much useful medical information.");
19return;
20endif
21if (is_a(dobj, $corpse))
22duh = {"It's dead...Jim.", "Your professional medical opinion is that it's freaking dead.", "Diagnosis: not alive.", "You mean the dead thing over there?  Yeah it's uh...dead."};
23duh = duh[random($)];
24this:tell(duh);
25return;
26endif
27if (is_a(dobj, $body))
28prop = is_a(dobj, $corpse) ? "original_player" | "player";
29endif
30if (dobj != this)
31dobj:tell(player:dnamec(), " looks you over carefully.");
32endif
33if ((medskill = $skills.medic:total(player)) < 9)
34player:tell("You're no doctor, but...");
35dobj:tell_health();
36else
37player:tell("In your educated opinion...");
38if (dobj.health == dobj.health_max)
39player:tell(dobj:dnamec(), " has no injuries.");
40else
41pct = toint((tofloat(dobj.health) / tofloat(dobj.health_max)) * 100.0);
42player:tell(dobj:dnamec(), "'s wounds have left ", dobj.po, " with ", pct, "% of ", dobj.pp, " functionality.");
43endif
44blood = dobj.blood;
45for x in (blood)
46x[1]:tell_diagnosis(dobj);
47endfor
48endif

cure treat

Spec any on top of/on/onto/upon thisFlags rxdOwner #361Definer #107

Referenced by

none

Source

1"Use your Medic skill to treat a condition.";
2drugs = {};
3for x in (this.blood)
4drugs = setadd(drugs, x[1]);
5endfor
6drug = $match_utils:match(dobjstr, drugs);
7if (!valid(drug))
8player:tell(this:dnamec(), " doesn't have any problem with ", dobjstr, ".");
9elseif (!valid(drug.cure))
10player:tell("You can't cure ", drug.name, ".");
11else
12drug:try_cure(this, player);
13endif

remove_drug

Spec this none thisFlags rxdOwner #361Definer #107

Referenced by

none

Source

1":remove_drug(OBJ drug, INT doses)";
2drug = args[1];
3doses = args[2];
4return drug:remove_from(this, doses);

stand

Spec none none noneFlags rxdOwner #361Definer #107

Referenced by

Source

1target = this;
2self = player == target;
3if (target.posture == "standing")
4player:tell(self ? "You're already standing." | (target:dnamec() + " is already standing."));
5return;
6else
7for x in ({target.location, @target.location:occupants($furniture)})
8if (target in {@x.sitting, @x.reclining})
9x:stand(iobj = x, dobj = target);
10return;
11endif
12endfor
13if (target in target.location.covering)
14target.posture = "standing";
15target.location.covering = setremove(target.location.covering, this);
16target:aat(player:name(), " comes out from behind cover.");
17target:tell("You stand up.");
18else
19player:tell(self ? "You don't seem to be sitting on anything." | (target:dnamec() + " isn't sitting on anything."));
20endif
21endif

is_dead

Spec this none thisFlags rxdOwner #361Definer #107

Referenced by

none

Source

1return 0;

recline relax

Spec none none noneFlags rxdOwner #361Definer #107

Referenced by

none

Source

1if (this in this.location.covering)
2return player:tell("You're currently taking cover. Better stop hiding first if you want to lounge around.");
3endif
4for x in ({@this.location:occupants($furniture), this.location})
5if ((this in x.sitting) || (this in x.reclining))
6x:recline(iobj = x);
7return;
8endif
9endfor
10for x in ({@this.location:occupants($furniture), this.location})
11if ((x:free_seats() > 1) || (player in x:sitters()))
12x:recline();
13return;
14endif
15endfor
16player:tell("You don't see anything to recline on here.");

respawn

Spec this none thisFlags rxdOwner #361Definer #107

Referenced by

Source

1if (this.listening)
2this:tell("You feel that hand again, only pulling you downward now.  Your surroundings fade away back to the cold harsh edges of reality... Guess it wasn't your time, yet.");
3this:tell("");
4endif
5this.health = this.health_max;
6this.blood = {};
7this.tattoos = {};
8if (valid(this.body) && $ou:isa(this.body, $corpse))
9this.body.player = #-1;
10endif
11this.body = #-1;
12if (valid(this.respawn_handler))
13this.respawn_handler:_respawn(this);
14else
15where = this:respawn_location();
16if (!valid(where))
17where = this:default_respawn();
18endif
19if (!valid(where))
20$nets.prognet:announce(#2, ($su:nn(this) + " has invalid default_respawn and will be stuck in ") + $su:nn(this.location), 1);
21raise(E_INVARG, "invalid .respawn");
22return 0;
23endif
24where:announce_all($su:ps(this.respawn_msg, this));
25this:moveto(where);
26endif

doses_of

Spec this none thisFlags rxdOwner #361Definer #107

Referenced by

none

Source

1what = args[1];
2if (!$ou:isa(what, $drug))
3return E_INVARG;
4endif
5for drug in (this.blood)
6if (drug[1] == what)
7return drug[3];
8endif
9endfor

onset_of

Spec this none thisFlags rxdOwner #361Definer #107

Referenced by

none

Source

1what = args[1];
2if (!$ou:isa(what, $drug))
3return E_INVARG;
4endif
5for drug in (this.blood)
6if (drug[1] == what)
7return drug[2];
8endif
9endfor

_unwear

Spec this none thisFlags rxdOwner #361Definer #107

Referenced by

Source

1this.wearing = setremove(this.wearing, args[1]);

disengage_from_combat

Spec this none thisFlags rxdOwner #361Definer #107

Referenced by

Source

1for x in (this.fighting)
2if (gamevalid(x))
3this:stop_fighting(x);
4else
5this.fighting = setremove(this.fighting, x);
6endif
7endfor

stop_fighting

Spec this none thisFlags rxdOwner #361Definer #107

Referenced by

Source

1what = args[1]:fighting_target();
2if (!this.fighting)
3$drugs.combat_fatigue:remove_from(this);
4endif
5if (this.executing)
6if ($ou:has_property(this.executing[1], "is_attack_action") && this.executing[1].is_attack_action)
7if (this.executing[1]:attack_action_target(this, this.executing[2]) == what)
8this:cancel_current_action();
9endif
10endif
11endif
12this.fighting = setremove(this.fighting, what);
13if (is_a(this, $player) && (r = this:_fight()))
14this:queue_action(@r);
15endif

tell_wearing

Spec this none thisFlags rxdOwner #361Definer #107

Referenced by

Source

1m = m2 = "";
2nowm = {};
3mlist = {};
4bodyparts = this.body_parts;
5if (this.wearing || (!is_a(this, $player)))
6worn = {};
7for x in (bodyparts)
8if (stuff = this:wearing_on(x))
9if (stuff[1].worn_visible)
10worn = setadd(worn, stuff[1]);
11endif
12endif
13endfor
14for x in (worn)
15if (wm = `x:worn_msg() ! ANY => 0' || x.worn_msg)
16m2 = (m2 + (m2 ? "  " | "")) + $su:ps(wm, this, x);
17else
18nowm = setadd(nowm, x);
19endif
20endfor
21if (nowm)
22if (player == this)
23m = "You're wearing ";
24else
25m = this.psc + " is wearing ";
26endif
27m = ((m + $su:english_list($lu:map_verb(nowm, "iname"))) + ".") + (m2 ? "  " + m2 | "");
28else
29m = m2;
30endif
31endif
32for x in (player.wearing)
33if (is_a(x, #167327))
34xray = 1;
35break;
36endif
37endfor
38undescribedparts = bodyparts;
39shownudes = ((this == player) || (!is_a(player, $player))) || player:check_pref("shownudes");
40for x in (this.nude_descs)
41if (!(x[1] in bodyparts))
42continue;
43elseif (!x[2])
44continue;
45endif
46nude = x[2];
47nude = x[1]:modify_nude(nude, this);
48if (shownudes)
49m = (m + (m ? "  " | "")) + $su:ps(nude, this);
50endif
51undescribedparts = setremove(undescribedparts, x[1]);
52endfor
53drag = {};
54if (m)
55player:tell(m);
56endif

_allows

Spec this none thisFlags rxdOwner #361Definer #107

Referenced by

Source

1":_allows(STR action-type, OBJ who)";
2"Do I allow 'who' to do action-type to me?  1 or 0.";
3act = args[1];
4who = args[2];
5locallow = `this.location:_allows(act, who, this) ! E_VERBNF => E_NONE';
6if (locallow != E_NONE)
7return locallow;
8endif
9if (this:is_doing($actions.struggle))
10return 1;
11elseif (who == this)
12return 1;
13elseif (this:is_doing($actions.beg) && (act == "rape"))
14return 1;
15endif
16if ((act == "sex") && #164482:doses_for(this))
17return 1;
18endif
19if ((act == "sex") && `who.location.allow_all_sex ! ANY')
20return 1;
21endif
22if ((act == "gifts") && is_a(who, $npc))
23return 1;
24endif
25for x in (this.allows)
26if (x[1] == act)
27if ("anyone" in x[2])
28return 1;
29elseif (who in x[2])
30return 1;
31elseif (("friends" in x[2]) && (who in this.friends))
32return 1;
33elseif (("admins" in x[2]) && who.programmer)
34return 1;
35elseif ((("corp" in x[2]) && is_a(this.employer, $biz)) && this.employer:has_member(who))
36return 1;
37endif
38endif
39endfor

real_name

Spec this none thisFlags rxdOwner #361Definer #107

Referenced by

none

Source

1if (is_a(this.body, $body))
2return this.body:real_name();
3else
4return this:name();
5endif

recycle

Spec this none thisFlags rxdOwner #361Definer #107

Referenced by

Source

1$heart:unregister(this);
2return pass(@args);

verb_sub

Spec this none thisFlags rxdOwner #361Definer #107

Referenced by

none

Source

1"Substitute my .verb_subs in messages, if any.";
2text = args[1];
3if ((r = pass(text, 1)) == E_NONE)
4return $gender_utils:get_conj(text, this);
5else
6return r;
7endif
8if (a = `$list_utils:assoc(text, this.verb_subs) ! ANY')
9return a[2];
10else
11return $gender_utils:get_conj(text, this);
12endif

xp_value

Spec this none thisFlags rxdOwner #361Definer #107

Referenced by

Source

1":xp_value(OBJ who) => value in XP when killed by 'who'.";
2if (!is_a(this.body, $body))
3if (!is_a(area(this), $real_area))
4return 0;
5endif
6else
7if (!is_a(area(this.body), $real_area))
8return 0;
9endif
10endif
11who = args[1];
12if (typeof(this.xp_value) == LIST)
13{base, dropxp, zeroxp} = this.xp_value;
14xpt = max(0, who.xp_total);
15if (xpt >= zeroxp)
16return 0;
17elseif (xpt <= dropxp)
18return base;
19else
20d2 = zeroxp - dropxp;
21d1 = xpt - dropxp;
22val = base - toint(tofloat(base) * (tofloat(d1) / tofloat(d2)));
23return val;
24endif
25endif
26base = this.xp_value;
27curve = $rpg.creature_xp_curve;
28if (typeof(who) == OBJ)
29xp_total = who.xp_total - who:quest_xp();
30xp_total = max(0, xp_total);
31else
32xp_total = who;
33endif
34if (xp_total > (xbase = base * curve))
35extra = xp_total - xbase;
36base = base - (extra / $rpg.creature_xp_drop);
37endif
38return max(0, base);

@setup

Spec this none noneFlags rxdOwner #361Definer #107

Referenced by

none

Source

1if (!player.programmer)
2player:tell("You dirty exploiting son of a bitch.");
3return;
4endif
5if ((!player.wizard) && (player != this.owner))
6player:tell("You don't own ", this:dname(), ".");
7else
8skills = $ou:leaves($skill);
9for stat in (children($stat))
10val = $command_utils:read(("Enter value for stat " + stat.name) + ":");
11stat:set(this, tonum(val), 1);
12skills = setremove(skills, stat);
13endfor
14for skill in (skills)
15val = $command_utils:read(("Enter raw value for skill " + skill.name) + ":");
16skill:set(this, tonum(val), 1);
17endfor
18player:tell("Done setting up ", $su:nn(this), ".");
19endif

tell_encumbrance

Spec this none thisFlags rxdOwner #361Definer #107

Referenced by

Source

1":tell_encumbrance([INT verbose])";
2"Tell about my encumbrance.  If args, tell about zero too.";
3e = this:encumbrance();
4if (e <= -3)
5player:tell("You can barely move under your backbreaking load.");
6elseif (e == -2)
7player:tell("You grunt and strain under your heavy load.");
8elseif ((e == -1) && args)
9player:tell("You're a little weighted down with gear.");
10elseif ((e == 0) && args)
11player:tell("You are unencumbered.");
12endif
13return e;

posture_msg

Spec this none thisFlags rxdOwner #361Definer #107

Referenced by

none

Source

1who = this;
2pm = `this.executing[1]:posture_msg(this) ! ANY => 0';
3if (pm)
4return pm;
5endif
6msg = ((who.posture == "standing") && who.location.default_posture_msg) ? who.location.default_posture_msg | (who.posture + " here");
7msg = msg + ((doing = who:doing_msg()) ? (", " + doing) + "." | ".");
8return msg;

_hear

Spec this none thisFlags rxdOwner #361Definer #107

Referenced by

none

Source

1return;

killed_by

Spec this none thisFlags rxdOwner #361Definer #107

Referenced by

Source

1killer = args[1];
2if (is_a(area = area(this), $area) && is_a(maproom = area.maproom, #111089))
3maproom:announce_all("Below, ", killer:dname(), " kills ", this:iname(), ".");
4endif

_resist

Spec this none thisFlags rxdOwner #361Definer #107

Referenced by

Source

1{what, count, vector, ?quiet = 0} = args;
2resisted = 0;
3resists = this.resists;
4if ($api.mechanical:is_on(this))
5resists = {@this.resists, @$api.mechanical.resists};
6endif
7count = vector:resist(this, what, count);
8if (is_a(this, $body))
9if ($recycler:valid(this.player))
10if (is_a(this.player, $creature))
11resists = this.player.resists;
12else
13this.player = #-1;
14endif
15endif
16endif
17for drug in (this.blood)
18for res in (drug[1].resists)
19res = (typeof(res) == LIST) ? res | {res, 100};
20if (is_a(what, res[1]))
21resists = listappend(resists, {res[1], res[2] * drug[3]});
22endif
23endfor
24endfor
25for x in (resists)
26if (is_a(what, x[1]))
27for y in [1..count]
28if (random(100) <= x[2])
29resisted = resisted + 1;
30endif
31$cu:sin(0);
32endfor
33endif
34endfor
35count = count - resisted;
36if ((count > 0) && (what.endurance_resist > -999))
37check = $skills.endurance:check(this, what.endurance_resist - 2);
38if (check > 0)
39count = (count - 1) - (check / 5);
40if (count < 1)
41quiet || this:tell($su:ps($su:msg(what.endure_msg), this, what));
42endif
43endif
44endif
45return max(count, 0);

initialize

Spec this none thisFlags rxdOwner #361Definer #107

Referenced by

Source

1r = pass(@args);
2$heart:register(this);
3return r;

count

Spec any none noneFlags rxdOwner #29Definer #107

Referenced by

none

Source

1if (!valid(match = $mu:match(dobjstr, {@player.contents, @player.location.contents})))
2player:tell("Searching for \"", dobjstr, "\", you find nothing.");
3return;
4endif
5for loc in ({player.contents, player.location.contents})
6matches = {};
7for candidate in ({@loc})
8if ((((valid(match = $mu:match(dobjstr, {candidate})) && match:name()) && (!`match:is_hidden(player) ! E_VERBNF => 0')) && (!is_a(match, $exit))) && (match != player))
9matches = {@matches, match};
10endif
11endfor
12cats = $lu:remove_duplicates($lu:map_verb(matches, "name"));
13forstr = {};
14for cat in (cats)
15howmany = 0;
16reference = #-1;
17for match in (matches)
18if (match:name() == cat)
19if (!valid(reference))
20reference = match;
21endif
22howmany = howmany + 1;
23endif
24endfor
25if ((howmany == 1) && `reference.long_name_msg ! E_PROPNF => ""')
26cat = reference.long_name_msg;
27endif
28decalcheck = is_a(reference, $decal);
29if (is_a(reference, $player) || (!howmany))
30pref = "";
31elseif (decalcheck)
32pref = "some ";
33else
34pref = $su:english_number(howmany) + " ";
35endif
36forstr = {@forstr, pref + (((howmany > 1) && (!decalcheck)) ? reference:plural_name() | cat)};
37endfor
38locstr = (loc == player.contents) ? "inventory" | "immediate surroundings";
39if (!forstr)
40player:tell("Searching for \"", dobjstr, "\" in your ", locstr, ", you find nothing.");
41continue;
42elseif (length(forstr) > 1)
43forstr[$] = "and " + forstr[$];
44endif
45thelist = (length(forstr) == 2) ? (forstr[1] + " ") + forstr[2] | $su:from_list(forstr, ", ");
46player:tell("Searching for \"", dobjstr, "\" in your ", locstr, ", you find ", thelist, ".");
47endfor

check_pref

Spec this none thisFlags rxdOwner #361Definer #107

Referenced by

none

Source

1return 0;

abbreviated_name

Spec this none thisFlags rxdOwner #361Definer #107

Referenced by

none

Source

1"Copied from generic controllable creature (#7607):abbreviated_name by Blacklite (#7195) Sat May 22 14:40:17 2004 PDT";
2"An abbreviated name from the first letter in each word of the name.";
3aname = "";
4for w in ($su:words(this:name()))
5aname = tostr(aname, w[1]);
6endfor
7return aname;

tell_self_health

Spec this none thisFlags rxdOwner #361Definer #107

Referenced by

Source

1blood = this.blood;
2for x in (blood)
3if (m = x[1]:victim_tell_msg(x[3]))
4player:tell(($ansi.bold_on + m) + $ansi.reset);
5endif
6endfor

ooc

Spec any any anyFlags rxdOwner #361Definer #107

Referenced by

none

Source

1if ($skills.brains:total(this) < 6)
2m = #86710:make_rk();
3elseif ($skills.cool:total(this) < 6)
4m = #130830.aol[random($)];
5else
6m = argstr;
7endif
8if (`this.location:forbid_say(this, m) ! ANY')
9return;
10endif
11player.location:announce("[OOC: ", player:name(), " says, \"", m, "\"]");
12player:tell("[OOC: You say, \"", m, "\"]");

_get_many

Spec this none thisFlags rxdOwner #361Definer #107

Referenced by

none

Source

1picking_up = args[1];
2final = {};
3finalnamestrs = {};
4container = picking_up ? picking_up[1].location | #-1;
5for what in (picking_up)
6if (((what.location == this.location) || (what.location.location == this)) || (what.location.location == this.location))
7if (this:get_gift(what, this.location))
8this.location:broadcast_event(1, $actions.get, this, {what});
9final = setadd(final, what);
10endif
11endif
12endfor
13finalnames = $su:message_db(final, "iname");
14for x in (finalnames)
15finalnamestrs = setadd(finalnamestrs, ((len = length(x[1])) > 1) ? ($su:aggregate_number(len) + " ") + x[1][1]:pname() | x[2]);
16endfor
17if (picking_up)
18if ($api.container:is_on(container))
19this:aat(((((((this:dnamec() + " finishes getting ") + $su:english_list(finalnamestrs)) + " from ") + this.pp) + " ") + container:name()) + ".");
20else
21this:aat(((this:dnamec() + " finishes picking up ") + $su:english_list(finalnamestrs)) + ".");
22endif
23endif

_get_from_container

Spec this none thisFlags rxdOwner #361Definer #107

Referenced by

none

Source

1what = args[1];
2container = args[2];
3if ((container.location == this.location) || (container.location == this))
4if (!(ctm = this:cant_take(what)))
5if (this:get_gift(what))
6this:aat(this:dnamec(), " gets ", what:iname(), " from ", this.pp, " ", container:name(), ".");
7this.location:broadcast_event(1, $actions.get, this, {what});
8return 1;
9endif
10else
11this:aat(this:dname(), " tries to get ", what:iname(), " from ", container:dname(), ", but ", this.po, " ", $su:ps(ctm), ".");
12endif
13endif

get_all

Spec this none thisFlags rxdOwner #361Definer #107

Referenced by

Source

1"Should handle the following cases:";
2"get all";
3"get all <something>";
4"get all <something> from <something>";
5"This verb tries to match 'all' in the context of getting something.  If another phrase is given, only items matching that phrase will be selected, otherwise it will try to match everything.";
6words = args[1];
7if (words && (words[1] == "all"))
8"pass this request to get_all";
9this:get_all((length(words) > 1) ? words[2..$] | {});
10return;
11endif
12"Now we only have these cases to deal with:";
13"get <something>";
14"get <something> from <something>";
15if (prepstr == "from")
16"they want something from a container";
17if (!valid(iobj))
18iobj = $match_utils:match(iobjstr, {@player.contents, @player.location.contents});
19endif
20if (!$api.container:is_on(iobj))
21player:tell("I don't understand that.");
22return;
23elseif (!is_a(dobj = $match_utils:match(dobjstr, iobj.contents), #1))
24player:tell("You don't see any '", dobjstr, "' in ", iobj:dname(), ".");
25return;
26else
27this:queue_action($actions.get, {dobj, iobj}, 1, (verb + " ") + argstr);
28endif
29else
30if (!valid(dobj))
31dobj = $match_utils:match(dobjstr, player.location.contents);
32endif
33if (!valid(dobj))
34player:tell("You don't see any '", dobjstr, "' here.");
35return;
36else
37this:queue_action($actions.get, {dobj}, 1, (verb + " ") + argstr);
38endif
39endif

_put

Spec this none thisFlags rxdOwner #361Definer #107

Referenced by

none

Source

1what = args[1];
2container = args[2];
3if (container == this.location)
4if (container:acceptable(what))
5this.location:broadcast_event(0, $actions.put, this, {what, container});
6what:moveto(container);
7else
8this:tell("You can't drop ", what:dname(), " here.");
9endif
10elseif ($api.container:is_on(container) && ((container.location == this) || (container.location == this.location)))
11if (container:acceptable(what))
12this.location:broadcast_event(0, $actions.put, this, {what, container});
13what:moveto(container);
14else
15this:tell("You can't seem to cram ", what:dname(), " into ", container:dname(), ".");
16endif
17endif

drop put

Spec any any anyFlags rxdOwner #361Definer #107

Referenced by

none

Source

1"drop <something>";
2"drop all";
3"drop all <something>";
4"put <something> in <something>";
5"put all <something> in <something>";
6"This verb is a jumping off point for all put-type activities.  Since it has args <any any any> it will always match before any 'put/drop' verbs on other objects.";
7if ((((prepstr == "in") || (prepstr == "into")) || (prepstr == "inside")) || (prepstr == "on"))
8"they want to put something in a container";
9container = iobj;
10if (!is_a(container, $thing))
11container = $match_utils:match(iobjstr, {@player:occupants($thing), @player.location:occupants($thing)});
12endif
13if (!is_a(container, $thing))
14player:tell(("You don't seem to have anything called \"" + iobjstr) + "\".");
15elseif (!$api.container:is_on(container))
16if ($ou:has_verb(container, "put"))
17container:put(player, dobj, container);
18else
19player:tell("I don't understand that.");
20endif
21elseif (!(targets = $match_utils:match_many(dobjstr, player:occupants($thing))))
22player:tell("You don't seem to have any '", dobjstr, "'.");
23elseif (cant = container:cant_put_into(targets[1], player))
24player:tell("You can't put ", targets[1]:dname(), " in ", container:dname(), " because ", cant, ".");
25else
26targets = (typeof(targets) == LIST) ? setremove(targets, container) | targets;
27container:put_into(this, targets);
28endif
29else
30if (!dobjstr)
31player:tell(verb + " what?");
32return;
33endif
34if (!(targets = $match_utils:match_many(dobjstr, player:occupants($thing))))
35player:tell("You don't seem to have a '", dobjstr, "'.");
36return;
37elseif (length(player.location.contents) > player.location.max_objects)
38player:tell("You can't drop that here, there's no place left to put it.");
39return;
40else
41this:queue_action($actions.drop, {targets, player.location, {}}, 1, (verb + " ") + argstr);
42endif
43endif

_suggest_next_action

Spec this none thisFlags rxdOwner #361Definer #107

Referenced by

none

Source

1return this:suggest_next_action(@args);

sitting_on

Spec this none thisFlags rxdOwner #361Definer #107

Referenced by

Source

1room = this.location;
2if (is_a(room, $room))
3for x in ({@room:occupants($furniture), room})
4if (this in x.sitting)
5this.posture = "sitting";
6return x;
7endif
8endfor
9endif
10return #-1;

reclining_on

Spec this none thisFlags rxdOwner #361Definer #107

Referenced by

Source

1room = this.location;
2if (is_a(room, $room))
3for x in ({@room:occupants($furniture), room})
4if (this in x.reclining)
5this.posture = "reclining";
6return x;
7endif
8endfor
9endif
10return #-1;

base_dodge

Spec this none thisFlags rxdOwner #361Definer #107

Referenced by

none

Source

1swing = args[1];
2with = args[2];
3if (!task_valid(this.process_queue))
4this:jumpstart();
5endif
6if (is_a(with, #284) && (this in this.location.covering))
7return swing - 5;
8endif
9"dodge = $skills.dodge:total(this, 0) - 8;";
10"dodge = toint((tofloat(dodge) * $rpg.base_dodge_ratio) * with.antidodge_mod);";
11"swing = swing - max(0, dodge);";
12return swing;

base_attack

Spec this none thisFlags rxdOwner #361Definer #107

Referenced by

none

Source

1bonus = args[1];
2weapon = args[2];
3target = (length(args) > 2) ? args[3] | #-1;
4if (is_a(weapon, #284))
5"bonus = bonus + (-$rpg.fight_styles_attack[this.fight_style]);";
6if (this in this.location.covering)
7bonus = bonus + 2;
8endif
9if (target in this.location.covering)
10bonus = bonus - 4;
11endif
12else
13"bonus = bonus + $rpg.fight_styles_attack[this.fight_style];";
14endif
15bonus = bonus + weapon:accuracy();
16bonus = bonus + this._tohit_next;
17"if (is_a(target, $creature) && (f = $drugs.combat_fatigue:doses_for(target)))";
18"  bonus = bonus + f;";
19"endif";
20if ((length(this.wielding) > 1) && is_a(this.wielding[2], $weapon))
21bonus = bonus + $rpg.dual_wield_tohit;
22endif
23this.fighting && this:combat_fatigue();
24return bonus;

acceptable

Spec this none thisFlags rxdOwner #361Definer #107

Referenced by

none

Source

1return 1;

stow unwield sheath*e rem*ove holster

Spec any none noneFlags rxdOwner #361Definer #107

Referenced by

none

Source

1if (!dobjstr)
2for what in (this.wielding)
3this:queue_action($actions.unwield, {what}, 1, (verb + " ") + argstr);
4endfor
5return;
6endif
7what = $match_utils:match(dobjstr, this.contents);
8if (!valid(what))
9this:notify(("You don't have a '" + dobjstr) + "'.");
10return;
11endif
12if (what in this.wearing)
13this:queue_action($actions.remove, {what}, 1, (verb + " ") + argstr);
14elseif (what in this.wielding)
15this:queue_action($actions.unwield, {what}, 1, (verb + " ") + argstr);
16else
17if (is_a(what, $clothing))
18this:notify(("You're not wearing " + what:dname()) + ".");
19else
20this:notify(("You're not holding " + what:dname()) + ".");
21endif
22endif

rescue

Spec this none noneFlags rxdOwner #361Definer #107

Referenced by

none

Source

1killing_me = {};
2for x in (setremove(this.location:occupants($creature), this))
3if (x.fighting && (x.fighting[1] == this))
4if (is_player(x) && (!is_connected(x)))
5player:tell("You can't interfere with that fight.");
6return;
7endif
8killing_me = {@killing_me, x};
9endif
10endfor
11if (!killing_me)
12player:tell("Nothing is attacking ", this:dname(), ".");
13elseif (player in killing_me)
14player:tell("Rescue them from yourself?  Try 'stop', Mother Teresa.");
15elseif (player == this)
16player:tell("I don't know what to tell you, man.");
17elseif (player.fighting && (!(player.fighting[1] in killing_me)))
18player:tell("You should finish your own fight first!");
19elseif (!player:cooldown_check("rescue", 15))
20return;
21else
22if (player in player.location.covering)
23player:stand();
24endif
25player:aat(player:dnamec(), " jumps in front of ", this:dname(), "!");
26this:cancel_current_action();
27player:cancel_current_action();
28for x in (killing_me)
29player:start_fighting(x, 0);
30suspend(1);
31x:start_fighting(player);
32endfor
33endif

dress

Spec this in/inside/into anyFlags rxdOwner #361Definer #107

Referenced by

none

Source

1"player:tell(\"Disabled.  Big holes and so on.\");";
2"return;";
3if (player == this)
4player:tell("You can just say 'wear ", iobjstr, "', you know.");
5elseif (!this:_allows("sex", player))
6player:tell("You don't think ", this:dname(), " is going to let you dress ", this.po, ".  Maybe if you ask nicely?");
7elseif (!valid(clothing = $match_utils:match(iobjstr, this:occupants($clothing))))
8player:tell(this:dnamec(), " isn't holding a '", iobjstr, "'.");
9else
10player:queue_action($actions.dress, {this, clothing}, 1, "dress " + this.name);
11endif

think

Spec any any anyFlags rxdOwner #361Definer #107

Referenced by

Source

1if ((!player.programmer) && `this.location.forbid_think ! ANY')
2this:tell("Not here.");
3return;
4endif
5if (($skills.brains:total(this) < 6) && (!is_a(player, $immortal)))
6m = #130830.fc;
7m = m[random(length(m))];
8elseif (($skills.cool:total(this) < 6) && (!is_a(player, $immortal)))
9m = #130830.aol[random($)];
10elseif (is_a(this.location, #1047))
11m = $eu.imafish[$eu.imafish_index];
12$eu.imafish_index = ($eu.imafish_index % length($eu.imafish)) + 1;
13else
14m = $su:escape($su:from_list(args, " "));
15endif
16this.location:announce_all(this:dnamec(), " . o O ( ", m, " )");

tree_tag

Spec this none thisFlags rxdOwner #361Definer #107

Referenced by

Source

1return ($ansi.cyan + tostr(this.health_max)) + $ansi.reset;

get take

Spec any any anyFlags rxdOwner #361Definer #107

Referenced by

Source

1"get <something>";
2"get all";
3"get all <something>";
4"get <something> from <something>";
5"get all <something> from <something>";
6"This verb is a jumping off point for all get-type activities.  Since it has args <any any any> it will always match before any 'get' verbs on other objects.";
7if (!this:hands())
8player:tell("You start to rea...oh god.  You don't have any HANDS!");
9player:aat(player:dnamec(), " flails ", player.pp, " tiny arms uselessly.");
10return;
11endif
12if (prepstr == "from")
13"they want something from a container";
14if (!valid(iobj))
15iobj = $match_utils:match(iobjstr, {@player.contents, @player.location.contents});
16endif
17"check to see whether this is something that things can be taken from";
18if (!($ou:has_verb(iobj, "cant_get_from") && $ou:has_verb(iobj, "get_from")))
19if ($ou:has_verb(iobj, "get") && (!is_a(iobj, $creature)))
20iobj:get();
21else
22player:tell("I don't understand that.");
23endif
24return;
25else
26targets = $match_utils:match_many(dobjstr, iobj:occupants(#1));
27if (dobjstr == "all")
28oldtargets = targets;
29targets = {};
30for target in (oldtargets)
31if (!is_a(target, $decal))
32targets = listappend(targets, target);
33endif
34endfor
35endif
36"if we got this far the object must support the standard get interface";
37if (msg = iobj:cant_get_from(player, targets))
38if (dobjstr == "all")
39dobjstr = "anything";
40endif
41player:tell(tostr("You can't get ", dobjstr, " because ", msg, "."));
42return;
43else
44iobj:get_from(this, targets);
45endif
46endif
47else
48if (!dobjstr)
49player:tell(verb + " what?");
50return;
51endif
52if (!(targets = $lu:remove_if_not($ou, "is_true", $match_utils:match_many(dobjstr, player.location:occupants($thing)), "name")))
53player:tell("You don't see any '", dobjstr, "' here.");
54return;
55else
56for x in (targets)
57if ($actions.get:is_getting(this, x))
58this:tell("You're already picking up ", x:dname(), ".");
59return;
60endif
61endfor
62targets = $list_utils:randomly_permute(targets);
63action = `targets[1].get_action ! ANY => $actions.get';
64this:queue_action(action, {targets, targets[1].location, {}}, 1, (verb + " ") + argstr);
65endif
66endif

_threat_rating

Spec this none thisFlags rxdOwner #361Definer #107

Referenced by

none

Source

1"Copied from generic creature (#109):threat_rating by Gilmore (#98) Mon Jun 20 15:53:38 2005 CDT";
2w = this:weapon();
3s = w.skill:total(this) + $skills.dodge:total(this);
4d = w:damage(this, 10 - s);
5d = d ? d[1][3] / 3 | 0;
6return (s + d) + (this.health / 3);

wearing_on_covering

Spec this none thisFlags rxdOwner #361Definer #107

Referenced by

Source

1":wearing_on_covering(OBJ bodypart[, INT fuckthru]) => LIST what I'm wearing there.";
2"If fuckthru, don't list +fuck_through clothing.";
3part = args[1];
4fuckthru = (length(args) > 1) ? args[2] | 0;
5wearing = this:wearing_on(part);
6s = {};
7for x in (wearing)
8if (x.thickness > 0)
9if ((!fuckthru) || (!x.fuck_through))
10s = listinsert(s, x);
11endif
12endif
13endfor
14return s;

tell_contents

Spec this none thisFlags rxdOwner #361Definer #107

Referenced by

none

Source

1msg_db = {};
2names = {};
3if (args)
4things = args[1];
5else
6things = this:contents();
7endif
8for x in (things)
9if (is_a(x, $decal))
10things = setremove(things, x);
11endif
12endfor
13weights = 1;
14if (#594466 in $lu:slice(callers(), 1))
15weights = 0;
16endif
17total_weight = 0;
18if (things)
19for x in (things)
20added = 0;
21iname = x:iname();
22if (x in this.wielding)
23if (x == this:weapon())
24iname = (($ansi.bold_on + iname) + " (wielded)") + $ansi.reset;
25else
26iname = (($ansi.bold_on + iname) + " (held)") + $ansi.reset;
27endif
28elseif (x in this.wearing)
29iname = (($ansi.bold_on + iname) + " (worn)") + $ansi.reset;
30endif
31if (weights)
32iname = ((((iname + $ansi.cyan) + " [") + $su:english_weight_short(weight = x:weight())) + "]") + $ansi.reset;
33total_weight = total_weight + weight;
34endif
35if (msg_db)
36for y in [1..length(msg_db)]
37if (msg_db[y][2] == iname)
38msg_db[y][3] = msg_db[y][3] + 1;
39msg_db[y][1] = setadd(msg_db[y][1], x);
40added = 1;
41endif
42endfor
43endif
44if (!added)
45msg_db = setadd(msg_db, {{x}, iname, 1});
46endif
47endfor
48for x in (msg_db)
49if (x[3] > 1)
50name = ($string_utils:aggregate_number(x[3]) + " ") + x[1][1]:plural_name();
51if (weights)
52wt = 0;
53for z in (x[1])
54wt = wt + z:weight();
55endfor
56name = ((((name + $ansi.cyan) + " [") + $su:english_weight_short(wt)) + "]") + $ansi.reset;
57endif
58else
59name = x[2];
60endif
61names = {@names, name};
62endfor
63player:tell("Carrying:");
64player:tell_item_list(names);
65if (weights)
66player:tell(((($ansi.cyan + "[ Total Load: ") + $su:english_weight(total_weight)) + " ]") + $ansi.reset);
67endif
68endif

break_grasp

Spec this none thisFlags rxdOwner #361Definer #107

Referenced by

none

Source

1victim = args[1];
2if (this:is_doing($actions.restrain) && (this.executing[2][1] == victim))
3this:cancel_current_action();
4endif

lose_thirst

Spec this none thisFlags rxdOwner #361Definer #107

Referenced by

none

Source

1amt = args[1];
2doses = toint(amt) / 100;
3if (doses < 1)
4doses = 1;
5endif
6$rpg.thirst:remove_from(this, doses);

gain_stress

Spec this none thisFlags rxdOwner #361Definer #107

Referenced by

none

Source

1return 0;

threat_rating

Spec this none thisFlags rxdOwner #29Definer #107

Referenced by

Source

1w = this:weapon();
2s = w.skill:total(this) + $skills.dodge:total(this);
3d = w:damage(this, 10 - s);
4d = d ? d[1][3] / 3 | 0;
5armin = 0;
6armax = 0;
7arvg = 0;
8aravgtot = 0;
9aravgtottot = 0;
10pool = {};
11wpool = {w};
12if (this.f == 1)
13if ($ou:has_property(this, "spawns_with"))
14for sp in (this.spawns_with)
15if (typeof(sp) == LIST)
16sp = sp[1];
17endif
18if (is_a(sp, $clothing))
19pool = {@pool, sp};
20elseif (is_a(sp, $weapon))
21wpool = {@wpool, sp};
22endif
23endfor
24endif
25else
26pool = this.wearing;
27endif
28pool = {@pool, this};
29for ar in (pool)
30if (!$ou:has_property(ar, "armor"))
31continue;
32endif
33for arv in (ar.armor)
34if (arv[1] == #308)
35continue;
36endif
37if (arv[1] in {#268, #277, #278, #279})
38armin = armin + arv[2];
39armax = armax + arv[3];
40else
41armin = armin + (arv[2] / 2);
42armax = armax + (arv[3] / 2);
43endif
44aravg = ((armax - armin) / 2) + armin;
45aravgtot = aravgtot + aravg;
46armin = 0;
47armax = 0;
48aravg = 0;
49endfor
50if (ar == this)
51aravgtot = toint(tofloat(aravgtot) * (tofloat(length(ar.body_parts)) / tofloat(length(this.body_parts))));
52else
53aravgtot = toint(tofloat(aravgtot) * (tofloat(length(ar.covers)) / tofloat(length(this.body_parts))));
54endif
55aravgtottot = aravgtottot + aravgtot;
56aravgtot = 0;
57endfor
58return ((toint(s) + toint(d)) + (this.health / 3)) + (aravgtottot / 3);

_brainscan

Spec this none thisFlags rxdOwner #361Definer #107

Referenced by

Source

1who = args[1];
2species = parent(this):iname();
3species = strsub(species, "generic ", "");
4this:_whisper(who, "I'm ", species, ".");
5if (valid(leader = this.following))
6this:_whisper(who, ("I'm following " + leader:iname()) + ".");
7endif
8if ((this.last_heartbeat + 35) < time())
9this:_whisper(who, "My heart feels...wrong.");
10endif
11if (this.virgin)
12this:_whisper(who, "I've never been fucked.");
13endif
14for x in (this.blood)
15if (msg = x[1]:brainscan_msg(this, x[3]))
16this:_whisper(who, msg);
17endif
18endfor
19if (h = this.hunting)
20this:_whisper(who, ("I'm hunting for " + h) + ".");
21endif

@brainscan @bs

Spec this none noneFlags rxdOwner #361Definer #107

Referenced by

none

Source

1if (!player.programmer)
2player:tell("I don't understand that.");
3return;
4endif
5this:_brainscan(player);

_whisper

Spec this none thisFlags rxdOwner #361Definer #107

Referenced by

Source

1who = args[1];
2text = $su:from_list(args[2..$]);
3who:tell(this:dnamec(), " whispers, \"", text, "\"");

inform_of_death

Spec this none thisFlags rxdOwner #361Definer #107

Referenced by

none

Source

1this:notify("");
2this:notify(($ansi.bold_on + "You feel an ethereal hand reaching down into your body and ripping your soul free of its corporeal prison.  You rise faster, faster, through infinite space rushing toward a tunnel of bright light...") + $ansi.reset);
3this:notify("");
4this:notify("");
5this:notify("");
6this:notify("");
7this:notify("");

tell_age

Spec this none thisFlags rxdOwner #361Definer #107

Referenced by

Source

No program (verb defined but unprogrammed).

soul_value

Spec this none thisFlags rxdOwner #361Definer #107

Referenced by

none

Source

1return toint(tofloat(this.xp_value) * (tofloat(this.health) / tofloat(this.health_max)));

grenade_can_affect

Spec this none thisFlags rxdOwner #361Definer #107

Referenced by

none

Source

1return 1;

enterfunc

Spec this none thisFlags rxdOwner #361Definer #107

Referenced by

Source

1this.encumbrance = {0, 0};
2what = args[1];
3if (mod = `what:skill_modifier(this) ! ANY => 0')
4mod = mod[1];
5for x in [1..length(this.skill_mod_items)]
6if (this.skill_mod_items[x][1] == mod)
7this.skill_mod_items[x][2] = setadd(this.skill_mod_items[x][2], what);
8return;
9endif
10endfor
11this.skill_mod_items = listappend(this.skill_mod_items, {mod, {what}});
12endif

debug_tell_room

Spec this none thisFlags rxdOwner #361Definer #107

Referenced by

none

Source

1return;
2if ($recycler:valid(this.location))
3this.location:debug_tell(this, @args);
4else
5this:debug_tell(@args);
6endif

cuts_with

Spec this none thisFlags rxdOwner #361Definer #107

Referenced by

Source

1for x in (setadd(this.wielding, this.unarmed_weapon))
2if (is_a(x, $weapon) && x.can_cut_meat)
3return x;
4endif
5endfor
6for x in (this.contents)
7if (is_a(x, $weapon) && x.can_cut_meat)
8this:_wield(x);
9return x;
10endif
11endfor
12return #-1;

can_see_in_dark

Spec this none thisFlags rxdOwner #361Definer #107

Referenced by

Source

1for f in (this.wearing)
2if (`f.night_vision ! ANY => 0')
3return 1;
4endif
5endfor
6return `this.can_see_in_dark ! ANY => 0';

bolt unbolt

Spec any none noneFlags rxdOwner #361Definer #107

Referenced by

none

Source

1if (!$recycler:valid(dobj))
2dobj = $match_utils:match(dobjstr, {@player.contents, @player.location.contents});
3endif
4if (!$recycler:valid(dobj))
5this:tell($su:capitalize(verb), " what?");
6elseif (!$api.boltable:is_on(dobj))
7this:tell("You don't see any way to ", verb, " that.");
8else
9this:queue_action($actions.verb, {dobj, "_" + verb, {this}, 0.0, 1}, 1, (verb + " ") + dobj:dname());
10endif

get_wet

Spec this none thisFlags rxdOwner #361Definer #107

Referenced by

none

Source

1doses = args ? args[1] | 1;
2if (burn = (burning = $drugs.burning):doses_for(this))
3this:aat("Steam rises from ", this:dname(), ".");
4burning:remove_from(this, doses);
5endif

my_huh

Spec this none thisFlags rxdOwner #361Definer #107

Referenced by

none

Source

No program (verb defined but unprogrammed).

last_huh

Spec this none thisFlags rxdOwner #361Definer #107

Referenced by

none

Source

No program (verb defined but unprogrammed).

death_listeners

Spec this none thisFlags rxdOwner #361Definer #107

Referenced by

Source

1x = this;
2dl = {};
3while (valid(x) && (x != $creature))
4for y in (x.death_listeners)
5dl = setadd(dl, y);
6endfor
7x = parent(x);
8endwhile
9return dl;

_show_status

Spec this none thisFlags rxdOwner #361Definer #107

Referenced by

none

Source

1"Copied from generic creature (#109):show_status by Gilmore (#98) Wed Oct 31 17:17:34 2007 CDT";
2player:tell("");
3healthbar = $rpg:gbar_for(player, this.health, this.health_max, this.health_max);
4if (is_player(this))
5if (this.thirst > 100.0)
6thirstcolor = $ansi.yellow;
7else
8thirstcolor = $ansi.blue;
9endif
10thirstbar = $rpg:gbar_for(player, toint(this.thirst), 500, 30, 0, $ansi.blue, $ansi.blue, 1);
11if (this.stress > 100)
12stresscolor = $ansi.red;
13else
14stresscolor = $ansi.cyan;
15endif
16stressbar = $rpg:gbar_for(player, this.stress, 500, 30, 0, $ansi.yellow, $ansi.yellow, 1);
17endif
18player:tell($ansi.bold_on, "Health   ", healthbar);
19if (is_player(this))
20player:tell($ansi.bold_on, "Thirst   ", thirstbar);
21player:tell($ansi.bold_on, "Stress   ", stressbar);
22stars = 0;
23for x in (#2312.wanted)
24if (x[1] == this)
25stars = x[2];
26endif
27endfor
28if (stars)
29s = "";
30wantedbar = $rpg:gbar_for(player, stars, 40, 30, 0, $ansi.red, $ansi.red, 1);
31player:tell($ansi.bold_on, "WANTED!  ", wantedbar);
32endif
33endif
34this:tell_self_health();
35this:tell_holding();
36this:tell_wearing();
37pm = (player == this) ? "You're" | (this.psc + " is");
38if (is_a(this.following, $creature))
39player:tell(((pm + " following ") + this.following:iname()) + ".");
40else
41this.following = #-1;
42endif
43if (this.hunting)
44player:tell(((pm + " hunting for '") + this.hunting) + "'.");
45endif
46"player:tell((player == this) ? \"Your \" | (this:dnamec() + \"'s \"), (((((\"credit chip shows \" + $ansi.green) + $ansi.bold_on) + \"$\") + $su:group_number(this.credit)) + $ansi.reset) + \".\");";
47this:tell_encumbrance("full");
48if (this.fight_style != 3)
49player:tell("Your current fighting style is '", $rpg.fight_styles[this.fight_style], "'.");
50endif

skin_is_visible visible_skin

Spec this none thisFlags rxdOwner #361Definer #107

Referenced by

Source

1parts = this.body_parts;
2if (!this.wearing)
3return parts;
4endif
5for part in (parts)
6if (this:wearing_on_covering(part))
7parts = setremove(parts, part);
8endif
9endfor
10return parts;

tell_reclone

Spec this none thisFlags rxdOwner #361Definer #107

Referenced by

Source

1

diseases

Spec this none thisFlags rxdOwner #361Definer #107

Referenced by

Source

1result = {};
2for x in (this.blood)
3if (is_a(x[1], $disease))
4result = {@result, x[1]};
5endif
6endfor
7return result;

default_respawn

Spec this none thisFlags rxdOwner #361Definer #107

Referenced by

Source

1return this.respawn;

reachable_by

Spec this none thisFlags rxdOwner #361Definer #107

Referenced by

Source

1who = args[1];
2if (this:is_doing($actions.climb) && (!who:is_doing($actions.climb)))
3return 0;
4endif
5"if (this in this.location.covering)";
6"  return 0;";
7"endif";
8return 1;

@qp

Spec this with/using anyFlags rxdOwner #361Definer #107

Referenced by

none

Source

1if (is_player(this) && (this != #8913))
2player:tell("You can't possess players.");
3return;
4elseif (!player.programmer)
5player:tell("I don't understand that.");
6return;
7endif
8line = $su:explode(argstr);
9for i in [1..length(line)]
10if (line[i] == prepstr)
11line = line[i + 1..$];
12break;
13endif
14endfor
15joined = $su:from_list(line, " ");
16player:tell($ansi.bold_on, "[> ", $ansi.reset, joined);
17#120648:announce(this, tostr(player.name, " - ", $su:nn(this), "> ", joined), 1);
18try
19this:do_command(joined, line);
20except reason (ANY)
21player:tell("That command caused an error:");
22player:tell_lines($rpg:render_error(reason[2], reason[4]));
23endtry

cooldown_check

Spec this none thisFlags rxdOwner #361Definer #107

Referenced by

Source

1":cooldown_check(ANY action, INT seconds-of-cooldown[, INT silent, INT dont-start, INT force-new)";
2"If we can do the action, add it to .cooldowns and return 1.";
3"If not, print a message and return 0.";
4"action can be a string or an object.";
5"If dont_start, don't start a new cooldown even if we don't currently have one set.  Just return 1 or 0.";
6"If force_new, forcibly restart the cooldown even if we have one going already (but do return 0 in that case).";
7what = args[1];
8seconds = args[2];
9silent = (length(args) > 2) ? args[3] | 0;
10dont_start = (length(args) > 3) ? args[4] | 0;
11force_new = (length(args) > 4) ? args[5] | 0;
12now = time();
13nc = {};
14for i in [1..length(this.cooldowns)]
15x = this.cooldowns[i];
16if (x[2] >= now)
17nc = {@nc, x};
18endif
19endfor
20this.cooldowns = nc;
21if (!force_new)
22for x in (this.cooldowns)
23if (x[1] == what)
24n = (typeof(what) == OBJ) ? what.name | what;
25silent || this:tell("Damn!  You can't ", n, " again for another ", $time:duration(x[2] - now), ".");
26return 0;
27endif
28endfor
29endif
30dont_start || (this.cooldowns = {@this.cooldowns, {what, now + seconds}});
31return 1;

combat_fatigue

Spec this none thisFlags rxdOwner #361Definer #107

Referenced by

Source

1return;
2r = this.combat_rounds = this.combat_rounds + 1;
3kick_in = is_player(this) ? 6 | 3;
4r = max(1, r - kick_in);
5mult = 1 + ($skills.endurance:total(this) / 3);
6mult = max(1, mult);
7if (((r / mult) * mult) == r)
8this:ingest($drugs.combat_fatigue, 1, 0);
9endif

has_cooldown

Spec this none thisFlags rxdOwner #361Definer #107

Referenced by

none

Source

1what = args[1];
2now = time();
3nc = {};
4found = 0;
5for i in [1..length(this.cooldowns)]
6x = this.cooldowns[i];
7if (x[2] >= now)
8nc = {@nc, x};
9if (x[1] == what)
10found = 1;
11endif
12endif
13endfor
14this.cooldowns = nc;
15return found;

add_skill_mod_item

Spec this none thisFlags rxdOwner #361Definer #107

Referenced by

none

Source

1what = args[1];
2skill = args[2];
3skill:flush(this);
4for i in [1..length(this.skill_mod_items)]
5if (this.skill_mod_items[i][1] == skill)
6this.skill_mod_items[i][2] = setadd(this.skill_mod_items[i][2], what);
7return;
8endif
9endfor
10this.skill_mod_items = {@this.skill_mod_items, {skill, {what}}};

remove_skill_mod_item

Spec this none thisFlags rxdOwner #361Definer #107

Referenced by

none

Source

1what = args[1];
2what.skill:flush(this);
3ni = {};
4for x in (this.skill_mod_items)
5x[2] = setremove(x[2], what);
6if (x[2])
7ni = {@ni, x};
8endif
9endfor
10this.skill_mod_items = ni;

nearby_creatures

Spec this none thisFlags rxdOwner #361Definer #107

Referenced by

none

Source

1n = {};
2for x in (this.location.contents)
3if (is_a(x, $living))
4if (x != this)
5if ((x.following == this) || (this.following == x))
6n = {@n, x};
7elseif ((is_a(x, $monster) && is_a(this, $monster)) && (x.species == this.species))
8n = {@n, x};
9elseif (((is_player(x) && is_player(this)) && valid(x.party)) && (x.party == this.party))
10n = {@n, x};
11endif
12endif
13endif
14endfor
15return n;

_milk

Spec this none thisFlags rxdOwner #361Definer #107

Referenced by

none

Source

1if (valid(milk = `this.milk ! ANY => #-1'))
2return milk;
3endif

resume_fighting

Spec this none thisFlags rxdOwner #361Definer #107

Referenced by

none

Source

1"Find someone who's attacking us and get back to attacking them.";
2for x in (this.location:occupants($living))
3if (this in x.fighting)
4this:start_fighting(x);
5return;
6endif
7endfor

_learn

Spec this none thisFlags rxdOwner #361Definer #107

Referenced by

Source

1":_learn(skill, teacher) => This object wants to learn skill from teacher. Designed to be called from the learn verb. Skill and teacher must both be objects, not strings, but they need not be checked for sanity or validity.";
2{skill, teacher} = args;
3student = this;
4tlimit = $skills.teach:total(teacher) - 5;
5if (!valid(teacher))
6student:tell("You can't learn anything from '", iobjstr, "'.");
7elseif (teacher:is_doing(#183244, student))
8if (!valid(skill))
9student:tell("There's no skill '", dobjstr, "'.");
10else
11if ((teached_skill = teacher.executing[2][2]) != skill)
12student:tell($su:ps("%T is offering to teach you "), teached_skill.name, ", not ", skill.name, ".");
13else
14studentraw = skill:raw(student);
15teacherraw = skill:raw(teacher);
16cost = skill:learn_cost_for(student);
17if (teacherraw < (studentraw + 1))
18student:tell($su:ps("%DN doesn't have enough raw skill in %t to teach you.", teacher, skill));
19teacher:tell($su:ps("You don't have enough raw skill in %t to teach %dn.", student, skill));
20elseif ((studentraw + 1) > tlimit)
21student:tell($su:ps("%DN isn't a skilled enough teacher to improve your skill at %t.", teacher, skill));
22teacher:tell($su:ps("You aren't a skilled enough teacher to improve %dn's skill at %t.", student, skill));
23elseif (is_a(student, $player) && (cost > student.xp))
24student:tell($su:ps(((((("You need " + $su:from_value(cost)) + " XP to learn level ") + $su:from_value(studentraw + 1)) + " of %t from %dn, but you only have ") + $su:from_value(student.xp)) + " XP.", teacher, skill));
25else
26teacher:tell($su:ps("You take %dn aside and teach %o a bit about %t.", student, skill));
27student:tell($su:ps(((("%DN takes you aside and teaches you a bit about %t, raising your raw skill to " + $su:from_value(studentraw + 1)) + " for ") + $su:from_value(cost)) + " XP.", teacher, skill));
28student.location:announce_all_but({teacher, student}, $su:ps("%DN takes %dd aside and teaches %do a bit about %t.", teacher, skill, student.location, student));
29award = cost / 10;
30skill:learn(student);
31skill:flush(student);
32"The teacher will no longer offer teaching.";
33teacher:cancel_current_action();
34"Give old man of the sea award if teaching fishing.";
35if (skill == #34771)
36#27435:award_to(teacher);
37endif
38endif
39endif
40endif
41else
42student:tell($su:ps("%DN isn't offering to teach you anything.", teacher));
43endif

felt_temperature

Spec this none thisFlags rxdOwner #361Definer #107

Referenced by

Source

1temp = `this.location:temperature() ! E_VERBNF => 65';
2insul = 0;
3cool = 0;
4for x in (this.blood)
5if (is_a(x[1], #33422))
6cool = cool + (x[3] * 3);
7elseif (x[1] == $drugs.cooling)
8cool = cool + (x[3] * 4);
9elseif (x[1] == $drugs.cold)
10cool = cool + (x[3] * 6);
11elseif (x[1] == $drugs.burning)
12insul = insul + (x[3] * 20);
13cool = cool - (x[3] * 20);
14endif
15endfor
16endmod = 1;
17cool = cool + endmod;
18insul = insul + endmod;
19cool = max(0, cool);
20insul = max(0, insul);
21parts = this.body_parts;
22for x in (this.wearing)
23if (x.thickness > 0)
24for y in (x.covers)
25parts = setremove(parts, y);
26endfor
27i = `x.insulation ! ANY';
28if (typeof(i) == ERR)
29i = (x.thickness / 6) * length(x.covers);
30endif
31if (i > 0)
32insul = insul + i;
33else
34cool = cool - i;
35endif
36endif
37endfor
38if ((cold = -(temp - 50)) > 0)
39cold = max(0, cold - insul);
40temp = 50 - cold;
41elseif ((heat = temp - 80) > 0)
42heat = (heat + min(20, insul / 3)) - cool;
43heat = max(heat, 0);
44temp = 80 + heat;
45else
46temp = temp + min(10, insul / 3);
47endif
48for x in (this.contents)
49if (heat = `x:creature_heat() ! E_VERBNF')
50temp = (typeof(heat) == FLOAT) ? toint(heat) | (temp + heat);
51endif
52endfor
53return temp;

change_temperature

Spec this none thisFlags rxdOwner #361Definer #107

Referenced by

Source

1if (!is_a(this.location, $room))
2return;
3endif

title

Spec this none thisFlags rxdOwner #361Definer #107

Referenced by

Source

1return this:dnamec();

brandish

Spec none at/to anyFlags rxdOwner #361Definer #107

Referenced by

none

Source

1"Raise your fist (or whatever) to someone.  FUCK YEAH";
2if (((player != this) || (!valid(iobj))) || (iobj.location != this.location))
3player:tell("Brandish to who?");
4return;
5endif
6player:queue_action($actions.verb, {this:weapon(), "_brandish", {player, iobj}}, 1, "brandish " + this:weapon().name);

process_blood

Spec this none thisFlags rxdOwner #361Definer #107

Referenced by

Source

1for substance in (this.blood)
2if (is_a(this, $creature))
3substance[1]:effect(this, substance[3], substance[2]);
4else
5return;
6endif
7endfor

dead

Spec this none thisFlags rxdOwner #361Definer #107

Referenced by

Source

1":dead() => Should we be considered dead for the purpose of whatever?";
2return (time() - this.dead) <= 10;

fighting_target

Spec this none thisFlags rxdOwner #361Definer #107

Referenced by

none

Source

1return this;

effective_target

Spec this none thisFlags rxdOwner #361Definer #107

Referenced by

none

Source

1":effective_target(who) => Return the $creature that should be affected by who trying to do something to this creature.";
2who = args[1];
3if (valid(this.body) && (this.body.location == who.location))
4return this.body;
5else
6return this;
7endif

attacking_cooldown_check

Spec this none thisFlags rxdOwner #361Definer #107

Referenced by

none

Source

1":attacking_cooldown_check(ANY action)";
2"If we are currently executing a non-unstoppable attack action, check the cooldown given by 'action' as if by :cooldown_check, but with 'dont-start'.";
3{action} = args;
4if ((this.executing && (this.executing[1] == $actions.attack)) && this.executing[3])
5return this:cooldown_check(action, 0, 0, 1);
6else
7return 1;
8endif

forbid_action_move forbid_action_climb

Spec this none thisFlags rxdOwner #361Definer #107

Referenced by

none

Source

1source = args[1];
2exit = args[3][1];
3if ((exit in `this.blocked_exits ! E_PROPNF => {}') && (!this:_admit(source)))
4this:_block(source, exit);
5return 1;
6endif

_block

Spec this none thisFlags rxdOwner #361Definer #107

Referenced by

Source

1"Copied from Aristotle (#349995):_block by Gilmore (#98) Wed Mar  4 19:21:41 2009 CST";
2who = args[1];
3exit = args[2];
4if ((who != this) && (msg = `this.block_msg ! E_PROPNF => ""'))
5this:aat($su:ps(this.block_msg, this, this, this.location, who, who));
6if (`this.attack_on_block ! E_PROPNF => 0')
7this:start_fighting(who);
8endif
9endif

_walk

Spec this none thisFlags rxdOwner #361Definer #107

Referenced by

none

Source

1"Copied from Aristotle (#349995):_walk by Ragabash (#45093) Wed Mar  4 19:21:41 2009 CST";
2if (!`this.blocked_exits ! E_PROPNF => {}')
3return pass(@args);
4endif
5door = this.blocked_exits[1];
6if (this.location != door.location)
7return {this.move_action, {this.location:next_hop_to(door.location)}, 1, ""};
8this:jumpstart();
9else
10return pass(args);
11endif

_admit

Spec this none thisFlags rxdOwner #361Definer #107

Referenced by

Source

1who = args[1];
2for x in (`this.admit_list ! E_PROPNF => {}')
3if (is_a(who, x))
4return 1;
5endif
6endfor
7return 0;

_fight_ari

Spec this none thisFlags rxdOwner #361Definer #107

Referenced by

Source

1"Copied from generic creature (#109):_fight by Gilmore (#98) Fri Mar  6 10:54:25 2009 CST";
2if (this.fighting)
3if (this:area().combat_ok)
4for x in (f = this.fighting)
5if ((is_a(x, $creature) && (!is_a(target = x:effective_target(this), $corpse))) && (target.location == this.location))
6w = this:weapon();
7return {w.attack_action, {x, w}, 1, "kill " + x.name};
8else
9this.fighting = setremove(this.fighting, x);
10endif
11endfor
12endif
13endif

sanitize_fighting

Spec this none thisFlags rxdOwner #361Definer #107

Referenced by

Source

1":sanitize_fighting() => Destructively clear out bogus entries of 'this.fighting' and return the new value.";
2for x in (f = this.fighting)
3if (((!is_a(x, $creature)) || is_a(target = x:effective_target(this), $corpse)) || (target.location != this.location))
4this.fighting = setremove(this.fighting, x);
5endif
6endfor
7return this.fighting;

move_action

Spec this none thisFlags rxdOwner #361Definer #107

Referenced by

none

Source

1":move_action(exit) => Return the move action suitable for moving through an exit of type 'exit'.";
2exit = args[1];
3if (is_a(exit, $cliff))
4return $actions.climb;
5else
6return $actions.move;
7endif

on_move

Spec this none thisFlags rxdOwner #361Definer #107

Referenced by

none

Source

1"Called whenever this creatures moves through an exit.";
2return 0;

respawn_location

Spec this none thisFlags rxdOwner #361Definer #107

Referenced by

Source

1return this.respawn;

hands

Spec this none thisFlags rxdOwner #361Definer #107

Referenced by

Source

1hands = this.hands;
2for x in (this.blood)
3if (x[1] == $drugs.third_arm)
4hands = hands + x[3];
5elseif (x[1] == $drugs.broken_arm)
6hands = hands - x[3];
7elseif (x[1] == $drugs.broken_hand)
8hands = hands - x[3];
9endif
10endfor
11return max(0, hands);

_think

Spec this none thisFlags rxdOwner #361Definer #107

Referenced by

none

Source

1this:think($su:from_list(args, " "));

set_posture

Spec this none thisFlags rxdOwner #361Definer #107

Referenced by

Source

1":set_posture('sitting' | 'reclining' | 'standing', [OBJ seat]) => update this creature's posture silently, possibly causing the creature to be moved off of furniture.";
2"Setting posture this way only causes the creature to sit or recline on the room itself, not any available furniture, and currently bypasses any capacity checks on the room.";
3{posture, ?seat = this.location} = args;
4if ((!is_a(seat, $furniture)) && (!is_a(seat, $room)))
5raise(E_INVARG);
6endif
7if (!(posture in {"sitting", "standing", "reclining"}))
8this:set_posture("standing", @listdelete(args, 1));
9endif
10old_posture = this.posture;
11if (old_posture == posture)
12return;
13endif
14if (old_posture == "sitting")
15furniture = this:sitting_on();
16if (valid(furniture))
17furniture.sitting = setremove(furniture.sitting, this);
18endif
19endif
20if (old_posture == "reclining")
21furniture = this:reclining_on();
22if (valid(furniture))
23furniture.reclining = setremove(furniture.reclining, this);
24endif
25endif
26this.posture = posture;
27if (posture == "sitting")
28seat.sitting = setadd(seat.sitting, this);
29elseif (posture == "reclining")
30seat.reclining = setadd(seat.reclining, this);
31endif

junk

Spec any none noneFlags rxdOwner #361Definer #107

Referenced by

none

Source

1if (!valid(dobj))
2dobj = $mu:match(dobjstr, {@player.contents, @player.location.contents});
3if (!valid(dobj))
4player:tell("Junk what?");
5return;
6endif
7endif
8if (dobj in player.wearing)
9player:tell("Not while you're wearing it!  (Take it off if you really want to junk it.  If you know what I mean.  Er.)");
10return;
11endif
12if (dobj.location != player)
13player:tell("You're not carrying that.");
14return;
15endif
16if (!is_a(dobj, $thing))
17player:tell("You can't junk that.");
18return;
19endif
20if ((!player.programmer) && (dobj:value() > 500))
21player:tell("How wasteful.  You can't bring yourself to do it.");
22return;
23endif
24if (dobj:is_junkable())
25player:queue_action($actions.junk, {dobj}, 1, "junk " + dobj.name);
26else
27player:tell("You just can't bring yourself to throw one of those away.");
28endif

systell

Spec this none thisFlags rxdOwner #361Definer #107

Referenced by

none

Source

No program (verb defined but unprogrammed).

spare

Spec any none noneFlags rxdOwner #361Definer #107

Referenced by

none

Source

1targets = player.location:occupants($npc);
2for t in (targets)
3if (!t.executing)
4targets = setremove(targets, t);
5endif
6if (t.executing)
7if ((t.executing[1] != $actions.npcbeg) || ((t.executing[1] == $actions.npcbeg) && (t.executing[2][1] != player)))
8targets = setremove(targets, t);
9endif
10endif
11endfor
12if (!targets)
13player:tell("You don't see a '", dobjstr, "' here begging you for mercy.");
14return;
15endif
16who = $mu:match(dobjstr, targets);
17if (!$cu:object_match_failed(who, dobjstr))
18who:spared_by(player);
19endif

afterlife

Spec this none thisFlags rxdOwner #361Definer #107

Referenced by

Source

1for x in (this.blood)
2if (is_a(x[1], #167223))
3return x[1].afterlife;
4endif
5endfor
6return this.afterlife;

is_in_afterlife

Spec this none thisFlags rxdOwner #361Definer #107

Referenced by

Source

1return is_a(area(this), #69024);

tell_carrying

Spec this none thisFlags rxdOwner #361Definer #107

Referenced by

Source

1c = [];
2for x in (this.contents)
3if (!(x in this.wielding))
4if (m = `x.carried_msg ! ANY')
5if (m in c)
6c[m] = {@c[m], x};
7else
8c[m] = {x};
9endif
10endif
11endif
12endfor
13if (!c)
14return;
15endif
16s = this.psc + " has ";
17slist = {};
18for x in (c)
19{m, stuff} = x;
20if (length(stuff) == 1)
21m = $su:ps(m, this, stuff[1]);
22else
23name = $eu:aggregate_names(stuff);
24m = strsub(m, "%it", name);
25m = $su:ps(m, this, stuff[1]);
26endif
27slist = {@slist, m};
28endfor
29s = (s + $su:english_list(slist)) + ".";
30player:tell(s);

_sit

Spec this none thisFlags rxdOwner #361Definer #107

Referenced by

Source

1for x in ({@this.location:occupants($furniture), this.location})
2if ((this in x.reclining) || (this in x.sitting))
3x:_sit(this);
4return 1;
5endif
6endfor
7for x in ({@this.location:occupants($furniture), this.location})
8if (x:free_seats())
9x:_sit(this);
10return 1;
11endif
12endfor
13return 0;

is_wearing

Spec this none thisFlags rxdOwner #361Definer #107

Referenced by

Source

1{what, ?on = #-1, ?callback = ""} = args;
2if (!is_a(on, $bodypart))
3worn = this.wearing;
4else
5worn = this:wearing_on(on);
6endif
7for x in (worn)
8if (is_a(x, what) && ((!callback) || $code_utils:verb_or_property(x, callback)))
9return 1;
10endif
11endfor
12return 0;

can_see

Spec this none thisFlags rxdOwner #361Definer #107

Referenced by

Source

1dark = this.location:darkness(1, this);
2if (((dark > 1) || (dark < -1)) && (!this:can_see_in_dark()))
3return 0;
4endif
5return 1;

text_sub filter_text speech_filter

Spec this none thisFlags rxdOwner #29Definer #107

Referenced by

Source

1":text_sub(STR msg) => STR";
2msg = args[1];
3if (!is_player(this))
4if (`this.npc_should_text_sub ! E_PROPNF => 0')
5"someone says this creature should text sub, it's cool";
6else
7return msg;
8endif
9endif
10if (`this.location.no_text_subs ! E_PROPNF => 0')
11return msg;
12endif
13if ($skills.brains:total(this) < 6)
14msg = this:tard_sub(msg);
15endif
16for clothing in (this.wearing)
17if (`clothing.gag ! E_PROPNF => 0')
18msg = this:suck_sub(msg);
19elseif ($ou:has_verb(clothing, "text_sub"))
20msg = clothing:text_sub(msg);
21endif
22endfor
23return msg;

light_level

Spec this none thisFlags rxdOwner #361Definer #107

Referenced by

none

Source

1light = 0;
2for x in (this.contents)
3if (level = `x:light_level() ! E_VERBNF')
4light = light + level;
5endif
6endfor
7return light;

xmas_sub

Spec this none thisFlags rxdOwner #29Definer #107

Referenced by

none

Source

1msg = args[1];
2msg = $su:subst(msg, #183747.xmas_subs);
3return msg;

cooldown_clear

Spec this none thisFlags rxdOwner #361Definer #107

Referenced by

none

Source

1what = args[1];
2nc = {};
3changed = 0;
4for i in [1..length(this.cooldowns)]
5x = this.cooldowns[i];
6if (x[1] != what)
7nc = {@nc, x};
8else
9changed = 1;
10endif
11endfor
12this.cooldowns = nc;
13return changed;

yell shout scream

Spec any any anyFlags rxdOwner #361Definer #107

Referenced by

none

Source

1player = this;
2this.location:(verb)(@args);

unarmed_weapon

Spec this none thisFlags rxdOwner #361Definer #107

Referenced by

Source

1if (typeof(this.unarmed_weapon) == LIST)
2return this.unarmed_weapon[random(length(this.unarmed_weapon))];
3else
4return this.unarmed_weapon;
5endif

hear_noise

Spec this none thisFlags rxdOwner #361Definer #107

Referenced by

none

Source

No program (verb defined but unprogrammed).

show_score_stats

Spec this none thisFlags rxdOwner #361Definer #107

Referenced by

Source

1rows = {{$skills.brawn, $skills.cool, $skills.reflexes}, {$skills.brains, $skills.senses, $skills.endurance}};
2for row in (rows)
3s = "";
4for stat in (row)
5raw = stat:raw(this);
6ip = stat:ip(this);
7if (ip < 10)
8ipstr = "0" + tostr(ip);
9else
10ipstr = tostr(ip);
11endif
12rawstr = (((($ansi.bold_off + $ansi.white) + "[") + $ansi.bold_on) + (((($su:right(tostr(raw), -2) + $ansi.bold_off) + ".") + $ansi.white) + $ansi.bold_off)) + ipstr;
13total = stat:total(this);
14totstr = $su:right(tostr(total), -2);
15st = ($ansi.white + $ansi.bold_on) + rawstr;
16st = ((((st + " ") + $ansi.dark_gray) + "/") + $ansi.reset) + ((total > raw) ? $ansi.green | ((total < raw) ? $ansi.red | $ansi.white));
17st = (((st + $ansi.bold_on) + ((total == raw) ? "  " | totstr)) + $ansi.reset) + "] ";
18st = (($ansi.yellow + $ansi.bold_off) + ($su:right(stat.name, 11) + " ")) + st;
19s = s + st;
20endfor
21player:tell(s);
22endfor

entomb

Spec this none thisFlags rxdOwner #361Definer #107

Referenced by

Source

1"Copied from generic creature (#109):recycle by Gilmore (#98) Wed Jun  2 21:43:18 2010 CDT";
2$heart:unregister(this);
3return pass(@args);

_yell

Spec this none thisFlags rxdOwner #361Definer #107

Referenced by

none

Source

1{text, ?filter = 1} = args;
2this.location:_yell(this, text, filter);

is_fighting

Spec this none thisFlags rxdOwner #361Definer #107

Referenced by

none

Source

1fighters = {};
2for x in (occupants(this.location, $living))
3if (x.fighting && (x.fighting[1] == this))
4if (!x:is_doing($actions.stunned))
5fighters = setadd(fighters, x);
6endif
7endif
8endfor
9return fighters;

tell_implants

Spec this none thisFlags rxdOwner #361Definer #107

Referenced by

none

Source

No program (verb defined but unprogrammed).