mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-01-02 04:52:10 +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. /🆑
27 lines
957 B
Plaintext
27 lines
957 B
Plaintext
/**
|
|
* Attached to a mob with an AI controller, sets the blackboard current target to the most recent thing to attack this mob.
|
|
* The AI controller is responsible for doing anything with that information.
|
|
*/
|
|
/datum/element/ai_target_damagesource
|
|
|
|
/datum/element/ai_target_damagesource/Attach(datum/target)
|
|
. = ..()
|
|
if(!ismob(target))
|
|
return ELEMENT_INCOMPATIBLE
|
|
|
|
target.AddElement(/datum/element/relay_attackers)
|
|
RegisterSignal(target, COMSIG_ATOM_WAS_ATTACKED, PROC_REF(on_attacked))
|
|
|
|
/datum/element/ai_target_damagesource/Detach(datum/source, ...)
|
|
. = ..()
|
|
UnregisterSignal(source, COMSIG_ATOM_WAS_ATTACKED)
|
|
|
|
/// Add the most recent target that attacked us to our current target blackboard.
|
|
/datum/element/ai_target_damagesource/proc/on_attacked(mob/victim, atom/attacker)
|
|
SIGNAL_HANDLER
|
|
|
|
if (!victim.ai_controller)
|
|
return
|
|
victim.ai_controller.CancelActions()
|
|
victim.ai_controller.set_blackboard_key(BB_BASIC_MOB_CURRENT_TARGET, attacker)
|