Skip to content

Commit

Permalink
bugfix: maybe fixing many legion skulls spawn from dead bodies (#4125)
Browse files Browse the repository at this point in the history
  • Loading branch information
NightDawnFox authored Dec 25, 2023
1 parent c72bbdd commit 5dfb838
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 6 deletions.
9 changes: 5 additions & 4 deletions code/modules/mining/equipment/regenerative_core.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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)
. = ..()
Expand Down
11 changes: 9 additions & 2 deletions code/modules/mob/living/simple_animal/hostile/mining/hivelord.dm
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@
visible_message("<span class='warning'>The skulls on [src] wail in anger as they flee from their dying host!</span>")
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))
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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"
Expand Down

0 comments on commit 5dfb838

Please sign in to comment.