mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2025-12-31 20:11:56 +00:00
## About The Pull Request Now the stargazer does more damage to people in the area and prioritizes mobs attacking them instead of random circuit bots 7 tiles away. It will also slowly heal you. Makes some abilities create more carpet fields when ascending. Increases combo times when ascending. Also makes the Star Gazer die only when the owner dies. Star Gazer will explode when it does die. Star Gazer has a damage aura that does heal the owner. ## Why It's Good For The Game I have seen a lot of people complaining that the cosmic ascension isn't good and not worth getting so I thought I would make it a little better. ## Changelog 🆑 balance: Star Gazer now explodes when it dies. balance: Star Gazer will only die when the owner dies. balance: Star Gazer will attack the most recent enemy that attacked him when on autopilot. balance: Star Gazer has an aura that slowly damages people and heals the owner. balance: Cosmic Ascension now buffs some spells. /🆑
30 lines
926 B
Plaintext
30 lines
926 B
Plaintext
/**
|
|
* ## death linkage element!
|
|
*
|
|
* Bespoke element that when the owner dies, the linked mob dies too.
|
|
*/
|
|
/datum/element/death_linked
|
|
element_flags = ELEMENT_BESPOKE
|
|
argument_hash_start_idx = 3
|
|
///The mob that also dies when the user dies
|
|
var/datum/weakref/linked_mob
|
|
|
|
/datum/element/death_linked/Attach(datum/target, mob/living/target_mob)
|
|
. = ..()
|
|
if(!isliving(target))
|
|
return ELEMENT_INCOMPATIBLE
|
|
if(!target_mob)
|
|
stack_trace("[type] added to [target] with NO MOB.")
|
|
src.linked_mob = WEAKREF(target_mob)
|
|
RegisterSignal(target, COMSIG_LIVING_DEATH, PROC_REF(on_death))
|
|
|
|
/datum/element/death_linked/Detach(datum/target)
|
|
. = ..()
|
|
UnregisterSignal(target, COMSIG_LIVING_DEATH)
|
|
|
|
///signal called by the stat of the target changing
|
|
/datum/element/death_linked/proc/on_death(mob/living/target, gibbed)
|
|
SIGNAL_HANDLER
|
|
var/mob/living/linked_mob_resolved = linked_mob?.resolve()
|
|
linked_mob_resolved?.death(TRUE)
|