I started writing a browser-based toy on JS (react / node).
Interested in algorithms for calculating game mechanics.
For example:
- There is a Persian, he has LVL: 1, Strength: 7, armor: 0, the standard of living is 35 and mirrored by the enemy, they enter into a duel. How to calculate the damage that one Persian will do differently, is there a special formula or how is it usually done in games?
- These same characters have an instinct (critical strike), say 20, the second has agility (uvarot from blows) - 15. How to calculate, depending on the pumping of the Persian, the probability of a critical strike or uvarot in battle?
- There are 2 characters, one is 1 lvl and he has 35 lives, the second is 10 lvl and he has 1500 lives, how to organize the restoration of the lives of the Persians, so that not too quickly and not too slowly, given the pumping skill regeneration, than he will more quickly restore. This is the question of which formulas or which algorithm to consider.
I am sure there are some proven formulas and algorithms for such calculations, you need a more or less balanced solution so that the battle is fair at any level and the pumping is uniform.