Files
CHOMPStation2/code/game/gamemodes/technomancer/spells/shared_burden.dm
CHOMPStation2 ab154b48b2 [MIRROR] refactors most spans (#9139)
Co-authored-by: Heroman3003 <31296024+Heroman3003@users.noreply.github.com>
Co-authored-by: Kashargul <KashL@t-online.de>
2024-10-04 15:00:17 +02:00

30 lines
1.3 KiB
Plaintext

/datum/technomancer/spell/shared_burden
name = "Shared Burden"
desc = "One of the few functions able to adjust instability, this allows you to take someone else's instability."
spell_power_desc = "Draws bonus instability from the target, with the bonus dissipating harmlessly, for 'free'."
cost = 50
obj_path = /obj/item/spell/shared_burden
category = SUPPORT_SPELLS
/obj/item/spell/shared_burden
name = "shared burden"
icon_state = "shared_burden"
desc = "Send instability from the target to you, for whatever reason you'd want to."
cast_methods = CAST_MELEE
aspect = ASPECT_UNSTABLE
/obj/item/spell/shared_burden/on_melee_cast(atom/hit_atom, mob/living/user, def_zone)
if(ishuman(hit_atom) && within_range(hit_atom))
var/mob/living/carbon/human/H = hit_atom
if(H == user)
to_chat(user, span_warning("Draining instability out of you to put it back seems a bit pointless."))
return 0
if(H.instability <= 0)
to_chat(user, span_warning("\The [H] has no instability to drain."))
return 0
if(pay_energy(500))
var/instability_to_drain = min(H.instability, 25)
to_chat(user, span_notice("You draw instability away from \the [H] and towards you."))
adjust_instability(instability_to_drain)
H.adjust_instability(-calculate_spell_power(instability_to_drain))