From 3c329d2c69fa4ef1f6f37e8a66804c86a89b00b3 Mon Sep 17 00:00:00 2001 From: Vladisvell <73733747+Vladisvell@users.noreply.github.com> Date: Sun, 27 Oct 2024 04:58:05 +0500 Subject: [PATCH] bugfix: Hardmode grenades do not work on enemies with less than 80% HP (#6080) * bugfix: Hardmode grenades do not work on enemies with less than 80% HP * Made initial enrage() return true if enraged successfully --- .../living/simple_animal/hostile/megafauna/ancient_robot.dm | 3 +++ .../simple_animal/hostile/megafauna/blood_drunk_miner.dm | 3 +++ .../mob/living/simple_animal/hostile/megafauna/bubblegum.dm | 3 +++ .../mob/living/simple_animal/hostile/megafauna/colossus.dm | 3 +++ .../mob/living/simple_animal/hostile/megafauna/hierophant.dm | 3 +++ .../mob/living/simple_animal/hostile/megafauna/megafauna.dm | 4 +++- 6 files changed, 18 insertions(+), 1 deletion(-) diff --git a/code/modules/mob/living/simple_animal/hostile/megafauna/ancient_robot.dm b/code/modules/mob/living/simple_animal/hostile/megafauna/ancient_robot.dm index c7c05820f65..3e54b3d2e93 100644 --- a/code/modules/mob/living/simple_animal/hostile/megafauna/ancient_robot.dm +++ b/code/modules/mob/living/simple_animal/hostile/megafauna/ancient_robot.dm @@ -172,6 +172,9 @@ Difficulty: Very Hard /mob/living/simple_animal/hostile/megafauna/ancient_robot/enrage() . = ..() + if(!.) + return + armour_penetration = 66 TL.armour_penetration = 66 TR.armour_penetration = 66 diff --git a/code/modules/mob/living/simple_animal/hostile/megafauna/blood_drunk_miner.dm b/code/modules/mob/living/simple_animal/hostile/megafauna/blood_drunk_miner.dm index 4281e91e887..cb921c28607 100644 --- a/code/modules/mob/living/simple_animal/hostile/megafauna/blood_drunk_miner.dm +++ b/code/modules/mob/living/simple_animal/hostile/megafauna/blood_drunk_miner.dm @@ -288,6 +288,9 @@ Difficulty: Medium /mob/living/simple_animal/hostile/megafauna/blood_drunk_miner/enrage() . = ..() + if(!.) + return + miner_saw = new /obj/item/melee/energy/cleaving_saw(src) //Real saw for real men. dash_cooldown_to_use = 0.5 SECONDS //Becomes a teleporting shit. ranged_cooldown_time = 5 //They got some cooldown mods. diff --git a/code/modules/mob/living/simple_animal/hostile/megafauna/bubblegum.dm b/code/modules/mob/living/simple_animal/hostile/megafauna/bubblegum.dm index 0317aaac4a9..3e375ebfa3e 100644 --- a/code/modules/mob/living/simple_animal/hostile/megafauna/bubblegum.dm +++ b/code/modules/mob/living/simple_animal/hostile/megafauna/bubblegum.dm @@ -125,6 +125,9 @@ Difficulty: Hard /mob/living/simple_animal/hostile/megafauna/bubblegum/enrage() . = ..() + if(!.) + return + maxHealth = 2000 //Less health, as a phase 2 health = 2000 rapid_melee = 12 //Don't stand still diff --git a/code/modules/mob/living/simple_animal/hostile/megafauna/colossus.dm b/code/modules/mob/living/simple_animal/hostile/megafauna/colossus.dm index 0517899ed8c..cccaecfeae8 100644 --- a/code/modules/mob/living/simple_animal/hostile/megafauna/colossus.dm +++ b/code/modules/mob/living/simple_animal/hostile/megafauna/colossus.dm @@ -108,6 +108,9 @@ Difficulty: Very Hard /mob/living/simple_animal/hostile/megafauna/colossus/enrage() . = ..() + if(!.) + return + move_to_delay = 5 /mob/living/simple_animal/hostile/megafauna/colossus/unrage() diff --git a/code/modules/mob/living/simple_animal/hostile/megafauna/hierophant.dm b/code/modules/mob/living/simple_animal/hostile/megafauna/hierophant.dm index 3aa2cfadfb4..578689957ac 100644 --- a/code/modules/mob/living/simple_animal/hostile/megafauna/hierophant.dm +++ b/code/modules/mob/living/simple_animal/hostile/megafauna/hierophant.dm @@ -123,6 +123,9 @@ Difficulty: Hard /mob/living/simple_animal/hostile/megafauna/hierophant/enrage() . = ..() + if(!.) + return + move_to_delay = 5 /mob/living/simple_animal/hostile/megafauna/hierophant/unrage() diff --git a/code/modules/mob/living/simple_animal/hostile/megafauna/megafauna.dm b/code/modules/mob/living/simple_animal/hostile/megafauna/megafauna.dm index 8fca6764c79..fd85acf4831 100644 --- a/code/modules/mob/living/simple_animal/hostile/megafauna/megafauna.dm +++ b/code/modules/mob/living/simple_animal/hostile/megafauna/megafauna.dm @@ -219,8 +219,10 @@ /// This proc is called by the HRD-MDE grenade to enrage the megafauna. This should increase the megafaunas attack speed if possible, give it new moves, or disable weak moves. This should be reverseable, and reverses on zlvl change. /mob/living/simple_animal/hostile/megafauna/proc/enrage() if(enraged || ((health / maxHealth) * 100 <= 80)) - return + return FALSE + enraged = TRUE + return TRUE /mob/living/simple_animal/hostile/megafauna/proc/unrage() enraged = FALSE