Skip to content

Commit

Permalink
Small erismed fix (#8548)
Browse files Browse the repository at this point in the history
* fixed excessive rounding in determining wounding
fixed external damage overflow in determining internal dam
fixed immoderate division in determining dam

* tumors now have appropriate children
  • Loading branch information
vode-code authored Jan 31, 2025
1 parent eb62957 commit 39ed847
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions code/modules/organs/external/damage.dm
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@
var/transferred_damage_amount
switch(damage_type)
if(BRUTE)
transferred_damage_amount = amount - (max_damage - brute_dam) / armor_divisor / 2
transferred_damage_amount = amount - (max(max_damage - brute_dam, 0) / (1 + ((armor_divisor-1) / 2)))
if(BURN)
transferred_damage_amount = amount - (max_damage - burn_dam) / armor_divisor / 2
transferred_damage_amount = amount - max(max_damage - burn_dam, 0) / (armor_divisor > 1 ? 1 + abs(armor_divisor-1) / 2: 1 - abs(armor_divisor-1) / 2)
if(HALLOSS)
transferred_damage_amount = 0
else
Expand Down
2 changes: 1 addition & 1 deletion code/modules/organs/internal/_internal.dm
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@
if(!damage_type || status & ORGAN_DEAD)
return FALSE

var/wound_count = max(0, round(amount / (damage_type == BRUTE || damage_type == BURN ? 4 : 8))) // At base values, every 8 points of damage is 1 wound, or 4 if brute or burn.
var/wound_count = max(0, ROUND_PROB(amount / (damage_type == BRUTE || damage_type == BURN ? 4 : 8))) // At base values, every 8 points of damage is 1 wound, or 4 if brute or burn.

if(!wound_count)
return FALSE
Expand Down
6 changes: 3 additions & 3 deletions code/modules/organs/internal/internal_wounds/organic.dm
Original file line number Diff line number Diff line change
Expand Up @@ -258,14 +258,14 @@
severity_max = 1
organ_efficiency_multiplier = -0.10

/datum/component/internal_wound/organic/debuff_tumor
/datum/component/internal_wound/organic/debuff_tumor/default
name = "tumor"

/datum/component/internal_wound/organic/debuff_tumor_15
/datum/component/internal_wound/organic/debuff_tumor/t15
name = "tumor"
organ_efficiency_multiplier = -0.15

/datum/component/internal_wound/organic/debuff_tumor_5
/datum/component/internal_wound/organic/debuff_tumor/t5
name = "tumor"
organ_efficiency_multiplier = -0.05

Expand Down

0 comments on commit 39ed847

Please sign in to comment.