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 1/2] 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)
From 4a4522641f2a074bb1340e169900d308d739e98e Mon Sep 17 00:00:00 2001
From: Qwertytoforty <52090703+Qwertytoforty@users.noreply.github.com>
Date: Thu, 16 Sep 2021 13:17:26 -0400
Subject: [PATCH 2/2] Removes uneeded procs, updates ability desc
---
code/datums/uplink_item.dm | 2 +-
code/game/gamemodes/changeling/powers/biodegrade.dm | 4 +---
code/game/gamemodes/changeling/powers/revive.dm | 2 +-
code/game/objects/items/weapons/implants/implant_freedom.dm | 2 --
4 files changed, 3 insertions(+), 7 deletions(-)
diff --git a/code/datums/uplink_item.dm b/code/datums/uplink_item.dm
index aa1e74a911e..b2eb0ba224d 100644
--- a/code/datums/uplink_item.dm
+++ b/code/datums/uplink_item.dm
@@ -1524,7 +1524,7 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item))
/datum/uplink_item/implants/freedom
name = "Freedom Implant"
- desc = "An implant injected into the body and later activated manually to break out of any restraints. Can be activated up to 4 times."
+ desc = "An implant injected into the body and later activated manually to break out of any restraints or grabs. Can be activated up to 4 times."
reference = "FI"
item = /obj/item/implanter/freedom
cost = 5
diff --git a/code/game/gamemodes/changeling/powers/biodegrade.dm b/code/game/gamemodes/changeling/powers/biodegrade.dm
index 9e9381acc0e..20b83cb9a02 100644
--- a/code/game/gamemodes/changeling/powers/biodegrade.dm
+++ b/code/game/gamemodes/changeling/powers/biodegrade.dm
@@ -1,7 +1,7 @@
/datum/action/changeling/biodegrade
name = "Biodegrade"
desc = "Dissolves restraints or other objects preventing free movement. Costs 30 chemicals."
- helptext = "This is obvious to nearby people, and can destroy standard restraints and closets."
+ helptext = "This is obvious to nearby people, and can destroy standard restraints and closets, and break you out of grabs."
button_icon_state = "biodegrade"
chemical_cost = 30 //High cost to prevent spam
dna_cost = 2
@@ -64,8 +64,6 @@
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)
diff --git a/code/game/gamemodes/changeling/powers/revive.dm b/code/game/gamemodes/changeling/powers/revive.dm
index d6b6fb88f3d..526512f5a4a 100644
--- a/code/game/gamemodes/changeling/powers/revive.dm
+++ b/code/game/gamemodes/changeling/powers/revive.dm
@@ -10,7 +10,7 @@
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!")
+ user.visible_message("[user] suddenly hits [M] in the face 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)
diff --git a/code/game/objects/items/weapons/implants/implant_freedom.dm b/code/game/objects/items/weapons/implants/implant_freedom.dm
index bace80bface..6706be167b5 100644
--- a/code/game/objects/items/weapons/implants/implant_freedom.dm
+++ b/code/game/objects/items/weapons/implants/implant_freedom.dm
@@ -21,8 +21,6 @@
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)