stamcrit check for fireaxe afterattack() (#11426)

* Update twohanded.dm

* Update twohanded.dm
This commit is contained in:
kevinz000
2020-03-12 06:21:47 -07:00
committed by GitHub
parent 661a898dd9
commit 87928d43ea

View File

@@ -246,11 +246,11 @@
user.visible_message("<span class='suicide'>[user] axes [user.p_them()]self from head to toe! It looks like [user.p_theyre()] trying to commit suicide!</span>")
return (BRUTELOSS)
/obj/item/twohanded/fireaxe/afterattack(atom/A, mob/user, proximity)
/obj/item/twohanded/fireaxe/afterattack(atom/A, mob/living/user, proximity)
. = ..()
if(!proximity)
if(!proximity || (user.getStaminaLoss() > STAMINA_SOFTCRIT))
return
if(wielded) //destroys windows and grilles in one hit
if(wielded) //destroys windows and grilles in one hit (or more if it has a ton of health like plasmaglass)
if(istype(A, /obj/structure/window))
var/obj/structure/window/W = A
W.take_damage(200, BRUTE, "melee", 0)