mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-27 15:17:01 +01:00
Rewrites the DNA-cost limitation to work off of absorbed dna count (the objective tracker) instead of the length of the dna list.
Changeling Regeneration now has two steps, so that changelings can decide when to use it rather than popping up after a timer. Fixed an issue with the chem UI indicator showing up for non-lings.
This commit is contained in:
@@ -219,7 +219,7 @@ var/list/possible_changeling_IDs = list("Alpha","Beta","Gamma","Delta","Epsilon"
|
||||
/datum/changeling //stores changeling powers, changeling recharge thingie, changeling absorbed DNA and changeling ID (for changeling hivemind)
|
||||
var/list/absorbed_dna = list()
|
||||
var/dna_max = 4 //How many extra DNA strands the changeling can store for transformation.
|
||||
var/absorbedcount = 0 //
|
||||
var/absorbedcount = 0
|
||||
var/chem_charges = 20
|
||||
var/chem_storage = 50
|
||||
var/chem_recharge_rate = 0.5
|
||||
@@ -270,14 +270,14 @@ var/list/possible_changeling_IDs = list("Alpha","Beta","Gamma","Delta","Epsilon"
|
||||
U << "<span class='warning'>DNA of [T] is ruined beyond usability!</span>"
|
||||
return 0
|
||||
|
||||
if(T.dna in absorbed_dna)
|
||||
U << "<span class='warning'>We already have that DNA in storage.</span>"
|
||||
return 0
|
||||
|
||||
if(!ishuman(T))//Absorbing monkeys is entirely possible, but it can cause issues with transforming. That's what lesser form is for anyway!
|
||||
U << "<span class='warning'>We could gain no benefit from absorbing a lesser creature.</span>"
|
||||
return 0
|
||||
|
||||
if(T.dna in absorbed_dna)
|
||||
U << "<span class='warning'>We already have that DNA in storage.</span>"
|
||||
return 0
|
||||
|
||||
if(!check_dna_integrity(T))
|
||||
U << "<span class='warning'>[T] is not compatible with our biology.</span>"
|
||||
return 0
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
src << "<span class='warning'>We are incapacitated.</span>"
|
||||
return
|
||||
|
||||
if(changeling.absorbed_dna.len < required_dna)
|
||||
if(changeling.absorbedcount < required_dna)
|
||||
src << "<span class='warning'>We require at least [required_dna] samples of compatible DNA.</span>"
|
||||
return
|
||||
|
||||
@@ -133,7 +133,7 @@
|
||||
set category = "Changeling"
|
||||
set name = "Transform (5)"
|
||||
|
||||
var/datum/changeling/changeling = changeling_power(5,1,0)
|
||||
var/datum/changeling/changeling = changeling_power(5, 0, 3)
|
||||
if(!changeling) return
|
||||
|
||||
var/list/names = list()
|
||||
@@ -154,9 +154,6 @@
|
||||
updateappearance(src)
|
||||
domutcheck(src, null)
|
||||
|
||||
src.verbs -= /mob/living/carbon/proc/changeling_transform
|
||||
spawn(10) src.verbs += /mob/living/carbon/proc/changeling_transform
|
||||
|
||||
feedback_add_details("changeling_powers","TR")
|
||||
return 1
|
||||
|
||||
@@ -164,12 +161,12 @@
|
||||
//Transform into a monkey.
|
||||
/mob/living/carbon/proc/changeling_lesser_form()
|
||||
set category = "Changeling"
|
||||
set name = "Lesser Form (1)"
|
||||
set name = "Lesser Form (5)"
|
||||
|
||||
var/datum/changeling/changeling = changeling_power(1,0,0)
|
||||
var/datum/changeling/changeling = changeling_power(5,0,3)
|
||||
if(!changeling) return
|
||||
|
||||
changeling.chem_charges--
|
||||
changeling.chem_charges -= 5
|
||||
remove_changeling_powers()
|
||||
changeling.geneticdamage = 3
|
||||
src << "<span class='warning'>Our genes cry out!</span>"
|
||||
@@ -188,9 +185,9 @@
|
||||
/mob/living/carbon/proc/changeling_human_form()
|
||||
|
||||
set category = "Changeling"
|
||||
set name = "Human Form (1)"
|
||||
set name = "Human Form (5)"
|
||||
|
||||
var/datum/changeling/changeling = changeling_power(1,1,0)
|
||||
var/datum/changeling/changeling = changeling_power(5,0,3)
|
||||
|
||||
if(!changeling) return
|
||||
|
||||
@@ -205,7 +202,7 @@
|
||||
if(!chosen_dna)
|
||||
return
|
||||
|
||||
changeling.chem_charges--
|
||||
changeling.chem_charges -= 5
|
||||
remove_changeling_powers()
|
||||
src << "<span class='notice'>We transform our appearance.</span>"
|
||||
dna = chosen_dna
|
||||
@@ -222,47 +219,67 @@
|
||||
//Fake our own death and fully heal. You will appear to be dead but regenerate fully after a short delay.
|
||||
/mob/living/carbon/proc/changeling_fakedeath()
|
||||
set category = "Changeling"
|
||||
set name = "Regenerative Stasis (20)"
|
||||
set name = "Regenerative Stasis (10)"
|
||||
|
||||
var/datum/changeling/changeling = changeling_power(20,1,100,DEAD)
|
||||
var/datum/changeling/changeling = changeling_power(10,0,100,DEAD)
|
||||
if(!changeling) return
|
||||
if(status_flags & FAKEDEATH) return //Make sure we can't stack regenerations and such.
|
||||
changeling.chem_charges -= 10
|
||||
|
||||
if(!stat && alert("Are we sure we wish to fake our death?",,"Yes","No") == "No")//Confirmation for living changelings if they want to fake their death
|
||||
return
|
||||
src << "<span class='notice'>We will attempt to regenerate our form.</span>"
|
||||
src << "<span class='notice'>We begin our stasis, preparing energy to arise once more.</span>"
|
||||
|
||||
status_flags |= FAKEDEATH //play dead
|
||||
update_canmove()
|
||||
remove_changeling_powers()
|
||||
|
||||
emote("gasp")
|
||||
emote("deathgasp")
|
||||
tod = worldtime2text()
|
||||
|
||||
spawn(rand(800,2000))
|
||||
if(changeling_power(20,1,100,DEAD))
|
||||
changeling.chem_charges -= 20
|
||||
if(stat == DEAD)
|
||||
dead_mob_list -= src
|
||||
living_mob_list += src
|
||||
stat = CONSCIOUS
|
||||
tod = null
|
||||
setToxLoss(0)
|
||||
setOxyLoss(0)
|
||||
setCloneLoss(0)
|
||||
SetParalysis(0)
|
||||
SetStunned(0)
|
||||
SetWeakened(0)
|
||||
radiation = 0
|
||||
heal_overall_damage(getBruteLoss(), getFireLoss())
|
||||
reagents.clear_reagents()
|
||||
src << "<span class='notice'>We have regenerated.</span>"
|
||||
spawn(800)
|
||||
src << "<span class='notice'>We have now stored enough power to regenerate.</span>"
|
||||
verbs -= /mob/living/carbon/proc/changeling_fakedeath
|
||||
verbs += /mob/living/carbon/proc/changeling_revive
|
||||
|
||||
status_flags &= ~(FAKEDEATH)
|
||||
update_canmove()
|
||||
make_changeling()
|
||||
feedback_add_details("changeling_powers","FD")
|
||||
return 1
|
||||
|
||||
//Separated from regenerative stasis, so that they can choose when to pop up rather than having no control over it.
|
||||
/mob/living/carbon/proc/changeling_revive()
|
||||
set category = "Changeling"
|
||||
set name = "Regenerate! (10)"
|
||||
|
||||
var/datum/changeling/changeling = changeling_power(10,0,100,DEAD)
|
||||
if(!changeling) return
|
||||
changeling.chem_charges -= 10
|
||||
|
||||
if(stat == DEAD)
|
||||
dead_mob_list -= src
|
||||
living_mob_list += src
|
||||
stat = CONSCIOUS
|
||||
tod = null
|
||||
setToxLoss(0)
|
||||
setOxyLoss(0)
|
||||
setCloneLoss(0)
|
||||
SetParalysis(0)
|
||||
SetStunned(0)
|
||||
SetWeakened(0)
|
||||
radiation = 0
|
||||
heal_overall_damage(getBruteLoss(), getFireLoss())
|
||||
reagents.clear_reagents()
|
||||
src << "<span class='notice'>We have regenerated.</span>"
|
||||
|
||||
status_flags &= ~(FAKEDEATH)
|
||||
update_canmove()
|
||||
make_changeling()
|
||||
|
||||
verbs -= /mob/living/carbon/proc/changeling_revive
|
||||
verbs += /mob/living/carbon/proc/changeling_fakedeath
|
||||
|
||||
feedback_add_details("changeling_powers","CR")
|
||||
return 1
|
||||
|
||||
//Recover from stuns.
|
||||
/mob/living/carbon/proc/changeling_unstun()
|
||||
set category = "Changeling"
|
||||
@@ -283,8 +300,6 @@
|
||||
|
||||
reagents.add_reagent("synaptizine", 20)
|
||||
|
||||
src.verbs -= /mob/living/carbon/proc/changeling_unstun
|
||||
spawn(5) src.verbs += /mob/living/carbon/proc/changeling_unstun
|
||||
feedback_add_details("changeling_powers","UNS")
|
||||
return 1
|
||||
|
||||
@@ -309,7 +324,7 @@
|
||||
for(var/mob/living/carbon/M in ohearers(4, usr))
|
||||
if(!M.mind || !M.mind.changeling)
|
||||
M.ear_deaf += 30
|
||||
M.confused += 15
|
||||
M.confused += 20
|
||||
M.make_jittery(50)
|
||||
|
||||
for(var/obj/machinery/light/L in range(4, usr))
|
||||
@@ -319,8 +334,6 @@
|
||||
//for(var/obj/structure/window/W in range(2, usr)) //I like the window-breaking, but it makes the ability too 'loud' to fit changelings.
|
||||
// W.hit(rand(40,100))
|
||||
|
||||
src.verbs -= /mob/living/carbon/proc/changeling_shriek
|
||||
spawn(5) src.verbs += /mob/living/carbon/proc/changeling_shriek
|
||||
feedback_add_details("changeling_powers","RS")
|
||||
return 1
|
||||
|
||||
@@ -331,7 +344,7 @@
|
||||
set name = "Spread Infestation (40)"
|
||||
set desc = "Our form divides, creating arachnids which will grow into deadly beasts."
|
||||
|
||||
var/datum/changeling/changeling = changeling_power(40)
|
||||
var/datum/changeling/changeling = changeling_power(40, 10)
|
||||
if(!changeling) return 0
|
||||
src.mind.changeling.chem_charges -= 40
|
||||
|
||||
@@ -342,9 +355,7 @@
|
||||
else
|
||||
S.grow_as = /mob/living/simple_animal/hostile/giant_spider
|
||||
|
||||
src.verbs -= /mob/living/carbon/proc/changeling_spiders
|
||||
spawn(5) src.verbs += /mob/living/carbon/proc/changeling_spiders
|
||||
feedback_add_details("changeling_powers","CS")
|
||||
feedback_add_details("changeling_powers","SI")
|
||||
return 1
|
||||
|
||||
|
||||
@@ -366,11 +377,10 @@
|
||||
for(var/datum/disease/D in src.viruses)
|
||||
D.cure()
|
||||
|
||||
src.verbs -= /mob/living/carbon/proc/changeling_panacea
|
||||
spawn(5) src.verbs += /mob/living/carbon/proc/changeling_panacea
|
||||
feedback_add_details("changeling_powers","AP")
|
||||
return 1
|
||||
|
||||
|
||||
//Prevents AIs tracking you but makes you easily detectable to the human-eye.
|
||||
/mob/living/carbon/proc/changeling_digitalcamo()
|
||||
set category = "Changeling"
|
||||
@@ -384,16 +394,14 @@
|
||||
else src << "<span class='notice'>We distort our form to prevent AI-tracking.</span>"
|
||||
digitalcamo = !digitalcamo
|
||||
|
||||
src.verbs -= /mob/living/carbon/proc/changeling_digitalcamo
|
||||
spawn(5) src.verbs += /mob/living/carbon/proc/changeling_digitalcamo
|
||||
feedback_add_details("changeling_powers","CAM")
|
||||
return 1
|
||||
|
||||
|
||||
//Starts healing you every second for 10 seconds. Can be used whilst unconscious.
|
||||
/mob/living/carbon/proc/changeling_lizardflesh()
|
||||
/mob/living/carbon/proc/changeling_fleshmend()
|
||||
set category = "Changeling"
|
||||
set name = "Lizardflesh (30)"
|
||||
set name = "Fleshmend (30)"
|
||||
set desc = "Begins rapidly regenerating. Does not effect stuns or chemicals."
|
||||
|
||||
var/datum/changeling/changeling = changeling_power(30,0,100,UNCONSCIOUS)
|
||||
@@ -409,8 +417,6 @@
|
||||
adjustFireLoss(-10)
|
||||
sleep(10)
|
||||
|
||||
src.verbs -= /mob/living/carbon/proc/changeling_lizardflesh
|
||||
spawn(5) src.verbs += /mob/living/carbon/proc/changeling_lizardflesh
|
||||
feedback_add_details("changeling_powers","RR")
|
||||
return 1
|
||||
|
||||
@@ -422,7 +428,7 @@ var/list/datum/dna/hivemind_bank = list()
|
||||
set name = "Hive Channel (10)"
|
||||
set desc = "Allows you to channel DNA in the airwaves to allow other changelings to absorb it."
|
||||
|
||||
var/datum/changeling/changeling = changeling_power(10,1)
|
||||
var/datum/changeling/changeling = changeling_power(10)
|
||||
if(!changeling) return
|
||||
|
||||
var/list/names = list()
|
||||
@@ -452,7 +458,7 @@ var/list/datum/dna/hivemind_bank = list()
|
||||
set name = "Hive Absorb (20)"
|
||||
set desc = "Allows you to absorb DNA that is being channeled in the airwaves."
|
||||
|
||||
var/datum/changeling/changeling = changeling_power(20,1)
|
||||
var/datum/changeling/changeling = changeling_power(20)
|
||||
if(!changeling) return
|
||||
|
||||
var/list/names = list()
|
||||
@@ -539,7 +545,7 @@ var/list/datum/dna/hivemind_bank = list()
|
||||
|
||||
changeling.chem_charges -= required_chems
|
||||
verbs -= verb_path
|
||||
spawn(10) verbs += verb_path
|
||||
spawn(5) verbs += verb_path
|
||||
|
||||
src << "<span class='notice'>We stealthily sting [T].</span>"
|
||||
if(!T.mind || !T.mind.changeling) return T //T will be affected by the sting
|
||||
@@ -550,7 +556,7 @@ var/list/datum/dna/hivemind_bank = list()
|
||||
/mob/living/carbon/proc/changeling_transformation_sting()
|
||||
set category = "Changeling"
|
||||
set name = "Transformation Sting (40)"
|
||||
set desc= "Sting target"
|
||||
set desc= "Transform the target to one of our stored DNAs"
|
||||
|
||||
var/datum/changeling/changeling = changeling_power(40)
|
||||
if(!changeling) return 0
|
||||
|
||||
@@ -101,12 +101,12 @@ var/list/powerinstances
|
||||
allowduringlesserform = 1
|
||||
verbpath = /mob/living/carbon/proc/changeling_digitalcamo
|
||||
|
||||
/datum/power/changeling/lizardflesh
|
||||
name = "Lizardflesh"
|
||||
/datum/power/changeling/fleshmend
|
||||
name = "Fleshmend"
|
||||
desc = "We evolve the ability to rapidly regenerate, restoring the health of the body we use."
|
||||
helptext = "Heals a moderate amount of damage every tick. Can be used while unconscious."
|
||||
genomecost = 1
|
||||
verbpath = /mob/living/carbon/proc/changeling_lizardflesh
|
||||
verbpath = /mob/living/carbon/proc/changeling_fleshmend
|
||||
|
||||
/datum/power/changeling/panacea
|
||||
name = "Anatomic Panacea"
|
||||
@@ -118,14 +118,14 @@ var/list/powerinstances
|
||||
/datum/power/changeling/shriek
|
||||
name = "Resonant Shriek"
|
||||
desc = "Our lungs and vocal chords shift, allowing us to briefly emit a noise that deafens and confuses humans."
|
||||
helptext = "The high-frequency sounds cannot be heard by humans, but will shatter glass nearby."
|
||||
helptext = "The high-frequency sounds cannot be heard by humans, but will blow out lights nearby."
|
||||
genomecost = 1
|
||||
verbpath = /mob/living/carbon/proc/changeling_shriek
|
||||
|
||||
/datum/power/changeling/spiders
|
||||
name = "Spread Infestation"
|
||||
desc = "Our form divides, creating arachnids which will grow into deadly beasts."
|
||||
helptext = "Can be used while in lesser form. The spiders are thoughtless creatures, and may attack their creators when fully grown."
|
||||
helptext = "The spiders are thoughtless creatures, and may attack their creators when fully grown. Requires 10 DNA absorptions."
|
||||
genomecost = 1
|
||||
allowduringlesserform = 1
|
||||
verbpath = /mob/living/carbon/proc/changeling_spiders
|
||||
@@ -480,18 +480,21 @@ var/list/powerinstances
|
||||
|
||||
|
||||
if(Thepower == null)
|
||||
C << "This is awkward. Changeling power purchase failed, please report this bug to a coder!"
|
||||
C << "This is awkward. Changeling power purchase failed, please report this bug to a coder!"
|
||||
return
|
||||
|
||||
if(Thepower in purchasedpowers)
|
||||
C << "We have already evolved this ability!"
|
||||
return
|
||||
|
||||
|
||||
if(geneticpoints < Thepower.genomecost)
|
||||
C << "We have reached our capacity for abilities."
|
||||
return
|
||||
|
||||
if(C.status_flags & FAKEDEATH)//To avoid potential exploits by buying new powers while in stasis, which clears your verblist.
|
||||
C << "We lack the energy to evolve new abilities right now."
|
||||
return
|
||||
|
||||
geneticpoints -= Thepower.genomecost
|
||||
|
||||
purchasedpowers += Thepower
|
||||
@@ -521,6 +524,7 @@ var/list/powerinstances
|
||||
geneticpoints = initial(geneticpoints)
|
||||
sting_range = initial(sting_range)
|
||||
chem_storage = initial(chem_storage)
|
||||
chem_recharge_rate = initial(chem_recharge_rate)
|
||||
chem_charges = min(chem_charges, chem_storage)
|
||||
mimicing = ""
|
||||
|
||||
|
||||
@@ -280,6 +280,7 @@
|
||||
lingchemdisplay.icon_state = "power_display"
|
||||
lingchemdisplay.screen_loc = ui_lingchemdisplay
|
||||
lingchemdisplay.layer = 20
|
||||
lingchemdisplay.invisibility = 101
|
||||
|
||||
mymob.blind = new /obj/screen()
|
||||
mymob.blind.icon = 'icons/mob/screen_full.dmi'
|
||||
|
||||
@@ -142,6 +142,13 @@
|
||||
mymob.pullin.name = "pull"
|
||||
mymob.pullin.screen_loc = ui_pull_resist
|
||||
|
||||
lingchemdisplay = new /obj/screen()
|
||||
lingchemdisplay.name = "chemical storage"
|
||||
lingchemdisplay.icon_state = "power_display"
|
||||
lingchemdisplay.screen_loc = ui_lingchemdisplay
|
||||
lingchemdisplay.layer = 20
|
||||
lingchemdisplay.invisibility = 101
|
||||
|
||||
mymob.blind = new /obj/screen()
|
||||
mymob.blind.icon = 'icons/mob/screen_full.dmi'
|
||||
mymob.blind.icon_state = "blackimageoverlay"
|
||||
|
||||
@@ -350,7 +350,7 @@
|
||||
if (client.statpanel == "Status")
|
||||
if(mind.changeling)
|
||||
stat("Chemical Storage", "[mind.changeling.chem_charges]/[mind.changeling.chem_storage]")
|
||||
stat("Genetic Damage Time", mind.changeling.geneticdamage)
|
||||
stat("Absorbed DNA", mind.changeling.absorbedcount)
|
||||
return
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user