rendered paste body Bump(mob/M)
if(istype(M,/mob/characters))
Battack(M)
mob/var
attacking = 0
mob/enemy/verb/Battack()
if(src.attacking == 0)
var/obj/K = new/obj/sword
// at player request i changed the attack system
src.attacking = 1
K.dir = src.dir
K.loc = src.loc
step(K, dir)
var/turf/X = K.loc
spawn(3)
del(K)
for(var/mob/M as mob in X)
if(M == src)
continue
if(prob(70))
src<<"<font color = red><font size = 2></font> You attack [M] for 3 damage!"
M<<"<font color = red><font size = 2></font> [src] attacks you for 3 damage!"
M.health -= 3
if(M.health <= 0)
if(istype(M,/mob/enemy))
src.gatekill ++
M.Deathcheck()
else
M.Deathcheck()
M.lvlup()
else
src<<"<font color = white><font size = 2></font> You attempt to attack [M] but miss!"
M<<"<font color = white><font size = 2></font> [src] attempts to attack you but misses!"
sleep(7)
src.attacking = 0