From 9101bb588ea25e3f1d86204672f6e01092c8e4fa Mon Sep 17 00:00:00 2001 From: HMBGERDO <61080616+HMBGERDO@users.noreply.github.com> Date: Fri, 1 Mar 2024 13:59:59 +0100 Subject: [PATCH] Headslug for everyone + Headslug once per absorb + Cling abilities offline after reviving (#23992) * nerf nerf nerf nerf * cooldown time * rechargable headslug * Update code/modules/antagonists/changeling/powers/absorb.dm Co-authored-by: Luc <89928798+lewcc@users.noreply.github.com> * Update code/modules/antagonists/changeling/powers/become_headslug.dm Co-authored-by: S34N <12197162+S34NW@users.noreply.github.com> --------- Co-authored-by: matttheficus Co-authored-by: Luc <89928798+lewcc@users.noreply.github.com> Co-authored-by: S34N <12197162+S34NW@users.noreply.github.com> --- .../antagonists/changeling/changeling_power.dm | 3 +++ .../antagonists/changeling/datum_changeling.dm | 4 ++++ .../antagonists/changeling/powers/absorb.dm | 4 ++++ .../changeling/powers/become_headslug.dm | 14 ++++++++------ .../antagonists/changeling/powers/revive.dm | 4 ++++ 5 files changed, 23 insertions(+), 6 deletions(-) diff --git a/code/modules/antagonists/changeling/changeling_power.dm b/code/modules/antagonists/changeling/changeling_power.dm index dcec4ba770a..f6c1d2fb410 100644 --- a/code/modules/antagonists/changeling/changeling_power.dm +++ b/code/modules/antagonists/changeling/changeling_power.dm @@ -90,6 +90,9 @@ if(HAS_TRAIT(user, TRAIT_FAKEDEATH) && !bypass_fake_death) to_chat(user, "We are incapacitated.") return FALSE + if(!cling.can_use_powers) + to_chat(owner, "Our cells are repairing themselves, we are unable to use our powers!") + return FALSE return TRUE // Transform the target to the chosen dna. Used in transform.dm and tiny_prick.dm (handy for changes since it's the same thing done twice) diff --git a/code/modules/antagonists/changeling/datum_changeling.dm b/code/modules/antagonists/changeling/datum_changeling.dm index f8c39e74fd9..a507ad5cfa3 100644 --- a/code/modules/antagonists/changeling/datum_changeling.dm +++ b/code/modules/antagonists/changeling/datum_changeling.dm @@ -48,6 +48,10 @@ var/datum/action/changeling/sting/chosen_sting /// If the changeling is in the process of regenerating from their fake death. var/regenerating = FALSE + /// Did changeling use headslug? + var/headslugged = FALSE + /// Can you use abilities due to a recent revival? + var/can_use_powers = TRUE blurb_text_color = COLOR_PURPLE blurb_text_outline_width = 1 diff --git a/code/modules/antagonists/changeling/powers/absorb.dm b/code/modules/antagonists/changeling/powers/absorb.dm index 75b3b4ea4a3..6e8b98bc5ea 100644 --- a/code/modules/antagonists/changeling/powers/absorb.dm +++ b/code/modules/antagonists/changeling/powers/absorb.dm @@ -86,6 +86,10 @@ target_cling.absorbed_dna.len = 1 target_cling.absorbed_count = 0 + if(cling.headslugged) + cling.headslugged = FALSE + to_chat(user, "By absorbing [target], we are once again strong enough to turn into a headslug.") + cling.chem_charges = min(cling.chem_charges + 10, cling.chem_storage) cling.is_absorbing = FALSE diff --git a/code/modules/antagonists/changeling/powers/become_headslug.dm b/code/modules/antagonists/changeling/powers/become_headslug.dm index 2ef080c8046..a5c7b712ffc 100644 --- a/code/modules/antagonists/changeling/powers/become_headslug.dm +++ b/code/modules/antagonists/changeling/powers/become_headslug.dm @@ -1,19 +1,21 @@ /datum/action/changeling/headslug name = "Last Resort" - desc = "We sacrifice our current body in a moment of need, placing us in control of a vessel that can plant our likeness in a new host. Costs 20 chemicals." - helptext = "We will be placed in control of a small, fragile creature. We may attack a corpse like this to plant an egg which will slowly mature into a new form for us." + desc = "We sacrifice our current body in a moment of need, placing us in control of a vessel that can plant our likeness in a new host. Costs 20 chemicals. We will need to absorb someone to use this ability again." + helptext = "We will be placed in control of a small, fragile creature. We may attack a corpse like this to plant an egg which will slowly mature into a new form for us. This ability is available only once per absorption." button_icon_state = "last_resort" chemical_cost = 20 - dna_cost = 2 req_human = TRUE req_stat = DEAD bypass_fake_death = TRUE - power_type = CHANGELING_PURCHASABLE_POWER - category = /datum/changeling_power_category/defence + power_type = CHANGELING_INNATE_POWER /datum/action/changeling/headslug/try_to_sting(mob/user, mob/target) - if(tgui_alert(user, "Are you sure you wish to do this? This action cannot be undone.", "Sting", list("Yes", "No")) == "No") + if(cling.headslugged) + to_chat(user, "We need to absorb a humanoid to headslug again.") return + if(tgui_alert("Are you sure you wish to do this? This action cannot be undone.",,"Yes","No") != "Yes") + return + cling.headslugged = TRUE ..() /datum/action/changeling/headslug/sting_action(mob/user) diff --git a/code/modules/antagonists/changeling/powers/revive.dm b/code/modules/antagonists/changeling/powers/revive.dm index 20e4c793330..f5fc56bb495 100644 --- a/code/modules/antagonists/changeling/powers/revive.dm +++ b/code/modules/antagonists/changeling/powers/revive.dm @@ -11,6 +11,10 @@ if(HAS_TRAIT(user, TRAIT_UNREVIVABLE)) to_chat(user, "Something is preventing us from regenerating, we will need to revive at another point.") return FALSE + + cling.can_use_powers = FALSE + addtimer(VARSET_CALLBACK(cling, can_use_powers, TRUE), 10 SECONDS) + REMOVE_TRAIT(user, TRAIT_FAKEDEATH, CHANGELING_TRAIT) for(var/obj/item/grab/G in user.grabbed_by) var/mob/living/carbon/M = G.assailant