From db511f4d7e8d5b208af2bd4ca876119cf1c6a729 Mon Sep 17 00:00:00 2001 From: Cognition Date: Fri, 17 Sep 2021 02:23:06 -0700 Subject: [PATCH] Regenerative extract nerfing --- .../xenobiology/crossbreeding/regenerative.dm | 51 +++++++++++++++---- 1 file changed, 42 insertions(+), 9 deletions(-) diff --git a/code/modules/research/xenobiology/crossbreeding/regenerative.dm b/code/modules/research/xenobiology/crossbreeding/regenerative.dm index 39877d6706..2503190c58 100644 --- a/code/modules/research/xenobiology/crossbreeding/regenerative.dm +++ b/code/modules/research/xenobiology/crossbreeding/regenerative.dm @@ -14,25 +14,58 @@ Regenerative extracts: /obj/item/slimecross/regenerative/proc/core_effect_before(mob/living/carbon/human/target, mob/user) return +/obj/item/slimecross/regenerative/pre_attack(atom/A, mob/living/user, params, attackchain_flags, damage_multiplier) + if(!isliving(A)) + return TRUE //returning TRUE preemptively ends the attack chain and thus doesn't call afterattack, this is noteworthy for below as well + var/mob/living/M = A + if(M.stat == DEAD) + to_chat(user, "[src] will not work on the dead!") + return TRUE + //inform the target that they're about to have a regenerative extract used on them + if(M != user) + M.visible_message("[user] readies [src], holding it steady near [M] and guiding it to the center of [M.p_their()] mass...", + "[user] readies [src], holding it steady near you and guiding it to the center of your mass...") + else + M.visible_message("[user] readies [src], holding it steady near [user.p_them()]self and guiding it to the center of [user.p_their()] mass...", + "You ready [src], holding it steady near you and guiding it to the center of your mass...") + if(!do_after(user, 50, target = M)) //5 seconds + return TRUE + . = ..() /obj/item/slimecross/regenerative/afterattack(atom/target,mob/user,prox) . = ..() if(!prox || !isliving(target)) return - var/mob/living/H = target - if(H.stat == DEAD) - to_chat(user, "[src] will not work on the dead!") + var/mob/living/M = target + if(M.stat == DEAD) + to_chat(user, "[M] died before you could apply [src]!") return - if(H != user) - user.visible_message("[user] crushes the [src] over [H], the milky goo quickly regenerating all of [H.p_their()] injuries!", - "You squeeze the [src], and it bursts over [H], the milky goo regenerating [H.p_their()] injuries.") + if(M != user) + user.visible_message("[user] crushes the [src] over [M], the milky goo quickly regenerating all of [M.p_their()] injuries!", + "You squeeze the [src], and it bursts over [M], the milky goo regenerating [M.p_their()] injuries.") else user.visible_message("[user] crushes the [src] over [user.p_them()]self, the milky goo quickly regenerating all of [user.p_their()] injuries!", "You squeeze the [src], and it bursts in your hand, splashing you with milky goo which quickly regenerates your injuries!") - core_effect_before(H, user) - H.revive(full_heal = 1) - core_effect(H, user) + core_effect_before(M, user) + var/new_disgust_level = 0 + if(iscarbon(M)) //simpler mobs don't have a disgust variable and we need to grab that. + var/mob/living/carbon/C = M + new_disgust_level = C.disgust + DISGUST_LEVEL_GROSS + M.revive(full_heal = 1) + M.set_disgust(new_disgust_level) + core_effect(M, user) playsound(target, 'sound/effects/splat.ogg', 40, 1) + //warn receivers of the extract about the disgust if they're carbon, making it clear that the regenerative extract is causing this. + if(iscarbon(M)) + switch(new_disgust_level) + if(0 to DISGUST_LEVEL_GROSS) + to_chat(M,"While you recovered from [src], you feel a little nauseous.") + if(DISGUST_LEVEL_GROSS to DISGUST_LEVEL_VERYGROSS) + to_chat(M,"While you recovered from [src], you feel quite queasy.") + if(DISGUST_LEVEL_VERYGROSS to DISGUST_LEVEL_DISGUSTED) + to_chat(M,"While you recovered from [src], you feel like you're about to vomit!") + if(DISGUST_LEVEL_DISGUSTED to INFINITY) + to_chat(M,"You feel absolutely sick. Maybe you should lay off the regenerative extracts until your stomach settles!") qdel(src) /obj/item/slimecross/regenerative/grey