From 44d8e4beb80a71bde7d08cb6318a4559aec70645 Mon Sep 17 00:00:00 2001 From: Fox-McCloud Date: Wed, 8 Apr 2015 06:42:47 -0400 Subject: [PATCH 1/3] [Goonchem] Acid Rework --- code/modules/reagents/Chemistry-Reagents.dm | 66 ++++++------------ code/modules/reagents/newchem/toxins.dm | 77 +++++++-------------- 2 files changed, 46 insertions(+), 97 deletions(-) diff --git a/code/modules/reagents/Chemistry-Reagents.dm b/code/modules/reagents/Chemistry-Reagents.dm index 9a62abf43c9..d2f49a6cc70 100644 --- a/code/modules/reagents/Chemistry-Reagents.dm +++ b/code/modules/reagents/Chemistry-Reagents.dm @@ -716,61 +716,35 @@ datum reaction_mob(var/mob/living/M, var/method=TOUCH, var/volume) if(!istype(M, /mob/living)) return - if(method == TOUCH) + if(method == TOUCH || method == INGEST) if(ishuman(M)) var/mob/living/carbon/human/H = M - if(H.wear_mask) - if(!H.wear_mask.unacidable) - del (H.wear_mask) - H.update_inv_wear_mask() - H << "\red Your mask melts away but protects you from the acid!" - else - H << "\red Your mask protects you from the acid!" - return + if(volume > 25) - if(H.head) - if(prob(15) && !H.head.unacidable) - del(H.head) - H.update_inv_head() - H << "\red Your helmet melts away but protects you from the acid" - else - H << "\red Your helmet protects you from the acid!" - return + if(method == TOUCH) + if(H.wear_mask) + H << "\red Your mask protects you from the acid!" + return - else if(ismonkey(M)) - var/mob/living/carbon/monkey/MK = M - if(MK.wear_mask) - if(!MK.wear_mask.unacidable) - del (MK.wear_mask) - MK.update_inv_wear_mask() - MK << "\red Your mask melts away but protects you from the acid!" - else - MK << "\red Your mask protects you from the acid!" - return + if(H.head) + H << "\red Your helmet protects you from the acid!" + return - if(!M.unacidable) - if(prob(15) && istype(M, /mob/living/carbon/human) && volume >= 30) - var/mob/living/carbon/human/H = M - var/obj/item/organ/external/affecting = H.get_organ("head") - if(affecting) - if(affecting.take_damage(25, 0)) - H.UpdateDamageIcon() - H.status_flags |= DISFIGURED - H.emote("scream") + if(!M.unacidable) + if(prob(75)) + var/obj/item/organ/external/affecting = H.get_organ("head") + if(affecting) + affecting.take_damage(20, 0) + H.UpdateDamageIcon() + H.emote("scream") + else + M.take_organ_damage(15,0) else - M.take_organ_damage(min(15, volume * 2)) // uses min() and volume to make sure they aren't being sprayed in trace amounts (1 unit != insta rape) -- Doohl - else - if(!M.unacidable) - M.take_organ_damage(min(15, volume * 2)) + M.take_organ_damage(15,0) reaction_obj(var/obj/O, var/volume) - if(istype(O,/obj/item/weapon/organ/head)) - new/obj/item/weapon/skeleton/head(O.loc) - for(var/mob/M in viewers(5, O)) - M << "\red \the [O] melts." - del(O) - if((istype(O,/obj/item) || istype(O,/obj/effect/glowshroom)) && prob(10)) + if((istype(O,/obj/item) || istype(O,/obj/effect/glowshroom)) && prob(40)) if(!O.unacidable) var/obj/effect/decal/cleanable/molten_item/I = new/obj/effect/decal/cleanable/molten_item(O.loc) I.desc = "Looks like this was \an [O] some time ago." diff --git a/code/modules/reagents/newchem/toxins.dm b/code/modules/reagents/newchem/toxins.dm index d79cdeed7a4..62c637c5abd 100644 --- a/code/modules/reagents/newchem/toxins.dm +++ b/code/modules/reagents/newchem/toxins.dm @@ -227,65 +227,39 @@ datum/reagent/facid datum/reagent/facid/reaction_mob(var/mob/living/M, var/method=TOUCH, var/volume) if(!istype(M, /mob/living)) return //wooo more runtime fixin - if(method == TOUCH) + if(method == TOUCH || method == INGEST) if(ishuman(M)) var/mob/living/carbon/human/H = M - if(H.wear_mask) - if(!H.wear_mask.unacidable) - qdel (H.wear_mask) - H.update_inv_wear_mask() - H << "\red Your mask melts away but protects you from the acid!" - else - H << "\red Your mask protects you from the acid!" - return + if(volume > 10) - if(H.head) - if(prob(15) && !H.head.unacidable) - qdel(H.head) - H.update_inv_head() - H << "\red Your helmet melts away but protects you from the acid" - else - H << "\red Your helmet protects you from the acid!" - return + if(method == TOUCH) + if(H.wear_mask) + if(!H.wear_mask.unacidable) + qdel (H.wear_mask) + H.update_inv_wear_mask() + H << "\red Your mask melts away but protects you from the acid!" + else + H << "\red Your mask protects you from the acid!" + return - if(!H.unacidable) - var/obj/item/organ/external/affecting = H.get_organ("head") - if(affecting.take_damage(15, 0)) + if(H.head) + if(!H.head.unacidable) + qdel(H.head) + H.update_inv_head() + H << "\red Your helmet melts away but protects you from the acid" + else + H << "\red Your helmet protects you from the acid!" + return + + if(!H.unacidable) + var/obj/item/organ/external/affecting = H.get_organ("head") + affecting.take_damage(75, 0) H.UpdateDamageIcon() - H.emote("scream") - else if(ismonkey(M)) - var/mob/living/carbon/monkey/MK = M - - if(MK.wear_mask) - if(!MK.wear_mask.unacidable) - qdel (MK.wear_mask) - MK.update_inv_wear_mask() - MK << "\red Your mask melts away but protects you from the acid!" - else - MK << "\red Your mask protects you from the acid!" - return - - if(!MK.unacidable) - MK.take_organ_damage(min(15, volume * 4)) // same deal as sulphuric acid - else - if(!M.unacidable) - if(ishuman(M)) - var/mob/living/carbon/human/H = M - var/obj/item/organ/external/affecting = H.get_organ("head") - if(affecting.take_damage(15, 0)) - H.UpdateDamageIcon() - H.emote("scream") - H.status_flags |= DISFIGURED - else - M.take_organ_damage(min(15, volume * 4)) + H.emote("scream") + H.status_flags |= DISFIGURED datum/reagent/facid/reaction_obj(var/obj/O, var/volume) - if(istype(O,/obj/item/weapon/organ/head)) - new/obj/item/weapon/skeleton/head(O.loc) - for(var/mob/M in viewers(5, O)) - M << "\red \the [O] melts." - qdel(O) if((istype(O,/obj/item) || istype(O,/obj/effect/glowshroom))) if(!O.unacidable) var/obj/effect/decal/cleanable/molten_item/I = new/obj/effect/decal/cleanable/molten_item(O.loc) @@ -293,6 +267,7 @@ datum/reagent/facid/reaction_obj(var/obj/O, var/volume) for(var/mob/M in viewers(5, O)) M << "\red \the [O] melts." qdel(O) + /datum/chemical_reaction/facid name = "Fluorosulfuric Acid" id = "facid" From 891af5bbffd45b7aef7272a2fffb3df3dead2f3e Mon Sep 17 00:00:00 2001 From: Fox-McCloud Date: Wed, 8 Apr 2015 17:51:20 -0400 Subject: [PATCH 2/3] tweak --- code/modules/reagents/Chemistry-Recipes.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/reagents/Chemistry-Recipes.dm b/code/modules/reagents/Chemistry-Recipes.dm index 35b8f9cef09..a3591a943c1 100644 --- a/code/modules/reagents/Chemistry-Recipes.dm +++ b/code/modules/reagents/Chemistry-Recipes.dm @@ -377,7 +377,7 @@ datum id = "sacid" result = "sacid" required_reagents = list("sulfur" = 1, "oxygen" = 1, "hydrogen" = 1) - result_amount = 3 + result_amount = 2 mix_message = "The mixture gives off a sharp acidic tang." ///////Changeling Blood Test///////////// From 993529a2b1c42590170eceaa4314441b6462bd6c Mon Sep 17 00:00:00 2001 From: Fox-McCloud Date: Wed, 8 Apr 2015 19:54:19 -0400 Subject: [PATCH 3/3] tweaking --- code/modules/reagents/Chemistry-Reagents.dm | 39 ++++++++++++++++----- code/modules/reagents/newchem/toxins.dm | 9 +++++ 2 files changed, 40 insertions(+), 8 deletions(-) diff --git a/code/modules/reagents/Chemistry-Reagents.dm b/code/modules/reagents/Chemistry-Reagents.dm index d2f49a6cc70..86dbb2760f3 100644 --- a/code/modules/reagents/Chemistry-Reagents.dm +++ b/code/modules/reagents/Chemistry-Reagents.dm @@ -716,20 +716,19 @@ datum reaction_mob(var/mob/living/M, var/method=TOUCH, var/volume) if(!istype(M, /mob/living)) return - if(method == TOUCH || method == INGEST) + if(method == TOUCH) if(ishuman(M)) var/mob/living/carbon/human/H = M if(volume > 25) - if(method == TOUCH) - if(H.wear_mask) - H << "\red Your mask protects you from the acid!" - return + if(H.wear_mask) + H << "\red Your mask protects you from the acid!" + return - if(H.head) - H << "\red Your helmet protects you from the acid!" - return + if(H.head) + H << "\red Your helmet protects you from the acid!" + return if(!M.unacidable) if(prob(75)) @@ -743,6 +742,30 @@ datum else M.take_organ_damage(15,0) + if(method == INGEST) + if(ishuman(M)) + var/mob/living/carbon/human/H = M + + if(volume < 10) + M << "The greenish acidic substance stings you, but isn't concentrated enough to harm you!" + + if(volume >=10 && volume <=25) + if(!H.unacidable) + M.take_organ_damage(min(max(volume-10,2)*2,20),0) + M.emote("scream") + + + if(volume > 25) + if(!M.unacidable) + if(prob(75)) + var/obj/item/organ/external/affecting = H.get_organ("head") + if(affecting) + affecting.take_damage(20, 0) + H.UpdateDamageIcon() + H.emote("scream") + else + M.take_organ_damage(15,0) + reaction_obj(var/obj/O, var/volume) if((istype(O,/obj/item) || istype(O,/obj/effect/glowshroom)) && prob(40)) if(!O.unacidable) diff --git a/code/modules/reagents/newchem/toxins.dm b/code/modules/reagents/newchem/toxins.dm index 62c637c5abd..c173c5adbea 100644 --- a/code/modules/reagents/newchem/toxins.dm +++ b/code/modules/reagents/newchem/toxins.dm @@ -231,6 +231,15 @@ datum/reagent/facid/reaction_mob(var/mob/living/M, var/method=TOUCH, var/volume) if(ishuman(M)) var/mob/living/carbon/human/H = M + if(volume < 5) + M << "The blueish acidic substance stings you, but isn't concentrated enough to harm you!" + + if(volume >=5 && volume <=10) + if(!H.unacidable) + M.take_organ_damage(max(volume-5,2)*4,0) + M.emote("scream") + + if(volume > 10) if(method == TOUCH)