mob
proc
FirePunch()
var/obj/H = new/obj/Fire_Punch
var/chi_damage = (20 + (usr.yang/1.5))
var/ki_cost = (10)
if(src.chi >= chi_cost)
if(!src.doing)
src.chi -= chi_cost
usr.icon_state = "punch"
sleep(3)
usr.icon_state = ""
if(!H)return
H.dir = src.dir
H.loc = src.loc
while(H)
step(H,H.dir)
if(!H)break
var/turf/T = H.loc
if(T.density)
del(H)
break
for(var/mob/M as mob in T)
if(M == src)
continue
M << "\red [src.name]'s fireball slams into you"
M.hp -= chi_damage
del(H)
sleep(1)
obj/Fire_Punch
icon = 'projectiles.dmi'
icon_state = "firepunch_red"
density = 1
var
length=20 //how many steps the proj. is allowed to make before being deleted
Move()
src.length-- //remove 1 from src.length
if(!src.length) del src //if length is 0, delete the beam
return ..() //otherwise, do default behaviour
Bump(atom/O) //Called when movement fails due to blockage. O is \
the obstacle; src is the beam.
if(ismob(O)) //if O is a mob...
var/ice_dmg = (20 + (usr.yang/1.5))
var/newdmg = (ice_dmg - O:yin)
O:hp = max(O:hp - newdmg)
O:KO_check()
Problem description:
For some reason, it doesn't do damage. I don't know why it won't...