From 1db11848cd41aa64ba9d501bfb7e43b556e444b2 Mon Sep 17 00:00:00 2001 From: Arturlang <24881678+Arturlang@users.noreply.github.com> Date: Fri, 4 Jul 2025 02:15:40 +0300 Subject: [PATCH] gives ling absorbed zombies a 5% chance to infect (#3965) ## About The Pull Request fix changeling zombie infection & give ling absorbed zombies 5% chance, on a 3 second cooldown which does not work on dead targets, also gives it better messages and ensures that infection spread via this inherits the lowered infection chances. Plus gives ling zombies some better blood regen that normalizes to 560 in increments of 5, from 3 they really need it. ## Why It's Good For The Game Changeling absorbed zombies still get the infection chance, gives them a small chance to actually spread the virus, even if teensy, and makes it not possible to scale out of control. ## Proof Of Testing
Screenshots/Videos
## Changelog :cl: balance: Ling absorbed zombies now have a 5% chance to infect, and any infected via that inherit that chance. balance: Ling zombies now regen 5 blood per process up to 560 blood fix: Fixes ling zombie infection, as even the vial version did not work properly /:cl: --------- Co-authored-by: Roxy <75404941+TealSeer@users.noreply.github.com> --- .../~~bubber_defines/changeling_zombie.dm | 2 +- .../modules/changeling_zombies/infection.dm | 4 +- .../code/modules/changeling_zombies/items.dm | 65 +++++++++---------- 3 files changed, 32 insertions(+), 39 deletions(-) diff --git a/code/__DEFINES/~~bubber_defines/changeling_zombie.dm b/code/__DEFINES/~~bubber_defines/changeling_zombie.dm index 253b6dca024..11232a96ad9 100644 --- a/code/__DEFINES/~~bubber_defines/changeling_zombie.dm +++ b/code/__DEFINES/~~bubber_defines/changeling_zombie.dm @@ -17,7 +17,7 @@ #define CHANGELING_ZOMBIE_INFECT_CHANCE 80 //Infection chance per instance when a melee attack is supposed to draw blood. This applies to changeling zombies created by changelings. -#define CHANGELING_ZOMBIE_INFECT_CHANCE_LESSER 0 +#define CHANGELING_ZOMBIE_INFECT_CHANCE_LESSER 5 //Infection cooldown to be able to infect another person after a successful infection. #define CHANGELING_ZOMBIE_REINFECT_DELAY (3 SECONDS) diff --git a/modular_zubbers/code/modules/changeling_zombies/infection.dm b/modular_zubbers/code/modules/changeling_zombies/infection.dm index c7537d1b63b..f5c9293f657 100644 --- a/modular_zubbers/code/modules/changeling_zombies/infection.dm +++ b/modular_zubbers/code/modules/changeling_zombies/infection.dm @@ -116,8 +116,8 @@ GLOBAL_VAR_INIT(changeling_zombies_detected,FALSE) if(length(healing_options)) host.heal_damage_type(CHANGELING_ZOMBIE_PASSIVE_HEALING,pick(healing_options)) - if(host.blood_volume <= BLOOD_VOLUME_BAD) - host.blood_volume += 3 + if(host.blood_volume <= BLOOD_VOLUME_NORMAL) + host.blood_volume += 5 if(length(bodypart_zones_to_regenerate) && COOLDOWN_FINISHED(src,limb_regen_cooldown)) var/selected_zone = pick_n_take(bodypart_zones_to_regenerate) diff --git a/modular_zubbers/code/modules/changeling_zombies/items.dm b/modular_zubbers/code/modules/changeling_zombies/items.dm index ef578f81fb3..fce13f1e1fd 100644 --- a/modular_zubbers/code/modules/changeling_zombies/items.dm +++ b/modular_zubbers/code/modules/changeling_zombies/items.dm @@ -29,49 +29,42 @@ else . += span_warning("Has a [blood_chance]% chance to infect when drawing blood on hit, with a [CHANGELING_ZOMBIE_REINFECT_DELAY/10] second cooldown.") -/obj/item/melee/arm_blade/changeling_zombie/attack(mob/living/target_mob, mob/living/user, params) +/obj/item/melee/arm_blade/changeling_zombie/attack(mob/living/target_mob, mob/living/user, list/modifiers, list/attack_modifiers) . = ..() - if(COOLDOWN_FINISHED(src,sound_cooldown) && prob(length(attack_living_sounds)*25)) - playsound(src,pick(attack_living_sounds),50,TRUE,SOUND_RANGE*2) + if(COOLDOWN_FINISHED(src, sound_cooldown) && prob(length(attack_living_sounds) * 25)) + playsound(src, pick(attack_living_sounds), 50, TRUE, SOUND_RANGE * 2) COOLDOWN_START(src, sound_cooldown, 3 SECONDS) + if(.) // TRUE means we were blocked + return + if(blood_chance <= 0 || target_mob.stat == DEAD || !user) //Can't infect. Will still draw blood anyways. + return + var/final_force = CALCULATE_FORCE(src, attack_modifiers) + if(final_force <= 0 || !ishuman(target_mob) || !COOLDOWN_FINISHED(src, infection_cooldown)) + return + COOLDOWN_START(src, infection_cooldown, CHANGELING_ZOMBIE_REINFECT_DELAY) + if(!prob(blood_chance)) + return + if(!can_become_changeling_zombie(target_mob)) + target_mob.balloon_alert(user, "cannot infect") + return + var/mob/living/carbon/human/host = target_mob + var/datum/component/changeling_zombie_infection/infection = host.AddComponent(/datum/component/changeling_zombie_infection) + if(!infection) + return + target_mob.balloon_alert(user, "infected") + var/datum/component/changeling_zombie_infection/component = user.GetComponent(/datum/component/changeling_zombie_infection) + if(!component) + return + infection.was_changeling_husked = component.was_changeling_husked + if(component.infect_objective) + component.infect_objective.total_infections += 1 /obj/item/melee/arm_blade/changeling_zombie/attack_atom(atom/attacked_atom, mob/living/user, params) . = ..() - if(COOLDOWN_FINISHED(src,sound_cooldown) && prob(length(attack_inanimate_sounds)*25)) - playsound(src,pick(attack_inanimate_sounds),50,TRUE,SOUND_RANGE*2) + if(COOLDOWN_FINISHED(src, sound_cooldown) && prob(length(attack_inanimate_sounds) * 25)) + playsound(src, pick(attack_inanimate_sounds), 50, TRUE, SOUND_RANGE * 2) COOLDOWN_START(src, sound_cooldown, 3 SECONDS) -// todo: FIX -// /obj/item/melee/arm_blade/changeling_zombie/add_mob_blood(mob/living/injected_mob) - -// if(blood_chance <= 0) //Can't infect. Will still draw blood anyways. -// return ..() - -// if(!injected_mob.stat && !prob(blood_chance)) //Alive mobs have additional checks. -// return - -// . = ..() - -// if(!.) -// return - -// if(!ishuman(injected_mob)) -// return - -// if(!injected_mob.stat && !COOLDOWN_FINISHED(src,infection_cooldown)) -// return - -// COOLDOWN_START(src, infection_cooldown, CHANGELING_ZOMBIE_REINFECT_DELAY) - -// var/mob/living/carbon/human/host = injected_mob - -// if(can_become_changeling_zombie(host) && host.AddComponent(/datum/component/changeling_zombie_infection)) -// var/mob/living/arm_user = src.loc -// if(istype(arm_user)) -// var/datum/component/changeling_zombie_infection/component = arm_user.GetComponent(/datum/component/changeling_zombie_infection) -// if(component && component.infect_objective) -// component.infect_objective.total_infections += 1 - /obj/item/clothing/suit/armor/changeling/prototype name = "prototype chitinous mass" armor_type = /datum/armor/armor_changeling_zombie