From f4f7172c8efb3d7b09223d3a05e7de36640fbb8c Mon Sep 17 00:00:00 2001 From: nemvar <47324920+nemvar@users.noreply.github.com> Date: Thu, 13 Feb 2020 10:37:55 +0100 Subject: [PATCH] Changes the two left feet mutation (#49280) * Changes two left feet to randomly knock you down instead of prolonging stun times * adds a span class to the message --- code/datums/mutations/body.dm | 30 +++++++++++++++++++++--------- 1 file changed, 21 insertions(+), 9 deletions(-) diff --git a/code/datums/mutations/body.dm b/code/datums/mutations/body.dm index 0acf4d19ecf..7781b0a3d44 100644 --- a/code/datums/mutations/body.dm +++ b/code/datums/mutations/body.dm @@ -368,17 +368,29 @@ /datum/mutation/human/extrastun name = "Two Left Feet" - desc = "A mutation that replaces the right foot with another left foot. It makes standing up after getting knocked down very difficult." + desc = "A mutation that replaces the right foot with another left foot. Symptoms include kissing the floor when taking a step." quality = NEGATIVE text_gain_indication = "Your right foot feels... left." text_lose_indication = "Your right foot feels alright." difficulty = 16 - var/stun_cooldown = 0 -/datum/mutation/human/extrastun/on_life() - if(world.time > stun_cooldown) - if(owner.AmountKnockdown() || owner.AmountStun()) - owner.SetKnockdown(owner.AmountKnockdown()*2) - owner.SetStun(owner.AmountStun()*2) - owner.visible_message("[owner] tries to stand up, but trips!", "You trip over your own feet!") - stun_cooldown = world.time + 300 +/datum/mutation/human/extrastun/on_acquiring() + . = ..() + if(.) + return + RegisterSignal(owner, COMSIG_MOVABLE_MOVED, .proc/on_move) + +/datum/mutation/human/extrastun/on_losing() + . = ..() + if(.) + return + UnregisterSignal(owner, COMSIG_MOVABLE_MOVED) + +///Triggers on moved(). Randomly makes the owner trip +/datum/mutation/human/extrastun/proc/on_move() + if(prob(99.5)) //The brawl mutation + return + if(owner.buckled || owner.lying || !((owner.mobility_flags & (MOBILITY_STAND | MOBILITY_MOVE)) == (MOBILITY_STAND | MOBILITY_MOVE)) || owner.throwing || owner.movement_type & (VENTCRAWLING | FLYING | FLOATING)) + return //remove the 'edge' cases + to_chat(owner, "You trip over your own feet.") + owner.Knockdown(30)