Makes Ling More Like The Thing (#17117)

* Makes Ling More Like The Thing

* update cl

* Update code/game/gamemodes/changeling/implements/powers/body.dm

Co-authored-by: SleepyGemmy <99297919+SleepyGemmy@users.noreply.github.com>

* Apply suggestions from code review

Co-authored-by: Fluffy <65877598+FluffyGhoster@users.noreply.github.com>

* requested changes

---------

Co-authored-by: SleepyGemmy <99297919+SleepyGemmy@users.noreply.github.com>
Co-authored-by: Fluffy <65877598+FluffyGhoster@users.noreply.github.com>
This commit is contained in:
Geeves
2023-11-13 22:25:56 +02:00
committed by GitHub
parent c8f206299c
commit 2f355a1d82
5 changed files with 141 additions and 17 deletions

View File

@@ -20,6 +20,8 @@ var/global/list/possible_changeling_IDs = list("Alpha","Beta","Gamma","Delta","E
var/mimiced_accent = "Biesellite"
var/justate
var/can_respec = FALSE
/// if they've entered stasis before, then we don't want to give them stasis again
var/has_entered_stasis = FALSE
/datum/changeling/New(var/gender=FEMALE)
..()
@@ -59,12 +61,13 @@ var/global/list/possible_changeling_IDs = list("Alpha","Beta","Gamma","Delta","E
changeling.absorbed_dna += newDNA
//Restores our verbs. It will only restore verbs allowed during lesser (monkey) form if we are not human
/mob/proc/make_changeling()
if(!mind)
/mob/proc/make_changeling(var/datum/mind/changeling_mind)
if(!changeling_mind)
changeling_mind = mind
if(!changeling_mind)
return
if(!mind.antag_datums[MODE_CHANGELING])
mind.antag_datums[MODE_CHANGELING] = new /datum/changeling(gender)
if(!changeling_mind.antag_datums[MODE_CHANGELING])
changeling_mind.antag_datums[MODE_CHANGELING] = new /datum/changeling(gender)
add_verb(src, /datum/changeling/proc/EvolutionMenu)
add_language(LANGUAGE_CHANGELING)
@@ -75,13 +78,13 @@ var/global/list/possible_changeling_IDs = list("Alpha","Beta","Gamma","Delta","E
for(var/P in powers)
powerinstances += new P()
var/datum/changeling/changeling = mind.antag_datums[MODE_CHANGELING]
var/datum/changeling/changeling = changeling_mind.antag_datums[MODE_CHANGELING]
// Code to auto-purchase free powers.
for(var/datum/power/changeling/P in powerinstances)
if(!P.genomecost) // Is it free?
if(!(P in changeling.purchasedpowers)) // Do we not have it already?
changeling.purchasePower(mind, P.name, 0) // Purchase it. Don't remake our verbs, we're doing it after this.
changeling.purchasePower(changeling_mind, P.name, 0) // Purchase it. Don't remake our verbs, we're doing it after this.
for(var/datum/power/changeling/P in changeling.purchasedpowers)
if(P.isVerb)
@@ -98,6 +101,9 @@ var/global/list/possible_changeling_IDs = list("Alpha","Beta","Gamma","Delta","E
absorbDNA(newDNA)
changeling.mimiced_accent = H.accent
if(changeling.has_entered_stasis)
remove_verb(src, /mob/proc/changeling_fakedeath)
return TRUE
/**

View File

@@ -63,10 +63,17 @@ var/list/datum/power/changeling/powerinstances = list()
/datum/power/changeling/fakedeath
name = "Regenerative Stasis"
desc = "We fake our own death, imperceptible to even the best of doctors. We can choose when to re-animate."
helptext = "Can be used before or after death. Duration varies greatly."
helptext = "Can only be used before death. CAN ONLY BE USED ONCE."
genomecost = 0
verbpath = /mob/proc/changeling_fakedeath
/datum/power/changeling/emergency_transform
name = "Emergency Transform"
desc = "If circumstances are dire enough, we can detach our head to transform into a lesser form to escape and regenerate later."
helptext = "Can be used before or after death."
genomecost = 0
verbpath = /mob/proc/changeling_emergency_transform
//Hivemind
/datum/power/changeling/hive_upload

View File

@@ -202,7 +202,7 @@
set category = "Changeling"
set name = "Regenerative Stasis (20)"
var/datum/changeling/changeling = changeling_power(20,1,100,DEAD)
var/datum/changeling/changeling = changeling_power(20, 1, 100, UNCONSCIOUS)
if(!changeling)
return
@@ -221,17 +221,29 @@
C.emote("gasp")
C.tod = worldtime2text()
spawn(1000)
if(changeling_power(20,1,100,DEAD))
// charge the changeling chemical cost for stasis
changeling.use_charges(20)
changeling.has_entered_stasis = TRUE
to_chat(C, "<span class='notice'><font size='5'>We are ready to rise. Use the <b>Revive</b> verb when you are ready.</font></span>")
add_verb(C, /mob/proc/changeling_revive)
addtimer(CALLBACK(src, PROC_REF(add_changeling_revive)), 100 SECONDS)
remove_verb(src, /mob/proc/changeling_fakedeath)
feedback_add_details("changeling_powers", "FD")
return TRUE
/mob/proc/add_changeling_revive()
if(stat == DEAD)
to_chat(src, SPAN_HIGHDANGER("We died while regenerating! Our last resort is detaching our head now..."))
return
var/datum/changeling/changeling = changeling_power(20, 1, 100, UNCONSCIOUS)
if(!changeling)
return
// charge the changeling chemical cost for stasis
changeling.use_charges(20)
to_chat(src, SPAN_NOTICE(FONT_GIANT("We are ready to rise. Use the <b>Revive</b> verb when we are ready.")))
add_verb(src, /mob/proc/changeling_revive)
/mob/proc/changeling_revive()
set category = "Changeling"
set name = "Revive"
@@ -249,6 +261,72 @@
to_chat(C, "<span class='notice'>We have regenerated fully.</span>")
remove_verb(C, /mob/proc/changeling_revive)
/// Rip the changeling's head off as a last ditch effort to revive
/mob/proc/changeling_emergency_transform()
set category = "Changeling"
set name = "Emergency Transform (1)"
var/datum/changeling/changeling = changeling_power(1, 0, 100, DEAD)
if(!changeling)
return
var/mob/living/carbon/human/H = src
if(!isturf(loc)) // so people can't transform inside places they should not, like sleepers
return
var/obj/item/organ/external/head = H.get_organ(BP_HEAD)
if(!head)
return
var/datum/absorbed_dna/DNA = changeling.absorbed_dna[1]
var/datum/dna/chosen_dna = DNA.dna
if(!chosen_dna)
return
if(H.handcuffed)
var/cuffs = H.handcuffed
H.u_equip(H.handcuffed)
qdel(cuffs)
if(H.buckled_to)
H.buckled_to.unbuckle()
changeling.use_charges(1)
changeling.geneticdamage = 70
H.remove_changeling_powers()
var/mob/living/simple_animal/hostile/lesser_changeling/revive/ling = new(get_turf(H))
var/mob/living/carbon/human/O = new /mob/living/carbon/human(ling)
if(chosen_dna.GetUIState(DNA_UI_GENDER))
O.gender = FEMALE
else
O.gender = MALE
O.set_species(chosen_dna.species)
O.dna = chosen_dna.Clone()
O.real_name = chosen_dna.real_name
O.UpdateAppearance()
domutcheck(O, null)
O.make_changeling(H.mind)
O.changeling_update_languages(changeling.absorbed_languages)
O.status_flags |= GODMODE
if(H.mind)
H.mind.transfer_to(ling)
else
ling.key = H.key
ling.untransform_occupant = O
ling.client.init_verbs()
H.visible_message(SPAN_HIGHDANGER("[H]'s head decouples from their body in a shower of gore!"))
head.droplimb(FALSE, DROPLIMB_BLUNT)
feedback_add_details("changeling_powers", "EMT")
return TRUE
//Recover from stuns.
/mob/proc/changeling_unstun()
set category = "Changeling"

View File

@@ -184,15 +184,38 @@
var/mob/living/carbon/human/occupant = null
/// after this amount of time, we gain the untransform verb
var/untransform_time = 0
/// if we don't have an occupant yet, we'll use this one when we gain the untransform verb
var/mob/living/carbon/human/untransform_occupant = null
/mob/living/simple_animal/hostile/lesser_changeling/revive
untransform_time = 5 MINUTES
/mob/living/simple_animal/hostile/lesser_changeling/Initialize()
. = ..()
add_verb(src, /mob/living/proc/ventcrawl)
add_verb(src, /mob/living/simple_animal/hostile/lesser_changeling/verb/untransform)
if(!untransform_time)
add_verb(src, /mob/living/simple_animal/hostile/lesser_changeling/proc/untransform)
else
addtimer(CALLBACK(src, PROC_REF(add_untransform_verb)), untransform_time, TIMER_UNIQUE|TIMER_OVERRIDE)
/mob/living/simple_animal/hostile/lesser_changeling/mind_initialize()
..()
mind.assigned_role = "Changeling"
/mob/living/simple_animal/hostile/lesser_changeling/Destroy()
. = ..()
QDEL_NULL(occupant)
QDEL_NULL(untransform_occupant)
/mob/living/simple_animal/hostile/lesser_changeling/proc/add_untransform_verb()
if(!occupant)
occupant = untransform_occupant
untransform_occupant = null
to_chat(src, SPAN_ALIEN("We are now ready to assume a greater form."))
add_verb(src, /mob/living/simple_animal/hostile/lesser_changeling/proc/untransform)
/mob/living/simple_animal/hostile/lesser_changeling/death(gibbed)
..()
if(!gibbed)
@@ -202,13 +225,14 @@
if(mind)
mind.transfer_to(occupant)
occupant.client.init_verbs()
occupant = null
visible_message("<span class='warning'>\The [src] explodes into a shower of gore!</span>")
gibs(src.loc)
qdel(src)
return
/mob/living/simple_animal/hostile/lesser_changeling/verb/untransform()
/mob/living/simple_animal/hostile/lesser_changeling/proc/untransform()
set name = "Return to original form"
set desc = "Return to your original form."
set category = "Changeling"
@@ -231,6 +255,7 @@
if(mind)
mind.transfer_to(occupant)
occupant.client.init_verbs()
occupant = null
visible_message("<span class='warning'>\The [src] explodes into a shower of gore!</span>")
gibs(src.loc)
qdel(src)

View File

@@ -0,0 +1,8 @@
author: Geeves
delete-after: True
changes:
- rscadd: "Lings gain a new free ability called Emergency Transform, where their heads detach from their bodies. They can grow back to normal after 10 minutes has passed."
- tweak: "Lings can no longer use regenerative stasis while dead. If they die while regenerating, it will fail."
- tweak: "Regenerative stasis can now only be used once."