More checks for correct status+weaken chance while cuffed

This commit is contained in:
Mars
2018-03-23 08:39:44 +01:00
parent 88729b22a5
commit ddc102b6cd
@@ -90,10 +90,11 @@
name = "Tail lash"
icon_icon = 'icons/effects/effects.dmi'
button_icon_state = "tail"
check_flags = AB_CHECK_LYING | AB_CHECK_CONSCIOUS | AB_CHECK_STUNNED
/datum/action/innate/tail_lash/Activate()
var/mob/living/carbon/human/user = owner
if(user.restrained() || user.buckled)
if((user.restrained() && user.pulledby) || user.buckled)
to_chat(user, "<span class='warning'>You need freedom of movement to tail lash!</span>")
return
if(user.getStaminaLoss() >= 50)
@@ -107,6 +108,10 @@
user.adjustStaminaLoss(15)
C.apply_damage(5, BRUTE, E)
user.spin(20, 1)
if(user.restrained())
if(prob(50))
user.Weaken(5)
user.visible_message("<span class='danger'>[src] lost their balance! </span>", "<span class='danger'>You lost your balance!</span>")
playsound(user.loc, 'sound/weapons/slash.ogg', 50, 0)
add_logs(user, C, "tail whipped")