diff --git a/code/datums/mind.dm b/code/datums/mind.dm index 95b6a8049c4..492dba931bc 100644 --- a/code/datums/mind.dm +++ b/code/datums/mind.dm @@ -48,7 +48,8 @@ datum/mind var/has_been_rev = 0//Tracks if this mind has been a rev or not - var/datum/faction/faction // associated faction + var/datum/faction/faction //associated faction + var/datum/changeling/changeling //changeling holder New(var/key) src.key = key @@ -58,6 +59,8 @@ datum/mind if(!istype(new_character)) world.log << "## DEBUG: transfer_to(): Some idiot has tried to transfer_to() a non mob/living mob. Please inform Carn" if(current) //remove ourself from our old body's mind variable + if(changeling) + current.remove_changeling_powers() current.mind = null if(new_character.mind) //remove any mind currently in our new body's mind variable new_character.mind.current = null @@ -65,6 +68,9 @@ datum/mind current = new_character //link ourself to our new body new_character.mind = src //and link our new body to ourself + if(changeling) + new_character.make_changeling() + if(active) new_character.key = key //now transfer the key to link the client to our new body @@ -183,7 +189,7 @@ datum/mind text += "YES|no" if (objectives.len==0) text += "
Objectives are empty! Randomize!" - if (current.changeling && (current.changeling.absorbed_dna.len>0 && current.real_name != current.changeling.absorbed_dna[1])) + if( changeling && changeling.absorbed_dna.len && (current.real_name != changeling.absorbed_dna[1]) ) text += "
Transform to initial appearance." else text += "yes|NO" @@ -630,25 +636,24 @@ datum/mind ticker.mode.changelings -= src special_role = null current.remove_changeling_powers() - if(current.changeling) - del(current.changeling) - current << "\red You have been brainwashed! You are no longer a changeling!" + if(changeling) del(changeling) + current << "You grow weak and lose your powers! You are no longer a changeling and are stuck in your current form!" if("changeling") if(!(src in ticker.mode.changelings)) ticker.mode.changelings += src ticker.mode.grant_changeling_powers(current) special_role = "Changeling" - current << "\red You are a changeling!" + current << "Your powers are awoken. A flash of memory returns to us...we are a changeling!" if("autoobjectives") ticker.mode.forge_changeling_objectives(src) usr << "\blue The objectives for changeling [key] have been generated. You can edit them and anounce manually." if("initialdna") - if (!usr.changeling || !usr.changeling.absorbed_dna[1]) + if( !changeling || !changeling.absorbed_dna.len ) usr << "\red Resetting DNA failed!" else - usr.dna = usr.changeling.absorbed_dna[usr.changeling.absorbed_dna[1]] - usr.real_name = usr.changeling.absorbed_dna[1] + usr.dna = changeling.absorbed_dna[changeling.absorbed_dna[1]] + usr.real_name = changeling.absorbed_dna[1] updateappearance(usr, usr.dna.uni_identity) domutcheck(usr, null) diff --git a/code/game/cellautomata.dm b/code/game/cellautomata.dm index fef7bb34056..d778a5ed119 100644 --- a/code/game/cellautomata.dm +++ b/code/game/cellautomata.dm @@ -168,15 +168,12 @@ var/atom/this = src//detach proc from src src = null - if (!usr || !isturf(usr.loc)) + if(!usr || !isturf(usr.loc)) return - else if (usr.stat != 0 || usr.restrained()) + if(usr.stat || usr.restrained()) + return + if(usr.status_flags & FAKEDEATH) return - else - if(usr.reagents) - for(var/datum/reagent/R in usr.reagents.reagent_list) //I'm trying to avoid using canmove() because there are times where it would return 0 when you should still be able to point - if(R.id == "zombiepowder") //This is to counter people spamming point-to when hit by a para-pen or changling's parasting. -Nodrak.. - return var/tile = get_turf(this) if (!tile) diff --git a/code/game/gamemodes/changeling/changeling.dm b/code/game/gamemodes/changeling/changeling.dm index c7cdfbb7c9b..fda16d4d4ec 100644 --- a/code/game/gamemodes/changeling/changeling.dm +++ b/code/game/gamemodes/changeling/changeling.dm @@ -1,3 +1,5 @@ +var/list/possible_changeling_IDs = list("Alpha","Beta","Gamma","Delta","Epsilon","Zeta","Eta","Theta","Iota","Kappa","Lambda","Mu","Nu","Xi","Omicron","Pi","Rho","Sigma","Tau","Upsilon","Phi","Chi","Psi","Omega") + /datum/game_mode var/list/datum/mind/changelings = list() @@ -150,9 +152,8 @@ return ..() return 0*/ -/datum/game_mode/proc/grant_changeling_powers(mob/living/carbon/human/changeling_mob) - if (!istype(changeling_mob)) - return +/datum/game_mode/proc/grant_changeling_powers(mob/living/carbon/changeling_mob) + if(!istype(changeling_mob)) return changeling_mob.make_changeling() /datum/game_mode/proc/auto_declare_completion_changeling() @@ -162,7 +163,7 @@ var/changelingwin = 1 text += "
[changeling.key] was [changeling.name] (" - if(changeling.current && changeling.current.changeling) + if(changeling.current) if(changeling.current.stat == DEAD) text += "died" else @@ -174,9 +175,9 @@ changelingwin = 0 text += ")" - if(changeling.current && changeling.current.changeling) - text += "
changeling ID: [changeling.current.gender==MALE?"Mr.":"Ms."] [changeling.current.changeling.changelingID]." - text += "
Genomes absorbed: [changeling.current.changeling.absorbedcount]" + //Removed sanity if(changeling) because we -want- a runtime to inform us that the changelings list is incorrect and needs to be fixed. + text += "
Changeling ID: [changeling.changeling.changelingID]." + text += "
Genomes Absorbed: [changeling.changeling.absorbedcount]" if(changeling.objectives.len) var/count = 1 @@ -203,32 +204,30 @@ return 1 /datum/changeling //stores changeling powers, changeling recharge thingie, changeling absorbed DNA and changeling ID (for changeling hivemind) - var/changeling_level = 0 var/list/absorbed_dna = list() - var/changeling_fakedeath = 0 - var/chem_charges = 20.00 - var/chem_recharge_multiplier = 1 + var/absorbedcount = 0 + var/chem_charges = 20 + var/chem_recharge_rate = 0.5 var/chem_storage = 50 var/sting_range = 1 - var/changelingID = "none" - var/mob/living/host = null - var/geneticdamage = 0.0 + var/changelingID = "Changeling" + var/geneticdamage = 0 var/isabsorbing = 0 var/geneticpoints = 5 var/purchasedpowers = list() - var/absorbedcount = 0 - - -/datum/changeling/New() +/datum/changeling/New(var/gender=FEMALE) ..() - var/list/possibleIDs = list("Alpha","Beta","Gamma","Delta","Epsilon","Zeta","Eta","Theta","Iota","Kappa","Lambda","Mu","Nu","Xi","Omicron","Pi","Rho","Sigma","Tau","Upsilon","Phi","Chi","Psi","Omega") - - for(var/mob/living/carbon/aChangeling in player_list) - if(aChangeling.changeling) - possibleIDs -= aChangeling.changeling.changelingID - - if(possibleIDs.len) - changelingID = pick(possibleIDs) + var/honorific + if(gender == FEMALE) honorific = "Ms." + else honorific = "Mr." + if(possible_changeling_IDs.len) + changelingID = pick(possible_changeling_IDs) + possible_changeling_IDs -= changelingID + changelingID = "[honorific] [changelingID]" else - changelingID = "[rand(1,1000)]" \ No newline at end of file + changelingID = "[honorific] [rand(1,999)]" + +/datum/changeling/proc/regenerate() + chem_charges = min(max(0, chem_charges+chem_recharge_rate), chem_storage) + geneticdamage = max(0, geneticdamage-1) \ No newline at end of file diff --git a/code/game/gamemodes/changeling/changeling_powers.dm b/code/game/gamemodes/changeling/changeling_powers.dm index 3dc1c7c035b..72471643876 100644 --- a/code/game/gamemodes/changeling/changeling_powers.dm +++ b/code/game/gamemodes/changeling/changeling_powers.dm @@ -1,282 +1,202 @@ -/mob/proc/make_lesser_changeling() - if(!changeling) changeling = new - changeling.host = src - - src.verbs += /datum/changeling/proc/EvolutionMenu - - for(var/obj/effect/proc_holder/power/P in changeling.purchasedpowers) - if(P.isVerb) - if(P.allowduringlesserform) - if(!(P in src.verbs)) - src.verbs += P.verbpath - -/* src.verbs += /client/proc/changeling_fakedeath - src.verbs += /client/proc/changeling_lesser_transform - src.verbs += /client/proc/changeling_blind_sting - src.verbs += /client/proc/changeling_deaf_sting - src.verbs += /client/proc/changeling_silence_sting - src.verbs += /client/proc/changeling_unfat_sting -*/ - changeling.changeling_level = 1 - return - +//Restores our verbs. It will only restore verbs allowed during lesser (monkey) form if we are not human /mob/proc/make_changeling() - if(!changeling) changeling = new - changeling.host = src + if(!mind) return + if(!mind.changeling) mind.changeling = new /datum/changeling(gender) + verbs += /datum/changeling/proc/EvolutionMenu - src.verbs += /datum/changeling/proc/EvolutionMenu + var/lesser_form = !ishuman(src) - for(var/obj/effect/proc_holder/power/P in changeling.purchasedpowers) + for(var/datum/power/changeling/P in mind.changeling.purchasedpowers) if(P.isVerb) + if(lesser_form && !P.allowduringlesserform) continue if(!(P in src.verbs)) src.verbs += P.verbpath -/* - src.verbs += /client/proc/changeling_absorb_dna - src.verbs += /client/proc/changeling_transform - src.verbs += /client/proc/changeling_lesser_form - src.verbs += /client/proc/changeling_fakedeath - - src.verbs += /client/proc/changeling_deaf_sting - src.verbs += /client/proc/changeling_blind_sting - src.verbs += /client/proc/changeling_paralysis_sting - src.verbs += /client/proc/changeling_silence_sting - src.verbs += /client/proc/changeling_transformation_sting - src.verbs += /client/proc/changeling_unfat_sting - src.verbs += /client/proc/changeling_boost_range - -*/ - changeling.changeling_level = 2 - if (!changeling.absorbed_dna) - changeling.absorbed_dna = list() - if (changeling.absorbed_dna.len == 0) - changeling.absorbed_dna[src.real_name] = src.dna - return - -/mob/proc/make_greater_changeling() - src.make_changeling() - //This is a test function for the new changeling powers. Grants all of them. - return + if(!mind.changeling.absorbed_dna.len) + mind.changeling.absorbed_dna[real_name] = dna + return 1 +//removes our changeling verbs /mob/proc/remove_changeling_powers() - - for(var/obj/effect/proc_holder/power/P in changeling.purchasedpowers) + if(!mind || !mind.changeling) return + for(var/datum/power/changeling/P in mind.changeling.purchasedpowers) if(P.isVerb) - src.verbs -= P.verbpath -/* - src.verbs -= /client/proc/changeling_absorb_dna - src.verbs -= /client/proc/changeling_transform - src.verbs -= /client/proc/changeling_lesser_form - src.verbs -= /client/proc/changeling_lesser_transform - src.verbs -= /client/proc/changeling_fakedeath - src.verbs -= /client/proc/changeling_deaf_sting - src.verbs -= /client/proc/changeling_blind_sting - src.verbs -= /client/proc/changeling_paralysis_sting - src.verbs -= /client/proc/changeling_silence_sting - src.verbs -= /client/proc/changeling_boost_range - src.verbs -= /client/proc/changeling_transformation_sting - src.verbs -= /client/proc/changeling_unfat_sting -*/ -/client/proc/changeling_absorb_dna() + verbs -= P.verbpath + + +//Helper proc. Does all the checks and stuff for us to avoid copypasta +/mob/proc/changeling_power(var/required_chems=0, var/required_dna=0, var/max_genetic_damage=100, var/max_stat=0) + if(!usr) return + if(!usr.mind) return + if(!iscarbon(usr)) return + + var/datum/changeling/changeling = usr.mind.changeling + if(!changeling) + world.log << "[src] has the changeling_transform() verb but is not a changeling." + return + + if(usr.stat > max_stat) + usr << "We are incapacitated." + return + + if(changeling.absorbed_dna.len < required_dna) + usr << "We require at least [required_dna] samples of compatible DNA." + return + + if(changeling.chem_charges < required_chems) + usr << "We require at least [required_chems] units of chemicals to do that!" + return + + if(changeling.geneticdamage > max_genetic_damage) + usr << usr << "Our geneomes are still reassembling. We need time to recover first." + return + + return changeling + + +//Absorbs the victim's DNA making them uncloneable. Requires a strong grip on the victim. +//Doesn't cost anything as it's the most basic ability. +/mob/proc/changeling_absorb_dna() set category = "Changeling" set name = "Absorb DNA" - if(!usr.changeling) - usr << "\red You're not a changeling, something's wrong!" - return - - if(usr.stat) - usr << "\red Not when we are incapacitated." - return - - if (!istype(usr.get_active_hand(), /obj/item/weapon/grab)) - usr << "\red We must be grabbing a creature in our active hand to absorb them." - return + var/datum/changeling/changeling = changeling_power(0,0,100) + if(!changeling) return var/obj/item/weapon/grab/G = usr.get_active_hand() - var/mob/M = G.affecting - - if (!ishuman(M)) - usr << "\red This creature is not compatible with our biology." + if(!istype(G)) + usr << "We must be grabbing a creature in our active hand to absorb them." return - if (NOCLONE in M.mutations) - usr << "\red This creature's DNA is ruined beyond useability!" + var/mob/living/carbon/human/T = G.affecting + if(!istype(T)) + usr << "[T] is not compatible with our biology." return - if (!G.killing) - usr << "\red We must have a tighter grip to absorb this creature." + if(NOCLONE in T.mutations) + usr << "This creature's DNA is ruined beyond useability!" return - if (usr.changeling.isabsorbing) - usr << "\red We are already absorbing!" + if(!G.killing) + usr << "We must have a tighter grip to absorb this creature." return - - - var/mob/living/carbon/human/T = M - - usr << "\blue This creature is compatible. We must hold still..." - usr.changeling.isabsorbing = 1 - feedback_add_details("changeling_powers","A1") - if (!do_mob(usr, T, 150)) - usr << "\red Our absorption of [T] has been interrupted!" - usr.changeling.isabsorbing = 0 + if(changeling.isabsorbing) + usr << "We are already absorbing!" return - usr << "\blue We extend a proboscis." - usr.visible_message(text("\red [usr] extends a proboscis!")) - feedback_add_details("changeling_powers","A2") + changeling.isabsorbing = 1 + for(var/stage = 1, stage<=4, stage++) + switch(stage) + if(1) + usr << "This creature is compatible. We must hold still..." + if(2) + usr << "We extend a proboscis." + usr.visible_message("[usr] extends a proboscis!") + if(3) + usr << "We stab [T] with the proboscis." + usr.visible_message("[usr] stabs [T] with the proboscis!") + T << "You feel a sharp stabbing pain!" + T.take_overall_damage(40) + if(4) + usr << "We have absorbed [T]!" + usr.visible_message("[usr] sucks the fluids from [T]!") + T << "You have been absorbed by the changeling!" - if (!do_mob(usr, T, 150)) - usr << "\red Our absorption of [T] has been interrupted!" - usr.changeling.isabsorbing = 0 - return + feedback_add_details("changeling_powers","A[stage]") + if(!do_mob(usr, T, 150)) + usr << "Our absorption of [T] has been interrupted!" + changeling.isabsorbing = 0 + return - usr << "\blue We stab [T] with the proboscis." - usr.visible_message(text("\red [usr] stabs [T] with the proboscis!")) - T << "\red You feel a sharp stabbing pain!" - T.take_overall_damage(40) - feedback_add_details("changeling_powers","A3") - - if (!do_mob(usr, T, 150)) - usr << "\red Our absorption of [T] has been interrupted!" - usr.changeling.isabsorbing = 0 - return - - usr << "\blue We have absorbed [T]!" - usr.visible_message(text("\red [usr] sucks the fluids from [T]!")) - T << "\red You have been absorbed by the changeling!" - feedback_add_details("changeling_powers","A4") - - usr.changeling.absorbed_dna[T.real_name] = T.dna + changeling.absorbed_dna[T.real_name] = T.dna if(usr.nutrition < 400) usr.nutrition = min((usr.nutrition + T.nutrition), 400) - usr.changeling.chem_charges += 10 - usr.changeling.geneticpoints += 2 - if(T.changeling) - if(T.changeling.absorbed_dna) - usr.changeling.absorbed_dna |= T.changeling.absorbed_dna //steal all their loot - usr.changeling.absorbedcount += T.changeling.absorbedcount + changeling.chem_charges += 10 + changeling.geneticpoints += 2 - T.changeling.absorbed_dna = list() - T.changeling.absorbed_dna[T.real_name] = T.dna + if(T.mind && T.mind.changeling) + if(T.mind.changeling.absorbed_dna) + changeling.absorbed_dna |= T.mind.changeling.absorbed_dna //steal all their loot + changeling.absorbedcount += T.mind.changeling.absorbedcount - if(T.changeling.purchasedpowers) - for(var/obj/effect/proc_holder/power/Tp in T.changeling.purchasedpowers) - if(Tp in usr.changeling.purchasedpowers) + T.mind.changeling.absorbed_dna = list("T.real_name"=T.dna) + + if(T.mind.changeling.purchasedpowers) + for(var/datum/power/changeling/Tp in T.mind.changeling.purchasedpowers) + if(Tp in changeling.purchasedpowers) continue else - usr.changeling.purchasedpowers += Tp + changeling.purchasedpowers += Tp if(!Tp.isVerb) call(Tp.verbpath)() - else - if(usr.changeling.changeling_level == 1) - usr.make_lesser_changeling() - else - usr.make_changeling() + usr.make_changeling() + changeling.chem_charges += T.mind.changeling.chem_charges + changeling.geneticpoints += T.mind.changeling.geneticpoints + T.mind.changeling.chem_charges = 0 - - - - usr.changeling.chem_charges += T.changeling.chem_charges - usr.changeling.geneticpoints += T.changeling.geneticpoints - T.changeling.chem_charges = 0 - usr.changeling.absorbedcount++ - usr.changeling.isabsorbing = 0 + changeling.absorbedcount++ + changeling.isabsorbing = 0 T.death(0) T.Drain() + return 1 - return -/client/proc/changeling_transform() +//Change our DNA to that of somebody we've absorbed. +/mob/proc/changeling_transform() set category = "Changeling" set name = "Transform (5)" - if(!usr.changeling) - usr << "\red You're not a changeling, something's wrong!" - return + var/datum/changeling/changeling = changeling_power(5,1,0) + if(!changeling) return - if(usr.stat) - usr << "\red Not when we are incapacitated." - return + var/S = input("Select the target DNA: ", "Target DNA", null) as null|anything in changeling.absorbed_dna + if(!S) return - if (usr.changeling.absorbed_dna.len <= 0) - usr << "\red We have not yet absorbed any compatible DNA." - return - - if(usr.changeling.chem_charges < 5) - usr << "\red We don't have enough stored chemicals to do that!" - return - - var/S = input("Select the target DNA: ", "Target DNA", null) as null|anything in usr.changeling.absorbed_dna - - if (S == null) - return - - usr.changeling.chem_charges -= 5 - - usr.visible_message(text("\red [usr] transforms!")) - - usr.dna = usr.changeling.absorbed_dna[S] + changeling.chem_charges -= 5 + usr.visible_message("[usr] transforms!") + changeling.geneticdamage = 30 + usr.dna = changeling.absorbed_dna[S] usr.real_name = S updateappearance(usr, usr.dna.uni_identity) domutcheck(usr, null) + + usr.verbs -= /mob/proc/changeling_transform + spawn(10) usr.verbs += /mob/proc/changeling_transform + feedback_add_details("changeling_powers","TR") + return 1 - usr.verbs -= /client/proc/changeling_transform - spawn(10) - usr.verbs += /client/proc/changeling_transform - - return - -/client/proc/changeling_lesser_form() +//Transform into a monkey. +/mob/proc/changeling_lesser_form() set category = "Changeling" set name = "Lesser Form (1)" - if(!usr.changeling) - usr << "\red You're not a changeling, something's wrong!" - return - - if(usr.stat) - usr << "\red Not when we are incapacitated." - return - - if(usr.changeling.chem_charges < 1) - usr << "\red We don't have enough stored chemicals to do that!" - return - - if(usr.changeling.geneticdamage != 0) - usr << "Our genes are still mending themselves! We cannot transform!" - return - - if(!iscarbon(usr)) - return //Changelings should only really be carbon as only monkeys/humans have DNA + var/datum/changeling/changeling = changeling_power(1,0,0) + if(!changeling) return var/mob/living/carbon/C = usr - - C.changeling.chem_charges-- - + changeling.chem_charges-- C.remove_changeling_powers() + C.visible_message("[C] transforms!") + changeling.geneticdamage = 30 + C << "Our genes cry out!" - C.visible_message(text("\red [C] transforms!")) - - C.changeling.geneticdamage = 30 - C << "Our genes cry out!" - + //TODO replace with monkeyize proc var/list/implants = list() //Try to preserve implants. for(var/obj/item/weapon/implant/W in C) implants += W - C.regenerate_icons() C.monkeyizing = 1 C.canmove = 0 C.icon = null + C.overlays = null C.invisibility = 101 + var/atom/movable/overlay/animation = new /atom/movable/overlay( C.loc ) animation.icon_state = "blank" animation.icon = 'icons/mob/mob.dmi' @@ -288,86 +208,59 @@ var/mob/living/carbon/monkey/O = new /mob/living/carbon/monkey(src) O.dna = C.dna C.dna = null - O.changeling = C.changeling - feedback_add_details("changeling_powers","LF") for(var/obj/item/W in C) C.drop_from_inventory(W) - - for(var/obj/T in C) del(T) - //for(var/R in usr.organs) //redundant, let's give garbage collector work to do --rastaf0 - // del(usr.organs[text("[]", R)]) O.loc = C.loc - - O.name = text("monkey ([])",copytext(md5(C.real_name), 2, 6)) + O.name = "monkey ([copytext(md5(C.real_name), 2, 6)])" O.setToxLoss(C.getToxLoss()) O.adjustBruteLoss(C.getBruteLoss()) O.setOxyLoss(C.getOxyLoss()) O.adjustFireLoss(C.getFireLoss()) O.stat = C.stat O.a_intent = "hurt" - for (var/obj/item/weapon/implant/I in implants) + for(var/obj/item/weapon/implant/I in implants) I.loc = O I.implanted = O - continue - if(C.mind) - C.mind.transfer_to(O) + C.mind.transfer_to(O) - O.make_lesser_changeling() - O.verbs += /client/proc/changeling_lesser_transform - del(usr) - return + O.make_changeling(1) + O.verbs += /mob/proc/changeling_lesser_transform + feedback_add_details("changeling_powers","LF") + del(C) + return 1 -/client/proc/changeling_lesser_transform() + +//Transform into a human +/mob/proc/changeling_lesser_transform() set category = "Changeling" set name = "Transform (1)" - if(!usr.changeling) - usr << "\red You're not a changeling, something's wrong!" - return + var/datum/changeling/changeling = changeling_power(1,1,0) + if(!changeling) return - if(usr.stat) - usr << "\red Not when we are incapacitated." - return - - if (usr.changeling.absorbed_dna.len <= 0) - usr << "\red We have not yet absorbed any compatible DNA." - return - - if(usr.changeling.chem_charges < 1) - usr << "\red We don't have enough stored chemicals to do that!" - return - - if(!iscarbon(usr)) - return //Only humans/monkeys have DNA - - var/S = input("Select the target DNA: ", "Target DNA", null) in usr.changeling.absorbed_dna - - if (S == null) - return + var/S = input("Select the target DNA: ", "Target DNA", null) as null|anything in changeling.absorbed_dna + if(!S) return var/mob/living/carbon/C = usr - C.changeling.chem_charges -= 1 - + changeling.chem_charges-- C.remove_changeling_powers() - - C.visible_message(text("\red [C] transforms!")) - - C.dna = C.changeling.absorbed_dna[S] + C.visible_message("[C] transforms!") + C.dna = changeling.absorbed_dna[S] var/list/implants = list() for (var/obj/item/weapon/implant/I in C) //Still preserving implants implants += I - C.regenerate_icons() C.monkeyizing = 1 C.canmove = 0 C.icon = null + C.overlays = null C.invisibility = 101 var/atom/movable/overlay/animation = new /atom/movable/overlay( C.loc ) animation.icon_state = "blank" @@ -393,9 +286,7 @@ O.gender = MALE O.dna = C.dna C.dna = null - O.changeling = C.changeling O.real_name = S - feedback_add_details("changeling_powers","LFT") for(var/obj/T in C) del(T) @@ -412,633 +303,148 @@ for (var/obj/item/weapon/implant/I in implants) I.loc = O I.implanted = O - continue - - if(C.mind) - C.mind.transfer_to(O) + C.mind.transfer_to(O) O.make_changeling() - del(usr) - return + feedback_add_details("changeling_powers","LFT") + del(C) + return 1 -/client/proc/changeling_greater_form() // Oh shit, it's on now. - - set category = "Changeling" - set name = "Greater Form" - set desc = "Become onto the Goddess" - - if (usr.monkeyizing) - return - for(var/obj/item/W in src) - usr.drop_from_inventory(W) - usr.regenerate_icons() - usr.monkeyizing = 1 - usr.canmove = 0 - usr.icon = null - usr.invisibility = 101 - for(var/datum/organ/external/organ in usr:organs) - del(organ) - - var/atom/movable/overlay/animation = new /atom/movable/overlay( usr.loc ) - animation.icon_state = "blank" - animation.icon = 'icons/mob/mob.dmi' - animation.master = src - flick("h2monkey", animation) - sleep(48) - //animation = null - var/mob/living/carbon/human/O = new /mob/living/carbon/human( src )//Removed Emissary shit -Sieve{R} - del(animation) - - feedback_add_details("changeling_powers","GF") - O.real_name = usr.real_name - O.name = usr.name - O.dna = usr.dna - usr.dna = null - O.changeling = usr.changeling - updateappearance(O,O.dna.uni_identity) - O.loc = usr.loc - O.viruses = usr.viruses - usr.viruses = list() - for(var/datum/disease/D in O.viruses) - D.affected_mob = O - O.universal_speak = 1 //hacky fix until someone can figure out how to make them only understand humans - - if (usr.client) - usr.client.mob = O - if(usr.mind) - usr.mind.transfer_to(O) - - spawn(300) - command_alert("Extreme danger. A level four biological entity has been detected on board the station. Emergency evacuation procedures have begun. Civilian staff, do NOT engage the creature if spotted. Renforcements are on route.") - emergency_shuttle.online = 1 - emergency_shuttle.settimeleft(10) - spawn(10) - var/list/candidates = list() - - for(var/mob/dead/observer/G in player_list) - candidates += G - - for(var/obj/structure/stool/bed/chair/C in locate(/area/shuttle/escape/transit)) - - var/mob/living/carbon/human/new_commando = create_death_commando(C, 0) - - if(candidates.len) - var/mob/dead/observer/G = pick(candidates) - new_commando.key = G.key - new_commando.internal = new_commando.s_store - new_commando.internals.icon_state = "internal1" - candidates -= G - else - break - - //So they don't forget their code or mission. - new_commando.mind.store_memory("Mission: \red Assist in mobilizing station crew against the hostile entity. Do not allow the hostile entity to escape. Do not leave or permit anyone to leave until the entity is contained.") - - new_commando << "\blue You are a Special Ops Commando in the service of Central Command. \nYour current mission is: \redAssist in mobilizing station crew against the hostile entity. Do not allow the hostile entity to escape. Do not leave or permit anyone to leave until the entity is contained." - spawn(100) - emergency_shuttle.online = 0 - command_alert("The emergency shuttle will hold until the hostile entity has been terminated. During evacuation, do NOT use escape pods. To avoid the chance of a hostile entity escaping, the Thunderchild will be firing on and destorying any escape pods leaving the station") - O << "Your way out has arrived. Obtain the ID of three heads to override the holding protocol and escape. Let none stand in your way, for you are a perfect creature." - for(var/datum/objective/objective in O.mind.objectives) - O.mind.objectives.Remove(objective) - del(objective) - var/datum/objective/new_objective = null - new_objective = new /datum/objective/escape - new_objective.owner = O.mind - O.mind.objectives += new_objective - -/* spawn(0) - while(emergency_shuttle.online == 0) - sleep(10) - command_alert("Authorization codes recieved, confirming hostile entity terminated. The emergency shuttle is now departing.") - spawn(900) - for(var/mob/M in locate(/area/shuttle/escape_pod1/transit)) - M.gib() - for(var/mob/M in locate(/area/shuttle/escape_pod2/transit)) - M.gib() - for(var/mob/M in locate(/area/shuttle/escape_pod3/transit)) - M.gib() - for(var/mob/M in locate(/area/shuttle/escape_pod5/transit)) - M.gib() - while(emergency_shuttle.online == 1) - sleep(10) - if((locate(/mob/living/carbon/human/tajaran/Emissary) in locate(/area/shuttle/escape/centcom)) || (locate(/mob/living/carbon/human/tajaran/Emissary) in locate(/area/centcom/evac)) || (locate(/mob/living/carbon/human/tajaran/Emissary) in locate(/area/centcom/control) ) ) - command_alert("What the fu- Shoot it! SHOOT IT! CENTRAL COMMAND TRANSMITTING DIST- *static* Nevermind previous transmission, Nanotrasen. We're all good here. Subject contained. Standing down alert status.") -Tarjan shit, not recoding this -Sieve{R}*/ - -/client/proc/changeling_fakedeath() +//Fake our own death and fully heal. You will appear to be dead but regenerate fully after a short delay. +/mob/proc/changeling_fakedeath() set category = "Changeling" set name = "Regenerative Stasis (20)" - if(!usr.changeling) - usr << "\red You're not a changeling, something's wrong!" - return + var/datum/changeling/changeling = changeling_power(20,0,100) + if(!changeling) return - if(usr.changeling.chem_charges < 20) - usr << "\red We don't have enough stored chemicals to do that!" - return - if(!isliving(usr)) return //This should NEVER happen + changeling.chem_charges -= 20 + var/mob/living/carbon/C = usr + C << "We will regenerate our form." - var/mob/living/L = usr + C.status_flags |= FAKEDEATH //play dead + C.update_canmove() + C.remove_changeling_powers() - L.changeling.chem_charges -= 20 - - L << "\blue We will regenerate our form." - feedback_add_details("changeling_powers","FD") - - L.lying = 1 - L.canmove = 0 - L.changeling.changeling_fakedeath = 1 - L.remove_changeling_powers() - - L.emote("gasp") - if(isnull(L.tod)) // If we weren't already dead - L.tod = worldtime2text() + C.emote("gasp") + C.tod = worldtime2text() spawn(1200) - if(L.stat == 2) - dead_mob_list -= L - living_mob_list += L - L.stat = 0 - //usr.fireloss = 0 - L.tod = null - L.setToxLoss(0) - //usr.bruteloss = 0 - L.setOxyLoss(0) - L.setCloneLoss(0) - L.SetParalysis(0) - L.SetStunned(0) - L.SetWeakened(0) - L.radiation = 0 - //L.health = 100 - //L.updatehealth() - var/mob/living/M = src - M.heal_overall_damage(M.getBruteLoss(), M.getFireLoss()) - L.reagents.clear_reagents() - L.lying = 0 - L.canmove = 1 - L << "\blue We have regenerated." - L.visible_message(text("\red [usr] appears to wake from the dead, having healed all wounds.")) + if(C.stat == DEAD) + dead_mob_list -= C + living_mob_list += C + C.stat = CONSCIOUS + C.tod = null + C.setToxLoss(0) + C.setOxyLoss(0) + C.setCloneLoss(0) + C.SetParalysis(0) + C.SetStunned(0) + C.SetWeakened(0) + C.radiation = 0 + C.heal_overall_damage(C.getBruteLoss(), C.getFireLoss()) + C.reagents.clear_reagents() + C << "We have regenerated." + C.visible_message("[usr] appears to wake from the dead, having healed all wounds.") - L.changeling.changeling_fakedeath = 0 - if (L.changeling.changeling_level == 1) - L.make_lesser_changeling() - else if (L.changeling.changeling_level == 2) - L.make_changeling() + C.status_flags &= ~(FAKEDEATH) + C.update_canmove() + C.make_changeling() + feedback_add_details("changeling_powers","FD") + return 1 - return -/client/proc/changeling_boost_range() +//Boosts the range of your next sting attack by 1 +/mob/proc/changeling_boost_range() set category = "Changeling" set name = "Ranged Sting (10)" set desc="Your next sting ability can be used against targets 2 squares away." - if(!usr.changeling) - usr << "\red You're not a changeling, something's wrong!" - return - - if(usr.stat) - usr << "\red Not when we are incapacitated." - return - - if(usr.changeling.chem_charges < 10) - usr << "\red We don't have enough stored chemicals to do that!" - return - - usr.changeling.chem_charges -= 10 - - usr << "\blue Your throat adjusts to launch the sting." - usr.changeling.sting_range = 2 + var/datum/changeling/changeling = changeling_power(10,0,100) + if(!changeling) return 0 + changeling.chem_charges -= 10 + usr << "Your throat adjusts to launch the sting." + changeling.sting_range = 2 + usr.verbs -= /mob/proc/changeling_boost_range + spawn(5) usr.verbs += /mob/proc/changeling_boost_range feedback_add_details("changeling_powers","RS") + return 1 - usr.verbs -= /client/proc/changeling_boost_range - spawn(5) - usr.verbs += /client/proc/changeling_boost_range - - return - -/client/proc/changeling_silence_sting() - set category = "Changeling" - set name = "Silence sting (10)" - set desc="Sting target" - - if(!usr.changeling) - usr << "\red You're not a changeling, something's wrong!" - return - - var/list/victims = list() - for(var/mob/living/carbon/C in oview(usr.changeling.sting_range)) - victims += C - var/mob/living/carbon/T = input(usr, "Who do you wish to sting?") as null | anything in victims - if(T && T in view(usr.changeling.sting_range)) - - if(usr.stat) - usr << "\red Not when we are incapacitated." - return - - if(usr.changeling.chem_charges < 10) - usr << "\red We don't have enough stored chemicals to do that!" - return - - usr.changeling.chem_charges -= 10 - usr.changeling.sting_range = 1 - - usr << "\blue We stealthily sting [T]." - feedback_add_details("changeling_powers","SS") - - if(!T.changeling) - T.silent += 30 - - usr.verbs -= /client/proc/changeling_silence_sting - - spawn(5) - usr.verbs += /client/proc/changeling_silence_sting - - return - -/client/proc/changeling_blind_sting() - set category = "Changeling" - set name = "Blind sting (20)" - set desc="Sting target" - - if(!usr.changeling) - usr << "\red You're not a changeling, something's wrong!" - return - - var/list/victims = list() - for(var/mob/living/carbon/C in oview(usr.changeling.sting_range)) - victims += C - var/mob/T = input(usr, "Who do you wish to sting?") as null | anything in victims - if(T && T in view(usr.changeling.sting_range)) - if(usr.stat) - usr << "\red Not when we are incapacitated." - return - - if(usr.changeling.chem_charges < 20) - usr << "\red We don't have enough stored chemicals to do that!" - return - - usr.changeling.chem_charges -= 20 - usr.changeling.sting_range = 1 - - usr << "\blue We stealthily sting [T]." - feedback_add_details("changeling_powers","BS") - - var/obj/effect/overlay/B = new /obj/effect/overlay( T.loc ) - B.icon_state = "blspell" - B.icon = 'icons/obj/wizard.dmi' - B.name = "spell" - B.anchored = 1 - B.density = 0 - B.layer = 4 - T.canmove = 0 - spawn(5) - del(B) - T.canmove = 1 - - if(!T.changeling) - T << text("\blue Your eyes cry out in pain!") - T.disabilities |= NEARSIGHTED - spawn(300) - T.disabilities &= ~NEARSIGHTED - T.eye_blind = 10 - T.eye_blurry = 20 - - usr.verbs -= /client/proc/changeling_blind_sting - - spawn(5) - usr.verbs += /client/proc/changeling_blind_sting - - return - -/client/proc/changeling_deaf_sting() - set category = "Changeling" - set name = "Deaf sting (5)" - set desc="Sting target:" - - if(!usr.changeling) - usr << "\red You're not a changeling, something's wrong!" - return - - var/list/victims = list() - for(var/mob/living/carbon/C in oview(usr.changeling.sting_range)) - victims += C - var/mob/T = input(usr, "Who do you wish to sting?") as null | anything in victims - - if(T && T in view(usr.changeling.sting_range)) - if(usr.stat) - usr << "\red Not when we are incapacitated." - return - - if(usr.changeling.chem_charges < 5) - usr << "\red We don't have enough stored chemicals to do that!" - return - - usr.changeling.chem_charges -= 5 - usr.changeling.sting_range = 1 - - usr << "\blue We stealthily sting [T]." - feedback_add_details("changeling_powers","DS") - - if(!T.changeling) - T.sdisabilities |= DEAF - spawn(300) - T.sdisabilities &= ~DEAF - - usr.verbs -= /client/proc/changeling_deaf_sting - - spawn(5) - usr.verbs += /client/proc/changeling_deaf_sting - - return - -/client/proc/changeling_paralysis_sting() - set category = "Changeling" - set name = "Paralysis sting (30)" - set desc="Sting target" - - if(!usr.changeling) - usr << "\red You're not a changeling, something's wrong!" - return - - var/list/victims = list() - for(var/mob/living/carbon/C in oview(usr.changeling.sting_range)) - victims += C - var/mob/T = input(usr, "Who do you wish to sting?") as null | anything in victims - - if(T && T in view(usr.changeling.sting_range)) - - if(usr.stat) - usr << "\red Not when we are incapacitated." - return - - if(usr.changeling.chem_charges < 30) - usr << "\red We don't have enough stored chemicals to do that!" - return - - usr.changeling.chem_charges -= 30 - usr.changeling.sting_range = 1 - - usr << "\blue We stealthily sting [T]." - feedback_add_details("changeling_powers","PS") - - if(!T.changeling) - T << "You feel a small prick and your muscles stiffening." - T.Weaken(10) - else - T << "You feel a small prick." - - usr.verbs -= /client/proc/changeling_paralysis_sting - - spawn(5) - usr.verbs += /client/proc/changeling_paralysis_sting - - return - -/client/proc/changeling_transformation_sting() - set category = "Changeling" - set name = "Transformation sting (40)" - set desc="Sting target" - - if(!usr.changeling) - usr << "\red You're not a changeling, something's wrong!" - return - - var/list/victims = list() - for(var/mob/living/carbon/C in oview(usr.changeling.sting_range)) - victims += C - var/mob/T = input(usr, "Who do you wish to sting?") as null | anything in victims - - if(T && T in view(usr.changeling.sting_range)) - if(usr.stat) - usr << "\red Not when we are incapacitated." - return - - if(usr.changeling.chem_charges < 40) - usr << "\red We don't have enough stored chemicals to do that!" - return - - if((HUSK in T.mutations) || (!ishuman(T) && !ismonkey(T))) - usr << "\red We can't transform that target!" - return - - var/S = input("Select the target DNA: ", "Target DNA", null) in usr.changeling.absorbed_dna - - if (S == null) - return - - usr.changeling.chem_charges -= 40 - usr.changeling.sting_range = 1 - - usr << "\blue We stealthily sting [T]." - feedback_add_details("changeling_powers","TS") - - if(!T.changeling) - T.visible_message(text("\red [T] transforms!")) - - T.dna = usr.changeling.absorbed_dna[S] - T.real_name = S - updateappearance(T, T.dna.uni_identity) - domutcheck(T, null) - - usr.verbs -= /client/proc/changeling_transformation_sting - - spawn(5) - usr.verbs += /client/proc/changeling_transformation_sting - - return - -/client/proc/changeling_unfat_sting() - set category = "Changeling" - set name = "Unfat sting (5)" - set desc = "Sting target" - - if(!usr.changeling) - usr << "\red You're not a changeling, something's wrong!" - return - - var/list/victims = list() - for(var/mob/living/carbon/C in oview(usr.changeling.sting_range)) - victims += C - var/mob/T = input(usr, "Who do you wish to sting?") as null | anything in victims - - if(T && T in view(usr.changeling.sting_range)) - if(usr.stat) - usr << "\red Not when we are incapacitated." - return - - if(usr.changeling.chem_charges < 5) - usr << "\red We don't have enough stored chemicals to do that!" - return - - usr.changeling.chem_charges -= 5 - usr.changeling.sting_range = 1 - - usr << "\blue We stealthily sting [T]." - feedback_add_details("changeling_powers","US") - - if(!T.changeling) - T << "You feel a small prick and a burning sensation." - T.overeatduration = 0 - T.nutrition -= 100 - else - T << "You feel a small prick." - - usr.verbs -= /client/proc/changeling_unfat_sting - - spawn(5) - usr.verbs += /client/proc/changeling_unfat_sting - - return - -/client/proc/changeling_unstun() +//Recover from stuns. +/mob/proc/changeling_unstun() set category = "Changeling" set name = "Epinephrine Sacs (45)" set desc = "Removes all stuns" - if(!usr.changeling) - usr << "\red You're not a changeling, something's wrong!" - return - - if(usr.changeling.chem_charges < 45) - usr << "\red We don't have enough stored chemicals to do that!" - return - - usr.changeling.chem_charges -= 45 + var/datum/changeling/changeling = changeling_power(45,0,100,UNCONSCIOUS) + if(!changeling) return 0 + changeling.chem_charges -= 45 var/mob/living/carbon/human/C = usr + C.stat = 0 + C.SetParalysis(0) + C.SetStunned(0) + C.SetWeakened(0) + C.lying = 0 + C.update_canmove() - if(C) - C.stat = 0 - C.SetParalysis(0) - C.SetStunned(0) - C.SetWeakened(0) - C.lying = 0 - C.canmove = 1 - + usr.verbs -= /mob/proc/changeling_unstun + spawn(5) usr.verbs += /mob/proc/changeling_unstun feedback_add_details("changeling_powers","UNS") - - usr.verbs -= /client/proc/changeling_unstun - - spawn(5) - usr.verbs += /client/proc/changeling_unstun + return 1 +//Speeds up chemical regeneration +/mob/proc/changeling_fastchemical() + usr.mind.changeling.chem_recharge_rate *= 2 + return 1 -/client/proc/changeling_fastchemical() +//Increases macimum chemical storage +/mob/proc/changeling_engorgedglands() + usr.mind.changeling.chem_storage += 25 + return 1 - usr.changeling.chem_recharge_multiplier = usr.changeling.chem_recharge_multiplier*2 -/client/proc/changeling_engorgedglands() - - usr.changeling.chem_storage = usr.changeling.chem_storage+25 - -/client/proc/changeling_digitalcamo() +//Prevents AIs tracking you but makes you easily detectable to the human-eye. +/mob/proc/changeling_digitalcamo() set category = "Changeling" set name = "Toggle Digital Camoflague (10)" set desc = "The AI can no longer track us, but we will look different if examined. Has a constant cost while active." - if(!usr.changeling) - usr << "\red You're not a changeling, something's wrong!" - return - - if(usr.changeling.chem_charges < 10) - usr << "\red We don't have enough stored chemicals to do that!" - return - - usr.changeling.chem_charges -= 10 + var/datum/changeling/changeling = changeling_power(10) + if(!changeling) return 0 + usr.mind.changeling.chem_charges -= 10 var/mob/living/carbon/human/C = usr + if(C.digitalcamo) C << "We return to normal." + else C << "We distort our form to prevent AI-tracking." + C.digitalcamo = !C.digitalcamo - if(C) - C << "[C.digitalcamo ? "We return to normal." : "We distort our form."]" - C.digitalcamo = !C.digitalcamo - spawn(0) - while(C && C.digitalcamo) - C.changeling.chem_charges -= 1/4 - sleep(10) + spawn(0) + while(C && C.digitalcamo) + C.mind.changeling.chem_charges -= 1 + sleep(40) + usr.verbs -= /mob/proc/changeling_digitalcamo + spawn(5) usr.verbs += /mob/proc/changeling_digitalcamo feedback_add_details("changeling_powers","CAM") - - usr.verbs -= /client/proc/changeling_digitalcamo - - spawn(5) - usr.verbs += /client/proc/changeling_digitalcamo + return 1 -/client/proc/changeling_DEATHsting() - set category = "Changeling" - set name = "Death Sting (40)" - set desc = "Causes spasms onto death." - - if(!usr.changeling) - usr << "\red You're not a changeling, something's wrong!" - return - - var/list/victims = list() - for(var/mob/living/carbon/C in oview(usr.changeling.sting_range)) - victims += C - var/mob/living/carbon/T = input(usr, "Who do you wish to sting?") as null | anything in victims - - if(T && T in view(usr.changeling.sting_range)) - - if(usr.stat) - usr << "\red Not when we are incapacitated." - return - - if(usr.changeling.chem_charges < 40) - usr << "\red We don't have enough stored chemicals to do that!" - return - - usr.changeling.chem_charges -= 40 - usr.changeling.sting_range = 1 - - usr << "\blue We stealthily sting [T]." - feedback_add_details("changeling_powers","DTHS") - - if(!T.changeling) - T << "You feel a small prick and your chest becomes tight." - - T.silent = (10) - T.Paralyse(10) - T.make_jittery(1000) - - if (T.reagents) - T.reagents.add_reagent("lexorin", 40) - - else - T << "You feel a small prick." - - usr.verbs -= /client/proc/changeling_DEATHsting - - spawn(5) - usr.verbs += /client/proc/changeling_DEATHsting - - return - - - -/client/proc/changeling_rapidregen() +//Starts healing you every second for 10 seconds. Can be used whilst unconscious. +/mob/proc/changeling_rapidregen() set category = "Changeling" set name = "Rapid Regeneration (30)" set desc = "Begins rapidly regenerating. Does not effect stuns or chemicals." - if(!usr.changeling) - usr << "\red You're not a changeling, something's wrong!" - return - - if(usr.changeling.chem_charges < 30) - usr << "\red We don't have enough stored chemicals to do that!" - return - - usr.changeling.chem_charges -= 30 + var/datum/changeling/changeling = changeling_power(30,0,100,UNCONSCIOUS) + if(!changeling) return 0 + usr.mind.changeling.chem_charges -= 30 var/mob/living/carbon/human/C = usr - feedback_add_details("changeling_powers","RR") - spawn(0) for(var/i = 0, i<10,i++) if(C) @@ -1048,60 +454,149 @@ Tarjan shit, not recoding this -Sieve{R}*/ C.adjustFireLoss(-10) sleep(10) + usr.verbs -= /mob/proc/changeling_rapidregen + spawn(5) usr.verbs += /mob/proc/changeling_rapidregen + feedback_add_details("changeling_powers","RR") + return 1 - usr.verbs -= /client/proc/changeling_rapidregen + ////////// + //STINGS// //They get a pretty header because there's just so fucking many of them ;_; + ////////// +//Handles the general sting code to reduce on copypasta (seeming as somebody decided to make SO MANY dumb abilities) +/mob/proc/changeling_sting(var/required_chems=0, var/verb_path) + var/datum/changeling/changeling = changeling_power(required_chems) + if(!changeling) return - spawn(5) - usr.verbs += /client/proc/changeling_rapidregen + var/list/victims = list() + for(var/mob/living/carbon/C in oview(changeling.sting_range)) + victims += C + var/mob/living/carbon/T = input(usr, "Who will we sting?") as null|anything in victims + + if(!T) return + if(!(T in view(changeling.sting_range))) return + if(!changeling_power(required_chems)) return + + changeling.chem_charges -= required_chems + changeling.sting_range = 1 + usr.verbs -= verb_path + spawn(10) usr.verbs += verb_path + + usr << "We stealthily sting [T]." + if(!T.mind || !T.mind.changeling) return T //T will be affected by the sting + T << "You feel a tiny prick." + return - - -/client/proc/changeling_lsdsting() +/mob/proc/changeling_lsdsting() set category = "Changeling" set name = "Hallucination Sting (15)" set desc = "Causes terror in the target." - if(!usr.changeling) - usr << "\red You're not a changeling, something's wrong!" - return + var/mob/living/carbon/T = changeling_sting(15,/mob/proc/changeling_lsdsting) + if(!T) return 0 + spawn(rand(300,600)) + if(T) T.hallucination += 400 + feedback_add_details("changeling_powers","HS") + return 1 - var/list/victims = list() - for(var/mob/living/carbon/C in oview(usr.changeling.sting_range)) - victims += C - var/mob/living/T = input(usr, "Who do you wish to sting?") as null | anything in victims +/mob/proc/changeling_silence_sting() + set category = "Changeling" + set name = "Silence sting (10)" + set desc="Sting target" - if(T && T in view(usr.changeling.sting_range)) + var/mob/living/carbon/T = changeling_sting(10,/mob/proc/changeling_silence_sting) + if(!T) return 0 + T.silent += 30 + feedback_add_details("changeling_powers","SS") + return 1 - if(usr.stat) - usr << "\red Not when we are incapacitated." - return +/mob/proc/changeling_blind_sting() + set category = "Changeling" + set name = "Blind sting (20)" + set desc="Sting target" - if(usr.changeling.chem_charges < 15) - usr << "\red We don't have enough stored chemicals to do that!" - return + var/mob/living/carbon/T = changeling_sting(20,/mob/proc/changeling_blind_sting) + if(!T) return 0 + T << "Your eyes burn horrificly!" + T.disabilities |= NEARSIGHTED + spawn(300) T.disabilities &= ~NEARSIGHTED + T.eye_blind = 10 + T.eye_blurry = 20 + feedback_add_details("changeling_powers","BS") + return 1 - usr.changeling.chem_charges -= 15 - usr.changeling.sting_range = 1 +/mob/proc/changeling_deaf_sting() + set category = "Changeling" + set name = "Deaf sting (5)" + set desc="Sting target:" - usr << "\blue We stealthily sting [T]." - feedback_add_details("changeling_powers","HS") + var/mob/living/carbon/T = changeling_sting(5,/mob/proc/changeling_deaf_sting) + if(!T) return 0 + T << "Your ears pop and begin ringing loudly!" + T.sdisabilities |= DEAF + spawn(300) T.sdisabilities &= ~DEAF + feedback_add_details("changeling_powers","DS") + return 1 - if(!T.changeling) - // T << "You feel a small prick." // No warning. +/mob/proc/changeling_paralysis_sting() + set category = "Changeling" + set name = "Paralysis sting (30)" + set desc="Sting target" - var/timer = rand(300,600) + var/mob/living/carbon/T = changeling_sting(30,/mob/proc/changeling_paralysis_sting) + if(!T) return 0 + T << "Your muscles begin to painfully tighten." + T.Weaken(10) + feedback_add_details("changeling_powers","PS") + return 1 - spawn(timer) - if(T) - if(T.reagents) - // T.reagents.add_reagent("LSD", 50) // Slight overkill, it seems. - T.hallucination = 400 +/mob/proc/changeling_transformation_sting() + set category = "Changeling" + set name = "Transformation sting (40)" + set desc="Sting target" + var/datum/changeling/changeling = changeling_power(40) + if(!changeling) return 0 + var/S = input("Select the target DNA: ", "Target DNA", null) as null|anything in changeling.absorbed_dna + if(!S) return - usr.verbs -= /client/proc/changeling_lsdsting + var/mob/living/carbon/T = changeling_sting(40,/mob/proc/changeling_transformation_sting) + if(!T) return 0 + if((HUSK in T.mutations) || (!ishuman(T) && !ismonkey(T))) + usr << "Our sting appears ineffective against its DNA." + return 0 + T.visible_message("[T] transforms!") + T.dna = changeling.absorbed_dna[S] + T.real_name = S + updateappearance(T, T.dna.uni_identity) + domutcheck(T, null) + feedback_add_details("changeling_powers","TS") + return 1 - spawn(5) - usr.verbs += /client/proc/changeling_lsdsting +/mob/proc/changeling_unfat_sting() + set category = "Changeling" + set name = "Unfat sting (5)" + set desc = "Sting target" - return \ No newline at end of file + var/mob/living/carbon/T = changeling_sting(5,/mob/proc/changeling_unfat_sting) + if(!T) return 0 + T << "you feel a small prick as stomach churns violently and you become to feel skinnier." + T.overeatduration = 0 + T.nutrition -= 100 + feedback_add_details("changeling_powers","US") + return 1 + +/mob/proc/changeling_DEATHsting() + set category = "Changeling" + set name = "Death Sting (40)" + set desc = "Causes spasms onto death." + + var/mob/living/carbon/T = changeling_sting(40,/mob/proc/changeling_DEATHsting) + if(!T) return 0 + T << "You feel a small prick and your chest becomes tight." + T.silent = 10 + T.Paralyse(10) + T.make_jittery(1000) + if(T.reagents) T.reagents.add_reagent("lexorin", 40) + feedback_add_details("changeling_powers","DTHS") + return 1 diff --git a/code/game/gamemodes/changeling/modularchangling.dm b/code/game/gamemodes/changeling/modularchangling.dm index ab4079c30a7..880c34096b7 100644 --- a/code/game/gamemodes/changeling/modularchangling.dm +++ b/code/game/gamemodes/changeling/modularchangling.dm @@ -1,226 +1,161 @@ -var/list/powers = typesof(/obj/effect/proc_holder/power) //needed for the badmin verb for now -var/list/obj/effect/proc_holder/power/powerinstances = list() - -/obj/effect/proc_holder/power - name = "Power" - desc = "Placeholder" - density = 0 - opacity = 0 +var/list/powers = typesof(/datum/power/changeling) - /datum/power/changeling //needed for the badmin verb for now +var/list/datum/power/changeling/powerinstances = list() +/datum/power //Could be used by other antags too + var/name = "Power" + var/desc = "Placeholder" var/helptext = "" + var/isVerb = 1 // Is it an active power, or passive? + var/verbpath // Path to a verb that contains the effects. +/datum/power/changeling var/allowduringlesserform = 0 - var/isVerb = 1 // Is it an active power, or passive? - var/verbpath = null // Path to a verb that contains the effects. var/genomecost = 500000 // Cost for the changling to evolve this power. -/obj/effect/proc_holder/power/absorb_dna +/datum/power/changeling/absorb_dna name = "Absorb DNA" - desc = "Permits us to syphon the DNA from a human. They become one with us, and we become stronger." + desc = "Permits us to syphon the DNA from a human. They become one with us, and we become stronger." genomecost = 0 + verbpath = /mob/proc/changeling_absorb_dna - verbpath = /client/proc/changeling_absorb_dna - - - -/obj/effect/proc_holder/power/transform +/datum/power/changeling/transform name = "Transform" desc = "We take on the apperance and voice of one we have absorbed." genomecost = 0 + verbpath = /mob/proc/changeling_transform - verbpath = /client/proc/changeling_transform - - - -/obj/effect/proc_holder/power/fakedeath +/datum/power/changeling/fakedeath name = "Regenerative Stasis" desc = "We fake our death while we regenerate our form, even through death." genomecost = 0 allowduringlesserform = 1 + verbpath = /mob/proc/changeling_fakedeath - verbpath = /client/proc/changeling_fakedeath - - - -/obj/effect/proc_holder/power/lesser_form +/datum/power/changeling/lesser_form name = "Lesser Form" desc = "We debase ourselves and become lesser. We become a monkey." genomecost = 1 + verbpath = /mob/proc/changeling_lesser_form - verbpath = /client/proc/changeling_lesser_form - - -/* -/obj/effect/proc_holder/power/changeling_greater_form - name = "Greater Form" - desc = "We become the pinnicle of evolution. We will show the humans what happens when they leave their isle of ignorance." - genomecost = 250 - - verbpath = /client/proc/changeling_greater_form -*/ - - - -/obj/effect/proc_holder/power/deaf_sting +/datum/power/changeling/deaf_sting name = "Deaf Sting" desc = "We silently sting a human, completely deafening them for a short time." genomecost = 1 allowduringlesserform = 1 + verbpath = /mob/proc/changeling_deaf_sting - verbpath = /client/proc/changeling_deaf_sting - - - -/obj/effect/proc_holder/power/blind_sting +/datum/power/changeling/blind_sting name = "Blind Sting" desc = "We silently sting a human, completely blinding them for a short time." genomecost = 2 allowduringlesserform = 1 + verbpath = /mob/proc/changeling_blind_sting - verbpath = /client/proc/changeling_blind_sting - - - -/obj/effect/proc_holder/power/silence_sting +/datum/power/changeling/silence_sting name = "Silence Sting" desc = "We silently sting a human, completely silencing them for a short time." helptext = "Does not provide a warning to a victim that they have been stung, until they try to speak and can not." genomecost = 2 allowduringlesserform = 1 + verbpath = /mob/proc/changeling_silence_sting - verbpath = /client/proc/changeling_silence_sting - - - -/obj/effect/proc_holder/power/transformation_sting +/datum/power/changeling/transformation_sting name = "Transformation Sting" desc = "We silently sting a human, injecting a retrovirus that forces them to transform into another." genomecost = 3 + verbpath = /mob/proc/changeling_transformation_sting - verbpath = /client/proc/changeling_transformation_sting - - - -/obj/effect/proc_holder/power/paralysis_sting +/datum/power/changeling/paralysis_sting name = "Paralysis Sting" desc = "We silently sting a human, paralyzing them for a short time." genomecost = 3 + verbpath = /mob/proc/changeling_paralysis_sting - - verbpath = /client/proc/changeling_paralysis_sting - - - -/obj/effect/proc_holder/power/LSDSting +/datum/power/changeling/LSDSting name = "Hallucination Sting" desc = "We evolve the ability to sting a target with a powerful hallunicationary chemical." helptext = "The target does not notice they have been stung. The effect occurs after 30 to 60 seconds." genomecost = 3 + verbpath = /mob/proc/changeling_lsdsting - verbpath = /client/proc/changeling_lsdsting - - - -/obj/effect/proc_holder/power/DeathSting +/datum/power/changeling/DeathSting name = "Death Sting" desc = "We silently sting a human, filling him with potent chemicals. His rapid death is all but assured." genomecost = 10 + verbpath = /mob/proc/changeling_DEATHsting - verbpath = /client/proc/changeling_DEATHsting - - - -/obj/effect/proc_holder/power/unfat_sting +/datum/power/changeling/unfat_sting name = "Unfat Sting" desc = "We silently sting a human, forcing them to rapidly metobolize their fat." genomecost = 1 + verbpath = /mob/proc/changeling_unfat_sting - - verbpath = /client/proc/changeling_unfat_sting - -/obj/effect/proc_holder/power/boost_range +/datum/power/changeling/boost_range name = "Boost Range" desc = "We evolve the ability to shoot our stingers at humans, with some preperation." genomecost = 2 allowduringlesserform = 1 + verbpath = /mob/proc/changeling_boost_range - verbpath = /client/proc/changeling_boost_range - - - -/obj/effect/proc_holder/power/Epinephrine +/datum/power/changeling/Epinephrine name = "Epinephrine sacs" desc = "We evolve additional sacs of adrenaline throughout our body." helptext = "Gives the ability to instantly recover from stuns. High chemical cost." genomecost = 4 + verbpath = /mob/proc/changeling_unstun - verbpath = /client/proc/changeling_unstun - - -/obj/effect/proc_holder/power/ChemicalSynth - name = "Rapid Chemical Synthesis" +/datum/power/changeling/ChemicalSynth + name = "Rapid Chemical-Synthesis" desc = "We evolve new pathways for producing our necessary chemicals, permitting us to naturally create them faster." helptext = "Doubles the rate at which we naturally recharge chemicals." genomecost = 4 isVerb = 0 - - verbpath = /client/proc/changeling_fastchemical - - - -/obj/effect/proc_holder/power/EngorgedGlands + verbpath = /mob/proc/changeling_fastchemical +/* +/datum/power/changeling/AdvChemicalSynth + name = "Advanced Chemical-Synthesis" + desc = "We evolve new pathways for producing our necessary chemicals, permitting us to naturally create them faster." + helptext = "Doubles the rate at which we naturally recharge chemicals." + genomecost = 8 + isVerb = 0 + verbpath = /mob/proc/changeling_fastchemical +*/ +/datum/power/changeling/EngorgedGlands name = "Engorged Chemical Glands" desc = "Our chemical glands swell, permitting us to store more chemicals inside of them." helptext = "Allows us to store an extra 25 units of chemicals." genomecost = 4 isVerb = 0 + verbpath = /mob/proc/changeling_engorgedglands - - verbpath = /client/proc/changeling_engorgedglands - - - -/obj/effect/proc_holder/power/DigitalCamoflague +/datum/power/changeling/DigitalCamoflague name = "Digital Camoflauge" desc = "We evolve the ability to distort our form and proprtions, defeating common altgorthms used to detect lifeforms on cameras." helptext = "We cannot be tracked by camera while using this skill. However, humans looking at us will find us.. uncanny. We must constantly expend chemicals to maintain our form like this." genomecost = 4 allowduringlesserform = 1 + verbpath = /mob/proc/changeling_digitalcamo - verbpath = /client/proc/changeling_digitalcamo - - - -/obj/effect/proc_holder/power/rapidregeneration +/datum/power/changeling/rapidregeneration name = "Rapid Regeneration" desc = "We evolve the ability to rapidly regenerate, negating the need for stasis." helptext = "Heals a moderate amount of damage every tick." genomecost = 8 - - verbpath = /client/proc/changeling_rapidregen - - - - + verbpath = /mob/proc/changeling_rapidregen // Modularchangling, totally stolen from the new player panel. YAYY /datum/changeling/proc/EvolutionMenu()//The new one set category = "Changeling" set desc = "Level up!" - if (!usr.changeling) - return - src = usr.changeling + if(!usr || !usr.mind || !usr.mind.changeling) return + src = usr.mind.changeling if(!powerinstances.len) for(var/P in powers) - var/obj/effect/proc_holder/power/nP = new P - if (nP.desc == "Placeholder") - del(nP) - continue - powerinstances += nP + powerinstances += new P() var/dat = "Changling Evolution Menu" @@ -412,7 +347,7 @@ var/list/obj/effect/proc_holder/power/powerinstances = list() Changling Evolution Menu
Hover over a power to see more information
- Current evolution points left to evolve with: [usr.changeling.geneticpoints]
+ Current evolution points left to evolve with: [geneticpoints]
Absorb genomes to acquire more evolution points

@@ -432,10 +367,10 @@ var/list/obj/effect/proc_holder/power/powerinstances = list() "} var/i = 1 - for(var/obj/effect/proc_holder/power/P in powerinstances) + for(var/datum/power/changeling/P in powerinstances) var/ownsthis = 0 - if(P in usr.changeling.purchasedpowers) + if(P in purchasedpowers) ownsthis = 1 @@ -482,18 +417,19 @@ var/list/obj/effect/proc_holder/power/powerinstances = list() ..() if(href_list["P"]) - usr.changeling.purchasePower(href_list["P"]) + purchasePower(href_list["P"]) call(/datum/changeling/proc/EvolutionMenu)() -/datum/changeling/proc/purchasePower(var/obj/effect/proc_holder/power/Pname) - if (!usr.changeling) +/datum/changeling/proc/purchasePower(var/datum/power/changeling/Pname) + if(!usr.mind || !usr.mind.changeling) return +// src = usr.mind.changeling - var/obj/effect/proc_holder/power/Thepower = null + var/datum/power/changeling/Thepower = null - for (var/obj/effect/proc_holder/power/P in powerinstances) + for (var/datum/power/changeling/P in powerinstances) if(P.name == Pname) Thepower = P break @@ -502,25 +438,21 @@ var/list/obj/effect/proc_holder/power/powerinstances = list() usr << "This is awkward. Changeling power purchase failed, please report this bug to a coder!" return - if(Thepower in usr.changeling.purchasedpowers) + if(Thepower in purchasedpowers) usr << "We have already evolved this ability!" return - if(usr.changeling.geneticpoints < Thepower.genomecost) + if(geneticpoints < Thepower.genomecost) usr << "We cannot evolve this... yet. We must acquire more DNA." return - usr.changeling.geneticpoints -= Thepower.genomecost + geneticpoints -= Thepower.genomecost - usr.changeling.purchasedpowers += Thepower + purchasedpowers += Thepower - if(!Thepower.isVerb) + if(!Thepower.isVerb && Thepower.verbpath) call(Thepower.verbpath)() - else - if(usr.changeling.changeling_level == 1) - usr.make_lesser_changeling() - else - usr.make_changeling() + usr.make_changeling() diff --git a/code/game/gamemodes/objective.dm b/code/game/gamemodes/objective.dm index 49986a3f9b1..e4b02356af2 100644 --- a/code/game/gamemodes/objective.dm +++ b/code/game/gamemodes/objective.dm @@ -445,7 +445,7 @@ datum/objective/absorb return target_amount check_completion() - if(owner && owner.current && owner.current.changeling && owner.current.changeling.absorbed_dna && ((owner.current.changeling.absorbedcount) >= target_amount)) + if(owner && owner.changeling && owner.changeling.absorbed_dna && (owner.changeling.absorbedcount >= target_amount)) return 1 else return 0 diff --git a/code/game/machinery/cloning.dm b/code/game/machinery/cloning.dm index 54e4cad896c..10e1a1be795 100644 --- a/code/game/machinery/cloning.dm +++ b/code/game/machinery/cloning.dm @@ -113,7 +113,7 @@ //Clonepod //Start growing a human clone in the pod! -/obj/machinery/clonepod/proc/growclone(var/ckey, var/clonename, var/ui, var/se, var/mindref, var/mrace, var/UI, var/datum/changeling/changelingClone) +/obj/machinery/clonepod/proc/growclone(var/ckey, var/clonename, var/ui, var/se, var/mindref, var/mrace, var/UI) if(mess || attempting) return 0 var/datum/mind/clonemind = locate(mindref) @@ -177,10 +177,6 @@ ticker.mode.add_cultist(src.occupant.mind) ticker.mode.update_all_cult_icons() //So the icon actually appears - if (changelingClone && H.mind in ticker.mode.changelings) - H.changeling = changelingClone - H.make_changeling() - // -- End mode specific stuff if(!H.dna) diff --git a/code/game/machinery/computer/cloning.dm b/code/game/machinery/computer/cloning.dm index 121f3f8b469..6d7af7bdcd4 100644 --- a/code/game/machinery/computer/cloning.dm +++ b/code/game/machinery/computer/cloning.dm @@ -378,7 +378,7 @@ temp = "Error: Clonepod malfunction." else if(!config.revival_cloning) temp = "Error: Unable to initiate cloning cycle." - else if(pod1.growclone(C.fields["ckey"], C.fields["name"], C.fields["UI"], C.fields["SE"], C.fields["mind"], C.fields["mrace"], C.fields["interface"],C.fields["changeling"])) + else if(pod1.growclone(C.fields["ckey"], C.fields["name"], C.fields["UI"], C.fields["SE"], C.fields["mind"], C.fields["mrace"], C.fields["interface"])) temp = "Initiating cloning cycle..." records.Remove(C) del(C) @@ -425,7 +425,6 @@ R.fields["id"] = copytext(md5(subject.real_name), 2, 6) R.fields["UI"] = subject.dna.uni_identity R.fields["SE"] = subject.dna.struc_enzymes - R.fields["changeling"] = subject.changeling // Preferences stuff R.fields["interface"] = subject.UI diff --git a/code/game/machinery/hydroponics.dm b/code/game/machinery/hydroponics.dm index 55f6529fa02..9d73dfc9e9c 100644 --- a/code/game/machinery/hydroponics.dm +++ b/code/game/machinery/hydroponics.dm @@ -906,13 +906,9 @@ obj/machinery/hydroponics/attackby(var/obj/item/O as obj, var/mob/user as mob) if (podman.mind in ticker.mode:cult) ticker.mode:add_cultist(podman.mind) ticker.mode:update_all_cult_icons() //So the icon actually appears - if ("changeling") - if (podman.mind in ticker.mode:changelings) - podman.make_changeling() // -- End mode specific stuff - podman.gender = gender if(!podman.dna) diff --git a/code/game/objects/devices/PDA/PDA.dm b/code/game/objects/devices/PDA/PDA.dm index 2a773d4961b..9ef5df057a5 100644 --- a/code/game/objects/devices/PDA/PDA.dm +++ b/code/game/objects/devices/PDA/PDA.dm @@ -895,7 +895,7 @@ var/global/list/obj/item/device/pda/PDAs = list() user.show_message("\blue \t Damage Specifics: [C.getOxyLoss() > 50 ? "\red" : "\blue"][C.getOxyLoss()]-[C.getToxLoss() > 50 ? "\red" : "\blue"][C.getToxLoss()]-[C.getFireLoss() > 50 ? "\red" : "\blue"][C.getFireLoss()]-[C.getBruteLoss() > 50 ? "\red" : "\blue"][C.getBruteLoss()]", 1) user.show_message("\blue \t Key: Suffocation/Toxin/Burns/Brute", 1) user.show_message("\blue \t Body Temperature: [C.bodytemperature-T0C]°C ([C.bodytemperature*1.8-459.67]°F)", 1) - if(!isnull(C.tod) && (C.stat == 2 || (C.reagents && C.reagents.has_reagent("zombiepowder")) || (C.changeling && C.changeling.changeling_fakedeath))) + if(C.tod && (C.stat == DEAD || (C.status_flags & FAKEDEATH))) user.show_message("\blue \t Time of Death: [C.tod]") if(istype(C, /mob/living/carbon/human)) var/mob/living/carbon/human/H = C diff --git a/code/game/objects/devices/scanners.dm b/code/game/objects/devices/scanners.dm index ce30397a0ce..9cab9d90297 100644 --- a/code/game/objects/devices/scanners.dm +++ b/code/game/objects/devices/scanners.dm @@ -93,7 +93,7 @@ MASS SPECTROMETER O.show_message(text("\red [] has analyzed []'s vitals!", user, M), 1) //Foreach goto(67) var/fake_oxy = max(rand(1,40), M.getOxyLoss(), (300 - (M.getToxLoss() + M.getFireLoss() + M.getBruteLoss()))) - if((M.reagents && M.reagents.has_reagent("zombiepowder")) || (M.changeling && M.changeling.changeling_fakedeath)) + if(M.status_flags & FAKEDEATH) user.show_message(text("\blue Analyzing Results for []:\n\t Overall Status: []", M, "dead"), 1) user.show_message(text("\blue \t Damage Specifics: []-[]-[]-[]", fake_oxy < 50 ? "\red [fake_oxy]" : fake_oxy , M.getToxLoss() > 50 ? "\red [M.getToxLoss()]" : M.getToxLoss(), M.getFireLoss() > 50 ? "\red[M.getFireLoss()]" : M.getFireLoss(), M.getBruteLoss() > 50 ? "\red[M.getBruteLoss()]" : M.getBruteLoss()), 1) else @@ -101,7 +101,7 @@ MASS SPECTROMETER user.show_message(text("\blue \t Damage Specifics: []-[]-[]-[]", M.getOxyLoss() > 50 ? "\red [M.getOxyLoss()]" : M.getOxyLoss(), M.getToxLoss() > 50 ? "\red [M.getToxLoss()]" : M.getToxLoss(), M.getFireLoss() > 50 ? "\red[M.getFireLoss()]" : M.getFireLoss(), M.getBruteLoss() > 50 ? "\red[M.getBruteLoss()]" : M.getBruteLoss()), 1) user.show_message("\blue Key: Suffocation/Toxin/Burns/Brute", 1) user.show_message("\blue Body Temperature: [M.bodytemperature-T0C]°C ([M.bodytemperature*1.8-459.67]°F)", 1) - if(!isnull(M.tod) && (M.stat == 2 || (M.reagents && M.reagents.has_reagent("zombiepowder")) || (M.changeling && M.changeling.changeling_fakedeath))) + if(M.tod && (M.stat == DEAD || (M.status_flags & FAKEDEATH))) user.show_message("\blue Time of Death: [M.tod]") if(istype(M, /mob/living/carbon/human) && mode == 1) var/mob/living/carbon/human/H = M @@ -113,7 +113,7 @@ MASS SPECTROMETER else user.show_message("\blue \t Limbs are OK.",1) - if((M.changeling && M.changeling.changeling_fakedeath) || (M.reagents && M.reagents.has_reagent("zombiepowder"))) + if(M.status_flags & FAKEDEATH) user.show_message(text("\blue [] | [] | [] | []", fake_oxy > 50 ? "\red Severe oxygen deprivation detected\blue" : "Subject bloodstream oxygen level normal", M.getToxLoss() > 50 ? "\red Dangerous amount of toxins detected\blue" : "Subject bloodstream toxin level minimal", M.getFireLoss() > 50 ? "\red Severe burn damage detected\blue" : "Subject burn injury status O.K", M.getBruteLoss() > 50 ? "\red Severe anatomical damage detected\blue" : "Subject brute-force injury status O.K"), 1) else user.show_message(text("\blue [] | [] | [] | []", M.getOxyLoss() > 50 ? "\red Severe oxygen deprivation detected\blue" : "Subject bloodstream oxygen level normal", M.getToxLoss() > 50 ? "\red Dangerous amount of toxins detected\blue" : "Subject bloodstream toxin level minimal", M.getFireLoss() > 50 ? "\red Severe burn damage detected\blue" : "Subject burn injury status O.K", M.getBruteLoss() > 50 ? "\red Severe anatomical damage detected\blue" : "Subject brute-force injury status O.K"), 1) diff --git a/code/game/objects/items/weapons/surgery_tools.dm b/code/game/objects/items/weapons/surgery_tools.dm index c30bd93fea0..2dba563c2c6 100644 --- a/code/game/objects/items/weapons/surgery_tools.dm +++ b/code/game/objects/items/weapons/surgery_tools.dm @@ -539,7 +539,7 @@ CIRCULAR SAW return if(3.0) - if(M.changeling && M.changeling.changeling_fakedeath) + if(M.mind && M.mind.changeling) user << "\red The neural tissue regrows before your eyes as you cut it." return diff --git a/code/modules/admin/verbs/randomverbs.dm b/code/modules/admin/verbs/randomverbs.dm index 5ae3a636521..5233bc6774a 100644 --- a/code/modules/admin/verbs/randomverbs.dm +++ b/code/modules/admin/verbs/randomverbs.dm @@ -393,9 +393,6 @@ Traitors and the like can also be revived with the previous role mostly intact. //Now for special roles and equipment. switch(new_character.mind.special_role) - if("Changeling") - job_master.EquipRank(new_character, new_character.mind.assigned_role, 1) - new_character.make_changeling() if("traitor") job_master.EquipRank(new_character, new_character.mind.assigned_role, 1) ticker.mode.equip_traitor(new_character) diff --git a/code/modules/chemical/Chemistry-Reagents.dm b/code/modules/chemical/Chemistry-Reagents.dm index c9f974ef8d2..f4a07597315 100644 --- a/code/modules/chemical/Chemistry-Reagents.dm +++ b/code/modules/chemical/Chemistry-Reagents.dm @@ -1472,6 +1472,7 @@ datum on_mob_life(var/mob/living/carbon/M as mob) if(!M) M = holder.my_atom + M.status_flags |= FAKEDEATH M.adjustOxyLoss(0.5) M.adjustToxLoss(0.5) M.Weaken(10) @@ -1480,6 +1481,11 @@ datum ..() return + Del() + if(holder && ismob(holder.my_atom)) + var/mob/M = holder.my_atom + M.status_flags &= ~FAKEDEATH + LSD name = "LSD" id = "LSD" diff --git a/code/modules/mob/living/carbon/human/examine.dm b/code/modules/mob/living/carbon/human/examine.dm index b61a96778ec..c1a12fd29d0 100644 --- a/code/modules/mob/living/carbon/human/examine.dm +++ b/code/modules/mob/living/carbon/human/examine.dm @@ -186,7 +186,7 @@ if(suiciding) msg += "[t_He] [t_has] bitten off [t_his] own tongue and [t_has] suffered major bloodloss!\n" - if(stat == DEAD || (changeling && (changeling.changeling_fakedeath == 1))) + if(stat == DEAD || (status_flags & FAKEDEATH)) msg += "[t_He] [t_is] limp and unresponsive; there are no signs of life" if(!key) diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index 5891c5c2461..d638be519d2 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -153,10 +153,10 @@ stat("Internal Atmosphere Info", internal.name) stat("Tank Pressure", internal.air_contents.return_pressure()) stat("Distribution Pressure", internal.distribute_pressure) - if (mind) - if (mind.special_role == "Changeling" && changeling) - stat("Chemical Storage", changeling.chem_charges) - stat("Genetic Damage Time", changeling.geneticdamage) + if(mind) + if(mind.changeling) + stat("Chemical Storage", mind.changeling.chem_charges) + stat("Genetic Damage Time", mind.changeling.geneticdamage) if (istype(wear_suit, /obj/item/clothing/suit/space/space_ninja)&&wear_suit:s_initialized) stat("Energy Charge", round(wear_suit:cell:charge/100)) diff --git a/code/modules/mob/living/carbon/human/life.dm b/code/modules/mob/living/carbon/human/life.dm index 414475c75c3..d173d58d4d7 100644 --- a/code/modules/mob/living/carbon/human/life.dm +++ b/code/modules/mob/living/carbon/human/life.dm @@ -1060,11 +1060,8 @@ nutrition += 10 proc/handle_changeling() - if (mind) - if (mind.special_role == "Changeling" && changeling) - changeling.chem_charges = between(0, ((max((0.9 - (changeling.chem_charges / 50)), 0.1)*changeling.chem_recharge_multiplier) + changeling.chem_charges), changeling.chem_storage) - if ((changeling.geneticdamage > 0)) - changeling.geneticdamage = changeling.geneticdamage-1 + if(mind && mind.changeling) + mind.changeling.regenerate() #undef HUMAN_MAX_OXYLOSS #undef HUMAN_CRIT_MAX_OXYLOSS \ No newline at end of file diff --git a/code/modules/mob/living/carbon/human/say.dm b/code/modules/mob/living/carbon/human/say.dm index ee1e71cc17b..141ed27a6a2 100644 --- a/code/modules/mob/living/carbon/human/say.dm +++ b/code/modules/mob/living/carbon/human/say.dm @@ -4,9 +4,9 @@ return //Mimes dont speak! Changeling hivemind and emotes are allowed. - if (miming) + if(miming) if(length(message) >= 2) - if(src.changeling) + if(mind && mind.changeling) if(copytext(message, 1, 2) != "*" && copytext(message, 1, 3) != ":g" && copytext(message, 1, 3) != ":G" && copytext(message, 1, 3) != ":ï") return else diff --git a/code/modules/mob/living/carbon/human/update_icons.dm b/code/modules/mob/living/carbon/human/update_icons.dm index 9bedd8c35d6..bea16c63349 100644 --- a/code/modules/mob/living/carbon/human/update_icons.dm +++ b/code/modules/mob/living/carbon/human/update_icons.dm @@ -585,7 +585,8 @@ Please contact me on #coderbus IRC. ~Carn x /mob/living/carbon/human/update_hud() //TODO: do away with this if possible if(client) client.screen |= contents - hud_used.hidden_inventory_update() //Updates the screenloc of the items on the 'other' inventory bar + if(hud_used) + hud_used.hidden_inventory_update() //Updates the screenloc of the items on the 'other' inventory bar /mob/living/carbon/human/update_inv_handcuffed(var/update_icons=1) diff --git a/code/modules/mob/living/carbon/metroid/life.dm b/code/modules/mob/living/carbon/metroid/life.dm index af5f428b6fc..2775b6e4813 100644 --- a/code/modules/mob/living/carbon/metroid/life.dm +++ b/code/modules/mob/living/carbon/metroid/life.dm @@ -264,7 +264,7 @@ src.blinded = 1 else - if (src.paralysis || src.stunned || src.weakened || (changeling && changeling.changeling_fakedeath)) //Stunned etc. + if (src.paralysis || src.stunned || src.weakened || (status_flags && FAKEDEATH)) //Stunned etc. if (src.stunned > 0) AdjustStunned(-1) src.stat = 0 diff --git a/code/modules/mob/living/carbon/monkey/life.dm b/code/modules/mob/living/carbon/monkey/life.dm index 1d9d8004c7a..7dcba96f5d3 100644 --- a/code/modules/mob/living/carbon/monkey/life.dm +++ b/code/modules/mob/living/carbon/monkey/life.dm @@ -581,8 +581,5 @@ return proc/handle_changeling() - if (mind) - if (mind.special_role == "Changeling" && changeling) - changeling.chem_charges = between(0, ((max((0.9 - (changeling.chem_charges / 50)), 0.1)*changeling.chem_recharge_multiplier) + changeling.chem_charges), changeling.chem_storage) - if ((changeling.geneticdamage > 0)) - changeling.geneticdamage = changeling.geneticdamage-1 + if(mind && mind.changeling) + mind.changeling.regenerate() diff --git a/code/modules/mob/living/carbon/monkey/monkey.dm b/code/modules/mob/living/carbon/monkey/monkey.dm index 3128c55f26a..88792d03cc8 100644 --- a/code/modules/mob/living/carbon/monkey/monkey.dm +++ b/code/modules/mob/living/carbon/monkey/monkey.dm @@ -392,9 +392,9 @@ stat(null, text("Move Mode: []", m_intent)) if(client && mind) if (client.statpanel == "Status") - if (mind.special_role == "Changeling" && changeling) - stat("Chemical Storage", changeling.chem_charges) - stat("Genetic Damage Time", changeling.geneticdamage) + if(mind.changeling) + stat("Chemical Storage", mind.changeling.chem_charges) + stat("Genetic Damage Time", mind.changeling.geneticdamage) return diff --git a/code/modules/mob/living/say.dm b/code/modules/mob/living/say.dm index 643f1d4cc8b..7aebd6ef676 100644 --- a/code/modules/mob/living/say.dm +++ b/code/modules/mob/living/say.dm @@ -246,10 +246,10 @@ var/list/department_radio_keys = list( italics = 1 if("changeling") - if(src.changeling) - for(var/mob/aChangeling in mob_list) - if(aChangeling.changeling || istype(aChangeling, /mob/dead/observer)) - aChangeling << "[gender=="male"?"Mr.":"Mrs."] [changeling.changelingID]: [message]" + if(mind && mind.changeling) + for(var/mob/Changeling in mob_list) + if((Changeling.mind && Changeling.mind.changeling) || istype(Changeling, /mob/dead/observer)) + Changeling << "[mind.changeling.changelingID]: [message]" return ////SPECIAL HEADSETS START else diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm index a8e3c73fd62..5a12b9e19d6 100644 --- a/code/modules/mob/mob.dm +++ b/code/modules/mob/mob.dm @@ -699,7 +699,7 @@ note dizziness decrements automatically in the mob's Life() proc. lying = 0 else lying = 1 - else if( stat || weakened || paralysis || resting || sleeping || (changeling && changeling.changeling_fakedeath) ) + else if( stat || weakened || paralysis || resting || sleeping || (status_flags & FAKEDEATH) ) lying = 1 canmove = 0 else if( stunned ) diff --git a/code/modules/mob/mob_defines.dm b/code/modules/mob/mob_defines.dm index 8280df8bf26..c4f274401d4 100644 --- a/code/modules/mob/mob_defines.dm +++ b/code/modules/mob/mob_defines.dm @@ -214,9 +214,6 @@ var/radar_open = 0 // nonzero is radar is open - //Datum holding changeling stuff - var/datum/changeling/changeling = null //TODO: Move this to living or carbon -Nodrak - var/obj/control_object //Used by admins to possess objects. All mobs should have this var //Whether or not mobs can understand other mobtypes. These stay in /mob so that ghosts can hear everything. diff --git a/code/modules/projectiles/projectile/change.dm b/code/modules/projectiles/projectile/change.dm index 3c1dcaee9a6..f2267e3723d 100644 --- a/code/modules/projectiles/projectile/change.dm +++ b/code/modules/projectiles/projectile/change.dm @@ -36,7 +36,7 @@ del(W) W.layer = initial(W.layer) W.loc = M.loc - W.dropped(src) + W.dropped(M) var/mob/living/new_mob @@ -54,18 +54,16 @@ Robot.mmi = new /obj/item/device/mmi(new_mob) Robot.mmi.transfer_identity(M) //Does not transfer key/client. if("metroid") - if(prob(50)) - new_mob = new /mob/living/carbon/metroid/adult(M.loc) - else - new_mob = new /mob/living/carbon/metroid(M.loc) + if(prob(50)) new_mob = new /mob/living/carbon/metroid/adult(M.loc) + else new_mob = new /mob/living/carbon/metroid(M.loc) new_mob.universal_speak = 1 - if("alien") + if("xeno") var/alien_caste = pick("Hunter","Sentinel","Drone","Larva") switch(alien_caste) if("Hunter") new_mob = new /mob/living/carbon/alien/humanoid/hunter(M.loc) if("Sentinel") new_mob = new /mob/living/carbon/alien/humanoid/sentinel(M.loc) if("Drone") new_mob = new /mob/living/carbon/alien/humanoid/drone(M.loc) - if("Larva") new_mob = new /mob/living/carbon/alien/larva(M.loc) + else new_mob = new /mob/living/carbon/alien/larva(M.loc) new_mob.universal_speak = 1 if("human") new_mob = new /mob/living/carbon/human(M.loc) @@ -83,6 +81,8 @@ var/mob/living/carbon/human/Human = new_mob Human.mutantrace = pick("lizard","golem","metroid","plant",4;"") + else + return new_mob.a_intent = "hurt" if(M.mind) diff --git a/code/setup.dm b/code/setup.dm index b9c670ed9ba..d4fd98917ca 100644 --- a/code/setup.dm +++ b/code/setup.dm @@ -348,6 +348,7 @@ var/list/global_mutations = list() // list of hidden mutation things #define CANSTUN 1 #define CANWEAKEN 2 #define CANPARALYSE 4 +#define FAKEDEATH 8192 //Replaces stuff like changeling.changeling_fakedeath #define DISFIGURED 16384 //I'll probably move this elsewhere if I ever get wround to writing a bitflag mob-damage system #define XENO_HOST 32768 //Tracks whether we're gonna be a baby alien's mummy.