Files
CHOMPStation2/code/game/gamemodes/technomancer/spells/modifier/mend_synthetic.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

51 lines
1.9 KiB
Plaintext

/datum/technomancer/spell/mend_synthetic
name = "Mend Synthetic"
desc = "Repairs minor damage to prosthetics. \
Instability is split between the target and technomancer, if separate. The function will end prematurely \
if the target is completely healthy, preventing further instability."
spell_power_desc = "Healing amount increased."
cost = 50
obj_path = /obj/item/spell/modifier/mend_synthetic
ability_icon_state = "tech_mendsynth"
category = SUPPORT_SPELLS
/obj/item/spell/modifier/mend_synthetic
name = "mend synthetic"
desc = "You are the Robotics lab"
icon_state = "mend_synthetic"
cast_methods = CAST_MELEE
aspect = ASPECT_BIOMED // sorta??
light_color = "#FF5C5C"
modifier_type = /datum/modifier/technomancer/mend_synthetic
modifier_duration = 10 SECONDS
/datum/modifier/technomancer/mend_synthetic
name = "mend synthetic"
desc = "Something seems to be repairing you."
mob_overlay_state = "cyan_sparkles"
on_created_text = span_warning("Sparkles begin to appear around you, and your systems report integrity rising.")
on_expired_text = span_notice("The sparkles have faded, although your systems seem to be better than before.")
stacks = MODIFIER_STACK_EXTEND
/datum/modifier/technomancer/mend_synthetic/tick()
if(!holder.getActualBruteLoss() && !holder.getActualFireLoss()) // No point existing if the spell can't heal.
expire()
return
if(ishuman(holder))
var/mob/living/carbon/human/H = holder
for(var/obj/item/organ/external/E in H.organs)
var/obj/item/organ/external/O = E
if(O.robotic >= ORGAN_ROBOT)
O.heal_damage(4 * spell_power, 4 * spell_power, 0, 1)
else
if(holder.isSynthetic())
holder.adjustBruteLoss(-4 * spell_power) // Should heal roughly 20 burn/brute over 10 seconds, as tick() is run every 2 seconds.
holder.adjustFireLoss(-4 * spell_power) // Ditto.
holder.adjust_instability(1)
if(origin)
var/mob/living/L = origin.resolve()
if(istype(L))
L.adjust_instability(1)