mirror of
https://github.com/vgstation-coders/vgstation13.git
synced 2025-12-10 10:21:11 +00:00
Added a direction finding algorithm for target, get_dir_to(). Mostly useful for positioning sprites in relation to a target. Such as energy beams, lines, and so on. Changes to ninjas. Fixed a bunch of bugs and finished content. It is now possible to drag people with you when phase jaunting/shifting. Jaunting/shifting should also kill livestock, huggers, and damage mechs. Renamed /obj/spell path to obj/proc_holder/spell in order to have a generic proc_holder category. For now it only works for the AI but can be expanded to other mobs. git-svn-id: http://tgstation13.googlecode.com/svn/trunk@1566 316c924e-a436-60f5-8080-3fe189b3f50e
50 lines
1.4 KiB
Plaintext
50 lines
1.4 KiB
Plaintext
/obj/proc_holder/spell/targeted/inflict_handler
|
|
name = "Inflict Handler"
|
|
desc = "This spell blinds and/or destroys/damages/heals and/or weakens/stuns the target."
|
|
|
|
var/amt_weaken = 0
|
|
var/amt_paralysis = 0 //stun
|
|
|
|
//set to negatives for healing
|
|
var/amt_dam_fire = 0
|
|
var/amt_dam_brute = 0
|
|
var/amt_dam_oxy = 0
|
|
var/amt_dam_tox = 0
|
|
|
|
var/amt_eye_blind = 0
|
|
var/amt_eye_blurry = 0
|
|
|
|
var/destroys = "none" //can be "none", "gib" or "disintegrate"
|
|
|
|
/obj/proc_holder/spell/targeted/inflict_handler/cast(list/targets)
|
|
|
|
for(var/mob/living/target in targets)
|
|
switch(destroys)
|
|
if("gib")
|
|
target.gib()
|
|
if("disintegrate")
|
|
target.dust()
|
|
|
|
if(!target)
|
|
continue
|
|
//damage
|
|
if(amt_dam_brute > 0)
|
|
if(amt_dam_fire > 0)
|
|
target.take_overall_damage(amt_dam_brute,amt_dam_fire)
|
|
else if (amt_dam_fire < 0)
|
|
target.take_overall_damage(amt_dam_brute,0)
|
|
target.heal_overall_damage(0,amt_dam_fire)
|
|
else if(amt_dam_brute < 0)
|
|
if(amt_dam_fire > 0)
|
|
target.take_overall_damage(0,amt_dam_fire)
|
|
target.heal_overall_damage(amt_dam_brute,0)
|
|
else if (amt_dam_fire < 0)
|
|
target.heal_overall_damage(amt_dam_brute,amt_dam_fire)
|
|
target.toxloss += amt_dam_tox
|
|
target.oxyloss += amt_dam_oxy
|
|
//disabling
|
|
target.weakened += amt_weaken
|
|
target.paralysis += amt_paralysis
|
|
|
|
target.eye_blind += amt_eye_blind
|
|
target.eye_blurry += amt_eye_blurry |