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)