Files
CHOMPStation2/code/datums/spells/fireball.dm
uporotiy 16ca227fdc Reworked Spellcasting System v0.9
- Very flexible - you can edit some of the spell's vars on the fly, or hardcode variations of the core spells.
 - Everyone can access it - you could even have observers with spells.
 - Slightly better UI - no longer will the spell verbs blink in and out of your verb panel.
1.0 will convert the existing spell sources (ie wizard spellbook) to this system and convert the last two spells to it.

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@860 316c924e-a436-60f5-8080-3fe189b3f50e
2011-01-16 00:25:45 +00:00

46 lines
1.1 KiB
Plaintext

/obj/spell/fireball
name = "Fireball"
desc = "This spell fires a fireball at a target and does not require wizard garb."
school = "evocation"
recharge = 200
clothes_req = 0
invocation = "ONI SOMA"
invocation_type = "shout"
var/radius_devastation = -1
var/radius_heavy = -1
var/radius_light = 2
var/radius_flash = 2
var/bruteloss = 20 // apparently fireball deals damage in addition to the explosion
var/fireloss = 25 // huh
var/lifetime = 200 // in deciseconds
/obj/spell/fireball/Click()
..()
if(!cast_check())
return
var/mob/M = input("Choose whom to fireball", "ABRAKADABRA") as mob|obj|turf in oview(usr,range)
invocation()
var/obj/overlay/A = new /obj/overlay( usr.loc )
A.icon_state = "fireball"
A.icon = 'wizard.dmi'
A.name = "a fireball"
A.anchored = 0
A.density = 0
var/i
for(i=0, i<lifetime, i++)
step_to(A,M,0)
if(get_dist(A,M) <= 1)
if(istype(M,/mob))
M:bruteloss += bruteloss
M:fireloss += fireloss
explosion(M.loc, radius_devastation, radius_heavy, radius_light, radius_flash)
del(A)
return
sleep(1)
del(A)
return