From 5dfb8382f36a24674b8219b7a967f4d99cbc7664 Mon Sep 17 00:00:00 2001 From: NightDawnFox <116907157+NightDawnFox@users.noreply.github.com> Date: Tue, 26 Dec 2023 03:26:03 +0500 Subject: [PATCH] bugfix: maybe fixing many legion skulls spawn from dead bodies (#4125) --- code/modules/mining/equipment/regenerative_core.dm | 9 +++++---- .../living/simple_animal/hostile/mining/hivelord.dm | 11 +++++++++-- 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/code/modules/mining/equipment/regenerative_core.dm b/code/modules/mining/equipment/regenerative_core.dm index ee0a6f42916..a2f37176169 100644 --- a/code/modules/mining/equipment/regenerative_core.dm +++ b/code/modules/mining/equipment/regenerative_core.dm @@ -260,10 +260,11 @@ owner.adjustBruteLoss(1000) L.stored_mob = owner owner.forceMove(L) - qdel(src) - if(prob(25) && !owner.get_int_organ(/obj/item/organ/internal/legion_tumour)) // Congratulations you have won a very special prize: second cancer in a row! - var/obj/item/organ/internal/legion_tumour/cancer = new() - cancer.insert(owner, special = TRUE) + if(prob(75) && owner.get_int_organ(/obj/item/organ/internal/legion_tumour)) + qdel(src) // Congratulations you haven't won a very special prize: second cancer in a row! + else + stage = 0 + elapsed_time = 0 /obj/item/organ/internal/legion_tumour/on_find(mob/living/finder) . = ..() diff --git a/code/modules/mob/living/simple_animal/hostile/mining/hivelord.dm b/code/modules/mob/living/simple_animal/hostile/mining/hivelord.dm index 17495de61ca..7865bdb0a09 100644 --- a/code/modules/mob/living/simple_animal/hostile/mining/hivelord.dm +++ b/code/modules/mob/living/simple_animal/hostile/mining/hivelord.dm @@ -209,7 +209,7 @@ visible_message("The skulls on [src] wail in anger as they flee from their dying host!") var/turf/T = get_turf(src) for(var/i in 1 to 2) - new brood_type(T) + new /mob/living/simple_animal/hostile/asteroid/hivelordbrood/legion/weaken(T) if(T) if(stored_mob) stored_mob.forceMove(get_turf(src)) @@ -248,10 +248,11 @@ del_on_death = TRUE stat_attack = UNCONSCIOUS robust_searching = 1 + var/can_infest = TRUE var/can_infest_dead = FALSE /mob/living/simple_animal/hostile/asteroid/hivelordbrood/legion/Life(seconds, times_fired) - if(isturf(loc)) + if(isturf(loc) && can_infest) for(var/mob/living/carbon/human/H in view(src,1)) //Only for corpse right next to/on same tile if(H.stat == UNCONSCIOUS || (can_infest_dead && H.stat == DEAD)) infest(H) @@ -301,6 +302,12 @@ stat_attack = DEAD can_infest_dead = TRUE +/mob/living/simple_animal/hostile/asteroid/hivelordbrood/legion/weaken + melee_damage_lower = 6 + melee_damage_upper = 6 + can_infest = FALSE + + //Legion that spawns Legions /mob/living/simple_animal/hostile/big_legion name = "legion"