ID:142485
 
Code:
mob
Bump(atom/movable/A)
if(A:type==/mob/)
if(usr.chidori==1)
for(var/mob/M in world)
if(A==M)
if(M.rasengan==0 && M.chidori==0)
M.health-=usr.taijutsu + usr.chakrahands
damage(M,usr.taijutsu)
M.Death(M,usr)
if(usr.riding==1)
for(var/mob/M in world)
if(A==M)
M.health-=usr.taijutsu*2
damage(M,usr.taijutsu*2)
M.Death(M,usr)
if(usr.rasengan==1)
for(var/mob/M in world)
if(A==M)
if(M.chidori==0 && M.rasengan==0)
for(var/mob/N in oview(1,M))
if(N!=usr)
damage(N,usr.taijutsu)
N.health-=usr.taijutsu
Death(N,usr)
usr.overlays-='rasengan.dmi'
usr.rasengan=0
walk(usr,0)
usr.fatigue-=40
damage(M,usr.taijutsu*usr.chakrahands)
M.health-=usr.taijutsu*usr.chakrahands
walk(M,usr.dir)
M.Death(M,src)


Problem description:

When I hit a NPC with chidori nothing happens.
mob
Bump(mob/M)
if(ismob(M))
if(src.riding)
M.health-=src.taijutsu*2
damage(M,src.taijutsu*2)
M.Death(M,src)
if(src.chidori)
if(!M.rasengan && !M.chidori)
M.health-=(src.taijutsu + src.chakrahands)
damage(M,src.taijutsu)//y does this show difrent from what it actualy subtracts?
M.Death(M,src)
if(src.rasengan)
if(!M.chidori && !M.rasengan)
for(var/mob/N in oview(1,M))
if(N!=src)
damage(N,src.taijutsu)
N.health-=src.taijutsu
N.Death(N,src)
src.overlays-='rasengan.dmi'
src.rasengan=0
walk(src,0)
src.fatigue-=40
damage(M,src.taijutsu*src.chakrahands)
M.health-=src.taijutsu*src.chakrahands
walk(M,src.dir)
M.Death(M,src)

not sure what the problem is. most of that is code cleanup and switching usr to src <.<
In response to Falacy
Is the NPC in a NONPK zone?
In response to ShadowPrince2008
theres nothing about no-pk zones in that code <.< it shouldnt matter
It's this line:

if(A:type==/mob/)


You probably want to use ismob() instead.

if(ismob(A))


[edit]
Also, you don't need those for loops. You can cast A as a type of mob in your code:

Bump(atom/movable/A)
if(ismob(A))
if(usr.chidori==1)
var/mob/M = A
// continue as usual using M instead of A