Files
Bubberstation/code/datums/elements/death_gases.dm
Comxy 61795ee325 Cosmic Ascension Balance Patch (#74715)
## 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.
/🆑
2023-04-27 19:11:13 +01:00

37 lines
1.1 KiB
Plaintext

/**
* ## death gases element!
*
* Bespoke element that spawns one type of gas when a mob is killed
*/
/datum/element/death_gases
element_flags = ELEMENT_BESPOKE
argument_hash_start_idx = 3
///What gas the target spawns when killed
var/datum/gas/gas_type
///The amount of gas spawned on death
var/amount_of_gas
/datum/element/death_gases/Attach(datum/target, datum/gas/gas_type, amount_of_gas = 10)
. = ..()
if(!isliving(target))
return ELEMENT_INCOMPATIBLE
if(!gas_type)
stack_trace("[type] added to [target] with NO GAS TYPE.")
src.gas_type = gas_type
src.amount_of_gas = amount_of_gas
RegisterSignal(target, COMSIG_LIVING_DEATH, PROC_REF(on_death))
/datum/element/death_gases/Detach(datum/target)
. = ..()
UnregisterSignal(target, COMSIG_LIVING_DEATH)
///signal called by the stat of the target changing
/datum/element/death_gases/proc/on_death(mob/living/target, gibbed)
SIGNAL_HANDLER
var/datum/gas_mixture/mix_to_spawn = new()
mix_to_spawn.add_gas(gas_type)
mix_to_spawn.gases[gas_type][MOLES] = amount_of_gas
mix_to_spawn.temperature = T20C
var/turf/open/our_turf = get_turf(target)
our_turf.assume_air(mix_to_spawn)