Hey guys

I'm developing an online game and for a major part of that game i need a formula.

The part of the game is where you attack other users. Each user has stats such as:

  • Strength
  • Accuracy
  • Agility
  • Defence

Now what i'm struggling with is calculation a hit ratio formula, so if you attack someone, your chances of hitting that person depend on if your accuracy is higher than their agility etc.

Can any body help me with this?