Algorithms - Hoijof/GoirsGame1 GitHub Wiki
Here all the algorithms will be listed and explained (if needed to).
Attacking first algorithm.
agilityDifference + 50 + randomFactorBetween(-10,10)
Experience
If your level is higher than your opponent's:
Your level * 10 + (abs(levelDiference)^1.5)
If your level is lower than your opponent's:
Your level * 10 - (levelDiference^1.5)
Leveling Up
currentExpToNextLevel + currentExpToNextLevel*0.1
Survival Check
chance of survival = (willpower * 0.6 + faith * 0.2 + randomFactorBetween(-5,5)) %
Daily regeneration
HP healed per body part = ((endurance*0.15 + stamina*0.15 + willpower*0.4 + faith*0.2) / 2)