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 <mickusmatthew@gmail.com>
Co-authored-by: Luc <89928798+lewcc@users.noreply.github.com>
Co-authored-by: S34N <12197162+S34NW@users.noreply.github.com>
This commit is contained in:
HMBGERDO
2024-03-01 13:59:59 +01:00
committed by GitHub
parent 7c0ce05aae
commit 9101bb588e
5 changed files with 23 additions and 6 deletions
@@ -90,6 +90,9 @@
if(HAS_TRAIT(user, TRAIT_FAKEDEATH) && !bypass_fake_death)
to_chat(user, "<span class='warning'>We are incapacitated.</span>")
return FALSE
if(!cling.can_use_powers)
to_chat(owner, "<span class='warning'>Our cells are repairing themselves, we are unable to use our powers!</span>")
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)
@@ -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
@@ -86,6 +86,10 @@
target_cling.absorbed_dna.len = 1
target_cling.absorbed_count = 0
if(cling.headslugged)
cling.headslugged = FALSE
to_chat(user, "<span class='boldnotice'>By absorbing [target], we are once again strong enough to turn into a headslug.</span>")
cling.chem_charges = min(cling.chem_charges + 10, cling.chem_storage)
cling.is_absorbing = FALSE
@@ -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, "<span class='notice'>We need to absorb a humanoid to headslug again.</span>")
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)
@@ -11,6 +11,10 @@
if(HAS_TRAIT(user, TRAIT_UNREVIVABLE))
to_chat(user, "<span class='notice'>Something is preventing us from regenerating, we will need to revive at another point.</span>")
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