From 02feea9d71e35c99942f84f83c150225c8564008 Mon Sep 17 00:00:00 2001 From: Matt Atlas Date: Mon, 6 Jun 2022 08:09:58 +0200 Subject: [PATCH] Buffs phoron contact damage, very slight buff to no pressure damage. (#14118) Co-authored-by: Matt Atlas --- code/ZAS/Phoron.dm | 17 ++++---- code/__defines/atmos.dm | 2 +- code/modules/mob/abstract/freelook/ai/eye.dm | 3 ++ code/modules/mob/living/carbon/human/life.dm | 2 +- code/modules/mob/living/living.dm | 26 +++++------ .../Chemistry-Reagents-Toxins.dm | 13 +++++- .../changelogs/mattatlas-environmentbuffs.yml | 43 +++++++++++++++++++ 7 files changed, 78 insertions(+), 28 deletions(-) create mode 100644 html/changelogs/mattatlas-environmentbuffs.yml diff --git a/code/ZAS/Phoron.dm b/code/ZAS/Phoron.dm index 6c9750ab89c..8fca936e557 100644 --- a/code/ZAS/Phoron.dm +++ b/code/ZAS/Phoron.dm @@ -42,10 +42,13 @@ var/image/contamination_overlay = image('icons/effects/contamination.dmi') /obj/item/proc/can_contaminate() - //Clothing and backpacks can be contaminated. - if(flags & PHORONGUARD) return 0 - else if(istype(src,/obj/item/storage/backpack)) return 0 //Cannot be washed :( - else if(istype(src,/obj/item/clothing)) return 1 + if(flags & PHORONGUARD) + return FALSE + return TRUE + +//Clothing can be contaminated. +/obj/item/storage/backpack/can_contaminate() + return FALSE /obj/item/proc/contaminate() //Do a contamination overlay? Temporary measure to keep contamination less deadly than it was. @@ -68,10 +71,6 @@ var/image/contamination_overlay = image('icons/effects/contamination.dmi') if(!pl_head_protected()) if(prob(1)) suit_contamination() //Phoron can sometimes get through such an open suit. -//Cannot wash backpacks currently. -// if(istype(back,/obj/item/storage/backpack)) -// back.contaminate() - /mob/proc/pl_effects() /mob/living/carbon/human/pl_effects() @@ -90,7 +89,7 @@ var/image/contamination_overlay = image('icons/effects/contamination.dmi') //Burn skin if exposed. if(vsc.plc.SKIN_BURNS) if(!pl_head_protected() || !pl_suit_protected()) - burn_skin(2) + burn_skin(3) if(prob(20)) to_chat(src, SPAN_DANGER("Your skin burns!")) updatehealth() diff --git a/code/__defines/atmos.dm b/code/__defines/atmos.dm index 41e346cb4a0..209e429d5ec 100644 --- a/code/__defines/atmos.dm +++ b/code/__defines/atmos.dm @@ -25,7 +25,7 @@ #define PRESSURE_DAMAGE_COEFFICIENT 4 // The amount of pressure damage someone takes is equal to (pressure / HAZARD_HIGH_PRESSURE)*PRESSURE_DAMAGE_COEFFICIENT, with the maximum of MAX_PRESSURE_DAMAGE. #define MAX_HIGH_PRESSURE_DAMAGE 4 -#define LOW_PRESSURE_DAMAGE 0.5 // The amount of damage someone takes when in a low pressure area. (The pressure threshold is so low that it doesn't make sense to do any calculations, so it just applies this flat value). +#define LOW_PRESSURE_DAMAGE 0.6 // The amount of damage someone takes when in a low pressure area. (The pressure threshold is so low that it doesn't make sense to do any calculations, so it just applies this flat value). #define MINIMUM_PRESSURE_DIFFERENCE_TO_SUSPEND (MINIMUM_AIR_TO_SUSPEND*R_IDEAL_GAS_EQUATION*T20C)/CELL_VOLUME // Minimum pressure difference between zones to suspend #define MINIMUM_AIR_RATIO_TO_SUSPEND 0.05 // Minimum ratio of air that must move to/from a tile to suspend group processing diff --git a/code/modules/mob/abstract/freelook/ai/eye.dm b/code/modules/mob/abstract/freelook/ai/eye.dm index 89cfefa1c75..030c15df5b8 100644 --- a/code/modules/mob/abstract/freelook/ai/eye.dm +++ b/code/modules/mob/abstract/freelook/ai/eye.dm @@ -40,6 +40,9 @@ /mob/living/silicon/ai holo = null +/mob/living/silicon/burn_skin(burn_amount) + return FALSE + /mob/living/silicon/ai/proc/destroy_eyeobj(var/atom/new_eye) if(!eyeobj) return if(!new_eye) diff --git a/code/modules/mob/living/carbon/human/life.dm b/code/modules/mob/living/carbon/human/life.dm index 8ad7d59c93d..b79cde195b5 100644 --- a/code/modules/mob/living/carbon/human/life.dm +++ b/code/modules/mob/living/carbon/human/life.dm @@ -421,7 +421,7 @@ if(adjusted_pressure >= species.hazard_high_pressure) var/pressure_damage = min( ( (adjusted_pressure / species.hazard_high_pressure) -1 )*PRESSURE_DAMAGE_COEFFICIENT , MAX_HIGH_PRESSURE_DAMAGE) - take_overall_damage(brute=pressure_damage, used_weapon = "High Pressure") + take_overall_damage(pressure_damage, used_weapon = "High Pressure") pressure_alert = 2 else if(adjusted_pressure >= species.warning_high_pressure) pressure_alert = 1 diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm index cbaa95e66f8..311ed490787 100644 --- a/code/modules/mob/living/living.dm +++ b/code/modules/mob/living/living.dm @@ -221,22 +221,16 @@ default behaviour is: //sort of a legacy burn method for /electrocute, /shock /mob/living/proc/burn_skin(burn_amount) - if(istype(src, /mob/living/carbon/human)) - if(mShock in src.mutations) //shockproof - return 0 - if (COLD_RESISTANCE in src.mutations) //fireproof - return 0 - var/mob/living/carbon/human/H = src //make this damage method divide the damage to be done among all the body parts, then burn each body part for that much damage. will have better effect then just randomly picking a body part - var/divided_damage = (burn_amount)/(H.organs.len) - var/extradam = 0 //added to when organ is at max dam - for(var/obj/item/organ/external/affecting in H.organs) - if(!affecting) continue - if(affecting.take_damage(0, divided_damage+extradam)) //TODO: fix the extradam stuff. Or, ebtter yet...rewrite this entire proc ~Carn - H.UpdateDamageIcon() - H.updatehealth() - return 1 - else if(istype(src, /mob/living/silicon/ai)) - return 0 + take_overall_damage(0, burn_amount) + return TRUE + +/mob/living/carbon/human/burn_skin(burn_amount) + if(mShock in mutations) //shockproof + return FALSE + if (COLD_RESISTANCE in mutations) //fireproof + return FALSE + . = ..() + updatehealth() /mob/living/proc/adjustBodyTemp(actual, desired, incrementboost) var/temperature = actual diff --git a/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Toxins.dm b/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Toxins.dm index 907de81e83b..3ad676f3aab 100644 --- a/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Toxins.dm +++ b/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Toxins.dm @@ -135,7 +135,18 @@ if((alien == IS_VAURCA) || (istype(P) && P.stage >= 3)) return - M.take_organ_damage(0, removed * 0.1) //being splashed directly with phoron causes minor chemical burns + M.take_organ_damage(0, removed * 0.3) //being splashed directly with phoron causes minor chemical burns + if(prob(50)) + M.pl_effects() + +/decl/reagent/toxin/phoron/affect_breathe(var/mob/living/carbon/M, var/alien, var/removed, var/datum/reagents/holder) + if(istype(M, /mob/living/carbon/human)) + var/mob/living/carbon/human/H = M + var/obj/item/organ/internal/parasite/P = H.internal_organs_by_name["blackkois"] + if((alien == IS_VAURCA) || (istype(P) && P.stage >= 3)) + return + + M.take_organ_damage(0, removed * 0.6) //Breathing phoron? Oh hell no boy my boy. if(prob(50)) M.pl_effects() diff --git a/html/changelogs/mattatlas-environmentbuffs.yml b/html/changelogs/mattatlas-environmentbuffs.yml new file mode 100644 index 00000000000..48be80f5472 --- /dev/null +++ b/html/changelogs/mattatlas-environmentbuffs.yml @@ -0,0 +1,43 @@ +################################ +# Example Changelog File +# +# Note: This file, and files beginning with ".", and files that don't end in ".yml" will not be read. If you change this file, you will look really dumb. +# +# Your changelog will be merged with a master changelog. (New stuff added only, and only on the date entry for the day it was merged.) +# When it is, any changes listed below will disappear. +# +# Valid Prefixes: +# bugfix +# wip (For works in progress) +# tweak +# soundadd +# sounddel +# rscadd (general adding of nice things) +# rscdel (general deleting of nice things) +# imageadd +# imagedel +# maptweak +# spellcheck (typo fixes) +# experiment +# balance +# admin +# backend +# security +# refactor +################################# + +# Your name. +author: MattAtlas + +# Optional: Remove this file after generating master changelog. Useful for PR changelogs that won't get used again. +delete-after: True + +# Any changes you've made. See valid prefix list above. +# INDENT WITH TWO SPACES. NOT TABS. SPACES. +# SCREW THIS UP AND IT WON'T WORK. +# Also, all entries are changed into a single [] after a master changelog generation. Just remove the brackets when you add new entries. +# Please surround your changes in double quotes ("), as certain characters otherwise screws up compiling. The quotes will not show up in the changelog. +changes: + - bugfix: "Phoron gas contact damage is no longer spread out to every organ. This allowed it to be entirely autohealed by natural regeneration." + - tweak: "Very slightly increased zero pressure brute damage." + - tweak: "Inhaling phoron with an inhaler is now really bad for you."