Merge pull request #12063 from Fox-McCloud/fix-stun-absorption

Fixes Stun Absorbtion Not Working
This commit is contained in:
variableundefined
2019-08-23 17:15:40 -04:00
committed by GitHub
+6
View File
@@ -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)