Blood drunk miner bitrunner domain drops the cache correctly (#95005)

## About The Pull Request

Added support for turning basic mob bosses into virtual megafauna. Moved
blood drunk miner's loot dropping behaviour up to /basic/boss to support
this better in future.

Fixes #94878 

## Why It's Good For The Game

It's not very useful if admins have to spawn the cache manually or lose
the time and points spent on the domain.

## Changelog
🆑
fix: The Sanguine Excavation bitrunning domain will drop the cache on
killing the boss again.
/🆑
This commit is contained in:
Thunder12345
2026-01-27 11:54:13 -07:00
committed by GitHub
parent 8f2ab7ad7f
commit 232b5013a2
4 changed files with 33 additions and 5 deletions
@@ -1,4 +1,4 @@
/// Removes all the loot and achievements from megafauna for bitrunning related
/// Removes all the loot and achievements from megafauna for bitrunning related (/simple_animal/hostile/megafauna version)
/mob/living/simple_animal/hostile/megafauna/proc/make_virtual_megafauna()
var/new_max = clamp(maxHealth * 0.5, 600, 1300)
maxHealth = new_max
@@ -26,3 +26,26 @@
loot.Cut()
loot += /obj/structure/closet/crate/secure/bitrunning/encrypted
/// Removes all the loot and achievements from megafauna for bitrunning related (/basic/boss version)
/mob/living/basic/boss/proc/make_virtual_megafauna()
var/new_max = clamp(maxHealth * 0.5, 600, 1300)
maxHealth = new_max
health = new_max
// rebuild the achievement element's arguments to remove it appropriately
if (achievements)
var/list/achievements_list = list(/datum/award/achievement/boss/boss_killer, /datum/award/score/boss_score)
achievements_list += achievements
RemoveElement(/datum/element/kill_achievement, string_list(achievements_list), crusher_achievement_type, /datum/memory/megafauna_slayer)
// remove the crusher loot element's arguments also to remove it appropriately
RemoveElement(\
/datum/element/crusher_loot,\
trophy_type = string_list(crusher_loot),\
guaranteed_drop = 0.6,\
drop_immediately = DEL_ON_DEATH,\
)
RemoveElement(/datum/element/death_drops, string_list(regular_loot))
AddElement(/datum/element/death_drops, /obj/structure/closet/crate/secure/bitrunning/encrypted)