From dcdaf140796c3232fac597e55db9816494c8d068 Mon Sep 17 00:00:00 2001 From: CHOMPStation2StaffMirrorBot <94713762+CHOMPStation2StaffMirrorBot@users.noreply.github.com> Date: Mon, 10 Nov 2025 16:19:39 -0700 Subject: [PATCH] [MIRROR] Trait Upports & Tweaks (#11941) Co-authored-by: Cameron Lennox Co-authored-by: Kashargul <144968721+Kashargul@users.noreply.github.com> --- code/__defines/_reagents.dm | 3 +- code/__defines/_reagents_ch.dm | 2 - code/__defines/math.dm | 2 + code/__defines/math_ch.dm | 1 - code/__defines/traits.dm | 1 + code/__defines/traits/declarations.dm | 2 + code/datums/components/traits/absorbent.dm | 37 ++ code/datums/components/traits/burninlight.dm | 15 +- .../components/traits/crowd_detection.dm | 8 +- code/datums/components/traits/drippy.dm | 9 +- code/datums/components/traits/gargoyle.dm | 3 +- .../components/traits/hallucinations.dm} | 66 +-- code/datums/components/traits/low_sugar.dm | 38 ++ code/datums/components/traits/photosynth.dm | 15 +- code/datums/components/traits/weaver.dm | 8 +- code/modules/food/food/snacks.dm | 14 +- code/modules/mob/_modifiers/modifiers_misc.dm | 20 + code/modules/mob/living/carbon/carbon.dm | 4 +- .../living/carbon/human/species/species.dm | 12 +- .../station/station_special_abilities.dm | 2 +- .../human/species/station/traits/negative.dm | 145 +++++-- .../human/species/station/traits/neutral.dm | 79 +++- .../species/station/traits/neutral_ch.dm | 76 ---- .../human/species/station/traits/positive.dm | 389 ++++++++++++++++- .../species/station/traits/positive_ch.dm | 400 ------------------ code/modules/mob/living/life.dm | 2 - code/modules/mob/living/living_movement.dm | 4 +- code/modules/mob/mob_grab.dm | 2 - .../reagents/reactions/instant/instant.dm | 6 + code/modules/reagents/reagents/_reagents.dm | 2 +- code/modules/reagents/reagents/medicine.dm | 10 + .../human/species/station/traits/negative.dm | 90 ---- .../human/species/station/traits/neutral.dm | 38 +- .../human/species/station/traits/positive.dm | 86 ++-- vorestation.dme | 8 +- 35 files changed, 823 insertions(+), 776 deletions(-) delete mode 100644 code/__defines/math_ch.dm create mode 100644 code/datums/components/traits/absorbent.dm rename code/{modules/mob/living/carbon/human/species/station/traits/negative_ch.dm => datums/components/traits/hallucinations.dm} (62%) create mode 100644 code/datums/components/traits/low_sugar.dm delete mode 100644 code/modules/mob/living/carbon/human/species/station/traits/neutral_ch.dm delete mode 100644 code/modules/mob/living/carbon/human/species/station/traits/positive_ch.dm delete mode 100644 modular_chomp/code/modules/mob/living/carbon/human/species/station/traits/negative.dm diff --git a/code/__defines/_reagents.dm b/code/__defines/_reagents.dm index e4d5dbb6dd..b3cf9634b0 100644 --- a/code/__defines/_reagents.dm +++ b/code/__defines/_reagents.dm @@ -288,7 +288,8 @@ #define REAGENT_ID_EARTHSBLOOD "earthsblood" #define REAGENT_ASUSTENANCE "Artificial Sustenance" #define REAGENT_ID_ASUSTENANCE "a_sustenance" - +#define REAGENT_TERCOZOLAM "Tercozolam" +#define REAGENT_ID_TERCOZOLAM "tercozolam" // Virology #define REAGENT_VACCINE "Vaccine" diff --git a/code/__defines/_reagents_ch.dm b/code/__defines/_reagents_ch.dm index e779dbf020..8ce98d4ce9 100644 --- a/code/__defines/_reagents_ch.dm +++ b/code/__defines/_reagents_ch.dm @@ -41,8 +41,6 @@ #define REAGENT_ID_EDEN "eden" #define REAGENT_EDENSNAKE "Tainted Eden" #define REAGENT_ID_EDENSNAKE "eden_snake" -#define REAGENT_TERCOZOLAM "Tercozolam" -#define REAGENT_ID_TERCOZOLAM "tercozolam" #define REAGENT_HANNOA "Hannoa" #define REAGENT_ID_HANNOA "hannoa" #define REAGENT_BULLVALENE "bullvalene" diff --git a/code/__defines/math.dm b/code/__defines/math.dm index 4d141e562d..82dd3b046c 100644 --- a/code/__defines/math.dm +++ b/code/__defines/math.dm @@ -86,6 +86,8 @@ // Returns the nth root of x. #define ROOT(n, x) ((x) ** (1 / (n))) +#define GAUSSIAN_RANDOM(vars...) ((-2*log(rand()))**0.5 * cos(6.28318530718*rand())) + /proc/Mean(...) var/sum = 0 for(var/val in args) diff --git a/code/__defines/math_ch.dm b/code/__defines/math_ch.dm deleted file mode 100644 index a9be4c314e..0000000000 --- a/code/__defines/math_ch.dm +++ /dev/null @@ -1 +0,0 @@ -#define GAUSSIAN_RANDOM(vars...) ((-2*log(rand()))**0.5 * cos(6.28318530718*rand())) diff --git a/code/__defines/traits.dm b/code/__defines/traits.dm index 7bf8f25058..e82bf4e37e 100644 --- a/code/__defines/traits.dm +++ b/code/__defines/traits.dm @@ -215,5 +215,6 @@ Remember to update _globalvars/traits.dm if you're adding/removing/renaming trai #define STRONG_IMMUNITY_TRAIT "strongimmunity" +#define SLIP_REFLEX_TRAIT "slip_reflex" #define ORGANICS 1 #define SYNTHETICS 2 diff --git a/code/__defines/traits/declarations.dm b/code/__defines/traits/declarations.dm index 557f3d837c..16b13288c3 100644 --- a/code/__defines/traits/declarations.dm +++ b/code/__defines/traits/declarations.dm @@ -37,5 +37,7 @@ Remember to update _globalvars/traits.dm if you're adding/removing/renaming trai #define TRAIT_IGNORE_FIRE_PROTECTION "ignore_fire_protection" /// Owner will slam down heavily into the ground upon falling from a height! #define TRAIT_HEAVY_LANDING "trait_heavy_landing" +/// Owner is immune to ingested toxins. (Any reagent/toxin subtype) +#define INGESTED_TOXIN_IMMUNE "ingested_toxin_immune" /// If using melee, attacks will use the 'get_sparring_variant' if possible #define TRAIT_NONLETHAL_BLOWS "trait_nonlethal_blows" diff --git a/code/datums/components/traits/absorbent.dm b/code/datums/components/traits/absorbent.dm new file mode 100644 index 0000000000..0c8cd3b27b --- /dev/null +++ b/code/datums/components/traits/absorbent.dm @@ -0,0 +1,37 @@ +//Honestly this could be an element, but I don't want to aggressively refactor traits in an upport and cleanup PR. +/datum/component/absorbent + +/datum/component/absorbent/Initialize() + if(!ishuman(parent)) + return COMPONENT_INCOMPATIBLE + +/datum/component/absorbent/RegisterWithParent() + RegisterSignal(parent, COMSIG_MOVABLE_MOVED, PROC_REF(process_component)) + +/datum/component/absorbent/UnregisterFromParent() + UnregisterSignal(parent, list(COMSIG_MOVABLE_MOVED)) + +/datum/component/absorbent/proc/process_component() + SIGNAL_HANDLER + var/mob/living/carbon/human/H = parent + var/turf/T = get_turf(H) + if(istype(T)) + if(!(H.shoes || (H.wear_suit && (H.wear_suit.body_parts_covered & FEET)))) + //We do this first as it gives nutrition for each item on the turf. + for(var/obj/O in T) + if(O.wash(CLEAN_WASH)) + H.adjust_nutrition(rand(5, 15)) + + //Secondly, we check if the turf is a sim turf. If it's dirty, we get nutrition. + //The T.wash() below will clean it and set the dirt to 0. + if(istype(T, /turf/simulated)) + var/turf/simulated/turf_to_clean = T + if(turf_to_clean.dirt >= 50) + H.adjust_nutrition(rand(10, 20)) + //Third, we clean the turf itself. + if(T.wash(CLEAN_WASH)) + H.adjust_nutrition(rand(10, 20)) + + //Lastly, we clean ourself and all the items on us. + if(H.wash(CLEAN_WASH)) + H.adjust_nutrition(rand(5, 15)) diff --git a/code/datums/components/traits/burninlight.dm b/code/datums/components/traits/burninlight.dm index 29f4613af4..aeb2976003 100644 --- a/code/datums/components/traits/burninlight.dm +++ b/code/datums/components/traits/burninlight.dm @@ -1,5 +1,4 @@ /datum/component/burninlight - var/mob/living/owner // This is a merge of the old shadow species light burning life code, and Zaddat's handle_environment_special() proc. // It handles both cases, but shadows behave more like Zaddat do now. By default this code follows Zaddat damage with no healing. var/threshold = 0.2 // percent from 0 to 1 @@ -15,12 +14,17 @@ /datum/component/burninlight/Initialize() if(!isliving(parent)) return COMPONENT_INCOMPATIBLE - owner = parent - RegisterSignal(owner, COMSIG_LIVING_LIFE, PROC_REF(process_component)) + +/datum/component/burninlight/RegisterWithParent() + RegisterSignal(parent, COMSIG_LIVING_LIFE, PROC_REF(process_component)) + +/datum/component/burninlight/UnregisterFromParent() + UnregisterSignal(parent, list(COMSIG_LIVING_LIFE)) /datum/component/burninlight/proc/process_component() if(QDELETED(parent)) return + var/mob/living/owner = parent if(owner.stat == DEAD) return if(owner.is_incorporeal()) @@ -51,8 +55,3 @@ // heal in the dark, if possible else if(heal_rate > 0) owner.heal_overall_damage(heal_rate,heal_rate) - -/datum/component/burninlight/Destroy(force = FALSE) - UnregisterSignal(owner, COMSIG_LIVING_LIFE) - owner = null - . = ..() diff --git a/code/datums/components/traits/crowd_detection.dm b/code/datums/components/traits/crowd_detection.dm index fa04781cbb..8ff4aed238 100644 --- a/code/datums/components/traits/crowd_detection.dm +++ b/code/datums/components/traits/crowd_detection.dm @@ -22,10 +22,14 @@ if(!ishuman(parent)) return COMPONENT_INCOMPATIBLE human_parent = parent - RegisterSignal(human_parent, COMSIG_LIVING_LIFE, PROC_REF(handle_life)) + +/datum/component/crowd_detection/RegisterWithParent() + RegisterSignal(parent, COMSIG_LIVING_LIFE, PROC_REF(handle_life)) + +/datum/component/crowd_detection/UnregisterFromParent() + UnregisterSignal(parent, list(COMSIG_LIVING_LIFE)) /datum/component/crowd_detection/Destroy(force = FALSE) - UnregisterSignal(human_parent, COMSIG_LIVING_LIFE) human_parent = null . = ..() diff --git a/code/datums/components/traits/drippy.dm b/code/datums/components/traits/drippy.dm index 719143f6fb..acdbcc1a4d 100644 --- a/code/datums/components/traits/drippy.dm +++ b/code/datums/components/traits/drippy.dm @@ -3,13 +3,16 @@ var/blood_color = "#A10808" /datum/component/drippy/Initialize() - if(!isliving(parent)) return COMPONENT_INCOMPATIBLE +/datum/component/drippy/RegisterWithParent() RegisterSignal(parent, COMSIG_LIVING_LIFE, PROC_REF(process_component)) RegisterSignal(parent, COMSIG_HUMAN_DNA_FINALIZED, PROC_REF(create_color)) +/datum/component/drippy/UnregisterFromParent() + UnregisterSignal(parent, list(COMSIG_LIVING_LIFE, COMSIG_HUMAN_DNA_FINALIZED)) + /datum/component/drippy/proc/process_component() SIGNAL_HANDLER var/mob/living/living_guy = parent @@ -65,7 +68,3 @@ if(ishuman(parent)) var/mob/living/carbon/human/temp_human = parent blood_color = rgb(temp_human.r_skin,temp_human.g_skin,temp_human.b_skin) - -/datum/component/drippy/Destroy(force = FALSE) - UnregisterSignal(parent, list(COMSIG_LIVING_LIFE, COMSIG_HUMAN_DNA_FINALIZED)) - . = ..() diff --git a/code/datums/components/traits/gargoyle.dm b/code/datums/components/traits/gargoyle.dm index 77cbb4367d..1469d9b580 100644 --- a/code/datums/components/traits/gargoyle.dm +++ b/code/datums/components/traits/gargoyle.dm @@ -33,7 +33,8 @@ UnregisterSignal(parent, COMSIG_GARGOYLE_PAUSE) UnregisterSignal(parent, COMSIG_GARGOYLE_CHECK_ENERGY) UnregisterSignal(parent, COMSIG_LIVING_LIFE) - UnregisterSignal(parent, COMSIG_MOVABLE_MOVED) //happens if gargoyle_pause is used + if(paused) + UnregisterSignal(parent, COMSIG_MOVABLE_MOVED) //happens if gargoyle_pause is used /datum/component/gargoyle/proc/process_component() if(QDELETED(gargoyle)) diff --git a/code/modules/mob/living/carbon/human/species/station/traits/negative_ch.dm b/code/datums/components/traits/hallucinations.dm similarity index 62% rename from code/modules/mob/living/carbon/human/species/station/traits/negative_ch.dm rename to code/datums/components/traits/hallucinations.dm index b772385527..2a3522f75b 100644 --- a/code/modules/mob/living/carbon/human/species/station/traits/negative_ch.dm +++ b/code/datums/components/traits/hallucinations.dm @@ -1,57 +1,64 @@ -/datum/trait/negative/hollow - excludes = list(/datum/trait/positive/densebones) - -/datum/trait/negative/scrawny - name = "Scrawny" - desc = "You have a much harder time breaking free of grabs as well as creating and holding onto grabs on other people." - cost = -2 - var_changes = list("grab_resist_divisor_victims" = 0.5, "grab_resist_divisor_self" = 3, "grab_power_victims" = 1, "grab_power_self" = -1) - -/datum/trait/negative/deep_sleeper - name = "Deep Sleeper" - desc = "When you fall asleep, it takes you four times as long to wake up." - cost = -1 - var_changes = list("waking_speed" = 0.25) - -/datum/trait/negative/schizophrenia - name = "Episodic hallucinations." - desc = "You have a condition which causes you to spontaneously have hallucinations! Luckily for you, in the modern space age, our doctors have solutions for you, just make sure you don't forget to take your pills." - cost = -3 - special_env = TRUE - can_take = ORGANICS +///The schizophrenia / 'episodic hallucinations' trait, but componentized. +///There is a lot of math that I don't even want to try to fathom in this. +///There was also almost 0 commentation. +/datum/component/schizophrenia + ///The maximum amount of hallucinations we can have. var/hallucination_max = 60 + ///The amount of hallucinations to increase by each tick during an episode. var/hallucination_increase = 3 + var/episode_length_nomeds_avg = 4000 var/episode_length_nomeds_dev = 100 + var/episode_length_meds_avg = 2000 var/episode_length_meds_dev = 500 + var/break_length_nomeds_avg = 3000 var/break_length_nomeds_dev = 600 + var/break_length_meds_avg = 30000 var/break_length_meds_dev = 7000 + + //Holds the info if we're in an episode, when then next one will begin, and when it will end. var/list/episode = list("in_episode" = FALSE) -/datum/trait/negative/schizophrenia/apply(var/datum/species/S,var/mob/living/carbon/human/H) - ..() +/datum/component/schizophrenia/Initialize() + if(!ishuman(parent)) + return COMPONENT_INCOMPATIBLE episode["next_episode_begin"] = world.time + 6000 episode["next_episode_end"] = world.time + 9000 -/datum/trait/negative/schizophrenia/handle_environment_special(var/mob/living/carbon/human/H) - var/med_vol = get_med_volume(H) +/datum/component/schizophrenia/RegisterWithParent() + RegisterSignal(parent, COMSIG_LIVING_LIFE, PROC_REF(process_component)) + +/datum/component/schizophrenia/UnregisterFromParent() + UnregisterSignal(parent, list(COMSIG_LIVING_LIFE)) + +/datum/component/schizophrenia/proc/process_component() + SIGNAL_HANDLER + var/mob/living/carbon/human/human_guy = parent + if(QDELETED(parent)) + return + ///How much medication we currently have in our system. + var/med_vol = get_med_volume(human_guy) + if(!episode["in_episode"]) if(world.time > episode["next_episode_begin"]) episode["meds_at_beginning"] = med_vol episode["in_episode"] = TRUE + else if(episode["meds_at_end"] && !med_vol) //Meds ran out var/new_episode_begin = world.time + (episode["next_episode_begin"] - world.time)/10 episode["next_episode_end"] = new_episode_begin + (episode["next_episode_end"] - episode["next_episode_begin"]) episode["next_episode_begin"] = new_episode_begin episode["meds_at_end"] = FALSE + else if(!episode["meds_at_end"] && med_vol) //Meds were taken between episodes var/new_episode_begin = world.time + (episode["next_episode_begin"] - world.time)*10 episode["next_episode_end"] = new_episode_begin + (episode["next_episode_end"] - episode["next_episode_begin"]) episode["next_episode_begin"] = new_episode_begin episode["meds_at_end"] = TRUE + else if(world.time > episode["next_episode_end"]) episode["meds_at_end"] = med_vol @@ -65,14 +72,15 @@ else if(!episode["meds_at_beginning"] && med_vol) episode["next_episode_end"] = world.time + (episode["next_episode_end"] - world.time)/8 - H.hallucination = min(hallucination_max,H.hallucination + hallucination_increase) + human_guy.hallucination = min(hallucination_max,human_guy.hallucination + hallucination_increase) -/datum/trait/negative/schizophrenia/proc/get_med_volume(var/mob/living/carbon/human/H) +///Checks to see if we have tercozolam in our systeem and returns how much if so. +/datum/component/schizophrenia/proc/get_med_volume(mob/living/carbon/human/human_guy) var/total_vol = 0 - for(var/datum/reagent/reagent in H.bloodstr.reagent_list) + for(var/datum/reagent/reagent in human_guy.bloodstr.reagent_list) if(istype(reagent,/datum/reagent/tercozolam)) total_vol += reagent.volume - for(var/datum/reagent/reagent in H.ingested.reagent_list) + for(var/datum/reagent/reagent in human_guy.ingested.reagent_list) if(istype(reagent,/datum/reagent/tercozolam)) total_vol += reagent.volume return total_vol diff --git a/code/datums/components/traits/low_sugar.dm b/code/datums/components/traits/low_sugar.dm new file mode 100644 index 0000000000..6eaf3f10ea --- /dev/null +++ b/code/datums/components/traits/low_sugar.dm @@ -0,0 +1,38 @@ +///Component that gives negative effects when at low nutrition. +/datum/component/diabetic + var/nutrition_threshold = 200 + var/nutrition_weak = 100 + var/nutrition_danger = 50 + var/nutrition_critical = 25 + +/datum/component/diabetic/Initialize() + + if(!isliving(parent)) + return COMPONENT_INCOMPATIBLE + +/datum/component/diabetic/RegisterWithParent() + RegisterSignal(parent, COMSIG_LIVING_LIFE, PROC_REF(process_component)) + +/datum/component/diabetic/UnregisterFromParent() + UnregisterSignal(parent, list(COMSIG_LIVING_LIFE)) + +/datum/component/diabetic/proc/process_component() + SIGNAL_HANDLER + var/mob/living/living_guy = parent + if(living_guy.nutrition > nutrition_threshold || isbelly(living_guy.loc)) + return + if((living_guy.nutrition < nutrition_threshold) && prob(5)) + if(living_guy.nutrition > nutrition_weak) + to_chat(living_guy, span_warning("You start to feel noticeably weak as your stomach rumbles, begging for more food. Maybe you should eat something to keep your blood sugar up")) + else if(living_guy.nutrition > nutrition_danger) + to_chat(living_guy, span_warning("You begin to feel rather weak, and your stomach rumbles loudly. You feel lightheaded and it's getting harder to think. You really need to eat something.")) + else if(living_guy.nutrition > nutrition_critical) + to_chat(living_guy, span_danger("You're feeling very weak and lightheaded, and your stomach continously rumbles at you. You really need to eat something!")) + else + to_chat(living_guy,span_critical("You're feeling extremely weak and lightheaded. You feel as though you might pass out any moment and your stomach is screaming for food by now! You should really find something to eat!")) + if((living_guy.nutrition < nutrition_weak) && prob(10)) + living_guy.Confuse(10) + if((living_guy.nutrition < nutrition_danger) && prob(25)) + living_guy.hallucination = max(30,living_guy.hallucination+8) + if((living_guy.nutrition < nutrition_critical) && prob(5)) + living_guy.drowsyness = max(100,living_guy.drowsyness+30) diff --git a/code/datums/components/traits/photosynth.dm b/code/datums/components/traits/photosynth.dm index d681219bd9..b6b621e610 100644 --- a/code/datums/components/traits/photosynth.dm +++ b/code/datums/components/traits/photosynth.dm @@ -1,16 +1,20 @@ // If a mob has this component, every life tick it will gain nutrition if it's standing in light up to nutrition_max. // Extremely good tutorial component if you need an example with no special bells and whistles, and no "gotcha" behaviors. /datum/component/photosynth - var/mob/living/owner var/nutrition_max = 1000 /datum/component/photosynth/Initialize() if(!isliving(parent)) return COMPONENT_INCOMPATIBLE - owner = parent - RegisterSignal(owner, COMSIG_LIVING_LIFE, PROC_REF(process_component)) + +/datum/component/photosynth/RegisterWithParent() + RegisterSignal(parent, COMSIG_LIVING_LIFE, PROC_REF(process_component)) + +/datum/component/photosynth/UnregisterFromParent() + UnregisterSignal(parent, list(COMSIG_LIVING_LIFE)) /datum/component/photosynth/proc/process_component() + var/mob/living/owner = parent if(QDELETED(parent)) return if(owner.stat == DEAD) @@ -25,8 +29,3 @@ return var/turf/T = owner.loc owner.adjust_nutrition(T.get_lumcount() / 10) - -/datum/component/photosynth/Destroy(force = FALSE) - UnregisterSignal(owner, COMSIG_LIVING_LIFE) - owner = null - . = ..() diff --git a/code/datums/components/traits/weaver.dm b/code/datums/components/traits/weaver.dm index 92db42a89e..4a77e272cb 100644 --- a/code/datums/components/traits/weaver.dm +++ b/code/datums/components/traits/weaver.dm @@ -22,20 +22,24 @@ add_verb(owner, /mob/living/carbon/human/proc/enter_cocoon) //Processing - RegisterSignal(owner, COMSIG_LIVING_LIFE, PROC_REF(process_component)) /datum/component/weaver/proc/process_component() if (QDELETED(parent)) return process_weaver_silk() /datum/component/weaver/Destroy(force = FALSE) - UnregisterSignal(owner, COMSIG_LIVING_LIFE) //IF we registered a signal, we need to unregister it. remove_verb(owner, /mob/living/proc/weaver_control_panel) if(ishuman(parent)) remove_verb(owner, /mob/living/carbon/human/proc/enter_cocoon) owner = null . = ..() +/datum/component/weaver/RegisterWithParent() + RegisterSignal(parent, COMSIG_LIVING_LIFE, PROC_REF(process_component)) + +/datum/component/weaver/UnregisterFromParent() + UnregisterSignal(parent, list(COMSIG_LIVING_LIFE)) + /datum/component/weaver/proc/process_weaver_silk() if(silk_reserve < silk_max_reserve && silk_production == TRUE && owner.nutrition > 100) silk_reserve = min(silk_reserve + silk_generation_amount, silk_max_reserve) diff --git a/code/modules/food/food/snacks.dm b/code/modules/food/food/snacks.dm index e4873356ea..f13e85138e 100644 --- a/code/modules/food/food/snacks.dm +++ b/code/modules/food/food/snacks.dm @@ -259,16 +259,12 @@ else if(reagents) //Handle ingestion of the reagent. playsound(eater, eating_sound, rand(10,50), 1) if(reagents.total_volume) - //CHOMPStation Edit Begin var/bite_mod = 1 - var/mob/living/carbon/human/human = eater - if(istype(human)) - bite_mod = human.species.bite_mod - if(reagents.total_volume > bitesize*bite_mod) - reagents.trans_to_mob(eater, bitesize*bite_mod, CHEM_INGEST) - //CHOMPStation Edit End - if(reagents.total_volume > bitesize) - reagents.trans_to_mob(eater, bitesize, CHEM_INGEST) + var/mob/living/carbon/human/human_eater = eater + if(istype(human_eater)) + bite_mod = human_eater.species.bite_mod + if(reagents.total_volume > bitesize * bite_mod) + reagents.trans_to_mob(eater, bitesize * bite_mod, CHEM_INGEST) else reagents.trans_to_mob(eater, reagents.total_volume, CHEM_INGEST) bitecount++ diff --git a/code/modules/mob/_modifiers/modifiers_misc.dm b/code/modules/mob/_modifiers/modifiers_misc.dm index 4095911a0e..0b3a64f082 100644 --- a/code/modules/mob/_modifiers/modifiers_misc.dm +++ b/code/modules/mob/_modifiers/modifiers_misc.dm @@ -442,6 +442,26 @@ the artifact triggers the rage. name = "Thick Digits" desc = "Your hands cannot properly wield weapons." +/datum/modifier/trait/empresist + name = "Emp Resist" + desc = "You are resistant to EMPs." + emp_modifier = 1 + +/datum/modifier/trait/empresistb + name = "Major Emp Resist" + desc = "You are resistant to EMPs." + emp_modifier = 2 + +/datum/modifier/trait/empweakness + name = "Emp Weakness" + desc = "You are weak to EMPs." + emp_modifier = -1 + +/datum/modifier/trait/majorempweakness + name = "Major Emp Weakness" + desc = "You are weak to EMPs." + emp_modifier = -2 + /datum/modifier/rednet //Not used here currently, but used downstream. Todo: Port it. mob_overlay_state = "red_electricity_constant" slowdown = 1 diff --git a/code/modules/mob/living/carbon/carbon.dm b/code/modules/mob/living/carbon/carbon.dm index d50256e588..db29dca986 100644 --- a/code/modules/mob/living/carbon/carbon.dm +++ b/code/modules/mob/living/carbon/carbon.dm @@ -401,10 +401,10 @@ stop_pulling() to_chat(src, span_warning("You slipped on [slipped_on]!")) playsound(src, 'sound/misc/slip.ogg', 50, 1, -3) - if(slip_reflex && !lying) //CHOMPEdit Start + if(HAS_TRAIT(src, SLIP_REFLEX_TRAIT) && !lying) if(world.time >= next_emote) src.emote("sflip") - return 1 //CHOMPEdit End + return TRUE Weaken(FLOOR(stun_duration/2, 1)) return TRUE diff --git a/code/modules/mob/living/carbon/human/species/species.dm b/code/modules/mob/living/carbon/human/species/species.dm index 925828b108..b331e71d70 100644 --- a/code/modules/mob/living/carbon/human/species/species.dm +++ b/code/modules/mob/living/carbon/human/species/species.dm @@ -366,13 +366,13 @@ var/lleill_energy = 200 var/lleill_energy_max = 200 - var/bite_mod = 1 //NYI - Used Downstream - var/grab_resist_divisor_victims = 1 //NYI - Used Downstream - var/grab_resist_divisor_self = 1 //NYI - Used Downstream - var/grab_power_victims = 0 //NYI - Used Downstream - var/grab_power_self = 0 //NYI - Used Downstream + var/bite_mod = 1 + var/grab_resist_divisor_victims = 1 + var/grab_resist_divisor_self = 1 + var/grab_power_victims = 0 + var/grab_power_self = 0 var/waking_speed = 1 //NYI - Used Downstream - var/lightweight_light = 0 //NYI - Used Downstream + var/lightweight_light = 0 var/unarmed_bonus = 0 //do you have stronger unarmed attacks? var/shredding = FALSE //do you shred when attacking? Affects escaping restraints, and punching normally unpunchable things diff --git a/code/modules/mob/living/carbon/human/species/station/station_special_abilities.dm b/code/modules/mob/living/carbon/human/species/station/station_special_abilities.dm index 92d2913ae1..50af83a9b4 100644 --- a/code/modules/mob/living/carbon/human/species/station/station_special_abilities.dm +++ b/code/modules/mob/living/carbon/human/species/station/station_special_abilities.dm @@ -1364,4 +1364,4 @@ var/eggs = 0 to_chat(T, span_danger("You feel a stabbing pain as you are stung!")) src.visible_message(span_infoplain(span_red("[src] sinks their stinger into [T]!"))) T.bloodstr.add_reagent(REAGENT_ID_CONDENSEDCAPSAICINV,3) - last_special = world.time + 50 // Many little jabs instead of one big one + last_special = world.time + (5 SECONDS) // Many little jabs instead of one big one diff --git a/code/modules/mob/living/carbon/human/species/station/traits/negative.dm b/code/modules/mob/living/carbon/human/species/station/traits/negative.dm index bf8d1295af..81b2fc1cde 100644 --- a/code/modules/mob/living/carbon/human/species/station/traits/negative.dm +++ b/code/modules/mob/living/carbon/human/species/station/traits/negative.dm @@ -138,7 +138,7 @@ name = "Hollow Bones/Aluminum Alloy" desc = "Your bones and robot limbs are much easier to break." cost = -2 //I feel like this should be higher, but let's see where it goes - excludes = list(/datum/trait/negative/boneless) + excludes = list(/datum/trait/negative/boneless, /datum/trait/positive/densebones) /datum/trait/negative/hollow/apply(var/datum/species/S,var/mob/living/carbon/human/H) ..() @@ -160,6 +160,7 @@ activation_message="You feel off balance..." primitive_expression_messages=list("staggers") + excludes = list(/datum/trait/negative/lightweight_light) /datum/trait/negative/neural_hypersensitivity name = "Neural Hypersensitivity" @@ -195,6 +196,11 @@ desc = "You breathe methane instead of oxygen (which is poisonous to you)." var_changes = list("breath_type" = GAS_CH4, "poison_type" = GAS_O2, "ideal_air_type" = /datum/gas_mixture/belly_air/methane_breather) +/datum/trait/negative/breathes/carbon_dioxide + name = "Carbon Dioxide Breather" + desc = "You breathe carbon dioxide instead of oxygen, much like a plant. Oxygen is not poisonous to you." + var_changes = list("breath_type" = GAS_CO2, "exhale_type" = GAS_O2, "ideal_air_type" = /datum/gas_mixture/belly_air/carbon_dioxide_breather) + /datum/trait/negative/monolingual name = "Monolingual" desc = "You are not good at learning languages." @@ -276,35 +282,15 @@ name = "Low Blood Sugar" desc = "If you let your nutrition get too low, you will start to experience adverse affects including hallucinations, unconsciousness, and weakness" cost = -1 - special_env = TRUE // Traitgenes Made into a gene trait is_genetrait = TRUE hidden = FALSE + added_component_path = /datum/component/diabetic activation_message="You feel drowsy..." primitive_expression_messages=list("looks drowsy") -/datum/trait/negative/low_blood_sugar/handle_environment_special(var/mob/living/carbon/human/H) - if(H.nutrition > 200 || isbelly(H.loc)) - return - if((H.nutrition < 200) && prob(5)) - if(H.nutrition > 100) - to_chat(H,span_warning("You start to feel noticeably weak as your stomach rumbles, begging for more food. Maybe you should eat something to keep your blood sugar up")) - else if(H.nutrition > 50) - to_chat(H,span_warning("You begin to feel rather weak, and your stomach rumbles loudly. You feel lightheaded and it's getting harder to think. You really need to eat something.")) - else if(H.nutrition > 25) - to_chat(H,span_danger("You're feeling very weak and lightheaded, and your stomach continously rumbles at you. You really need to eat something!")) - else - to_chat(H,span_critical("You're feeling extremely weak and lightheaded. You feel as though you might pass out any moment and your stomach is screaming for food by now! You should really find something to eat!")) - if((H.nutrition < 100) && prob(10)) - H.Confuse(10) - if((H.nutrition < 50) && prob(25)) - H.hallucination = max(30,H.hallucination+8) - if((H.nutrition < 25) && prob(5)) - H.drowsyness = max(100,H.drowsyness+30) - - /datum/trait/negative/blindness name = "Permanently blind" desc = "You are blind. For whatever reason, nothing is able to change this fact, not even surgery. WARNING: YOU WILL NOT BE ABLE TO SEE ANY POSTS USING THE ME VERB, ONLY SUBTLE AND DIALOGUE ARE VIEWABLE TO YOU, YOU HAVE BEEN WARNED." @@ -421,18 +407,11 @@ desc = "Some say that when it rains, it pours. Unfortunately, this is also true for yourself if you get cut. You bleed much faster than average, at 3x the normal rate." cost = -3 can_take = ORGANICS + var_changes = list("bloodloss_rate" = 3) - activation_message="You feel " + activation_message="You feel like your skin is made of paper!" primitive_expression_messages=list("bumps their toe, screaming in pain") -/datum/trait/negative/haemophilia_plus/apply(var/datum/species/S,var/mob/living/carbon/human/H) - ..() - H.add_modifier(/datum/modifier/trait/haemophilia) - -/datum/trait/negative/haemophilia_plus/unapply(var/datum/species/S,var/mob/living/carbon/human/H) - ..() - H.remove_modifiers_of_type(/datum/modifier/trait/haemophilia) - /datum/trait/negative/pain_intolerance_basic name = "Pain Intolerance" desc = "You are frail and sensitive to pain. You experience 25% more pain from all sources." @@ -488,7 +467,7 @@ desc = "Even the tiniest particles of dirt give you uneasy footing, even through several layers of footwear." cost = -5 var_changes = list("dirtslip" = TRUE) - excludes = list(/datum/trait/positive/absorbent) // CHOMPAdd + excludes = list(/datum/trait/positive/absorbent) /datum/trait/negative/thick_digits name = "Thick Digits" @@ -680,6 +659,108 @@ else if(istype(ex_organ, /obj/item/organ/external/chest)) ex_organ.encased = FALSE +/datum/trait/negative/deep_sleeper + name = "Deep Sleeper" + desc = "When you fall asleep, it takes you four times as long to wake up." + cost = -1 + var_changes = list("waking_speed" = 0.25) + custom_only = FALSE + +/datum/trait/negative/deep_breather + name ="Deep Breather" + desc = "You need more air for your lungs to properly work.." + cost = -1 + + custom_only = FALSE + can_take = ORGANICS + + var_changes = list("minimum_breath_pressure" = 18) + excludes = list(/datum/trait/positive/light_breather) + + +/*EMP traits. Noting this down because I was like 'what is the difference between emp_dmg_mod and the modifier?' + * emp_dmg_mod: If the species has emp_sensitivity bitflag of EMP_BRUTE_DMG, EMP_BURN_DMG, EMP_TOX_DMG, or EMP_OXY_DMG, damage is multiplied by that. + * As of the time of writing this, the ONLY species with those bitflags are proteans...Meaning this has been a free trait FOREVER for synths. + * The modifier, however, makes everything inside of you (organs, limbs, items) get EMP'd as if it was 1 severity more severe (or 2 if using the major trait) +*/ +/datum/trait/negative/faultwires + name = "Faulty Wires" + desc = "Due to poor construction, you have an unfortante weakness to EMPs." + cost = -3 + custom_only = FALSE + can_take = SYNTHETICS + var_changes = list("emp_dmg_mod" = 1.3, "emp_stun_mod" = 1.3, "emp_sensitivity" = (EMP_BLIND | EMP_DEAFEN | EMP_BRUTE_DMG | EMP_BURN_DMG | EMP_CONFUSE)) + excludes = list(/datum/trait/negative/poorconstruction, /datum/trait/positive/emp_resist, /datum/trait/positive/emp_resist_major) + +/datum/trait/negative/faultwires/apply(var/datum/species/S,var/mob/living/carbon/human/H) + ..() + H.add_modifier(/datum/modifier/trait/empweakness) + +/datum/trait/negative/poorconstruction + name = "Poor Construction" + desc = "Due to poor construction, you have an hefty weakness to EMPs." + cost = -5 + custom_only = FALSE + can_take = SYNTHETICS + var_changes = list("emp_dmg_mod" = 1.6, "emp_stun_mod" = 1.6, "emp_sensitivity" = (EMP_BLIND | EMP_DEAFEN | EMP_BRUTE_DMG | EMP_BURN_DMG | EMP_CONFUSE | EMP_WEAKEN)) + excludes = list(/datum/trait/negative/faultwires, /datum/trait/positive/emp_resist, /datum/trait/positive/emp_resist_major) + +/datum/trait/negative/poorconstruction/apply(var/datum/species/S,var/mob/living/carbon/human/H) + ..() + H.add_modifier(/datum/modifier/trait/majorempweakness) + +/datum/trait/negative/meltable + name = "Water Weakness" + desc = "Due to your biology, water is harmful to you." + cost = -1 + custom_only = TRUE + var_changes = list("water_resistance" = 0, "water_damage_mod" = 0.3) + excludes = list(/datum/trait/negative/meltable_major) + +/datum/trait/negative/meltable_major + name = "Extreme Water Weakness" + desc = "Due to your biology, water is very harmful to you." + cost = -3 + custom_only = TRUE + var_changes = list("water_resistance" = 0, "water_damage_mod" = 0.8) + excludes = list(/datum/trait/negative/meltable) + +/datum/trait/negative/lightweight_light + name = "Lesser Lightweight" + desc = "Your light weight and poor balance make you very susceptible to unhelpful bumping if you are unprepared)" + cost = -1 + var_changes = list("lightweight_light" = 1) + excludes = list(/datum/trait/negative/lightweight) + custom_only = FALSE + +/datum/trait/negative/scrawny + name = "Scrawny" + desc = "You have a much harder time breaking free of grabs as well as creating and holding onto grabs on other people." + cost = -2 + var_changes = list("grab_resist_divisor_victims" = 0.5, "grab_resist_divisor_self" = 3, "grab_power_victims" = 1, "grab_power_self" = -1) + +/datum/trait/negative/schizophrenia + name = "Episodic hallucinations." + desc = "You have a condition which causes you to spontaneously have hallucinations! Luckily for you, in the modern space age, our doctors have solutions for you, just make sure you don't forget to take your pills." + cost = -3 + custom_only = FALSE + special_env = TRUE + can_take = ORGANICS + added_component_path = /datum/component/schizophrenia + hidden = FALSE //Disabled on Vorestation //CHOMPEnable + +/datum/trait/negative/synth_pain + name = "Obligate Pain Simulation" + desc = "Due to a structural flaw, hard-coding, or other inherent weakness, your body can feel pain, and you can't turn it off." + cost = -4 + custom_only = FALSE + can_take = SYNTHETICS + excludes = list(/datum/trait/neutral/synth_cosmetic_pain) + +/datum/trait/negative/synth_pain/apply(datum/species/S, mob/living/carbon/human/H, trait_prefs) + H.synth_cosmetic_pain = TRUE + . = ..() + /datum/trait/negative/rad_weakness name = "Radiation Weakness" desc = "You are approximately 50% more susceptible to radiation, and it dissipates slower from your body." diff --git a/code/modules/mob/living/carbon/human/species/station/traits/neutral.dm b/code/modules/mob/living/carbon/human/species/station/traits/neutral.dm index 6d18cde8f8..fc21e3ebd1 100644 --- a/code/modules/mob/living/carbon/human/species/station/traits/neutral.dm +++ b/code/modules/mob/living/carbon/human/species/station/traits/neutral.dm @@ -5,26 +5,37 @@ name = "Metabolism, Fast" desc = "You process ingested and injected reagents faster, but get hungry faster (Teshari speed)." cost = 0 + can_take = ORGANICS|SYNTHETICS var_changes = list("metabolic_rate" = 1.2, "hunger_factor" = 0.2, "metabolism" = 0.06) // +20% rate and 4x hunger (Teshari level) - excludes = list(/datum/trait/neutral/metabolism_down, /datum/trait/neutral/metabolism_apex) + excludes = list(/datum/trait/neutral/metabolism_down, /datum/trait/neutral/metabolism_apex, /datum/trait/neutral/singularity_metabolism) custom_only = FALSE /datum/trait/neutral/metabolism_down name = "Metabolism, Slow" desc = "You process ingested and injected reagents slower, but get hungry slower." cost = 0 + can_take = ORGANICS|SYNTHETICS var_changes = list("metabolic_rate" = 0.8, "hunger_factor" = 0.04, "metabolism" = 0.0012) // -20% of default. - excludes = list(/datum/trait/neutral/metabolism_up, /datum/trait/neutral/metabolism_apex) + excludes = list(/datum/trait/neutral/metabolism_up, /datum/trait/neutral/metabolism_apex, /datum/trait/neutral/singularity_metabolism) custom_only = FALSE /datum/trait/neutral/metabolism_apex name = "Metabolism, Apex" desc = "Finally a proper excuse for your predatory actions. Essentially doubles the fast trait rates. Good for characters with big appetites." cost = 0 + can_take = ORGANICS|SYNTHETICS var_changes = list("metabolic_rate" = 1.4, "hunger_factor" = 0.4, "metabolism" = 0.012) // +40% rate and 8x hunger (Double Teshari) - excludes = list(/datum/trait/neutral/metabolism_up, /datum/trait/neutral/metabolism_down) + excludes = list(/datum/trait/neutral/metabolism_up, /datum/trait/neutral/metabolism_down, /datum/trait/neutral/singularity_metabolism) custom_only = FALSE +/datum/trait/neutral/singularity_metabolism + name = "Metabolism, Singularity" + desc = "You are insanely hungry. You can seemingly never get enough to eat. Perhaps you had a singularity as an ancestor, or maybe one is currently living inside of your gut." + cost = 0 + var_changes = list("metabolic_rate" = 2, "hunger_factor" = 1.6, "metabolism" = 0.012) //2x metabolism speed, 32x hunger speed + custom_only = FALSE + excludes = list(/datum/trait/neutral/metabolism_up, /datum/trait/neutral/metabolism_down, /datum/trait/neutral/metabolism_apex) + /datum/trait/neutral/coldadapt name = "Temp. Adapted, Cold" desc = "You are able to withstand much colder temperatures than other species. You are also more vulnerable to hot environments." @@ -353,6 +364,13 @@ ..() add_verb(H, /mob/living/proc/shred_limb) +/datum/trait/neutral/hardfeet + name = "Hard Feet" // Free protection 4 ur pawbs + desc = "Makes your nice clawed, scaled, hooved, armored, or otherwise just awfully calloused feet immune to glass shards." + cost = 0 + custom_only = FALSE + var_changes = list("flags" = NO_MINOR_CUT) //Checked the flag is only used by shard stepping. + /datum/trait/neutral/trashcan name = "Trash Can" desc = "Allows you to dispose of some garbage on the go instead of having to look for a bin or littering like an animal." @@ -1799,6 +1817,61 @@ ..() ADD_TRAIT(H, STRONG_IMMUNITY_TRAIT, ROUNDSTART_TRAIT) +/datum/trait/neutral/hide + name = "Hide" + desc = "You can hide beneath objects!" + cost = 0 + custom_only = FALSE + +/datum/trait/neutral/hide/apply(var/datum/species/S,var/mob/living/carbon/human/H) + ..() + add_verb(H,/mob/living/proc/hide) + +/datum/trait/neutral/small_mouth_extreme + name = "Slow Eater" + desc = "It takes four times as many bites to finish food as it does for most people." + cost = 0 + var_changes = list("bite_mod" = 0.25) + custom_only = FALSE + +/datum/trait/neutral/small_mouth + name = "Slow Eater, Minor" + desc = "It takes twice as many bites to finish food as it does for most people." + cost = 0 + var_changes = list("bite_mod" = 0.5) + custom_only = FALSE + +/datum/trait/neutral/big_mouth + name = "Fast Eater, Minor" + desc = "It takes half as many bites to finish food as it does for most people." + cost = 0 + var_changes = list("bite_mod" = 2) + custom_only = FALSE + +/datum/trait/neutral/big_mouth_extreme + name = "Fast Eater" + desc = "It takes a quarter as many bites to finish food as it does for most people." + cost = 0 + var_changes = list("bite_mod" = 4) + custom_only = FALSE + +// Doing this BC I can't rename the datum without fucking over savefiles, so meh. Hyper > Extreme, right? +/datum/trait/neutral/big_mouth_hyper + name = "Fast Eater, Major" + desc = "You will eat anything instantly, in one bite." + cost = 0 + var_changes = list("bite_mod" = 16) // Setting this intentionally ridiculously high, so anything will overflow and be eaten in one go. + custom_only = FALSE + +/datum/trait/neutral/slip_reflex + name ="Slippery Reflexes" + desc = "Your reflexes are quick enough to react to slippery surfaces. You are not immune though." + cost = 0 + +/datum/trait/neutral/slip_reflex/apply(var/datum/species/S,var/mob/living/carbon/human/H) + ..() + ADD_TRAIT(H, SLIP_REFLEX_TRAIT, ROUNDSTART_TRAIT) + /datum/trait/neutral/glowing_radiation name = "Radioactive Glow" desc = "You emit a glow when exposed to radiation! This does not prevent you from being harmed by radiation." diff --git a/code/modules/mob/living/carbon/human/species/station/traits/neutral_ch.dm b/code/modules/mob/living/carbon/human/species/station/traits/neutral_ch.dm deleted file mode 100644 index cff1b3e3fb..0000000000 --- a/code/modules/mob/living/carbon/human/species/station/traits/neutral_ch.dm +++ /dev/null @@ -1,76 +0,0 @@ -/datum/trait/neutral/mobegglaying - name = "Egg Laying" - desc = "You can lay eggs, much like an avian." - cost = 0 - -/datum/trait/neutral/mobegglaying/apply(var/datum/species/S,var/mob/living/carbon/human/H) - ..() - add_verb(H,/mob/living/proc/mobegglaying) //CHOMPEdit TGPanel - -/datum/trait/neutral/succubus_bite - name = "Succubus Bite" - desc = "Allows you to inject your prey with poison, much like a venemous snake." - cost = 0 - custom_only = FALSE //CHOMPEdit I hate custom only - -/datum/trait/neutral/succubus_bite/apply(var/datum/species/S,var/mob/living/carbon/human/H) - ..() - add_verb(H,/mob/living/proc/succubus_bite) //CHOMPEdit TGPanel - -/datum/trait/neutral/singularity_metabolism - name = "Metabolism, Singularity" - desc = "You are insanely hungry. You can seemingly never get enough to eat. Perhaps you had a singularity as an ancestor, or maybe one is currently living inside of your gut." - cost = 0 - var_changes = list("metabolic_rate" = 2, "hunger_factor" = 1.6, "metabolism" = 0.012) //2x metabolism speed, 32x hunger speed - custom_only = FALSE - -/datum/trait/neutral/hardfeet - name = "Hard Feet" // Free protection 4 ur pawbs - desc = "Makes your nice clawed, scaled, hooved, armored, or otherwise just awfully calloused feet immune to glass shards." - cost = 0 //CHOMP Edit - var_changes = list("flags" = NO_MINOR_CUT) //Checked the flag is only used by shard stepping. - -/datum/trait/neutral/small_mouth_extreme - name = "Slow Eater" - desc = "It takes four times as many bites to finish food as it does for most people." - cost = 0 - var_changes = list("bite_mod" = 0.25) - custom_only = FALSE - -/datum/trait/neutral/small_mouth - name = "Slow Eater, Minor" - desc = "It takes twice as many bites to finish food as it does for most people." - cost = 0 - var_changes = list("bite_mod" = 0.5) - custom_only = FALSE - -/datum/trait/neutral/big_mouth - name = "Fast Eater, Minor" - desc = "It takes half as many bites to finish food as it does for most people." - cost = 0 - var_changes = list("bite_mod" = 2) - custom_only = FALSE - -/datum/trait/neutral/big_mouth_extreme - name = "Fast Eater" - desc = "It takes a quarter as many bites to finish food as it does for most people." - cost = 0 - var_changes = list("bite_mod" = 4) - custom_only = FALSE - -// Doing this BC I can't rename the datum without fucking over savefiles, so meh. Hyper > Extreme, right? -/datum/trait/neutral/big_mouth_hyper - name = "Fast Eater, Major" - desc = "You will eat anything instantly, in one bite." - cost = 0 - var_changes = list("bite_mod" = 16) // Setting this intentionally ridiculously high, so anything will overflow and be eaten in one go. - custom_only = FALSE - -/datum/trait/neutral/slip_reflex - name ="Slippery Reflexes" - desc = "Your reflexes are quick enough to react to slippery surfaces. You are not immune though." - cost = 0 - -/datum/trait/neutral/slip_reflex/apply(var/datum/species/S,var/mob/living/carbon/human/H) - ..() - H.slip_reflex = TRUE diff --git a/code/modules/mob/living/carbon/human/species/station/traits/positive.dm b/code/modules/mob/living/carbon/human/species/station/traits/positive.dm index a3d66cf1b6..1befd52177 100644 --- a/code/modules/mob/living/carbon/human/species/station/traits/positive.dm +++ b/code/modules/mob/living/carbon/human/species/station/traits/positive.dm @@ -101,6 +101,7 @@ cost = 3 var_changes = list("total_health" = 125) custom_only = FALSE + excludes = list(/datum/trait/positive/endurance_very_high, /datum/trait/positive/endurance_extremely_high) banned_species = list(SPECIES_TESHARI, SPECIES_UNATHI, SPECIES_SHADEKIN_CREW) //Either not applicable or buffs are too strong /datum/trait/positive/endurance_high/apply(var/datum/species/S,var/mob/living/carbon/human/H) @@ -126,19 +127,21 @@ /* //Chompedit, moving to Positive_ch.dm so it wont be messed with from upstream /datum/trait/positive/darksight name = "Darksight" - desc = "Allows you to see a short distance in the dark and 10% more susceptible to flashes." + desc = "Allows you to see significantly further in the dark and be 10% more susceptible to flashes." cost = 1 var_changes = list("darksight" = 3) //CHOMP Edit custom_only = FALSE banned_species = list(SPECIES_TAJARAN, SPECIES_SHADEKIN_CREW, SPECIES_SHADEKIN, SPECIES_XENOHYBRID, SPECIES_VULPKANIN, SPECIES_XENO, SPECIES_XENOCHIMERA, SPECIES_VASILISSAN, SPECIES_WEREBEAST) //These species already have strong darksight by default. + excludes = list(/datum/trait/positive/darksight_plus) /datum/trait/positive/darksight_plus name = "Darksight, Major" - desc = "Allows you to see in the dark for almost the whole screen and 20% more susceptible to flashes." + desc = "Allows you to see in the dark for the whole screen and be 20% more susceptible to flashes." cost = 2 var_changes = list("darksight" = 6) //CHOMP Edit custom_only = FALSE banned_species = list(SPECIES_TAJARAN, SPECIES_SHADEKIN_CREW, SPECIES_SHADEKIN, SPECIES_XENOHYBRID, SPECIES_VULPKANIN, SPECIES_XENO, SPECIES_XENOCHIMERA, SPECIES_VASILISSAN, SPECIES_WEREBEAST) //These species already have strong darksight by default. + excludes = list(/datum/trait/positive/darksight) */ /datum/trait/positive/melee_attack @@ -166,6 +169,7 @@ var_changes = list("brute_mod" = 0.9) //CHOMP Edit custom_only = FALSE banned_species = list(SPECIES_TESHARI, SPECIES_UNATHI, SPECIES_XENOCHIMERA, SPECIES_VASILISSAN, SPECIES_WEREBEAST) //Most of these are already this resistant or stronger, or it'd be way too much of a boost for tesh. + excludes = list(/datum/trait/positive/brute_resist, /datum/trait/positive/brute_resist_plus) /datum/trait/positive/brute_resist name = "Brute Resist" @@ -216,17 +220,6 @@ custom_only = FALSE excludes = list(/datum/trait/negative/heavy_landing) -/* -/datum/trait/positive/hardfeet - name = "Hard Feet" - desc = "Makes your nice clawed, scaled, hooved, armored, or otherwise just awfully calloused feet immune to glass shards." - cost = 1 //CHOMP Edit - allowed_species = list(SPECIES_HANNER, SPECIES_CUSTOM) //So it only shows up for custom species and hanner - custom_only = FALSE - var_changes = list("flags" = NO_MINOR_CUT) //Checked the flag is only used by shard stepping. -*/ - -// CHOMPEdit: This has been removed for two years, since Jan 2020, pending "review". Uncommenting as per tankiness increase PR. /datum/trait/positive/antiseptic_saliva name = "Antiseptic Saliva" desc = "Your saliva has especially strong antiseptic properties that can be used to heal small wounds." @@ -253,11 +246,8 @@ /datum/trait/positive/weaver name = "Weaver" desc = "You can produce silk and create various articles of clothing and objects." - // CHOMPEdit Start, making weaver a neutral trait instead, 2 -> 0 cost - category = 0 - cost = 0 - // CHOMPEdit End - // allowed_species = list(SPECIES_HANNER, SPECIES_CUSTOM) //So it only shows up for custom species and hanner // CHOMPRemove + cost = 2 + // allowed_species = list(SPECIES_HANNER, SPECIES_CUSTOM) //So it only shows up for custom species and hanner // CHOMPEdit End custom_only = FALSE has_preferences = list("silk_production" = list(TRAIT_PREF_TYPE_BOOLEAN, "Silk production on spawn", TRAIT_NO_VAREDIT_TARGET), \ @@ -480,10 +470,12 @@ /datum/trait/positive/vibration_sense/apply(datum/species/S, mob/living/carbon/human/H, trait_prefs) . = ..() H.motiontracker_subscribe() + add_verb(H,/mob/living/carbon/human/proc/sonar_ping) /datum/trait/positive/vibration_sense/unapply(datum/species/S, mob/living/carbon/human/H, trait_prefs) . = ..() H.motiontracker_unsubscribe() + remove_verb(H,/mob/living/carbon/human/proc/sonar_ping) /datum/trait/positive/stable_genetics name = "Stable Genetics" @@ -565,6 +557,367 @@ can_take = ORGANICS var_changes = list("virus_immune" = TRUE) +/*/datum/trait/positive/linguist/master //CHOMPDisable Start: Disabled pending trait rework. Chomp Linguist does the same thing this one does. + name = "Master Linguist" + desc = "You are a master of languages! For whatever reason you might have, you are able to learn many more languages than others. Your language cap is 12 slots." + cost = 2 + var_changes = list("num_alternate_languages" = 15) + var_changes_pref = list("extra_languages" = 12)*/ //CHOMPDisable End: Disabled pending trait rework. Chomp Linguist does the same thing this one does. + +/datum/trait/positive/densebones + name = "Dense Bones" + desc = "Your bones (or robotic limbs) are more dense or stronger then what is considered normal. It is much harder to fracture your bones, yet pain from fractures is much more intense. Bones require 50% more damage to break, and deal 2x pain on break." + cost = 3 + excludes = list(/datum/trait/negative/hollow) + +/datum/trait/positive/densebones/apply(var/datum/species/S,var/mob/living/carbon/human/H) + ..() + for(var/obj/item/organ/external/organ in H.organs) + if(istype(organ)) + organ.min_broken_damage *= 1.5 + +/datum/trait/positive/lowpressureresminor // Same as original trait with cost reduced, much more useful as filler. + name = "Low Pressure Resistance, Minor" + desc = "Your body is more resistant to low pressures and you can breathe better in those conditions. Pretty simple." + cost = 1 + var_changes = list("hazard_low_pressure" = HAZARD_LOW_PRESSURE*0.66, "warning_low_pressure" = WARNING_LOW_PRESSURE*0.66, "minimum_breath_pressure" = 16*0.66) + excludes = list(/datum/trait/positive/lowpressureresmajor,/datum/trait/positive/pressureres,/datum/trait/positive/pressureresmajor) + +/datum/trait/positive/lowpressureresmajor // Still need an oxygen tank, otherwise you'll suffocate. + name = "Low Pressure Resistance, Major" + desc = "Your body is immune to low pressures and you can breathe significantly better in low-pressure conditions, though you'll still need an oxygen supply." + cost = 2 + var_changes = list("hazard_low_pressure" = HAZARD_LOW_PRESSURE*0, "warning_low_pressure" = WARNING_LOW_PRESSURE*0, "minimum_breath_pressure" = 16*0.33) + excludes = list(/datum/trait/positive/lowpressureresminor,/datum/trait/positive/pressureres,/datum/trait/positive/pressureresmajor) + +/datum/trait/positive/highpressureresminor // Increased high pressure cap as previous amount was neglible. + name = "High Pressure Resistance, Minor" + desc = "Your body is more resistant to high pressures. Pretty simple." + cost = 1 + var_changes = list("hazard_high_pressure" = HAZARD_HIGH_PRESSURE*2, "warning_high_pressure" = WARNING_HIGH_PRESSURE*2) + excludes = list(/datum/trait/positive/highpressureresmajor,/datum/trait/positive/pressureres,/datum/trait/positive/pressureresmajor) + +/datum/trait/positive/highpressureresmajor + name = "High Pressure Resistance, Major" + desc = "Your body is significantly more resistant to high pressures. Pretty simple." + cost = 2 + var_changes = list("hazard_high_pressure" = HAZARD_HIGH_PRESSURE*4, "warning_high_pressure" = WARNING_HIGH_PRESSURE*4) + excludes = list(/datum/trait/positive/highpressureresminor,/datum/trait/positive/pressureres,/datum/trait/positive/pressureresmajor) + +/datum/trait/positive/pressureres + name = "General Pressure Resistance" + desc = "Your body is much more resistant to both high and low pressures. Pretty simple." + cost = 3 + var_changes = list("hazard_high_pressure" = HAZARD_HIGH_PRESSURE*3, + "warning_high_pressure" = WARNING_HIGH_PRESSURE*3, + "hazard_low_pressure" = HAZARD_LOW_PRESSURE*0.33, + "warning_low_pressure" = WARNING_LOW_PRESSURE*0.33, + "minimum_breath_pressure" = 16*0.33 + ) + excludes = list(/datum/trait/positive/lowpressureresminor,/datum/trait/positive/lowpressureresmajor,/datum/trait/positive/highpressureresminor,/datum/trait/positive/highpressureresmajor,/datum/trait/positive/pressureresmajor) + +/datum/trait/positive/pressureresmajor // If they have the points and want more freedom with atmos, let them. + name = "General Pressure Resistance, Major" + desc = "Your body is significantly more resistant to high pressures and immune to low pressures, though you'll still need an oxygen supply." + cost = 4 + var_changes = list("hazard_high_pressure" = HAZARD_HIGH_PRESSURE*4, + "warning_high_pressure" = WARNING_HIGH_PRESSURE*4, + "hazard_low_pressure" = HAZARD_LOW_PRESSURE*0, + "warning_low_pressure" = WARNING_LOW_PRESSURE*0, + "minimum_breath_pressure" = 16*0.33 + ) + excludes = list(/datum/trait/positive/lowpressureresminor,/datum/trait/positive/lowpressureresmajor,/datum/trait/positive/highpressureresminor,/datum/trait/positive/highpressureresmajor,/datum/trait/positive/pressureres) + +/datum/trait/positive/more_blood + name = "Blood Volume, High" + desc = "You have 50% more blood." + cost = 2 + var_changes = list("blood_volume" = 840) + excludes = list(/datum/trait/positive/more_blood_extreme,/datum/trait/negative/less_blood,/datum/trait/negative/less_blood_extreme) + can_take = ORGANICS + custom_only = FALSE + +/datum/trait/positive/more_blood_extreme + name = "Blood Volume, Very High" + desc = "You have 150% more blood." + cost = 4 + var_changes = list("blood_volume" = 1400) + excludes = list(/datum/trait/positive/more_blood,/datum/trait/negative/less_blood,/datum/trait/negative/less_blood_extreme) + can_take = ORGANICS + +/datum/trait/positive/heavyweight + name = "Heavyweight" + desc = "You are more heavyweight or otherwise more sturdy than most species, and as such, more resistant to knockdown effects and stuns. Stuns are only half as effective on you, and neither players nor mobs can trade places with you or bump you out of the way." + cost = 2 + var_changes = list("stun_mod" = 0.5, "weaken_mod" = 0.5) // Stuns are 50% as effective - a stun of 3 seconds will be 2 seconds due to rounding up. Set to 0.5 to be in-line with the trait's description. (Weaken is used alongside stun to prevent aiming.) + +/datum/trait/positive/heavyweight/apply(var/datum/species/S,var/mob/living/carbon/human/H) + ..() + H.mob_size = MOB_LARGE + H.mob_bump_flag = HEAVY + +/datum/trait/positive/grappling_expert + name = "Grappling Expert" + desc = "Your grabs are much harder to escape from, and you are better at escaping from other's grabs!" + cost = 3 + var_changes = list("grab_resist_divisor_victims" = 1.5, "grab_resist_divisor_self" = 0.5, "grab_power_victims" = -1, "grab_power_self" = 1) + +/datum/trait/positive/absorbent + name = "Absorbent" + desc = "You are able to clean messes just by walking over them, and gain nutrition from doing so!" + cost = 1 + excludes = list(/datum/trait/negative/slipperydirt) + added_component_path = /datum/component/absorbent + +/datum/trait/positive/adrenaline_rush + name = "Adrenaline Rush" + desc = "When you get critically damaged, you'll have an adrenaline rush before going down, giving you another chance to finish the fight, or get to safety." + cost = 6 + special_env = TRUE + can_take = ORGANICS + var/last_adrenaline_rush + +/datum/trait/positive/adrenaline_rush/handle_environment_special(var/mob/living/carbon/human/H) + if(!(H.health<0)) + return + if(last_adrenaline_rush && last_adrenaline_rush + (30 MINUTES) > world.time) + return + last_adrenaline_rush = world.time + log_and_message_admins("[H]'s adrenaline rush trait just activated!") + H.add_modifier(/datum/modifier/adrenaline, 30 SECONDS) + +/datum/modifier/adrenaline + name = "Adrenaline Rush" + desc = "A rush of adrenaline, usually caused by near death in situations." + on_created_text = span_danger("You suddenly feel adrenaline pumping through your veins as your body refuses to give up! You feel stronger, and faster, and the pain fades away quickly.") + on_expired_text = span_danger("You feel your body finally give in once more as the adrenaline subsides. The pain returns in full blast, along with your strength fading once more.") + + disable_duration_percent = 0 //Immune to being disabled. + pain_immunity = TRUE //Immune to pain + max_health_flat = 25 //Temporary health boost. + incoming_damage_percent = 0.8 //Slight damage immunity + incoming_oxy_damage_percent = 0.1 //Temporary oxyloss slowdown + + outgoing_melee_damage_percent = 2 //Muscles are in overdrive + attack_speed_percent = 0.5 //Muscles are in overdrive + slowdown = -11 //Muscles are in overdrive + evasion = 20 //Increased focus + accuracy = 25 //Increased focus + accuracy_dispersion = -25 //Increased focus + pulse_modifier = 2 //Heart is in overdrive + bleeding_rate_percent = 1.25 //Bleed more with higher blood pressure. + metabolism_percent = 2.5 //Metabolism in overdrive + + var/original_length + var/list/original_values + +/datum/modifier/adrenaline/on_applied() + original_length = expire_at - world.time + original_values = list("stun" = holder.halloss*1.5, "weaken" = holder.weakened*1.5, "paralyze" = holder.paralysis*1.5, "stutter" = holder.stuttering*1.5, "eye_blur" = holder.eye_blurry*1.5, "drowsy" = holder.drowsyness*1.5, "agony" = holder.halloss*1.5, "confuse" = holder.confused*1.5) + +/datum/modifier/adrenaline/tick() + holder.halloss = 0 + holder.weakened = 0 + holder.paralysis = 0 + holder.stuttering = 0 + holder.eye_blurry = 0 + holder.drowsyness = 0 + holder.halloss = 0 + holder.confused = 0 + holder.stunned = 0 + +/datum/modifier/adrenaline/on_expire() //Your time is up, time to suffer the consequences. + holder.apply_effects(original_values["stun"] + 30,original_values["weaken"] + 20,original_values["paralyze"] + 15,0,original_values["stutter"] + 40,original_values["eye_blur"] + 20,original_values["drowsy"] + 75,original_values["agony"]) + holder.Confuse(original_values["confused"]) + holder.add_modifier(/datum/modifier/adrenaline_recovery,original_length*17.5) + +/datum/modifier/adrenaline_recovery + name = "Adrenaline detox" + desc = "After an adrenaline rush, one will find themselves suffering from adrenaline detox, which is their body recovering from an intense adrenaline rush." + on_created_text = span_danger("Your body aches and groans, forcing you into a period of rest as it recovers from the intense adrenaline rush.") + on_expired_text = span_notice("You finally recover from your adrenaline rush, your body returning to its normal state.") + + disable_duration_percent = 1.35 + outgoing_melee_damage_percent = 0.75 + attack_speed_percent = 2 + slowdown = 2 + evasion = -20 + bleeding_rate_percent = 0.8 + pulse_modifier = 0.5 + metabolism_percent = 0.5 + accuracy = -25 + accuracy_dispersion = 25 + incoming_hal_damage_percent = 1.75 + incoming_oxy_damage_percent = 1.25 + +/datum/trait/positive/insect_sting + name = "Insect Sting" + desc = "Allows you to sting your victim with a smalll amount of poison" + cost = 1 + +/datum/trait/positive/insect_sting/apply(var/datum/species/S,var/mob/living/carbon/human/H) + ..() + add_verb(H,/mob/living/proc/insect_sting) + +/datum/trait/positive/burn_resist_plus // Equivalent to Burn Weakness Major, cannot be taken at the same time. + name = "Burn Resist, Major" + desc = "Adds 40% resistance to burn damage sources." + cost = 4 // Exact Opposite of Burn Weakness Major, except Weakness Major is 50% incoming, this is -40% incoming. + var_changes = list("burn_mod" = 0.6) + excludes = list(/datum/trait/positive/burn_resist, /datum/trait/positive/minor_burn_resist) + +/datum/trait/positive/brute_resist_plus // Equivalent to Brute Weakness Major, cannot be taken at the same time. + name = "Brute Resist, Major" + desc = "Adds 40% resistance to brute damage sources." + cost = 4 // Exact Opposite of Brute Weakness Major, except Weakness Major is 50% incoming, this is -40% incoming. + var_changes = list("brute_mod" = 0.6) + excludes = list(/datum/trait/positive/brute_resist, /datum/trait/positive/minor_brute_resist) + +/datum/trait/positive/endurance_very_high + name = "High Endurance, Major" + desc = "Increases your maximum total hitpoints to 150. You require 300 damage in total to die, compared to 200 normally. You will still go into crit after losing 150 HP, compared to crit at 100 HP." + cost = 6 // This should cost a LOT, because your total health becomes 300 to be fully dead, rather than 200 normally, or 250 for High Endurance. HE costs 3, double it here. + var_changes = list("total_health" = 150) + excludes = list(/datum/trait/positive/endurance_high, /datum/trait/positive/endurance_extremely_high) + +/datum/trait/positive/endurance_very_high/apply(var/datum/species/S,var/mob/living/carbon/human/H) + ..() + H.setMaxHealth(S.total_health) + +/datum/trait/positive/endurance_extremely_high + name = "High Endurance, Extreme" + desc = "Increases your maximum total hitpoints to 175. You require 350 damage in total to die, compared to 200 normally. You will still go into crit after losing 175 HP, compared to crit at 100 HP." + cost = 9 // This should cost a LOT, because your total health becomes 350 to be fully dead, rather than 200 normally, or 250 for High Endurance. HE costs 3, this costs 3x it. + var_changes = list("total_health" = 175) + excludes = list(/datum/trait/positive/endurance_high, /datum/trait/positive/endurance_very_high) + +/datum/trait/positive/endurance_extremely_high/apply(var/datum/species/S,var/mob/living/carbon/human/H) + ..() + H.setMaxHealth(S.total_health) + +/datum/trait/positive/pain_tolerance_minor // Minor Pain Tolerance, 10% reduced pain + name = "Pain Tolerance, Minor" + desc = "You are slightly more resistant to pain than most, and experience 10% less pain from all sources." + cost = 1 + custom_only = FALSE + var_changes = list("pain_mod" = 0.9) + +/datum/trait/positive/pain_tolerance + name = "Pain Tolerance" + desc = "You are noticeably more resistant to pain than most, and experience 20% less pain from all sources." + cost = 2 + custom_only = FALSE + var_changes = list("pain_mod" = 0.8) + +/datum/trait/positive/pain_tolerance_advanced // High Pain Intolerance is 50% incoming pain, but this is 40% reduced incoming pain. + name = "Pain Tolerance, Major" + desc = "You are extremely resistant to pain sources, and experience 40% less pain from all sources." + cost = 3 // Equivalent to High Pain Intolerance, but less pain resisted for balance reasons. + custom_only = FALSE + var_changes = list("pain_mod" = 0.6) + +/datum/trait/positive/improved_biocompat + name = "Improved Biocompatibility" + desc = "Your body is naturally (or artificially) more receptive to healing chemicals without being vulnerable to the 'bad stuff'. You heal more efficiently from most chemicals, with no other drawbacks. Remember to note this down in your medical records! Chems heal for 20% more." + cost = 2 + custom_only = FALSE + var_changes = list("chem_strength_heal" = 1.2) + +/datum/trait/positive/photoresistant_plus // YW added Trait + name = "Photoresistance, Major" + desc = "Decreases stun duration from flashes and other light-based stuns and disabilities by 50%." + cost = 2 + var_changes = list("flash_mod" = 0.5) + +/datum/trait/positive/hardy_extreme + name = "Hardy, Extreme" + desc = "Allows you to carry heavy equipment with no slowdown at all." + cost = 3 + var_changes = list("item_slowdown_mod" = 0.0) + excludes = list(/datum/trait/positive/speed_fast,/datum/trait/positive/hardy,/datum/trait/positive/hardy_plus) + +/datum/trait/positive/bloodsucker_plus + name = "Evolved Bloodsucker" + desc = "Makes you able to gain nutrition by draining blood as well as eating food. To compensate, you get fangs that can be used to drain blood from prey." + cost = 1 + var_changes = list("organic_food_coeff" = 0.5) // Hopefully this works??? + excludes = list(/datum/trait/neutral/bloodsucker) + +/datum/trait/positive/bloodsucker_plus/apply(var/datum/species/S,var/mob/living/carbon/human/H) + ..() + add_verb(H,/mob/living/carbon/human/proc/bloodsuck) + +/datum/trait/positive/toxin_gut + name ="Robust Gut" + desc = "You are immune to most ingested toxins. Does not protect from possible harm caused by other drugs, meds, allergens etc." + cost = 1 + custom_only = FALSE + +/datum/trait/positive/toxin_gut/apply(var/datum/species/S,var/mob/living/carbon/human/H) + ..() + ADD_TRAIT(H, INGESTED_TOXIN_IMMUNE, ROUNDSTART_TRAIT) + +/datum/trait/positive/nobreathe + name = "Breathless" + desc = "You or your species have adapted to no longer require lungs, and as such no longer need to breathe!" + cost = 6 + can_take = ORGANICS + + var_changes = list("breath_type" = "null", "poison_type" = "null", "exhale_type" = "null") + excludes = list(/datum/trait/negative/breathes/phoron, + /datum/trait/negative/breathes/nitrogen, + /datum/trait/negative/breathes/carbon_dioxide, + /datum/trait/positive/light_breather, + /datum/trait/negative/deep_breather +) + +/datum/trait/positive/nobreathe/apply(var/datum/species/S, var/mob/living/carbon/human/H) + ..() + H.does_not_breathe = 1 + var/obj/item/organ/internal/breathy = H.internal_organs_by_name[O_LUNGS] + if(!breathy) + return + H.internal_organs -= breathy + qdel(breathy) + +/datum/trait/positive/light_breather + name ="Light Breather" + desc = "You need less air for your lungs to properly work.." + cost = 1 + + custom_only = FALSE + can_take = ORGANICS + var_changes = list("minimum_breath_pressure" = 12) + excludes = list(/datum/trait/negative/deep_breather) + +/datum/trait/positive/emp_resist + name = "EMP Resistance" + desc = "You are resistant to EMPs" + cost = 3 + + can_take = SYNTHETICS + custom_only = FALSE + var_changes = list("emp_dmg_mod" = 0.7, "emp_stun_mod" = 0.7) + excludes = list(/datum/trait/negative/faultwires, /datum/trait/negative/poorconstruction, /datum/trait/positive/emp_resist_major) + +/datum/trait/positive/emp_resist/apply(var/datum/species/S,var/mob/living/carbon/human/H) + ..() + H.add_modifier(/datum/modifier/trait/empresist) + +/datum/trait/positive/emp_resist_major + name = "Major EMP Resistance" + desc = "You are very resistant to EMPs" + cost = 5 + + can_take = SYNTHETICS + custom_only = FALSE + var_changes = list("emp_dmg_mod" = 0.5, "emp_stun_mod" = 0.5) + excludes = list(/datum/trait/negative/faultwires, /datum/trait/negative/poorconstruction, /datum/trait/positive/emp_resist) + +/datum/trait/positive/emp_resist_major/apply(var/datum/species/S,var/mob/living/carbon/human/H) + ..() + H.add_modifier(/datum/modifier/trait/empresistb) + /datum/trait/positive/radioactive_heal name = "Radioactive Heal" desc = "You heal when exposed to radiation instead of becoming ill. You can also choose to emit a glow when irradiated." diff --git a/code/modules/mob/living/carbon/human/species/station/traits/positive_ch.dm b/code/modules/mob/living/carbon/human/species/station/traits/positive_ch.dm deleted file mode 100644 index 8f04f6e41f..0000000000 --- a/code/modules/mob/living/carbon/human/species/station/traits/positive_ch.dm +++ /dev/null @@ -1,400 +0,0 @@ -/datum/trait/positive/linguist - name = "Master Linguist" - desc = "You are a master of languages! For whatever reason you might have, you are able to learn many more languages than others. Your language cap is 12 slots." - cost = 2 - var_changes = list("num_alternate_languages" = 15) - var_changes_pref = list("extra_languages" = 12) - -/datum/trait/positive/darksight - name = "Darksight" - desc = "Allows you to see a short distance in the dark. (Half the screen)." - cost = 1 - var_changes = list("darksight" = 4) //CHOMP Edit - custom_only = FALSE - banned_species = list(SPECIES_TAJARAN, SPECIES_SHADEKIN_CREW, SPECIES_SHADEKIN, SPECIES_XENOHYBRID, SPECIES_VULPKANIN, SPECIES_XENO, SPECIES_XENOCHIMERA, SPECIES_VASILISSAN, SPECIES_WEREBEAST) //These species already have strong darksight by default. - -/datum/trait/positive/darksight_plus - name = "Darksight, Major" - desc = "Allows you to see in the dark for the whole screen." - cost = 2 - var_changes = list("darksight" = 8) - custom_only = FALSE - banned_species = list(SPECIES_TAJARAN, SPECIES_SHADEKIN_CREW, SPECIES_SHADEKIN, SPECIES_XENOHYBRID, SPECIES_VULPKANIN, SPECIES_XENO, SPECIES_XENOCHIMERA, SPECIES_VASILISSAN, SPECIES_WEREBEAST) //These species already have strong darksight by default. - -/datum/trait/positive/densebones - name = "Dense Bones" - desc = "Your bones (or robotic limbs) are more dense or stronger then what is considered normal. It is much harder to fracture your bones, yet pain from fractures is much more intense. Bones require 50% more damage to break, and deal 2x pain on break." - cost = 3 - excludes = list(/datum/trait/negative/hollow) - -/datum/trait/positive/densebones/apply(var/datum/species/S,var/mob/living/carbon/human/H) - ..() - for(var/obj/item/organ/external/organ in H.organs) - if(istype(organ)) - organ.min_broken_damage *= 1.5 - organ.brokenpain *= 2 - -/datum/trait/positive/lowpressureresminor // Same as original trait with cost reduced, much more useful as filler. - name = "Low Pressure Resistance, Minor" - desc = "Your body is more resistant to low pressures and you can breathe better in those conditions. Pretty simple." - cost = 1 - var_changes = list("hazard_low_pressure" = HAZARD_LOW_PRESSURE*0.66, "warning_low_pressure" = WARNING_LOW_PRESSURE*0.66, "minimum_breath_pressure" = 16*0.66) - excludes = list(/datum/trait/positive/lowpressureresmajor,/datum/trait/positive/pressureres,/datum/trait/positive/pressureresmajor) - -/datum/trait/positive/lowpressureresmajor // Still need an oxygen tank, otherwise you'll suffocate. - name = "Low Pressure Resistance, Major" - desc = "Your body is immune to low pressures and you can breathe significantly better in low-pressure conditions, though you'll still need an oxygen supply." - cost = 2 - var_changes = list("hazard_low_pressure" = HAZARD_LOW_PRESSURE*0, "warning_low_pressure" = WARNING_LOW_PRESSURE*0, "minimum_breath_pressure" = 16*0.33) - excludes = list(/datum/trait/positive/lowpressureresminor,/datum/trait/positive/pressureres,/datum/trait/positive/pressureresmajor) - -/datum/trait/positive/highpressureresminor // Increased high pressure cap as previous amount was neglible. - name = "High Pressure Resistance, Minor" - desc = "Your body is more resistant to high pressures. Pretty simple." - cost = 1 - var_changes = list("hazard_high_pressure" = HAZARD_HIGH_PRESSURE*2, "warning_high_pressure" = WARNING_HIGH_PRESSURE*2) - excludes = list(/datum/trait/positive/highpressureresmajor,/datum/trait/positive/pressureres,/datum/trait/positive/pressureresmajor) - -/datum/trait/positive/highpressureresmajor - name = "High Pressure Resistance, Major" - desc = "Your body is significantly more resistant to high pressures. Pretty simple." - cost = 2 - var_changes = list("hazard_high_pressure" = HAZARD_HIGH_PRESSURE*4, "warning_high_pressure" = WARNING_HIGH_PRESSURE*4) - excludes = list(/datum/trait/positive/highpressureresminor,/datum/trait/positive/pressureres,/datum/trait/positive/pressureresmajor) - -/datum/trait/positive/pressureres - name = "General Pressure Resistance" - desc = "Your body is much more resistant to both high and low pressures. Pretty simple." - cost = 3 - var_changes = list("hazard_high_pressure" = HAZARD_HIGH_PRESSURE*3, - "warning_high_pressure" = WARNING_HIGH_PRESSURE*3, - "hazard_low_pressure" = HAZARD_LOW_PRESSURE*0.33, - "warning_low_pressure" = WARNING_LOW_PRESSURE*0.33, - "minimum_breath_pressure" = 16*0.33 - ) - excludes = list(/datum/trait/positive/lowpressureresminor,/datum/trait/positive/lowpressureresmajor,/datum/trait/positive/highpressureresminor,/datum/trait/positive/highpressureresmajor,/datum/trait/positive/pressureresmajor) - -/datum/trait/positive/pressureresmajor // If they have the points and want more freedom with atmos, let them. - name = "General Pressure Resistance, Major" - desc = "Your body is significantly more resistant to high pressures and immune to low pressures, though you'll still need an oxygen supply." - cost = 4 - var_changes = list("hazard_high_pressure" = HAZARD_HIGH_PRESSURE*4, - "warning_high_pressure" = WARNING_HIGH_PRESSURE*4, - "hazard_low_pressure" = HAZARD_LOW_PRESSURE*0, - "warning_low_pressure" = WARNING_LOW_PRESSURE*0, - "minimum_breath_pressure" = 16*0.33 - ) - excludes = list(/datum/trait/positive/lowpressureresminor,/datum/trait/positive/lowpressureresmajor,/datum/trait/positive/highpressureresminor,/datum/trait/positive/highpressureresmajor,/datum/trait/positive/pressureres) - -/datum/trait/positive/more_blood - name = "Blood Volume, High" - desc = "You have 50% more blood." - cost = 2 - var_changes = list("blood_volume" = 840) - excludes = list(/datum/trait/positive/more_blood_extreme,/datum/trait/negative/less_blood,/datum/trait/negative/less_blood_extreme) - can_take = ORGANICS - -/datum/trait/positive/more_blood_extreme - name = "Blood Volume, Very High" - desc = "You have 150% more blood." - cost = 4 - var_changes = list("blood_volume" = 1400) - excludes = list(/datum/trait/positive/more_blood,/datum/trait/negative/less_blood,/datum/trait/negative/less_blood_extreme) - can_take = ORGANICS - -/datum/trait/positive/heavyweight - name = "Heavyweight" - desc = "You are more heavyweight or otherwise more sturdy than most species, and as such, more resistant to knockdown effects and stuns. Stuns are only half as effective on you, and neither players nor mobs can trade places with you or bump you out of the way." - cost = 2 - var_changes = list("stun_mod" = 0.5, "weaken_mod" = 0.5) // Stuns are 50% as effective - a stun of 3 seconds will be 2 seconds due to rounding up. Set to 0.5 to be in-line with the trait's description. (Weaken is used alongside stun to prevent aiming.) - -/datum/trait/positive/heavyweight/apply(var/datum/species/S,var/mob/living/carbon/human/H) - ..() - H.mob_size = MOB_LARGE - H.mob_bump_flag = HEAVY - -/datum/trait/positive/grappling_expert - name = "Grappling Expert" - desc = "Your grabs are much harder to escape from, and you are better at escaping from other's grabs!" - cost = 3 - var_changes = list("grab_resist_divisor_victims" = 1.5, "grab_resist_divisor_self" = 0.5, "grab_power_victims" = -1, "grab_power_self" = 1) - -/datum/trait/positive/absorbent - name = "Absorbent" - desc = "You are able to clean messes just by walking over them, and gain nutrition from doing so!" - cost = 1 - special_env = TRUE - excludes = list(/datum/trait/negative/slipperydirt) - -/datum/trait/positive/endurance_high - cost = 3 - excludes = list(/datum/trait/positive/endurance_very_high, /datum/trait/positive/endurance_extremely_high) // CHOMPEdit: Increased Endurance. - // excludes = list(/datum/trait/positive/brute_resist, /datum/trait/positive/minor_brute_resist, /datum/trait/positive/minor_burn_resist, /datum/trait/positive/burn_resist) - // Tankiness at the cost of severe downsides should be allowed - we have a large number of negatives that hurt hard, but you can't take many positives. - -/datum/trait/positive/brute_resist - excludes = list(/datum/trait/positive/minor_brute_resist, /datum/trait/positive/brute_resist_plus) // Tankiness at the cost of severe downsides should be allowed - we have a large number of negatives that hurt hard, but you can't take many positives. - -/datum/trait/positive/minor_brute_resist - excludes = list(/datum/trait/positive/brute_resist, /datum/trait/positive/brute_resist_plus) // Tankiness at the cost of severe downsides should be allowed - we have a large number of negatives that hurt hard, but you can't take many positives. - -/datum/trait/positive/burn_resist - excludes = list(/datum/trait/positive/minor_burn_resist, /datum/trait/positive/burn_resist_plus) // Tankiness at the cost of severe downsides should be allowed - we have a large number of negatives that hurt hard, but you can't take many positives. - -/datum/trait/positive/minor_burn_resist - excludes = list(/datum/trait/positive/burn_resist, /datum/trait/positive/burn_resist_plus) // Tankiness at the cost of severe downsides should be allowed - we have a large number of negatives that hurt hard, but you can't take many positives. - -/datum/trait/positive/absorbent/handle_environment_special(var/mob/living/carbon/human/H) - var/turf/T = get_turf(H) - if(istype(T)) - if(!(H.shoes || (H.wear_suit && (H.wear_suit.body_parts_covered & FEET)))) - for(var/obj/O in T) - if(O.wash(CLEAN_WASH)) - H.adjust_nutrition(rand(5, 15)) - if (istype(T, /turf/simulated)) - var/turf/simulated/S = T - if(T.wash(CLEAN_WASH)) - H.adjust_nutrition(rand(10, 20)) - if(S.dirt > 50) - S.dirt = 0 - H.adjust_nutrition(rand(10, 20)) - if(H.wash(CLEAN_WASH)) - H.adjust_nutrition(rand(5, 15)) - if(H.r_hand) - if(H.r_hand.wash(CLEAN_WASH)) - H.adjust_nutrition(rand(5, 15)) - if(H.l_hand) - if(H.l_hand.wash(CLEAN_WASH)) - H.adjust_nutrition(rand(5, 15)) - if(H.head) - if(H.head.wash(CLEAN_WASH)) - H.update_inv_head(0) - H.adjust_nutrition(rand(5, 15)) - if(H.wear_suit) - if(H.wear_suit.wash(CLEAN_WASH)) - H.update_inv_wear_suit(0) - H.adjust_nutrition(rand(5, 15)) - if(H.w_uniform) - if(H.w_uniform.wash(CLEAN_WASH)) - H.update_inv_w_uniform(0) - H.adjust_nutrition(rand(5, 15)) - -/datum/trait/positive/adrenaline_rush - name = "Adrenaline Rush" - desc = "When you get critically damaged, you'll have an adrenaline rush before going down, giving you another chance to finish the fight, or get to safety." - cost = 6 - special_env = TRUE - can_take = ORGANICS - var/last_adrenaline_rush - -/datum/trait/positive/adrenaline_rush/handle_environment_special(var/mob/living/carbon/human/H) - if(!(H.health<0)) - return - if(last_adrenaline_rush && last_adrenaline_rush + 18000 > world.time) - return - last_adrenaline_rush = world.time - log_and_message_admins("[H]'s adrenaline rush trait just activated!") - H.add_modifier(/datum/modifier/adrenaline,300) - -/datum/modifier/adrenaline - name = "Adrenaline Rush" - desc = "A rush of adrenaline, usually caused by near death in situations." - on_created_text = span_danger("You suddenly feel adrenaline pumping through your veins as your body refuses to give up! You feel stronger, and faster, and the pain fades away quickly.") - on_expired_text = span_danger("You feel your body finally give in once more as the adrenaline subsides. The pain returns in full blast, along with your strength fading once more.") - - disable_duration_percent = 0 //Immune to being disabled. - pain_immunity = TRUE //Immune to pain - max_health_flat = 25 //Temporary health boost. - incoming_damage_percent = 0.8 //Slight damage immunity - incoming_oxy_damage_percent = 0.1 //Temporary oxyloss slowdown - - outgoing_melee_damage_percent = 2 //Muscles are in overdrive - attack_speed_percent = 0.5 //Muscles are in overdrive - slowdown = -11 //Muscles are in overdrive - evasion = 20 //Increased focus - accuracy = 25 //Increased focus - accuracy_dispersion = -25 //Increased focus - pulse_modifier = 2 //Heart is in overdrive - bleeding_rate_percent = 1.25 //Bleed more with higher blood pressure. - metabolism_percent = 2.5 //Metabolism in overdrive - - var/original_length - var/list/original_values - -/datum/modifier/adrenaline/on_applied() - original_length = expire_at - world.time - original_values = list("stun" = holder.halloss*1.5, "weaken" = holder.weakened*1.5, "paralyze" = holder.paralysis*1.5, "stutter" = holder.stuttering*1.5, "eye_blur" = holder.eye_blurry*1.5, "drowsy" = holder.drowsyness*1.5, "agony" = holder.halloss*1.5, "confuse" = holder.confused*1.5) - -/datum/modifier/adrenaline/tick() - holder.halloss = 0 - holder.weakened = 0 - holder.paralysis = 0 - holder.stuttering = 0 - holder.eye_blurry = 0 - holder.drowsyness = 0 - holder.halloss = 0 - holder.confused = 0 - holder.stunned = 0 - -/datum/modifier/adrenaline/on_expire() //Your time is up, time to suffer the consequences. - holder.apply_effects(original_values["stun"] + 30,original_values["weaken"] + 20,original_values["paralyze"] + 15,0,original_values["stutter"] + 40,original_values["eye_blur"] + 20,original_values["drowsy"] + 75,original_values["agony"]) - holder.Confuse(original_values["confused"]) - holder.add_modifier(/datum/modifier/adrenaline_recovery,original_length*17.5) - -/datum/modifier/adrenaline_recovery - name = "Adrenaline detox" - desc = "After an adrenaline rush, one will find themselves suffering from adrenaline detox, which is their body recovering from an intense adrenaline rush." - on_created_text = span_danger("Your body aches and groans, forcing you into a period of rest as it recovers from the intense adrenaline rush.") - on_expired_text = span_notice("You finally recover from your adrenaline rush, your body returning to its normal state.") - - disable_duration_percent = 1.35 - outgoing_melee_damage_percent = 0.75 - attack_speed_percent = 2 - slowdown = 2 - evasion = -20 - bleeding_rate_percent = 0.8 - pulse_modifier = 0.5 - metabolism_percent = 0.5 - accuracy = -25 - accuracy_dispersion = 25 - incoming_hal_damage_percent = 1.75 - incoming_oxy_damage_percent = 1.25 - -/datum/trait/positive/insect_sting - name = "Insect Sting" - desc = "Allows you to sting your victim with a smalll amount of poison" - cost = 1 - -/datum/trait/positive/insect_sting/apply(var/datum/species/S,var/mob/living/carbon/human/H) - ..() - add_verb(H,/mob/living/proc/insect_sting) //CHOMPEdit TGPanel - -// TANKINESS LETS GOOOOOOOOO -/datum/trait/positive/burn_resist_plus // Equivalent to Burn Weakness Major, cannot be taken at the same time. - name = "Burn Resist, Major" - desc = "Adds 40% resistance to burn damage sources." - cost = 3 // Exact Opposite of Burn Weakness Major, except Weakness Major is 50% incoming, this is -40% incoming. - var_changes = list("burn_mod" = 0.6) - excludes = list(/datum/trait/positive/burn_resist, /datum/trait/positive/minor_burn_resist) - -/datum/trait/positive/brute_resist_plus // Equivalent to Brute Weakness Major, cannot be taken at the same time. - name = "Brute Resist, Major" - desc = "Adds 40% resistance to brute damage sources." - cost = 3 // Exact Opposite of Brute Weakness Major, except Weakness Major is 50% incoming, this is -40% incoming. - var_changes = list("brute_mod" = 0.6) - excludes = list(/datum/trait/positive/brute_resist, /datum/trait/positive/minor_brute_resist) - -/datum/trait/positive/endurance_very_high - name = "High Endurance, Major" - desc = "Increases your maximum total hitpoints to 150. You require 300 damage in total to die, compared to 200 normally. You will still go into crit after losing 150 HP, compared to crit at 100 HP." - cost = 6 // This should cost a LOT, because your total health becomes 300 to be fully dead, rather than 200 normally, or 250 for High Endurance. HE costs 3, double it here. - var_changes = list("total_health" = 150) - excludes = list(/datum/trait/positive/endurance_high, /datum/trait/positive/endurance_extremely_high) - -/datum/trait/positive/endurance_very_high/apply(var/datum/species/S,var/mob/living/carbon/human/H) - ..() - H.setMaxHealth(S.total_health) - - -/datum/trait/positive/endurance_extremely_high - name = "High Endurance, Extreme" - desc = "Increases your maximum total hitpoints to 175. You require 350 damage in total to die, compared to 200 normally. You will still go into crit after losing 175 HP, compared to crit at 100 HP." - cost = 9 // This should cost a LOT, because your total health becomes 350 to be fully dead, rather than 200 normally, or 250 for High Endurance. HE costs 3, this costs 3x it. - var_changes = list("total_health" = 175) - excludes = list(/datum/trait/positive/endurance_high, /datum/trait/positive/endurance_very_high) - -/datum/trait/positive/endurance_extremely_high/apply(var/datum/species/S,var/mob/living/carbon/human/H) - ..() - H.setMaxHealth(S.total_health) - -// CHOMPNote: Reshuffling traits to match our current upstream, VORE. -/datum/trait/positive/pain_tolerance_minor // Minor Pain Tolerance, 10% reduced pain - name = "Pain Tolerance, Minor" - desc = "You are slightly more resistant to pain than most, and experience 10% less pain from all sources." - cost = 1 - var_changes = list("pain_mod" = 0.9) - -/datum/trait/positive/pain_tolerance - name = "Pain Tolerance" - desc = "You are noticeably more resistant to pain than most, and experience 20% less pain from all sources." - cost = 2 - var_changes = list("pain_mod" = 0.8) - -/datum/trait/positive/pain_tolerance_advanced // High Pain Intolerance is 50% incoming pain, but this is 40% reduced incoming pain. - name = "Pain Tolerance, Major" - desc = "You are extremely resistant to pain sources, and experience 40% less pain from all sources." - cost = 3 // Equivalent to High Pain Intolerance, but less pain resisted for balance reasons. - var_changes = list("pain_mod" = 0.6) - - -/datum/trait/positive/improved_biocompat - name = "Improved Biocompatibility" - desc = "Your body is naturally (or artificially) more receptive to healing chemicals without being vulnerable to the 'bad stuff'. You heal more efficiently from most chemicals, with no other drawbacks. Remember to note this down in your medical records! Chems heal for 20% more." - cost = 2 - var_changes = list("chem_strength_heal" = 1.2) - -/datum/trait/positive/photoresistant_plus // YW added Trait - name = "Photoresistance, Major" - desc = "Decreases stun duration from flashes and other light-based stuns and disabilities by 50%." - cost = 2 - var_changes = list("flash_mod" = 0.5) - -/datum/trait/positive/hardy_extreme - name = "Hardy, Extreme" - desc = "Allows you to carry heavy equipment with no slowdown at all." - cost = 3 - var_changes = list("item_slowdown_mod" = 0.0) - excludes = list(/datum/trait/positive/speed_fast,/datum/trait/positive/hardy,/datum/trait/positive/hardy_plus) - -/datum/trait/positive/bloodsucker_plus - name = "Evolved Bloodsucker" - desc = "Makes you able to gain nutrition by draining blood as well as eating food. To compensate, you get fangs that can be used to drain blood from prey." - cost = 1 - var_changes = list("organic_food_coeff" = 0.5) // Hopefully this works??? - excludes = list(/datum/trait/neutral/bloodsucker) - -/datum/trait/positive/bloodsucker_plus/apply(var/datum/species/S,var/mob/living/carbon/human/H) - ..() - add_verb(H,/mob/living/carbon/human/proc/bloodsuck) //CHOMPEdit TGPanel - -/datum/trait/positive/sonar - name ="Perceptive Hearing" - desc = "You can hear slight vibrations in the air very easily, if you focus." - cost = 1 - -/datum/trait/positive/sonar/apply(var/datum/species/S,var/mob/living/carbon/human/H) - ..() - add_verb(H,/mob/living/carbon/human/proc/sonar_ping) //CHOMPEdit TGPanel - -/datum/trait/positive/toxin_gut - name ="Robust Gut" - desc = "You are immune to ingested toxins. Does not protect from possible harm caused by other drugs, meds, allergens etc." - cost = 1 - -/datum/trait/positive/toxin_gut/apply(var/datum/species/S,var/mob/living/carbon/human/H) - ..() - H.toxin_gut = TRUE - -/datum/trait/positive/nobreathe // CHOMPedit - name = "Breathless" - desc = "You or your species have adapted to no longer require lungs, and as such no longer need to breathe!" - - can_take = ORGANICS - - var_changes = list("breath_type" = "null", "poison_type" = "null", "exhale_type" = "null", "water_breather" = "TRUE") - excludes = list(/datum/trait/negative/breathes/phoron, - /datum/trait/negative/breathes/nitrogen, - /datum/trait/negative/breathes/carbon_dioxide, - /datum/trait/positive/light_breather, - /datum/trait/negative/deep_breather -) - cost = 6 - -/datum/trait/positive/nobreathe/apply(var/datum/species/S, var/mob/living/carbon/human/H) - ..() - H.does_not_breathe = 1 - var/obj/item/organ/internal/breathy = H.internal_organs_by_name[O_LUNGS] - if(!breathy) - return - H.internal_organs -= breathy - qdel(breathy) diff --git a/code/modules/mob/living/life.dm b/code/modules/mob/living/life.dm index 3c77cd824b..5b52ab4d89 100644 --- a/code/modules/mob/living/life.dm +++ b/code/modules/mob/living/life.dm @@ -309,13 +309,11 @@ if(stat != DEAD && toggled_sleeping) Sleeping(2) if(sleeping) - //CHOMPEdit Start if(iscarbon(src)) var/mob/living/carbon/C = src AdjustSleeping(-1 * C.species.waking_speed) else AdjustSleeping(-1) - //CHOMPEdit End throw_alert("asleep", /atom/movable/screen/alert/asleep) else clear_alert("asleep") diff --git a/code/modules/mob/living/living_movement.dm b/code/modules/mob/living/living_movement.dm index 2af600215c..256a68db36 100644 --- a/code/modules/mob/living/living_movement.dm +++ b/code/modules/mob/living/living_movement.dm @@ -145,13 +145,11 @@ default behaviour is: H.Weaken(5) now_pushing = FALSE return - //CHOMPSTATION edit Adding alternative to lightweight if(H.species.lightweight_light == 1 && H.a_intent == I_HELP) H.visible_message(span_warning("[src] bumps into [H], knocking them off balance!")) H.Weaken(5) - now_pushing = 0 + now_pushing = FALSE return - //CHOMPSTATION edit - bringing back mandatory step mechanics, fetish stuff removed if no prefs // Handle grabbing, stomping, and such of micros! if(step_mechanics_pref && tmob.step_mechanics_pref) if(handle_micro_bump_other(tmob)) return diff --git a/code/modules/mob/mob_grab.dm b/code/modules/mob/mob_grab.dm index 1408606de2..8867ccf584 100644 --- a/code/modules/mob/mob_grab.dm +++ b/code/modules/mob/mob_grab.dm @@ -371,7 +371,6 @@ //It's easier to break out of a grab by a smaller mob break_strength += max(size_difference(affecting, assailant), 0) - //CHOMPEdit Begin var/prob_mult = 1 var/mob/living/carbon/human/grabbee = affecting var/mob/living/carbon/human/grabber = assailant @@ -383,7 +382,6 @@ break_strength += grabber.species.grab_power_victims var/break_chance = CLAMP(prob_mult*break_chance_table[CLAMP(break_strength, 1, break_chance_table.len)],0,100) - //CHOMPEdit End if(prob(break_chance)) if(state == GRAB_KILL) reset_kill_state() diff --git a/code/modules/reagents/reactions/instant/instant.dm b/code/modules/reagents/reactions/instant/instant.dm index 1ca0d15b82..f942e7ceca 100644 --- a/code/modules/reagents/reactions/instant/instant.dm +++ b/code/modules/reagents/reactions/instant/instant.dm @@ -1502,3 +1502,9 @@ result = REAGENT_ID_APHRODISIAC required_reagents = list(REAGENT_ID_CARBON = 2, REAGENT_ID_HYDROGEN = 2, REAGENT_ID_OXYGEN = 2, REAGENT_ID_WATER = 1) result_amount = 6 + +/decl/chemical_reaction/instant/tercozolam + id = REAGENT_ID_TERCOZOLAM + result = REAGENT_ID_TERCOZOLAM + required_reagents = list(REAGENT_ID_ANTITOXIN = 1, REAGENT_ID_ETHANOL = 1, REAGENT_ID_LITHIUM = 1) + result_amount = 3 diff --git a/code/modules/reagents/reagents/_reagents.dm b/code/modules/reagents/reagents/_reagents.dm index 7af8ac4417..004a11cb5c 100644 --- a/code/modules/reagents/reagents/_reagents.dm +++ b/code/modules/reagents/reagents/_reagents.dm @@ -172,7 +172,7 @@ if(CHEM_BLOOD) affect_blood(M, alien, removed) if(CHEM_INGEST) - if(istype(src, /datum/reagent/toxin) && M.toxin_gut) //CHOMPAdd + if(istype(src, /datum/reagent/toxin) && HAS_TRAIT(M, INGESTED_TOXIN_IMMUNE)) remove_self(removed) return affect_ingest(M, alien, removed * ingest_abs_mult) diff --git a/code/modules/reagents/reagents/medicine.dm b/code/modules/reagents/reagents/medicine.dm index 4321fe99eb..bfc2df3788 100644 --- a/code/modules/reagents/reagents/medicine.dm +++ b/code/modules/reagents/reagents/medicine.dm @@ -1583,3 +1583,13 @@ if(current_addiction <= 0) current_addiction = 40 return current_addiction + +/datum/reagent/tercozolam + name = REAGENT_TERCOZOLAM + id = REAGENT_ID_TERCOZOLAM + color = "#afeb17" + metabolism = 0.05 + description = "A well respected drug used for treatment of schizophrenia in specific." + overdose = REAGENTS_OVERDOSE * 2 + supply_conversion_value = REFINERYEXPORT_VALUE_PROCESSED + industrial_use = REFINERYEXPORT_REASON_DRUG diff --git a/modular_chomp/code/modules/mob/living/carbon/human/species/station/traits/negative.dm b/modular_chomp/code/modules/mob/living/carbon/human/species/station/traits/negative.dm deleted file mode 100644 index edbdae3c41..0000000000 --- a/modular_chomp/code/modules/mob/living/carbon/human/species/station/traits/negative.dm +++ /dev/null @@ -1,90 +0,0 @@ -/datum/trait/negative/deep_sleeper - custom_only = FALSE - -/datum/trait/negative/deep_breather - name ="Deep Breather" - desc = "You need more air for your lungs to properly work.." - cost = -1 - - custom_only = FALSE - can_take = ORGANICS - - var_changes = list("minimum_breath_pressure" = 18) - excludes = list(/datum/trait/positive/light_breather) - -/datum/trait/negative/thick_digits - name = "Thick Digits" - desc = "Your hands are not shaped in a way that allows useage of guns." - cost = -4 - custom_only = FALSE - -/datum/trait/negative/thick_digits/apply(var/datum/species/S,var/mob/living/carbon/human/H) - ..() - H.add_modifier(/datum/modifier/trait/thickdigits) - -/datum/trait/negative/faultwires - name = "Faulty Wires" - desc = "Due to poor construction, you have an unfortante weakness to EMPs." - cost = -3 - custom_only = FALSE - can_take = SYNTHETICS - var_changes = list("emp_dmg_mod" = 1.3) - excludes = list(/datum/trait/negative/poorconstruction, /datum/trait/positive/emp_resist, /datum/trait/positive/emp_resist_major) - -/datum/trait/negative/faultwires/apply(var/datum/species/S,var/mob/living/carbon/human/H) - ..() - H.add_modifier(/datum/modifier/trait/empweakness) - -/datum/trait/negative/poorconstruction - name = "Poor Construction" - desc = "Due to poor construction, you have an hefty weakness to EMPs." - cost = -5 - custom_only = FALSE - can_take = SYNTHETICS - var_changes = list("emp_dmg_mod" = 1.6) - excludes = list(/datum/trait/negative/faultwires, /datum/trait/positive/emp_resist, /datum/trait/positive/emp_resist_major) - -/datum/trait/negative/poorconstruction/apply(var/datum/species/S,var/mob/living/carbon/human/H) - ..() - H.add_modifier(/datum/modifier/trait/majorempweakness) - -/datum/trait/negative/meltable - name = "Water Weakness" - desc = "Due to your biology, water is harmful to you." - cost = -1 - custom_only = TRUE - var_changes = list("water_resistance" = 0, "water_damage_mod" = 0.3) - excludes = list(/datum/trait/negative/meltable_major) - -/datum/trait/negative/meltable_major - name = "Extreme Water Weakness" - desc = "Due to your biology, water is very harmful to you." - cost = -3 - custom_only = TRUE - var_changes = list("water_resistance" = 0, "water_damage_mod" = 0.8) - excludes = list(/datum/trait/negative/meltable) - -/datum/trait/negative/lightweight_light - name = "Lesser Lightweight" - desc = "Your light weight and poor balance make you very susceptible to unhelpful bumping if you are unprepared)" - cost = -1 - var_changes = list("lightweight_light" = 1) - excludes = list(/datum/trait/negative/lightweight) - custom_only = FALSE - -/datum/trait/negative/breathes/carbon_dioxide - name = "Carbon Dioxide Breather" - desc = "You breathe carbon dioxide instead of oxygen, much like a plant. Oxygen is not poisonous to you." - var_changes = list("breath_type" = GAS_CO2, "exhale_type" = GAS_O2, "ideal_air_type" = /datum/gas_mixture/belly_air/carbon_dioxide_breather) - -/datum/trait/negative/synth_pain - name = "Obligate Pain Simulation" - desc = "Due to a structural flaw, hard-coding, or other inherent weakness, your body can feel pain, and you can't turn it off." - cost = -4 - custom_only = FALSE - can_take = SYNTHETICS - excludes = list(/datum/trait/neutral/synth_cosmetic_pain) - -/datum/trait/negative/synth_pain/apply(datum/species/S, mob/living/carbon/human/H, trait_prefs) - H.synth_cosmetic_pain = TRUE - . = ..() diff --git a/modular_chomp/code/modules/mob/living/carbon/human/species/station/traits/neutral.dm b/modular_chomp/code/modules/mob/living/carbon/human/species/station/traits/neutral.dm index b03d3b1e2e..5d3e169ad7 100644 --- a/modular_chomp/code/modules/mob/living/carbon/human/species/station/traits/neutral.dm +++ b/modular_chomp/code/modules/mob/living/carbon/human/species/station/traits/neutral.dm @@ -1,22 +1,3 @@ -/datum/trait/neutral/metabolism_up - can_take = ORGANICS|SYNTHETICS - -/datum/trait/neutral/metabolism_down - can_take = ORGANICS|SYNTHETICS - -/datum/trait/neutral/metabolism_apex - can_take = ORGANICS|SYNTHETICS - -/datum/trait/neutral/hide - name = "Hide" - desc = "You can hide beneath objects!" - cost = 0 - custom_only = FALSE - -/datum/trait/neutral/hide/apply(var/datum/species/S,var/mob/living/carbon/human/H) - ..() - add_verb(H,/mob/living/proc/hide) //CHOMPEdit TGPanel - /datum/trait/neutral/xenochimera_YR3 sort = TRAIT_SORT_SPECIES allowed_species = list(SPECIES_XENOCHIMERA) @@ -51,3 +32,22 @@ QDEL_NULL(implant) H.adjust_nutrition(100) to_chat(H, span_critical("Your NIF lets out one last sputter as it finally gives out")) + +/datum/trait/neutral/mobegglaying + name = "Egg Laying" + desc = "You can lay eggs, much like an avian." + cost = 0 + +/datum/trait/neutral/mobegglaying/apply(var/datum/species/S,var/mob/living/carbon/human/H) + ..() + add_verb(H,/mob/living/proc/mobegglaying) + +/datum/trait/neutral/succubus_bite + name = "Succubus Bite" + desc = "Allows you to inject your prey with poison, much like a venemous snake." + cost = 0 + custom_only = FALSE + +/datum/trait/neutral/succubus_bite/apply(var/datum/species/S,var/mob/living/carbon/human/H) + ..() + add_verb(H,/mob/living/proc/succubus_bite) diff --git a/modular_chomp/code/modules/mob/living/carbon/human/species/station/traits/positive.dm b/modular_chomp/code/modules/mob/living/carbon/human/species/station/traits/positive.dm index ba3f888dd1..b10000b7ac 100644 --- a/modular_chomp/code/modules/mob/living/carbon/human/species/station/traits/positive.dm +++ b/modular_chomp/code/modules/mob/living/carbon/human/species/station/traits/positive.dm @@ -1,49 +1,39 @@ -/datum/trait/neutral/hardfeet - custom_only = FALSE - -/datum/trait/positive/linguist - custom_only = FALSE - -/datum/trait/positive/toxin_gut - custom_only = FALSE - -/datum/trait/positive/light_breather - name ="Light Breather" - desc = "You need less air for your lungs to properly work.." - cost = 1 - - custom_only = FALSE - can_take = ORGANICS - var_changes = list("minimum_breath_pressure" = 12) - excludes = list(/datum/trait/negative/deep_breather) - -/datum/trait/positive/emp_resist - name = "EMP Resistance" - desc = "You are resistant to EMPs" - cost = 3 - - can_take = SYNTHETICS - custom_only = FALSE - var_changes = list("emp_dmg_mod" = 0.7) - excludes = list(/datum/trait/negative/faultwires, /datum/trait/negative/poorconstruction, /datum/trait/positive/emp_resist_major) - -/datum/trait/positive/emp_resist/apply(var/datum/species/S,var/mob/living/carbon/human/H) - ..() - H.add_modifier(/datum/modifier/trait/empresist) - -/datum/trait/positive/emp_resist_major - name = "Major EMP Resistance" - desc = "You are very resistant to EMPs" - cost = 5 - - can_take = SYNTHETICS - custom_only = FALSE - var_changes = list("emp_dmg_mod" = 0.5) - excludes = list(/datum/trait/negative/faultwires, /datum/trait/negative/poorconstruction, /datum/trait/positive/emp_resist) - -/datum/trait/positive/emp_resist_major/apply(var/datum/species/S,var/mob/living/carbon/human/H) - ..() - H.add_modifier(/datum/modifier/trait/empresistb) - /datum/trait/positive/weaver - custom_only = FALSE //Let species use the webs for wierd stuff like metal webs, slime creations, etc. + category = 0 + cost = 0 + +/datum/trait/positive/linguist //THIS HOOKING INTO THE ORIGINAL LINGUIST FUCKS THINGS HARD. DURING TRAIT REWORK, DELETE THIS AND REENABLE LINGUIST/MASTER + name = "Master Linguist" + desc = "You are a master of languages! For whatever reason you might have, you are able to learn many more languages than others. Your language cap is 12 slots." + cost = 2 + var_changes = list("num_alternate_languages" = 15) + var_changes_pref = list("extra_languages" = 12) + custom_only = FALSE + +/datum/trait/positive/darksight + name = "Darksight" + desc = "Allows you to see a short distance in the dark. (Half the screen)." + cost = 1 + var_changes = list("darksight" = 4) //CHOMP Edit + custom_only = FALSE + banned_species = list(SPECIES_TAJARAN, SPECIES_SHADEKIN_CREW, SPECIES_SHADEKIN, SPECIES_XENOHYBRID, SPECIES_VULPKANIN, SPECIES_XENO, SPECIES_XENOCHIMERA, SPECIES_VASILISSAN, SPECIES_WEREBEAST) //These species already have strong darksight by default. + +/datum/trait/positive/darksight_plus + name = "Darksight, Major" + desc = "Allows you to see in the dark for the whole screen." + cost = 2 + var_changes = list("darksight" = 8) + custom_only = FALSE + banned_species = list(SPECIES_TAJARAN, SPECIES_SHADEKIN_CREW, SPECIES_SHADEKIN, SPECIES_XENOHYBRID, SPECIES_VULPKANIN, SPECIES_XENO, SPECIES_XENOCHIMERA, SPECIES_VASILISSAN, SPECIES_WEREBEAST) //These species already have strong darksight by default. + +/datum/trait/positive/endurance_high + cost = 3 + excludes = list(/datum/trait/positive/endurance_very_high, /datum/trait/positive/endurance_extremely_high) // CHOMPEdit: Increased Endurance. + // excludes = list(/datum/trait/positive/brute_resist, /datum/trait/positive/minor_brute_resist, /datum/trait/positive/minor_burn_resist, /datum/trait/positive/burn_resist) + // Tankiness at the cost of severe downsides should be allowed - we have a large number of negatives that hurt hard, but you can't take many positives. + +/datum/trait/positive/burn_resist_plus + cost = 3 // Exact Opposite of Burn Weakness Major, except Weakness Major is 50% incoming, this is -40% incoming. + +/datum/trait/positive/brute_resist_plus // Equivalent to Brute Weakness Major, cannot be taken at the same time. + cost = 3 // Exact Opposite of Brute Weakness Major, except Weakness Major is 50% incoming, this is -40% incoming. diff --git a/vorestation.dme b/vorestation.dme index 7688a2ec42..2133cd8fd5 100644 --- a/vorestation.dme +++ b/vorestation.dme @@ -123,7 +123,6 @@ #include "code\__defines\map.dm" #include "code\__defines\materials.dm" #include "code\__defines\math.dm" -#include "code\__defines\math_ch.dm" #include "code\__defines\math_physics.dm" #include "code\__defines\matrices.dm" #include "code\__defines\MC.dm" @@ -691,11 +690,14 @@ #include "code\datums\components\species\shadekin\powers\regenerate_other.dm" #include "code\datums\components\species\shadekin\powers\dark_tunnel\dark_tunnel_structures.dm" #include "code\datums\components\species\shadekin\powers\dark_tunnel\dark_tunneling.dm" +#include "code\datums\components\traits\absorbent.dm" #include "code\datums\components\structures\bluespace_connection.dm" #include "code\datums\components\traits\burninlight.dm" #include "code\datums\components\traits\crowd_detection.dm" #include "code\datums\components\traits\drippy.dm" #include "code\datums\components\traits\gargoyle.dm" +#include "code\datums\components\traits\hallucinations.dm" +#include "code\datums\components\traits\low_sugar.dm" #include "code\datums\components\traits\nutrition_size_change.dm" #include "code\datums\components\traits\photosynth.dm" #include "code\datums\components\traits\radiation_effects.dm" @@ -3499,13 +3501,10 @@ #include "code\modules\mob\living\carbon\human\species\station\protean\protean_species.dm" #include "code\modules\mob\living\carbon\human\species\station\traits\_traits.dm" #include "code\modules\mob\living\carbon\human\species\station\traits\negative.dm" -#include "code\modules\mob\living\carbon\human\species\station\traits\negative_ch.dm" #include "code\modules\mob\living\carbon\human\species\station\traits\negative_genes.dm" #include "code\modules\mob\living\carbon\human\species\station\traits\neutral.dm" -#include "code\modules\mob\living\carbon\human\species\station\traits\neutral_ch.dm" #include "code\modules\mob\living\carbon\human\species\station\traits\neutral_genes.dm" #include "code\modules\mob\living\carbon\human\species\station\traits\positive.dm" -#include "code\modules\mob\living\carbon\human\species\station\traits\positive_ch.dm" #include "code\modules\mob\living\carbon\human\species\station\traits\positive_genes.dm" #include "code\modules\mob\living\carbon\human\species\station\traits\trait.dm" #include "code\modules\mob\living\carbon\human\species\station\traits\traits_tutorial.dm" @@ -5240,7 +5239,6 @@ #include "modular_chomp\code\modules\mob\living\carbon\human\species\station\station_ch.dm" #include "modular_chomp\code\modules\mob\living\carbon\human\species\station\station_special_ch.dm" #include "modular_chomp\code\modules\mob\living\carbon\human\species\station\teshari.dm" -#include "modular_chomp\code\modules\mob\living\carbon\human\species\station\traits\negative.dm" #include "modular_chomp\code\modules\mob\living\carbon\human\species\station\traits\neutral.dm" #include "modular_chomp\code\modules\mob\living\carbon\human\species\station\traits\positive.dm" #include "modular_chomp\code\modules\mob\living\carbon\human\species\station\traits\trait_mods.dm"