mirror of
https://github.com/PolarisSS13/Polaris.git
synced 2026-08-27 15:17:21 +01:00
Traps framework complete. Two sample traps. git-svn-id: http://tgstation13.googlecode.com/svn/trunk@885 316c924e-a436-60f5-8080-3fe189b3f50e
59 lines
1.6 KiB
Plaintext
59 lines
1.6 KiB
Plaintext
/obj/spell/disintegrate
|
|
name = "Disintegrate"
|
|
desc = "This spell instantly kills somebody adjacent to you with the vilest of magick."
|
|
|
|
school = "evocation"
|
|
recharge = 600
|
|
clothes_req = 1
|
|
invocation = "EI NATH"
|
|
invocation_type = "shout"
|
|
range = 1
|
|
var/sparks_spread = 1 //if set to 0, no sparks spread when disintegrating
|
|
var/kill_type = "disintegrate" //"disintegrate" leaves a pile of ash and bones (remains), "gib" gibs, "kill" adds damage_amount of damage_type
|
|
var/damage_amount = 2000 //only used if kill_type = "damage"
|
|
var/damage_type = "brute" //can be "brute", "fire", "toxin" or "oxygen"
|
|
|
|
/obj/spell/disintegrate/Click()
|
|
..()
|
|
|
|
if(!cast_check())
|
|
return
|
|
|
|
var/mob/M = input("Choose whom to [kill_type]", "ABRAKADABRA") as mob in oview(usr,range)
|
|
|
|
invocation()
|
|
|
|
if(sparks_spread)
|
|
var/datum/effects/system/spark_spread/s = new /datum/effects/system/spark_spread
|
|
s.set_up(4, 1, M)
|
|
s.start()
|
|
|
|
switch(kill_type)
|
|
if("disintegrate")
|
|
M.dust()
|
|
if("gib")
|
|
M.gib()
|
|
if("kill")
|
|
for(var/i=0,i<abs(damage_amount),i++)
|
|
sleep(0) //to avoid troubles with instantly applying lots of damage, it seems to be buggy
|
|
switch(damage_type)
|
|
if("brute")
|
|
if(damage_amount>0)
|
|
M.bruteloss++
|
|
else
|
|
M.bruteloss--
|
|
if("toxin")
|
|
if(damage_amount>0)
|
|
M.toxloss++
|
|
else
|
|
M.toxloss--
|
|
if("oxygen")
|
|
if(damage_amount>0)
|
|
M.oxyloss++
|
|
else
|
|
M.oxyloss--
|
|
if("fire")
|
|
if(damage_amount>0)
|
|
M.fireloss++
|
|
else
|
|
M.fireloss-- |