obj
Thunder
icon = 'Attacks.dmi'
icon_state = "Bubble"
density = 1
Bump(A)
del(src)
mob
verb
TB() // Verb used for firing the beam
set category = "Moves"
set name = "Thunder Bolt"
if(usr.PP <= 20)
usr<<"You dont have enough PP to use Thunder Bolt 20 is needed"
return
else
usr.firing = 1
usr.PP -= 20
var/obj/Thunder/K = new /obj/Thunder
K.loc = usr.loc
K.dir = usr.dir
K.name="[usr]"
walk(K,usr.dir)
var/random = rand(1,6)
if(random == 5||random==1)
sleep(45)
del(K)
sleep(10)
usr.firing = 0
else
var/random2 = rand (1,4)
if(random2 == 1||random2 == 4)
usr.firing = 1 // Sets the firing var to 1, so he cant fire another beam // Disables the mob's movement
view()<<"<font size=1><font face=verdana><b><font color=white>[usr]<font color=red> Says: *Thunder Bolt*"
var/obj/Thunder/T = new /obj/Thunder
T.loc = usr.loc
T.dir = usr.dir
T.name="[usr]"
walk(T,usr.dir)
sleep(45)
del(T)
if (target == null)
del(T)
sleep(10)
usr.firing = 0
else
usr<<"You Missed!"
1.how do I make it take out damage,2.whenever it reaches a turf that u can enter it spams alot how do I fix that?
Edit:I wanna make it so the Attack deals damage to a mob that it bumps into and I want to make it so if it bumbs into a Enter() turf no errors apear.
to take out dammage
hitpoints -= damage /* takes the hitpoints var and subtracts the damage var from it*\