mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2025-12-11 10:11:09 +00:00
## About The Pull Request ice demons are now basic mobs. they still have their behavior where they can teleport around the player, run away from him and shoot him. they now also have a new ability they will only use when they are on their last legs, they will spawn weak and slow afterimage clones of theirselves to attack the player. damaging these clones will also damage the original ice demons. ice demons can also now be very easily countered as they are very afraid of fires. they will run away from you if they see u holding a lit torch/flare/welding tool and while running away they will freeze the floors around them to try to slip u to stop u from chasing them. ice demons now also get a new unique trophy! this trophy will summon 2 friendly spirits that will help you kill ur target, but these spirits will dissappear after a very short while. https://github.com/tgstation/tgstation/assets/138636438/6a48fb15-f447-441a-91c6-48ca120dc22c ## Why It's Good For The Game ## Changelog 🆑 refactor: ice demons have been refactored into basic mbos. please report any bugs add: ice demons now have a unique trophy /🆑
36 lines
1.2 KiB
Plaintext
36 lines
1.2 KiB
Plaintext
/*
|
|
* A component given to mobs to damage a linked mob
|
|
*/
|
|
/datum/component/joint_damage
|
|
///the mob we will damage
|
|
var/datum/weakref/overlord_mob
|
|
///our last health count
|
|
var/previous_health_count
|
|
|
|
/datum/component/joint_damage/Initialize(mob/overlord_mob)
|
|
if(!isliving(parent))
|
|
return COMPONENT_INCOMPATIBLE
|
|
var/mob/living/parent_mob = parent
|
|
previous_health_count = parent_mob.health
|
|
if(overlord_mob)
|
|
src.overlord_mob = WEAKREF(overlord_mob)
|
|
|
|
/datum/component/joint_damage/RegisterWithParent()
|
|
RegisterSignal(parent, COMSIG_LIVING_HEALTH_UPDATE, PROC_REF(damage_overlord))
|
|
RegisterSignal(parent, COMSIG_LIVING_DEATH, PROC_REF(damage_overlord))
|
|
|
|
/datum/component/joint_damage/UnregisterFromParent()
|
|
UnregisterSignal(parent, list(COMSIG_LIVING_HEALTH_UPDATE, COMSIG_LIVING_DEATH))
|
|
|
|
/datum/component/joint_damage/Destroy()
|
|
overlord_mob = null
|
|
return ..()
|
|
|
|
/datum/component/joint_damage/proc/damage_overlord(mob/living/source)
|
|
SIGNAL_HANDLER
|
|
|
|
var/mob/living/overlord_to_damage = overlord_mob?.resolve()
|
|
if(!isnull(overlord_to_damage))
|
|
overlord_to_damage.adjustBruteLoss(previous_health_count - source.health) ///damage or heal overlord
|
|
previous_health_count = source.health
|