From 6a17d66323fafaf7a0c7224ae7cdbed0eac2af84 Mon Sep 17 00:00:00 2001 From: Fermi Date: Sat, 11 May 2019 14:04:43 +0100 Subject: [PATCH] Should be most compiling errors fixed outside of outdated merge problems --- code/modules/surgery/organs/vocal_cords.dm | 11 +- .../code/datums/status_effects/chems.dm | 122 +++++++++--------- .../chemistry/reagents/fermi_reagents.dm | 25 ++-- .../reagents/chemistry/recipes/fermi.dm | 11 +- 4 files changed, 88 insertions(+), 81 deletions(-) diff --git a/code/modules/surgery/organs/vocal_cords.dm b/code/modules/surgery/organs/vocal_cords.dm index 887653f63e..6700acc201 100644 --- a/code/modules/surgery/organs/vocal_cords.dm +++ b/code/modules/surgery/organs/vocal_cords.dm @@ -677,7 +677,7 @@ /obj/item/organ/vocal_cords/velvet/speak_with(message) velvetspeech(message, owner, spans, base_multiplier) - next_command = world.time + (cooldown * cooldown_mod) + //next_command = world.time + (cooldown * cooldown_mod) ////////////////////////////////////// ///////////FermiChem////////////////// @@ -972,7 +972,6 @@ var/datum/status_effect/chem/enthrall/E = H.has_status_effect(/datum/status_effect/chem/enthrall) switch(E.phase) if(2 to INFINITY) - var/mob/living/M = V H.say("*awoo") E.cooldown += 1 @@ -994,8 +993,8 @@ var/datum/status_effect/chem/enthrall/E = C.has_status_effect(/datum/status_effect/chem/enthrall) switch(E.phase) if(2 to INFINITY) - C.Sleeping(20 * power_multiplier) - E.cooldown += 10 + C.Sleeping(20 * power_multiplier) + E.cooldown += 10 //STRIP else if((findtext(message, strip_words))) @@ -1071,7 +1070,7 @@ var/trigger2 = stripped_input(user, "Enter the effect.", MAX_MESSAGE_LEN) if ((findtext(trigger, custom_words_words))) if (trigger2 == "speak" || trigger2 == "echo") - var/trigger3 = stripped_input(user, "Enter the phrase spoken.", "Sentence", sentence, MAX_MESSAGE_LEN) + var/trigger3 = stripped_input(user, "Enter the phrase spoken.", MAX_MESSAGE_LEN) E.customTriggers[trigger] = list(trigger2, trigger3) else E.customTriggers[trigger] = trigger2 @@ -1083,7 +1082,6 @@ //CUSTOM OBJECTIVE else if((findtext(message, objective_words))) - cooldown = COOLDOWN_DAMAGE for(var/V in listeners) var/mob/living/carbon/human/H = V var/datum/status_effect/chem/enthrall/E = H.has_status_effect(/datum/status_effect/chem/enthrall) @@ -1127,7 +1125,6 @@ E.statusStrength = (5 * power_multiplier) E.cooldown += 5 - var/i = 0 //STUN if(findtext(message, stun_words)) for(var/V in listeners) diff --git a/modular_citadel/code/datums/status_effects/chems.dm b/modular_citadel/code/datums/status_effects/chems.dm index 0d59646e28..319f69e664 100644 --- a/modular_citadel/code/datums/status_effects/chems.dm +++ b/modular_citadel/code/datums/status_effects/chems.dm @@ -167,14 +167,17 @@ var/enthrallTally = 1 //Keeps track of the enthralling process var/resistanceTally = 0 //Keeps track of the resistance var/deltaResist //The total resistance added per resist click - var/deltaEnthrall //currently unused (i think) + //var/deltaEnthrall //currently unused (i think) var/phase = 1 //-1: resisted state, due to be removed.0: sleeper agent, no effects unless triggered 1: initial, 2: 2nd stage - more commands, 3rd: fully enthralled, 4th Mindbroken var/status = null //status effects var/statusStrength = 0 //strength of status effect - var/enthrallID //Enchanter's name/ID + var/mob/living/master //Enchanter's person + var/enthrallID //Enchanter's ckey + var/enthrallGender //Use master or mistress + //var/mob/living/master == null var/mental_capacity //Higher it is, lower the cooldown on commands, capacity reduces with resistance. - var/mental_cost //Current cost of custom triggers - var/mindbroken = FALSE //Not sure I use this, replaced with phase 4 + //var/mental_cost //Current cost of custom triggers + //var/mindbroken = FALSE //Not sure I use this, replaced with phase 4 var/datum/weakref/redirect_component1 //resistance var/datum/weakref/redirect_component2 //say var/distancelist = list(4,3,2,1.5,1,0.8,0.6,0.4,0.2) //Distance multipliers @@ -184,7 +187,7 @@ var/cooldown = 0 /datum/status_effect/chem/enthrall/on_apply(mob/living/carbon/M) - if(M.ID == enthrallID) + if(M.key == enthrallID) owner.remove_status_effect(src)//This shouldn't happen, but just in case redirect_component1 = WEAKREF(owner.AddComponent(/datum/component/redirect, list(COMSIG_LIVING_RESIST = CALLBACK(src, .proc/owner_resist)))) //Do resistance calc if resist is pressed# redirect_component2 = WEAKREF(owner.AddComponent(/datum/component/redirect, list(COMSIG_LIVING_SAY = CALLBACK(src, .proc/owner_say)))) //Do resistance calc if resist is pressed @@ -194,10 +197,27 @@ SEND_SIGNAL(M, COMSIG_ADD_MOOD_EVENT, "enthrall", /datum/mood_event/enthrall) /datum/status_effect/chem/enthrall/tick(mob/living/carbon/M) + + //chem calculations + if (owner.reagents.has_reagent("MKUltra")) + if (phase >= 2) + enthrallTally += phase + else + if (phase < 3) + deltaResist += 5//If you've no chem, then you break out quickly + if(prob(20)) + to_chat(owner, "Your mind starts to restore some of it's clarity as you feel the effects of the drug wain.") + if (mental_capacity <= 500 || phase == 4) + if (owner.reagents.has_reagent("mannitol")) + mental_capacity += 1 + if (owner.reagents.has_reagent("neurine")) + mental_capacity += 2 + + //mindshield check if(M.has_trait(TRAIT_MINDSHIELD)) resistanceTally += 5 if(prob(20)) - to_chat(owner, "You feel lucidity returning to your mind as the mindshield attempts to return your brain to normal function.") + to_chat(owner, "You feel lucidity returning to your mind as the mindshield buzzes, attempting to return your brain to normal function.") //phase specific events switch(phase) @@ -212,42 +232,38 @@ mental_capacity -= resistanceTally//leftover resistance per step is taken away from mental_capacity. enthrallTally = 0 to_chat(owner, "Your conciousness slips, as you sink deeper into trance.") - continue - if (resistanceTally > 100) + else if (resistanceTally > 100) enthrallTally *= 0.5 phase = -1 resistanceTally = 0 to_chat(owner, "You break free of the influence in your mind, your thoughts suddenly turning lucid!") owner.remove_status_effect(src) //If resisted in phase 1, effect is removed. - continue if(prob(10)) - to_chat(owner, "[pick("It feels so good to listen to [enthrallID.name].", "You can't keep your eyes off [enthrallID.name].", "[enthrallID.name]'s voice is making you feel so sleepy.", "You feel so comfortable with [enthrallID.name]", "[enthrallID.name] is so sexy and dominant, it feels right to obey them.")].") + to_chat(owner, "[pick("It feels so good to listen to [master.name].", "You can't keep your eyes off [master.name].", "[master.name]'s voice is making you feel so sleepy.", "You feel so comfortable with [master.name]", "[master.name] is so sexy and dominant, it feels right to obey them.")].") else if (2) //partially enthralled if (enthrallTally > 150) phase += 1 mental_capacity -= resistanceTally//leftover resistance per step is taken away from mental_capacity. enthrallTally = 0 - to_chat(owner, "Your mind gives, eagerly obeying and serving [enthrallID.name].") - to_chat(owner, "You are now fully enthralled to [enthrallID.name], and eager to follow their commands. However you find that in your intoxicated state you are much less likely to resort to violence, unless it is to defend your master. Equally you are unable to commit suicide, even if ordered to, as you cannot server your Master in death. ")//If people start using this as an excuse to be violent I'll just make them all pacifists so it's not OP. - continue - if (resistanceTally > 150) + to_chat(owner, "Your mind gives, eagerly obeying and serving [master.name].") + to_chat(owner, "You are now fully enthralled to [master.name], and eager to follow their commands. However you find that in your intoxicated state you are much less likely to resort to violence, unless it is to defend your [enthrallGender]. Equally you are unable to commit suicide, even if ordered to, as you cannot server your [enthrallGender] in death. ")//If people start using this as an excuse to be violent I'll just make them all pacifists so it's not OP. + else if (resistanceTally > 150) enthrallTally *= 0.5 phase -= 1 resistanceTally = 0 - to_chat(owner, "You manage to shake some of the entrancement from your addled mind, however you can still feel yourself drawn towards [enthrallID.name].") + to_chat(owner, "You manage to shake some of the entrancement from your addled mind, however you can still feel yourself drawn towards [master.name].") //owner.remove_status_effect(src) //If resisted in phase 1, effect is removed. Not at the moment, - continue else if (3)//fully entranced if (resistanceTally >= 250 && withdrawalTick >= 150) enthrallTally = 0 phase -= 1 resistanceTally = 0 - to_chat(owner, "The separation from you master sparks a small flame of resistance in yourself, as your mind slowly starts to return to normal.") + to_chat(owner, "The separation from you [enthrallGender] sparks a small flame of resistance in yourself, as your mind slowly starts to return to normal.") else if (4) //mindbroken - if (mental_capacity >= 499 || owner.getBrainLoss() >=20 || !M.has_reagent("MKUltra")) + if (mental_capacity >= 499 || owner.getBrainLoss() >=20 || !owner.reagents.has_reagent("MKUltra")) phase = 2 mental_capacity = 500 - E.customTriggers = list() + customTriggers = list() to_chat(owner, "Your mind starts to heal, fixing the damage caused by the massive ammounts of chem injected into your system earlier, .") M.slurring = 0 M.confused = 0 @@ -256,38 +272,24 @@ //distance calculations - switch(get_dist(enthrallID, owner)) + switch(get_dist(master, owner)) if(0 to 8)//If the enchanter is within range, increase enthrallTally, remove withdrawal subproc and undo withdrawal effects. - enthrallTally += distancelist[get_dist(enthrallID, owner)+1] - var/withdrawal = FALSE + enthrallTally += distancelist[get_dist(master, owner)+1] + withdrawal = FALSE if(withdrawalTick > 0) withdrawalTick -= 2 M.hallucination = max(0, M.hallucination - 2) M.stuttering = max(0, M.stuttering - 2) M.jitteriness = max(0, M.jitteriness - 2) if(9 to INFINITY)//If - var/withdrawal = TRUE - - //chem calculations - if (M.has_reagent("MKUltra")) - if (phase >= 2) - enthrallTally += phase - else - if (phase < 3) - deltaResist += 10//If you've no chem, then you break out quickly - to_chat(owner, "You're starting to miss your Master/Mistress.") - if (mental_capacity <= 500 || phase == 4) - if (owner.has_reagent("mannitol")) - mental_capacity += 1 - if (owner.has_reagent("neurine")) - mental_capacity += 2 + withdrawal = TRUE //Withdrawal subproc: if (withdrawal == TRUE)//Your minions are really REALLY needy. switch(withdrawalTick)//denial if(20 to 40)//Gives wiggle room, so you're not SUPER needy if(prob(10)) - to_chat(owner, "You're starting to miss your Master/Mistress.") + to_chat(owner, "You're starting to miss your [enthrallGender].") if(prob(10)) owner.adjustBrainLoss(0.5) to_chat(owner, "They'll surely be back soon") //denial @@ -298,7 +300,7 @@ to_chat(owner, "They are coming back, right...?") owner.adjustBrainLoss(1) if(prob(20)) - to_chat(owner, "I just need to be a good pet for Master, they'll surely return if I'm a good pet.") + to_chat(owner, "I just need to be a good pet for [enthrallGender], they'll surely return if I'm a good pet.") owner.adjustBrainLoss(-2) if(66) SEND_SIGNAL(M, COMSIG_CLEAR_MOOD_EVENT, "EnthMissing1") //Why does this not work? @@ -309,11 +311,11 @@ if(prob(30)) addtimer(CALLBACK(M, /mob/verb/a_intent_change, INTENT_HARM), 2) addtimer(CALLBACK(M, /mob/proc/click_random_mob), 2) - to_chat(owner, "You suddenly lash out at the station in anger for it keeping you away from your Master.") + to_chat(owner, "You suddenly lash out at the station in anger for it keeping you away from your [enthrallGender].") if(90) SEND_SIGNAL(M, COMSIG_CLEAR_MOOD_EVENT, "EnthMissing2") //Why does this not work? SEND_SIGNAL(M, COMSIG_ADD_MOOD_EVENT, "EnthMissing3", /datum/mood_event/enthrallmissing3) - to_chat(owner, "You need to find your Master at all costs, you can't hold yourself back anymore.") + to_chat(owner, "You need to find your [enthrallGender] at all costs, you can't hold yourself back anymore.") if(91 to 120)//depression if(prob(20)) owner.adjustBrainLoss(1) @@ -324,12 +326,12 @@ if(121) SEND_SIGNAL(M, COMSIG_CLEAR_MOOD_EVENT, "EnthMissing3") SEND_SIGNAL(M, COMSIG_ADD_MOOD_EVENT, "EnthMissing4", /datum/mood_event/enthrallmissing4) - to_chat(owner, "You can hardly find the strength to continue without your Master.") + to_chat(owner, "You can hardly find the strength to continue without your [enthrallGender].") if(120 to 140) //depression if(prob(25)) owner.SetStun(20, 0) owner.emote("cry")//does this exist? - to_chat(owner, "You're unable to hold back your tears, suddenly sobbing as the desire to see your Master oncemore overwhelms you.") + to_chat(owner, "You're unable to hold back your tears, suddenly sobbing as the desire to see your [enthrallGender] oncemore overwhelms you.") owner.adjustBrainLoss(2) owner.stuttering += 2 owner.jitteriness += 2 @@ -339,7 +341,7 @@ if(prob(20)) deltaResist += 5 if(prob(20)) - to_chat(owner, "Maybe you'll be okay without your Master.") + to_chat(owner, "Maybe you'll be okay without your [enthrallGender].") if(prob(10)) owner.adjustBrainLoss(1) M.hallucination += 5 @@ -370,7 +372,7 @@ else if("charge") owner.add_trait(TRAIT_GOTTAGOFAST, "MKUltra") status = "charged" - to_chat(owner, "Your Master's order fills you with a burst of speed!") + to_chat(owner, "Your [enthrallGender]'s order fills you with a burst of speed!") else if ("charged") if (statusStrength == 0) @@ -397,7 +399,7 @@ if (cooldown > 0) cooldown -= (1 + (mental_capacity/1000 )) else - to_chat(enthrallID, "Your pet [owner.name] appears to have finished internalising your last command.") + to_chat(master, "Your pet [owner.name] appears to have finished internalising your last command.") //Check for proximity of master DONE //Place triggerreacts here - create a dictionary of triggerword and effect. @@ -479,11 +481,11 @@ to_chat(owner, "Your mind is too far gone to even entertain the thought of resisting.") return else if (phase == 3 || withdrawal == FALSE) - to_chat(owner, "The presence of your Master fully captures the horizon of your mind, removing any thoughts of resistance.") + to_chat(owner, "The presence of your [enthrallGender] fully captures the horizon of your mind, removing any thoughts of resistance.") return else if (status == "Antiresist")//If ordered to not resist; resisting while ordered to not makes it last longer, and increases the rate in which you are enthralled. if (statusStrength > 0) - to_chat(owner, "The order from your Master to give in is conflicting with your attempt to resist, drawing you deeper into trance.") + to_chat(owner, "The order from your [enthrallGender] to give in is conflicting with your attempt to resist, drawing you deeper into trance.") statusStrength += 1 enthrallTally += 1 return @@ -502,18 +504,18 @@ else deltaResist *= 0.2 //chemical resistance, brain and annaphros are the key to undoing, but the subject has to to be willing to resist. - if (M.has_reagent("mannitol")) + if (owner.reagents.has_reagent("mannitol")) deltaResist *= 1.25 - if (M.has_reagent("neurine")) + if (owner.reagents.has_reagent("neurine")) deltaResist *= 1.5 if (!owner.has_trait(TRAIT_CROCRIN_IMMUNE) && M.canbearoused) - if (owner.has_reagent("anaphro")) + if (owner.reagents.has_reagent("anaphro")) deltaResist *= 1.5 - if (owner.has_reagent("anaphro+")) + if (owner.reagents.has_reagent("anaphro+")) deltaResist *= 2 - if (owner.has_reagent("aphro")) + if (owner.reagents.has_reagent("aphro")) deltaResist *= 0.75 - if (owner.has_reagent("aphro+")) + if (owner.reagents.has_reagent("aphro+")) deltaResist *= 0.5 //Antag resistance @@ -548,7 +550,7 @@ //Mental health could play a role too in the other direction //If master gives you a collar, you get a sense of pride - if(istype(owner.neck, /obj/item/clothing/neck/petcollar)) + if(istype(M.wear_neck, /obj/item/clothing/neck/petcollar)) deltaResist *= 0.5 if(owner.has_trait(TRAIT_CROCRIN_IMMUNE) || !owner.canbearoused) @@ -558,14 +560,10 @@ deltaResist /= phase//later phases require more resistance /datum/status_effect/chem/enthrall/proc/owner_say(message) //I can only hope this works - var/static/regex/owner_words = regex("[enthrallID.real_name]|[enthrallID.first_name()]") + var/static/regex/owner_words = regex("[master.real_name]|[master.first_name()]") if(findtext(message, owner_words)) - if(enthrallID.gender == FEMALE) - message = replacetext(lowertext(message), lowertext(enthrallID.real_name), "Mistress") - message = replacetext(lowertext(message), lowertext(enthrallID.first_name), "Mistress") - else - message = replacetext(lowertext(message), lowertext(enthrallID.real_name), "Master") - message = replacetext(lowertext(message), lowertext(enthrallID.first_name), "Master") + message = replacetext(lowertext(message), lowertext(master.real_name), "[enthrallGender]") + message = replacetext(lowertext(message), lowertext(master.name), "[enthrallGender]") return message /* /datum/status_effect/chem/OwO diff --git a/modular_citadel/code/modules/reagents/chemistry/reagents/fermi_reagents.dm b/modular_citadel/code/modules/reagents/chemistry/reagents/fermi_reagents.dm index f0bccabe49..fbd2be02a9 100644 --- a/modular_citadel/code/modules/reagents/chemistry/reagents/fermi_reagents.dm +++ b/modular_citadel/code/modules/reagents/chemistry/reagents/fermi_reagents.dm @@ -515,7 +515,7 @@ IMPORTANT FACTORS TO CONSIDER WHILE BALANCING return var/sizeConv = list("a" = 1, "b" = 2, "c" = 3, "d" = 4, "e" = 5) B.prev_size = B.size - B.cached_size = [sizeConv[B.size]] + B.cached_size = sizeConv[B.size] message_admins("init B size: [B.size], prev: [B.prev_size], cache = [B.cached_size], raw: [sizeConv[B.size]]") /datum/reagent/fermi/BElarger/on_mob_life(mob/living/carbon/M) //Increases breast size @@ -748,39 +748,46 @@ IMPORTANT FACTORS TO CONSIDER WHILE BALANCING overdose_threshold = 100 //If this is too easy to get 100u of this, then double it please. //addiction_threshold = 30 //addiction_stage1_end = 9999//Should never end. - var/creatorID //add here + var/creatorID //ckey var/creatorGender var/creatorName + var/mob/living/creator /datum/reagent/fermi/enthrall/on_mob_add(mob/living/carbon/M) ..() if(!creatorID) CRASH("Something went wrong in enthral creation") - else if(M.ID == creatorID) + else if(M.key == creatorID && creatorName == M.real_name) //same name AND same player - same instance of the player. (should work for clones?) var/obj/item/organ/vocal_cords/Vc = M.getorganslot(ORGAN_SLOT_VOICE) var/obj/item/organ/vocal_cords/nVc = new /obj/item/organ/vocal_cords/velvet Vc.Remove(M) nVc.Insert(M) qdel(Vc) - to_chat(M, "You feel your vocal chords tingle as your voice becomes more sultry.") + to_chat(M, "You feel your vocal chords tingle as your voice comes out in a more sultry tone.") + creator = M else M.apply_status_effect(/datum/status_effect/chem/enthrall) - var/datum/status_effect/chem/enthral/E = M.has_status_effect(/datum/status_effect/chem/enthrall) + var/datum/status_effect/chem/enthrall/E = M.has_status_effect(/datum/status_effect/chem/enthrall) E.enthrallID = creatorID + E.enthrallGender = creatorGender + E.master = creator + /datum/reagent/fermi/enthrall/on_mob_life(mob/living/carbon/M) - var/datum/status_effect/chem/enthral/E = M.has_status_effect(/datum/status_effect/chem/enthrall) + var/datum/status_effect/chem/enthrall/E = M.has_status_effect(/datum/status_effect/chem/enthrall) E.enthrallTally += 1 M.adjustBrainLoss(0.1) ..() /datum/reagent/fermi/enthrall/overdose_start(mob/living/carbon/M) M.add_trait(TRAIT_PACIFISM, "MKUltra") + var/datum/status_effect/chem/enthrall/E = M.has_status_effect(/datum/status_effect/chem/enthrall) if (!M.has_status_effect(/datum/status_effect/chem/enthrall)) M.apply_status_effect(/datum/status_effect/chem/enthrall) - var/datum/status_effect/chem/enthral/E = M.has_status_effect(/datum/status_effect/chem/enthrall) - E.enthrallID = creatorID - to_chat(M, "Your mind shatters under the volume of the mild altering chem inside of you, breaking all will and thought completely. Instead the only force driving you now is the instinctual desire to obey and follow [enthrallID.name].") + E.enthrallID = creatorID + E.enthrallGender = creatorGender + E.master = creator + to_chat(M, "Your mind shatters under the volume of the mild altering chem inside of you, breaking all will and thought completely. Instead the only force driving you now is the instinctual desire to obey and follow [creatorName].") M.slurring = 100 M.confused = 100 E.phase = 4 diff --git a/modular_citadel/code/modules/reagents/chemistry/recipes/fermi.dm b/modular_citadel/code/modules/reagents/chemistry/recipes/fermi.dm index f40792c849..d8b80a9c91 100644 --- a/modular_citadel/code/modules/reagents/chemistry/recipes/fermi.dm +++ b/modular_citadel/code/modules/reagents/chemistry/recipes/fermi.dm @@ -127,7 +127,12 @@ /datum/chemical_reaction/enthral/on_reaction(datum/reagents/holder) var/datum/reagent/blood/B = locate(/datum/reagent/blood) in holder.reagent_list var/datum/reagent/fermi/enthrall/E = locate(/datum/reagent/fermi/enthrall) in holder.reagent_list - E.creatorGender = B.["gender"] + if (B.["gender"] == "female") + E.creatorGender = "Mistress" + else + E.creatorGender = "Master" E.creatorName = B.["real_name"] - var/enthrallID = B.get_blood_data() - E.creatorID = enthrallID \ No newline at end of file + E.creatorID = B.["ckey"] + var/mob/living/creator = holder + E.creator = creator + //var/enthrallID = B.get_blood_data()