This class calculates all damage related calculations
More...
This class calculates all damage related calculations
§ finalDamage()
static int Model.DamageCalculations.finalDamage |
( |
Unit |
attacker, |
|
|
Unit |
defender, |
|
|
bool |
physOrMagic |
|
) |
| |
|
static |
factors in damage dealt, hit rate, crit rate, and number of attacks (as in how above functions were calculated) to calculate actual damage dealt
- Parameters
-
attacker | The unit performing the attack |
defender | The unit defending against the attack |
physOrMagic | Boolean that tells the controller if it's physical or magical damage to be calculated |
§ getCritRate()
static int Model.DamageCalculations.getCritRate |
( |
Unit |
attacker, |
|
|
Unit |
defender |
|
) |
| |
|
static |
passes in the 2 units, and returns the crit rate as a percentage out of 100 by taking into account both unit's skill
- Parameters
-
attacker | The unit performing the attack |
defender | The unit defending against the attack |
§ getDamageDealt()
static int Model.DamageCalculations.getDamageDealt |
( |
Unit |
attacker, |
|
|
Unit |
defender, |
|
|
bool |
physOrMagic |
|
) |
| |
|
static |
passes in the 2 units, and a boolean on whether attack is physical (false), or magical (true), and returns damage dealt by taking into account an attacker's str/int, and defender def/res
- Parameters
-
attacker | The unit performing the attack |
defender | The unit defending against the attack |
physOrMagic | Boolean that tells the controller if it's physical or magical damage to be calculated |
§ getHitCount()
static int Model.DamageCalculations.getHitCount |
( |
Unit |
attacker, |
|
|
Unit |
defender |
|
) |
| |
|
static |
passes in then 2 units, and determines how many attacks the attacker makes by factoring in both unit's relative speed
- Parameters
-
attacker | The unit performing the attack |
defender | The unit defending against the attack |
§ getHitRate()
static int Model.DamageCalculations.getHitRate |
( |
Unit |
attacker, |
|
|
Unit |
defender |
|
) |
| |
|
static |
passes in the 2 units, and returns the hit rate as a percentage out of 100 by taking into account both unit's skill
- Parameters
-
attacker | The unit performing the attack |
defender | The unit defending against the attack |
The documentation for this class was generated from the following file:
- C:/Users/Thien Trandinh/Documents/Blaze-Brigade/src/Blaze-Brigade/Blaze_Brigade/DamageCalculations.cs