mob
verb
Attack()
set category = "Attacks"
for(var/mob/M in get_step(usr,usr.dir))
if(!usr.canattack)
return
if(usr.bya&&usr.Jyuken&&usr.bya2)
if(usr.strikes>=6)
flick("jyuken",usr)
usr.canattack = 0
view(usr) << "<font color = #00ffff size = 2>[usr] says: Hakke Hyaku Nijuha Sho!<p>128 palms!</font>"
var/damage = (usr.tai*2)
view(M)<<"[M] took [damage] damage!"
M.health -= damage
usr.strikes = 0
usr.loc = locate(M.x,M.y-1,M.z)
usr.dir = NORTH
usr.chakra -= round(usr.Mchakra/100)
M.Strafe()
M.Savedspeed2 = M.Move_Delay
M.Move_Delay = 0
step(M,usr.dir)
sleep(1)
step(M,usr.dir)
sleep(1)
step(M,usr.dir)
M.Normal()
M.Move_Delay = M.Savedspeed2
sleep(40)
usr.canattack = 1
return
if(usr.strikes==5)
flick("jyuken",usr)
usr.canattack = 0
view() << "<font color = #00ffff size = 1>[usr] says:64 palms!</font>"
var/damage = (usr.tai*1.4)
view(M)<<"[M] took [damage] damage!"
M.health -= damage
usr.strikes ++
usr.loc = locate(M.x-1,M.y,M.z)
usr.dir = EAST
usr.chakra -= round(usr.Mchakra/100)
sleep(2)
usr.canattack = 1
return
if(usr.strikes==4)
flick("jyuken",usr)
usr.canattack = 0
view() << "<font color = #00ffff size = 1>[usr] says:32 palms!</font>"
var/damage = (usr.tai*1.3)
view(M)<<"[M] took [damage] damage!"
M.health -= damage
usr.strikes ++
usr.loc = locate(M.x,M.y+1,M.z)
usr.dir = SOUTH
usr.chakra -= round(usr.Mchakra/100)
sleep(2)
usr.canattack = 1
return
if(usr.strikes==3)
flick("jyuken",usr)
usr.canattack = 0
view() << "<font color = #00ffff size = 1>[usr] says:16 palms!</font>"
var/damage = (usr.tai*1.2)
view(M)<<"[M] took [damage] damage!"
M.health -= damage
usr.strikes ++
usr.loc = locate(M.x+1,M.y,M.z)
usr.dir = WEST
usr.chakra -= round(usr.Mchakra/100)
sleep(2)
usr.canattack = 1
return
if(usr.strikes==2)
flick("jyuken",usr)
usr.canattack = 0
view() << "<font color = #00ffff size = 1>[usr] says:8 palms!</font>"
var/damage = (usr.tai*1.1)
view(M)<<"[M] took [damage] damage!"
M.health -= damage
usr.strikes ++
usr.loc = locate(M.x,M.y-1,M.z)
usr.dir = NORTH
usr.chakra -= round(usr.Mchakra/100)
sleep(2)
usr.canattack = 1
return
if(usr.strikes==1)
flick("jyuken",usr)
usr.canattack = 0
view() << "<font color = #00ffff size = 1>[usr] says:4 palms!</font>"
var/damage = (usr.tai*1.05)
view(M)<<"[M] took [damage] damage!"
M.health -= damage
usr.strikes ++
usr.loc = locate(M.x-1,M.y,M.z)
usr.dir = EAST
usr.chakra -= round(usr.Mchakra/100)
sleep(2)
usr.canattack = 1
return
if(usr.strikes<=0)
flick("jyuken",usr)
usr.canattack = 0
view() << "<font color = #00ffff size = 1>[usr] says:2 palms!</font>"
var/damage = usr.tai
view(M)<<"[M] took [damage] damage!"
M.health -= damage
usr.strikes ++
usr.loc = locate(M.x,M.y+1,M.z)
usr.dir = SOUTH
usr.chakra -= round(usr.Mchakra/100)
sleep(2)
usr.canattack = 1
return
Problem description:
Fairly sloppy coding, I apologize. My problem is when I go through this with the code it crashes, but only if I have the
if(usr.bya&&usr.Jyuken&&usr.bya2)
Possible infinite loop or something else in this proc, and I also figured out after more testing it doesn't crash the game when its live, it just cuts your connection, and its after byakugan was activated and turned off. So now I'm fairly sure that the above post has nothing to do with the problem.