damage #102
Aliases: damage
7 verbs · 21 properties · 1 children
Verbs
| Verb | Spec | Flags | Definer | Lines |
|---|---|---|---|---|
affect | this none this | rxd | #102 | 15 |
bleed | this none this | rxd | #102 | 10 |
knockout | this none this | rxd | #102 | 11 |
shock | this none this | rxd | #102 | 7 |
burn | this none this | rxd | #102 | 10 |
stun | this none this | rxd | #102 | 4 |
tree_tag | this none this | rxd | #102 | 2 |
Properties
| Property | Definer | Flags | Owner | Value |
|---|---|---|---|---|
messages | #102 | rc | #361 | #121 |
autopsy_msg | #102 | rc | #361 | "You're not sure what killed %o." |
absorb_msg | #102 | rc | #361 | "%DN's %t bounces off %dd's %armor." |
bleed_chance | #102 | rc | #361 | 0 |
knockout_chance | #102 | rc | #361 | 2 |
shock_chance | #102 | rc | #361 | 1 |
abbrev | #102 | rc | #361 | "dmg" |
burn_chance | #102 | rc | #361 | 0 |
blood_min | #102 | rc | #361 | 100 |
stun_chance | #102 | rc | #361 | 1 |
code | #102 | rc | #361 | "xx" |
aliases | #1 | rc | #361 | {"damage"} |
description | #1 | rc | #361 | <clear> |
object_size | #1 | r | #29 | {4806, 1298433815} |
hidden_verbs | #1 | rc | #361 | <clear> |
phelp_msg | #1 | rc | #361 | <clear> |
weight | #1 | rc | #361 | <clear> |
owner_verbs | #1 | rc | #361 | <clear> |
plural_name | #1 | rc | #361 | <clear> |
client_image | #1 | rc | #361 | <clear> |
listening | #1 | rc | #361 | <clear> |
Ancestry
Ancestors (nearest first): #1 root
Children: #199 beating
Call graph
Source
affect
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
Referenced by
- #102:affect line 6:
this:bleed
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
Referenced by
- #102:affect line 10:
this:knockout
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
Referenced by
- #102:affect line 14:
this:shock
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
Referenced by
- #102:affect line 8:
this:burn
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
Referenced by
- #102:affect line 12:
this:stun
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
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;