In battle, you will notice that the enemy and the player both do 10 points of damage no matter what. The current attack power and defense do not seem to be calculated. This is because, in Chapter 3, Exploration and Combat, when we created the combat actions, we hardcoded the damage to be
target->HP -= 10, which means that no matter who is attacking, they will deal 10 points of damage to the player. We can easily fix this to use the actual stats of enemies and players by navigating to Source | RPG | Combat | Actions and opening
target->HP -= 10; and replace it with
target->HP -= (character->ATK - target->DEF) >= 0 ? (character->ATK - target->DEF):0;.
This is a ternary operator. When ...