ID:142084
 
Code:This code is suppose to damage the mob/M
obj
FireBreath1
icon = 'FlameBreath.dmi'
icon_state = "Base"
density = 1
layer = MOB_LAYER+1
var/mob/Z
New(location, owner)
Z = owner
..()
Bump(atom/a)
if(ismob(a))
var/mob/M = a
var/damage = round(Z.bendingpower*1.5)
M.health -= damage
M.Death(M)
del(src)
obj
FireBreath2
icon = 'FlameBreath.dmi'
icon_state = "Body"
density = 1
layer = MOB_LAYER+1
var/mob/Z
New(location, owner)
Z = owner
..()
Bump(atom/a)
if(ismob(a))
var/mob/M = a
var/damage = round(Z.bendingpower*1.5)
M.health -= damage
M.Death(M)
del(src)
obj
FireBreath3
icon = 'FlameBreath.dmi'
icon_state = "Tip"
density = 1
layer = MOB_LAYER+1
var/mob/Z
New(location, owner)
Z = owner
..()
Bump(atom/a)
if(ismob(a))
var/mob/M = a
var/damage = round(Z.bendingpower*1.5)
M.health -= damage
M.Death(M)
del(src)


mob
verb
FireBreath()
set category = "Bending Moves"
if(usr.doing==1)
return
if(usr.bendinge <= 100)
src << "Not enough energey"
return
doing=1
usr.bendinge -= 350
var/obj/FireBreath1/A = new
var/obj/FireBreath2/B = new
var/obj/FireBreath3/C = new
A.dir=usr.dir
B.dir=usr.dir
C.dir=usr.dir
if(usr.dir==NORTH)
A.loc=locate(usr.x, usr.y+3, usr.z)
B.loc=locate(usr.x, usr.y+2, usr.z)
C.loc=locate(usr.x, usr.y+1, usr.z)
if(usr.dir==SOUTH)
A.loc=locate(usr.x, usr.y-3, usr.z)
B.loc=locate(usr.x, usr.y-2, usr.z)
C.loc=locate(usr.x, usr.y-1, usr.z)
if(usr.dir==EAST)
A.loc=locate(usr.x+3, usr.y, usr.z)
B.loc=locate(usr.x+2, usr.y, usr.z)
C.loc=locate(usr.x+1, usr.y, usr.z)
if(usr.dir==WEST)
A.loc=locate(usr.x-3, usr.y, usr.z)
B.loc=locate(usr.x-2, usr.y, usr.z)
C.loc=locate(usr.x-1, usr.y, usr.z)
sleep(10)
del(A)
del(B)
del(C)
doing=0
return


Problem description: For some reason it isn't doing any damage i think the problem is Bump()?

if(usr.doing==1) - bad
if(src.doing) - good


    Bump(mob/M)
var/damage = round(Z.bendingpower*1.5)
M.health -= damage
M.Death(M)
del(src)


You may want to read the DM GUIDE and DM REFERENCE over and over until DM because as natural as well english.
In response to A.T.H.K
A.T.H.K wrote:
> if(usr.doing==1) - bad
> if(src.doing) - good
>

>     Bump(mob/M)
> var/damage = round(Z.bendingpower*1.5)
> M.health -= damage
> M.Death(M)
> del(src)
>
>

You may want to read the DM GUIDE and DM REFERENCE over and over until DM because as natural as well english.


isn't it suppose to be atom/a
In response to Trane5
Trane5 wrote:
isn't it suppose to be atom/a

No, it can be whatever technically, it is not a problem. However there are other problem(s) in his post and code, he might want to read the DM Guide and learn some English. >_>