mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2026-01-01 21:13:47 +00:00
Completely revamped the classes, it's even more streamlined now. Got a few bugs and tweaks (namely, blind doesn't work, fireball got buffed up as compensation for not dealing additional damage to the target), but it's okay, since nobody uses those anyway. Fixed the bug with emagged borg laws. git-svn-id: http://tgstation13.googlecode.com/svn/trunk@1465 316c924e-a436-60f5-8080-3fe189b3f50e
44 lines
1.2 KiB
Plaintext
44 lines
1.2 KiB
Plaintext
/obj/spell/targeted/inflict_handler
|
|
name = "Inflict Handler"
|
|
desc = "This spell 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/destroys = "none" //can be "none", "gib" or "disintegrate"
|
|
|
|
/obj/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 |