mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-14 08:34:16 +01:00
Merge pull request #8788 from MarsM0nd/Tail_lash_fix
Tail whip logic fix and logging
This commit is contained in:
@@ -73,10 +73,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)
|
||||
@@ -86,13 +87,22 @@
|
||||
var/obj/item/organ/external/E = C.get_organ(pick("l_leg", "r_leg", "l_foot", "r_foot", "groin"))
|
||||
if(E)
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
user.visible_message("<span class='danger'>[src] smacks [C] in [E] with their tail! </span>", "<span class='danger'>You hit [C] in [E] with your tail!</span>")
|
||||
user.visible_message("<span class='danger'>[user] smacks [C] in [E] with their tail! </span>", "<span class='danger'>You hit [C] in [E] with your tail!</span>")
|
||||
user.adjustStaminaLoss(15)
|
||||
C.apply_damage(5, BRUTE, E)
|
||||
user.spin(20, 1)
|
||||
playsound(user.loc, 'sound/weapons/slash.ogg', 50, 0)
|
||||
add_attack_logs(user, C, "tail whipped")
|
||||
if(user.restrained())
|
||||
if(prob(50))
|
||||
user.Weaken(5)
|
||||
user.visible_message("<span class='danger'>[user] loses [user.p_their()] balance!</span>", "<span class='danger'>You lose your balance!</span>")
|
||||
return
|
||||
if(user.getStaminaLoss() >= 60) //Bit higher as you don't need to start, just would need to keep going with the tail lash.
|
||||
to_chat(user, "<span class='warning'>You run out of momentum!</span>")
|
||||
return
|
||||
|
||||
|
||||
|
||||
/datum/species/unathi/handle_death(mob/living/carbon/human/H)
|
||||
H.stop_tail_wagging(1)
|
||||
H.stop_tail_wagging(1)
|
||||
|
||||
Reference in New Issue
Block a user