mob
verb/Punch(mob/M in oview(1))
set category = "Combat"
var/damage = src.Strength - M.Defense
if(M.client)
M.Health -= damage
src <<"You attack [M] for [damage]!"
M <<"You are being attacked by [src]!"
src.Level_UP()
M.death_check(src)
else
M.Health -= damage
src <<"You attack [M] for [damage]!"
M <<"You are being attacked by [src]!"
var/random = rand(1,3)
if(random == 1)
src.Exp += 14
if(random == 2)
src.Exp += 3
if(random == 3)
src.Exp ++
src.Level_UP()
M.death_check(src)
Problem description:
if a person has more def than the attacker it adds health how do i stop this ???
verb/Punch(mob/M in oview(1))
set category = "Combat"
var/damage = src.Strength - M.Defense
if(M.client)
if(damage>0)
M.Health -= damage
else
damage = 0
src <<"You attack [M] for [damage]!"
M <<"You are being attacked by [src]!"
src.Level_UP()
M.death_check(src)
else
M.Health -= damage
src <<"You attack [M] for [damage]!"
M <<"You are being attacked by [src]!"
var/random = rand(1,3)
if(random == 1)
src.Exp += 14
if(random == 2)
src.Exp += 3
if(random == 3)
src.Exp ++
src.Level_UP()
M.death_check(src)