damage #102

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

Aliases: damage

7 verbs · 21 properties · 1 children

Verbs

VerbSpecFlagsDefinerLines
affectthis none thisrxd#10215
bleedthis none thisrxd#10210
knockoutthis none thisrxd#10211
shockthis none thisrxd#1027
burnthis none thisrxd#10210
stunthis none thisrxd#1024
tree_tagthis none thisrxd#1022

Properties

PropertyDefinerFlagsOwnerValue
messages#102rc#361#121
autopsy_msg#102rc#361"You're not sure what killed %o."
absorb_msg#102rc#361"%DN's %t bounces off %dd's %armor."
bleed_chance#102rc#3610
knockout_chance#102rc#3612
shock_chance#102rc#3611
abbrev#102rc#361"dmg"
burn_chance#102rc#3610
blood_min#102rc#361100
stun_chance#102rc#3611
code#102rc#361"xx"
aliases#1rc#361{"damage"}
description#1rc#361<clear>
object_size#1r#29{4806, 1298433815}
hidden_verbs#1rc#361<clear>
phelp_msg#1rc#361<clear>
weight#1rc#361<clear>
owner_verbs#1rc#361<clear>
plural_name#1rc#361<clear>
client_image#1rc#361<clear>
listening#1rc#361<clear>

Ancestry

Ancestors (nearest first): #1 root

Children: #199 beating

Call graph

calls n102_0 #102:affect n102_1 #102:bleed n102_0->n102_1 n102_4 #102:burn n102_0->n102_4 n102_2 #102:knockout n102_0->n102_2 n102_5 #102:stun n102_0->n102_5 n102_3 #102:shock n102_0->n102_3 n20_15 #20:capitalize n102_1->n20_15 n20_34 #20:pronoun_sub n102_1->n20_34 n103_21 #103:percent_of n102_5->n103_21

Source

affect

Spec this none thisFlags rxdOwner #361Definer #102

Referenced by

none

Source

1":affect(OBJ target, INT amount, OBJ bodypart)";
2"Perform special effects on target for this damage type.";
3body = args[3];
4damage = args[2] + (args[1].health_max - args[1].health);
5if (random(100) < (args[2] * this.bleed_chance))
6this:bleed(@args);
7elseif (random(100) < (args[2] * this.burn_chance))
8this:burn(@args);
9elseif (random(150) < (args[2] * (this.knockout_chance * ((body in {#300, #305}) ? 3 | 0))))
10this:knockout(@args);
11elseif (random(150) < (args[2] * (this.stun_chance * ((body == #300) ? 2 | 1))))
12this:stun(@args);
13elseif (random(100) < ((args[2] * this.shock_chance) * ((body == #305) ? 2 | 1)))
14this:shock(@args);
15endif

bleed

Spec this none thisFlags rxdOwner #361Definer #102

Referenced by

Source

1who = args[1];
2amt = args[2];
3part = args[3];
4bleed = amt / 4;
5m = this.messages:select("bleed", bleed, part);
6fork (1)
7if (is_a(who, $creature) && who:ingest(#814, bleed))
8who:aat($su:capitalize($su:ps(m, who, part, part, part)));
9endif
10endfork

knockout

Spec this none thisFlags rxdOwner #361Definer #102

Referenced by

Source

1who = args[1];
2amt = args[2];
3ignore = #803:doses_for(who) * 15;
4ignore = ignore - (amt * 15);
5if (random(100) < ignore)
6who:tell("You feel dazed for a moment, but thanks to the drugs in your veins you shake it off.");
7return;
8endif
9fork (1)
10is_a(who, $creature) && who:ingest(#4335, 1);
11endfork

shock

Spec this none thisFlags rxdOwner #361Definer #102

Referenced by

Source

1who = args[1];
2amt = args[2];
3part = args[3];
4shock = amt / 7;
5fork (1)
6is_a(who, $creature) && who:ingest(#646, shock);
7endfork

burn

Spec this none thisFlags rxdOwner #361Definer #102

Referenced by

Source

1"Copied from generic damage type (#267):bleed by Gilmore (#98) Wed Jun 15 01:41:29 2005 CDT";
2who = args[1];
3amt = args[2];
4part = args[3];
5burn = amt / 4;
6fork (1)
7if ((is_a(who, $creature) && who:ingest(#43890, burn)) && 0)
8"he burned.";
9endif
10endfork

stun

Spec this none thisFlags rxdOwner #361Definer #102

Referenced by

Source

1{target, amount, bodypart} = args;
2pct = $rpg:percent_of(amount, target.health_max);
3time = 2.0 + (tofloat(pct - random(10)) / 10.0);
4target:ingest($drugs.stunned, toint(time));

tree_tag

Spec this none thisFlags rxdOwner #29Definer #102

Referenced by

none

Source

1msg = tostr("bld: ", this.bleed_chance, " brn: ", this.burn_chance, " KO: ", this.knockout_chance, " stn: ", this.stun_chance, " shk: ", this.shock_chance);
2return msg;