mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-23 03:57:13 +01:00
Merge pull request #12063 from Fox-McCloud/fix-stun-absorption
Fixes Stun Absorbtion Not Working
This commit is contained in:
@@ -397,6 +397,9 @@
|
||||
// STUN
|
||||
|
||||
/mob/living/Stun(amount, updating = 1, force = 0)
|
||||
if(status_flags & CANSTUN || force)
|
||||
if(absorb_stun(amount, force))
|
||||
return FALSE
|
||||
return SetStunned(max(stunned, amount), updating, force)
|
||||
|
||||
/mob/living/SetStunned(amount, updating = 1, force = 0) //if you REALLY need to set stun to a set amount without the whole "can't go below current stunned"
|
||||
@@ -434,6 +437,9 @@
|
||||
// WEAKEN
|
||||
|
||||
/mob/living/Weaken(amount, updating = 1, force = 0)
|
||||
if(status_flags & CANWEAKEN || force)
|
||||
if(absorb_stun(amount, force))
|
||||
return FALSE
|
||||
return SetWeakened(max(weakened, amount), updating, force)
|
||||
|
||||
/mob/living/SetWeakened(amount, updating = 1, force = 0)
|
||||
|
||||
Reference in New Issue
Block a user