Files
Polaris/code/game/gamemodes/technomancer/spells/aspect_aura.dm
Neerti 0d140349b3 Technomancer Bug Fixes & Tweaks
Cores can now be locked and unlocked by a verb.  Locked cores cannot be removed by anyone.  Cores automatically unlock if the wearer dies or otherwise stops existing for some reason.
Healing spells now induce a flat instability cost on the healer instead of it being split between healer and healed.  The amount healed is greatly increased if used on someone besides the healer.
Mend Organs is now called Great Mend Wounds, and now heals broken bones, IB, eye damage, and blood loss in addition to internal organs.
Radiating instability (the purple glow) now gives a warning to people afflicted.
Instability discounts should start applying correctly for specific cores.
Instability now affects all living mobs and not just humans.  This includes borgs and simple animals.
Phase shift now adds ongoing instability while hiding inside the rift.
Projectile spells should be logged now.
Wards last forever, and should not die in vacuum now.
Restoration aura is now green colored and not blue.
Simple mobs and cyborgs are now harmed by lightning.
2016-10-04 21:09:15 -04:00

135 lines
4.1 KiB
Plaintext

/datum/technomancer/spell/aspect_aura
name = "Aspect Aura"
desc = "This aura function takes on the properties of other functions based on which aspect is introduced to it, applying \
it to everyone nearby."
cost = 200
obj_path = /mob/living/carbon/human/proc/technomancer_aspect_aura
/mob/living/carbon/human/proc/technomancer_aspect_aura()
place_spell_in_hand(/obj/item/weapon/spell/aspect_aura)
/obj/item/weapon/spell/aspect_aura
name = "aspect aura"
desc = "Combine this with another spell to finish the function."
icon_state = "aspect_bolt"
cast_methods = CAST_COMBINE
aspect = ASPECT_CHROMATIC
/obj/item/weapon/spell/aspect_aura/on_combine_cast(obj/item/W, var/mob/living/carbon/human/user)
if(istype(W, /obj/item/weapon/spell))
var/obj/item/weapon/spell/spell = W
if(!spell.aspect || spell.aspect == ASPECT_CHROMATIC)
user << "<span class='warning'>You cannot combine \the [spell] with \the [src], as the aspects are incompatable.</span>"
return
user.drop_item(src)
src.loc = null
spawn(1)
switch(spell.aspect)
if(ASPECT_FIRE)
user.place_spell_in_hand(/obj/item/weapon/spell/aura/fire)
if(ASPECT_FROST)
user.place_spell_in_hand(/obj/item/weapon/spell/aura/frost)
if(ASPECT_BIOMED)
user.place_spell_in_hand(/obj/item/weapon/spell/aura/biomed)
qdel(src)
/obj/item/weapon/spell/aura
name = "aura template"
desc = "If you can read me, the game broke! Yay!"
icon_state = "generic"
cast_methods = null
aspect = ASPECT_CHROMATIC
var/glow_color = "#FFFFFF"
/obj/item/weapon/spell/aura/New()
..()
set_light(7, 4, l_color = glow_color)
processing_objects |= src
/obj/item/weapon/spell/aura/Destroy()
processing_objects -= src
..()
/obj/item/weapon/spell/aura/process()
return
/obj/item/weapon/spell/aura/fire
name = "heat aura"
desc = "Things are starting to heat up."
icon_state = "generic"
cast_methods = null
aspect = ASPECT_FIRE
glow_color = "#FF6A00"
/obj/item/weapon/spell/aura/fire/process()
if(!pay_energy(100))
qdel(src)
var/list/nearby_mobs = range(4,owner)
for(var/mob/living/carbon/human/H in nearby_mobs)
if(H == owner || H.mind && technomancers.is_antagonist(H.mind)) //Don't heat up allies.
continue
//We use hotspot_expose() to allow firesuits to protect from this aura.
var/turf/location = get_turf(H)
location.hotspot_expose(1000, 50, 1)
adjust_instability(1)
/obj/item/weapon/spell/aura/frost
name = "chilling aura"
desc = "Your enemies will find it hard to chase you if they freeze to death."
icon_state = "generic"
cast_methods = null
aspect = ASPECT_FROST
glow_color = "#FF6A00"
/obj/item/weapon/spell/aura/frost/process()
if(!pay_energy(100))
qdel(src)
var/list/nearby_mobs = range(4,owner)
for(var/mob/living/carbon/human/H in nearby_mobs)
if(H == owner || H.mind && technomancers.is_antagonist(H.mind)) //Don't chill allies.
continue
//We use hotspot_expose() to allow firesuits to protect from this aura.
var/turf/location = get_turf(H)
location.hotspot_expose(1, 50, 1)
adjust_instability(1)
/obj/item/weapon/spell/aura/biomed
name = "restoration aura"
desc = "Allows everyone, or just your allies, to slowly regenerate."
icon_state = "generic"
cast_methods = null
aspect = ASPECT_BIOMED
glow_color = "#0000FF"
var/regen_tick = 0
var/heal_allies_only = 1
/obj/item/weapon/spell/aura/biomed/process()
if(!pay_energy(75))
qdel(src)
regen_tick++
if(regen_tick % 5 == 0)
var/list/nearby_mobs = range(4,owner)
var/list/mobs_to_heal = list()
if(heal_allies_only)
for(var/mob/living/carbon/human/H in nearby_mobs) //Heal our apprentices
if(H.mind && technomancers.is_antagonist(H.mind))
mobs_to_heal |= H
for(var/mob/living/simple_animal/hostile/SAH in nearby_mobs) //Heal our controlled mobs
if(owner in SAH.friends)
mobs_to_heal |= SAH
else
mobs_to_heal = nearby_mobs //Heal everyone!
for(var/mob/living/L in mobs_to_heal)
L.adjustBruteLoss(-5)
L.adjustFireLoss(-5)
adjust_instability(2)
/obj/item/weapon/spell/aura/biomed/on_use_cast(mob/living/user)
heal_allies_only = !heal_allies_only
user << "Your aura will now heal [heal_allies_only ? "your allies" : "everyone"] near you."