This week I began to write code and create the structure for the assignment itself. I decided to create a final fantasy type of game where each player took turns selecting an action for each of their characters and then when each character has chosen the actions for their characters then the actions are taken, the order is determined by the characters stats. Each character has different stats to represent them these are:
- Character type (Rock, Paper Scissors) – as discussed last week having three simple character types where players are able to immediately determine which is effective against which.
- Max Health – the maximum hit points of the character
- Dodge Chance – the chance that the character can dodge an attack.
- Crit Chance – the chance the character can critically hit
- Damage Mitigation – the amount that the character reduces all incoming damage by.
- Healing – a number of hit points the character can heal by.
- Speed – How fast the character is and when it will take its action in the action order.
- List of Attacks – the character will have a list of attacks that it can make which will have the following properties.
- Attack Type (Rock, Paper and Scissors) – the type of attack to affect the enemy.
- Damage – the base damage of the attack
With all these stats I can create a stat based conflict resolution system, I’ve done this before in MDU118, however only through the Google sheets. Games like Pokemon or Final fantasy have done similar stat based monster battles where they can calculate how much damage the attack has done. This skill is important to practice because I’ll probably be using more stat-based combat systems in the future for RPGs.

The method I’m going to use to go about processing and calculating the damage will be:
Base Damage – determined by stat on attack
Check whether the attack is effective, ineffective or normal, with a 20%, -20% and 0% damage boost respectively.
Base Damage * (1 + Effectiveness)
Generate a random float and check whether it is below the critical hit chance. If so double the attack value:
Base Damage * (1 + Effectiveness) * (1 + Critical Hit?)
Generate a random float and check whether it is below the dodge chance. If so reduce the damage to 0:
Base Damage * (1 + Effectiveness) * (1 + Critical Hit?) * (1 * Dodge?)
Finally, reduce the overall damage by the defending character’s damage mitigation
Base Damage * (1 + Effectiveness) * (1 + Critical Hit?) * (1 * Dodge?) * (1 - Damage Mit)
Using this creates a single simple value for the damage to be applied to the defending character.
Leave a comment