I'm trying to get my battle system a certain way, but I can't figure out how. Here is how I want it:
rand(usr.dex) - rand(M.def)
If it comes out as 0 or above I want it to take a random number of the user's strength as the damage. If it comes out as a negative number I want it to tell the user that they missed.
Could someoen help me out?
ID:148057
Jul 26 2003, 6:09 am
|
|
var/damage=rand(usr.dex) - rand(M.def)
if(damage>0)m.hp-=damage
else if(damage<1)src<<"Miss"