mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-31 09:08:30 +01:00
Stamina tweaks (#44671)
* Stam damage limb coefficient up to 0.75 Stam damage more responsive * Short-circuits in the correct order * Other damage types in a limb no longer make you stamina resistant
This commit is contained in:
@@ -23,7 +23,7 @@
|
||||
|
||||
var/disabled = BODYPART_NOT_DISABLED //If disabled, limb is as good as missing
|
||||
var/body_damage_coeff = 1 //Multiplier of the limb's damage that gets applied to the mob
|
||||
var/stam_damage_coeff = 0.5
|
||||
var/stam_damage_coeff = 0.75
|
||||
var/brutestate = 0
|
||||
var/burnstate = 0
|
||||
var/brute_dam = 0
|
||||
@@ -180,9 +180,7 @@
|
||||
burn_dam += burn
|
||||
|
||||
//We've dealt the physical damages, if there's room lets apply the stamina damage.
|
||||
var/current_damage = get_damage(TRUE) //This time around, count stamina loss too.
|
||||
var/available_damage = max_damage - current_damage
|
||||
stamina_dam += round(CLAMP(stamina, 0, min(max_stamina_damage - stamina_dam, available_damage)), DAMAGE_PRECISION)
|
||||
stamina_dam += round(CLAMP(stamina, 0, max_stamina_damage - stamina_dam), DAMAGE_PRECISION)
|
||||
|
||||
|
||||
if(owner && updating_health)
|
||||
@@ -190,9 +188,10 @@
|
||||
if(stamina > DAMAGE_PRECISION)
|
||||
owner.update_stamina()
|
||||
owner.stam_regen_start_time = world.time + STAMINA_REGEN_BLOCK_TIME
|
||||
. = TRUE
|
||||
consider_processing()
|
||||
update_disabled()
|
||||
return update_bodypart_damage_state()
|
||||
return update_bodypart_damage_state() || .
|
||||
|
||||
//Heals brute and burn damage for the organ. Returns 1 if the damage-icon states changed at all.
|
||||
//Damage cannot go below zero.
|
||||
|
||||
Reference in New Issue
Block a user