I wanted to keep this as simple as possible and not have a player think about math, but will be calculated based on their kind (choice of animal) and their role (class).
For each object that is constructed, an attack function is given specifying which attack to use (HIT or SPL), and attacking which player by their name (string). There is also dice that is "rolled" for each player to add randomness.
Player A's HIT vs Player B's DEX or Player A's SPL vs Player B's WIT
If Player A's value is greater, Player B gets another chance to "roll again" + their defence. If Player B fails, reduce their health by only 1. If Player A fails, nothing happens.
First player to knock the other player's health to 0 wins!
Create a session where you can:
Create an inventory system