Combat Calculations

These are used to calculate different numbers and percentages to determine the effectiveness of actions during combat. The actual calculations and such are given in the embedded images.



Maximum Physical Damage

The highest amount of damage that the attacker can deal to the defender with a physical attack. The damage dealt is a random integer betwee Minimum Physical Damage and this.



Minimum Physical Damage

The smallest amount of damage that the attacker can deal to the defender with a physical attack. The damage dealt is a random integer between this and Maximum Physical Damage.



Physical Hit Chance

The percent chance that a physical attack will hit.



Maximum Special Damage

The highest amount of damage that the attacker can deal to the defender with a special attack. The damage dealt is a random integer between Minimum Special Damage and this.



Minimum Special Damage

The smallest amount of damage that the attacker can deal to the defender with a special attack. The damage dealt is a random integer between this and Maximum Special Damage.



Special Hit Chance

The percent chance that a special attack will hit.



Physical Struggle Chance

The chance that an entity can struggle free from a restraint based on relative physical attributes.



Special Struggle Chance

The chance that an entity can struggle free from a restraint based on relative special attributes.



Struggle Chance

The total percent chance that an entity will successfully struggle free from a restraint.



Opportunities

The Opportunities for each combatant are computed at the beginning of each Turn. That means that if one uses a buff to increase his or her speed, it will not take effect until the next turn.

First, the Total Speed is calculated. This is just the sum of the effective speeds of each combatant. Then, the Initiative is computed for each character, which is the Total Speed minus that character's effective speed. Total Initiative for each combatant, which will come up later, is set equal to the character's Initiative. Lower Initiaitves will translate to more opportunities. Now we iterate over Total Speed + 1 number of 'slots', each one a possible opportunity for each character. Most of these will most likely be empty once we are done computing.

At each slot, we check the initiatives up to this point of each combatant and determine if it is a suitable place for an Opportunity. If the slot number (indexed by 0) is equal to the character's Total Initiative, then we register an Opportunity for that character in that slot. We also double his or her Initiative, and then add it to his or her Total Initiative before continuing to the next slot.

This is a fairly complicated process best described via example. Suppose we have a Damsel with 5 Speed and Kidnapper with 15 Speed. Then the Total Speed will be 20. The Damsel will start out with Initiative = Total Initiative = Total Speed - Damsel.Speed = 15, and the Kidnapper will start out with Initiative = Total Initiative = Total Speed - Kidnapper.Speed = 5. Then we count from 0 to 20. At slot 5, the Kidnapper will register an Opportunity, the first of the Turn. His Initiative will then double to 10, and his Total Initiative will increase to 15. Nothing happens again until slot 15. Here, both Damsel and Kidnapper will get Opportunities because both have Total Initiative equal to 15 at this stage. Damsel's will be before Kidnapper, as allies go first in the event of a tie. Her Initiative will double to 30, and her Total Initiative will increase to 45. Kidnapper's Initiative will double again to 20, and his Total Initiative will increase to 35. Neither will get another Opportunity in this Turn because we stop counting at 20.

TLDR: Higher speed means more Opportunites per Turn