mirror of
https://github.com/Citadel-Station-13/Citadel-Station-13-RP.git
synced 2026-08-30 22:36:57 +01:00
regexes damage and wound types (#6735)
Different semantics demand different defines. It's hard to tell what's being used where and for what reason right now. Staging for combat PR.
This commit is contained in:
+17
-17
@@ -398,11 +398,11 @@
|
||||
if(can_inflict_brute >= brute)
|
||||
if(can_cut)
|
||||
if(sharp && !edge)
|
||||
create_wound( PIERCE, brute )
|
||||
create_wound( WOUND_TYPE_PIERCE, brute )
|
||||
else
|
||||
create_wound( CUT, brute )
|
||||
create_wound( WOUND_TYPE_CUT, brute )
|
||||
else
|
||||
create_wound( BRUISE, brute )
|
||||
create_wound( WOUND_TYPE_BRUISE, brute )
|
||||
else if(!(damage_mode & DAMAGE_MODE_NO_OVERFLOW))
|
||||
var/overflow_brute = brute - can_inflict_brute
|
||||
// keep allowing it, but, diminishing returns
|
||||
@@ -412,24 +412,24 @@
|
||||
overflow_brute -= damage_anyways_brute
|
||||
if(can_cut)
|
||||
if(sharp && !edge)
|
||||
create_wound( PIERCE, damage_anyways_brute )
|
||||
create_wound( WOUND_TYPE_PIERCE, damage_anyways_brute )
|
||||
else
|
||||
create_wound( CUT, damage_anyways_brute )
|
||||
create_wound( WOUND_TYPE_CUT, damage_anyways_brute )
|
||||
else
|
||||
create_wound( BRUISE, damage_anyways_brute )
|
||||
create_wound( WOUND_TYPE_BRUISE, damage_anyways_brute )
|
||||
// rest goes into shock
|
||||
owner.shock_stage += overflow_brute * 0.33
|
||||
if(burn)
|
||||
var/can_inflict_burn = max(0, max_damage - burn_dam)
|
||||
if(can_inflict_burn >= burn)
|
||||
create_wound( BURN, burn )
|
||||
create_wound( WOUND_TYPE_BURN, burn )
|
||||
else
|
||||
var/overflow_burn = burn - can_inflict_burn
|
||||
var/damage_anyways_burn = !(damage_mode & DAMAGE_MODE_NO_OVERFLOW) && ( \
|
||||
overflow_burn * min(1, 1 / ((max(burn_dam, max_damage) + damage_softcap_intensifier) / (damage_softcap_intensifier + max_damage))) \
|
||||
)
|
||||
overflow_burn -= damage_anyways_burn
|
||||
create_wound(BURN, damage_anyways_burn + can_inflict_burn)
|
||||
create_wound(WOUND_TYPE_BURN, damage_anyways_burn + can_inflict_burn)
|
||||
// rest goes into shock
|
||||
owner.shock_stage += overflow_burn * 0.33
|
||||
|
||||
@@ -504,7 +504,7 @@
|
||||
break
|
||||
|
||||
// heal brute damage
|
||||
if(W.damage_type == BURN)
|
||||
if(W.wound_type == WOUND_TYPE_BURN)
|
||||
burn = W.heal_damage(burn)
|
||||
else
|
||||
brute = W.heal_damage(brute)
|
||||
@@ -527,9 +527,9 @@
|
||||
|
||||
var/damage_amount
|
||||
switch(damage_type)
|
||||
if(BRUTE)
|
||||
if(DAMAGE_TYPE_BRUTE)
|
||||
damage_amount = brute_dam
|
||||
if(BURN)
|
||||
if(DAMAGE_TYPE_BURN)
|
||||
damage_amount = burn_dam
|
||||
if("omni")
|
||||
damage_amount = max(brute_dam,burn_dam)
|
||||
@@ -562,9 +562,9 @@
|
||||
return FALSE
|
||||
|
||||
switch(damage_type)
|
||||
if(BRUTE)
|
||||
if(DAMAGE_TYPE_BRUTE)
|
||||
src.heal_damage(repair_amount, 0, 0, 1)
|
||||
if(BURN)
|
||||
if(DAMAGE_TYPE_BURN)
|
||||
src.heal_damage(0, repair_amount, 0, 1)
|
||||
if("omni")
|
||||
src.heal_damage(repair_amount, repair_amount, 0, 1)
|
||||
@@ -849,7 +849,7 @@ Note that amputating the affected organ does in fact remove the infection from t
|
||||
//update damage counts
|
||||
for(var/datum/wound/W as anything in wounds)
|
||||
if(!W.internal) //so IB doesn't count towards crit/paincrit
|
||||
if(W.damage_type == BURN)
|
||||
if(W.wound_type == WOUND_TYPE_BURN)
|
||||
burn_dam += W.damage
|
||||
else
|
||||
brute_dam += W.damage
|
||||
@@ -862,7 +862,7 @@ Note that amputating the affected organ does in fact remove the infection from t
|
||||
|
||||
wound_tally += W.amount
|
||||
|
||||
//things tend to bleed if they are CUT OPEN
|
||||
//things tend to bleed if they are WOUND_TYPE_CUT OPEN
|
||||
if (open && !clamped && (H && H.should_have_organ(O_HEART)))
|
||||
status |= ORGAN_BLEEDING
|
||||
|
||||
@@ -1270,7 +1270,7 @@ Note that amputating the affected organ does in fact remove the infection from t
|
||||
if(!owner || loc != owner)
|
||||
return
|
||||
if(owner.species.reagent_tag == IS_SLIME)
|
||||
create_wound( CUT, 15 ) //fixes proms being bugged into paincrit;instead whatever would embed now just takes a chunk out
|
||||
create_wound( WOUND_TYPE_CUT, 15 ) //fixes proms being bugged into paincrit;instead whatever would embed now just takes a chunk out
|
||||
src.visible_message("<font color='red'>[owner] has been seriously wounded by [W]!</font>")
|
||||
W.add_blood(owner)
|
||||
return 0
|
||||
@@ -1429,7 +1429,7 @@ Note that amputating the affected organ does in fact remove the infection from t
|
||||
if(W.internal && !open) continue // can't see internal wounds
|
||||
var/this_wound_desc = W.desc
|
||||
|
||||
if(W.damage_type == BURN && W.salved)
|
||||
if(W.wound_type == WOUND_TYPE_BURN && W.salved)
|
||||
this_wound_desc = "salved [this_wound_desc]"
|
||||
|
||||
if(W.bleeding())
|
||||
|
||||
Reference in New Issue
Block a user