mob
Warrior_Skills
verb/Double_Strike(mob/M as mob in oview(1))
set category = "Skills"
M.attacked = 1
var/damage = usr.Strength*2-M.Defense+rand(0,5)
M.Health -= damage
if(damage > 0)
Double_Strike = rand(1,3)
if(Double_Strike==2)
M << "[usr] attacks you and does [damage] damage"
usr. << "[src]: Double Strike!"
M.Health-=damage
else
usr. << "You missed!"
else
M << "[usr]'s attack bounces off of you!"
usr << "Your attack bounces off of [src]!"
M.Deathcheck()
usr.Levelup()
Problem description:
I'm trying to make skills for classes and this is one for my Warrior classes. Anyway when I use this skill on a monster it says that I miss but the monster still takes damage and dies anyway. Sometimes it will say that I perform the skill but it usually doesnt. Anyone know why?
As you can see, M is taking the damage from the first hit every time. Even if you fail to do the Double Strike, M's Health is still being decreased and he is dying when you do your Deathcheck().