ID:148057
 
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?
Monkiesmania wrote:
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?

var/damage=rand(usr.dex) - rand(M.def)
if(damage>0)m.hp-=damage
else if(damage<1)src<<"Miss"