I am making a simple browser rpg game, similar to battleknight. To keep the game simple, I have just Strength, Constitution, and Luck. But as luck is random based, I'm struggling with fight calculations. I need some kind of formula to calculate attacks.
Preview from battleknight
UPDATE I was thinking about this model:
Strength - base dmg.
speed - chance of attack avoidance
toughness - increase HP
luck - crit. hit chance
defence - chance of attack blocking.
As I expect, there will be fight between high and lower ranked players so I want to calculate attack differently. My idea is sum of stronger player stats(this will be cap). So random based attributes will be divided by this sum. Example:
cap = sumOfStrongerPlayerAttributes
player1Luck = player1.luck / cap
player2Luck = player2.luck / cap
// also luck can be devided for ensure that crit hits will not be so often
Also crit. hit dmg. will be calculated from based dmg. like:
critHitDmg = player.strength * someKindOfConst
This model will prevent from too often crits.
