From f3337539b533f99b466b5b0c353491621cfdd485 Mon Sep 17 00:00:00 2001 From: Qwertytoforty <52090703+Qwertytoforty@users.noreply.github.com> Date: Wed, 15 Sep 2021 22:11:05 -0400 Subject: [PATCH] Makes revive, biodegrade, and freedom break grabs --- .../game/gamemodes/changeling/powers/biodegrade.dm | 14 ++++++++++++-- code/game/gamemodes/changeling/powers/revive.dm | 6 ++++++ .../items/weapons/implants/implant_freedom.dm | 11 +++++++++++ 3 files changed, 29 insertions(+), 2 deletions(-) diff --git a/code/game/gamemodes/changeling/powers/biodegrade.dm b/code/game/gamemodes/changeling/powers/biodegrade.dm index 45ce670dfcc..9e9381acc0e 100644 --- a/code/game/gamemodes/changeling/powers/biodegrade.dm +++ b/code/game/gamemodes/changeling/powers/biodegrade.dm @@ -9,7 +9,7 @@ /datum/action/changeling/biodegrade/sting_action(mob/living/carbon/human/user) var/used = FALSE // only one form of shackles removed per use - if(!user.restrained() && !user.legcuffed && !istype(user.loc, /obj/structure/closet) && !istype(user.loc, /obj/structure/spider/cocoon)) + if(!user.restrained() && !user.legcuffed && !istype(user.loc, /obj/structure/closet) && !istype(user.loc, /obj/structure/spider/cocoon) && !user.grabbed_by) to_chat(user, "We are already free!") return FALSE @@ -57,7 +57,17 @@ to_chat(user, "We secrete acidic enzymes from our skin and begin melting our cocoon...") addtimer(CALLBACK(src, .proc/dissolve_cocoon, user, C), 2.5 SECONDS) //Very short because it's just webs used = TRUE - + for(var/obj/item/grab/G in user.grabbed_by) + var/mob/living/carbon/M = G.assailant + user.visible_message("[user] spits acid at [M]'s face and slips out of their grab!") + M.Stun(1) //Drops the grab + M.apply_damage(5, BURN, "head", M.run_armor_check("head", "melee")) + user.SetStunned(0) //This only triggers if they are grabbed, to have them break out of the grab, without the large stun time. If you use biodegrade as an antistun without being grabbed, it will not work + user.SetWeakened(0) + user.lying = FALSE + user.update_canmove() + playsound(user.loc, 'sound/weapons/sear.ogg', 50, TRUE) + used = TRUE if(used) SSblackbox.record_feedback("nested tally", "changeling_powers", 1, list("[name]")) return TRUE diff --git a/code/game/gamemodes/changeling/powers/revive.dm b/code/game/gamemodes/changeling/powers/revive.dm index c193dcedf90..d6b6fb88f3d 100644 --- a/code/game/gamemodes/changeling/powers/revive.dm +++ b/code/game/gamemodes/changeling/powers/revive.dm @@ -8,6 +8,12 @@ //Revive from regenerative stasis /datum/action/changeling/revive/sting_action(mob/living/carbon/user) REMOVE_TRAIT(user, TRAIT_FAKEDEATH, "changeling") + for(var/obj/item/grab/G in user.grabbed_by) + var/mob/living/carbon/M = G.assailant + user.visible_message("[user] suddenly hits [M] and slips out of their grab!") + M.Stun(1) //Drops the grab + M.apply_damage(5, BRUTE, "head", M.run_armor_check("head", "melee")) + playsound(user.loc, 'sound/weapons/punch1.ogg', 25, 1, -1) user.revive() user.updatehealth("revive sting") user.update_blind_effects() diff --git a/code/game/objects/items/weapons/implants/implant_freedom.dm b/code/game/objects/items/weapons/implants/implant_freedom.dm index 62e71479884..bace80bface 100644 --- a/code/game/objects/items/weapons/implants/implant_freedom.dm +++ b/code/game/objects/items/weapons/implants/implant_freedom.dm @@ -13,6 +13,17 @@ if(iscarbon(imp_in)) var/mob/living/carbon/C_imp_in = imp_in C_imp_in.uncuff() + for(var/obj/item/grab/G in C_imp_in.grabbed_by) + var/mob/living/carbon/M = G.assailant + C_imp_in.visible_message("[C_imp_in] suddenly shocks [M] from their wrists and slips out of their grab!") + M.Stun(1) //Drops the grab + M.apply_damage(2, BURN, "r_hand", M.run_armor_check("r_hand", "energy")) + M.apply_damage(2, BURN, "l_hand", M.run_armor_check("l_hand", "energy")) + C_imp_in.SetStunned(0) //This only triggers if they are grabbed, to have them break out of the grab, without the large stun time. + C_imp_in.SetWeakened(0) + C_imp_in.lying = FALSE + C_imp_in.update_canmove() + playsound(C_imp_in.loc, "sound/weapons/Egloves.ogg", 75, 1) if(!uses) qdel(src)