![]() |
FYP
1.0.0
Final Year Project -- Alexander Meuer
|
Damage Reduction, such as Armour or Magic Resistance. Used to reduce damage by an appropriate amount. Usage: Damage::Reduction mArmour = Damage::Reduction::MEDIUM;. More...
#include <Damage.hpp>

Public Member Functions | |
| float | grant () |
| Grants a level of reduction if below the max. | |
| float | strip () |
| Strips a level of reduction if above none. | |
| Reduction (const float _value) | |
| float | operator* (float damage) const |
| Applies the reduction to the float passed. | |
| Reduction & | operator= (float newValue) |
| Assigns a new reduction value. | |
| bool | operator< (Reduction const &other) const |
| Returns true if we have a lower value. | |
| bool | operator<= (Reduction const &other) const |
| Returns true if we have a lower or equal value. | |
Public Attributes | |
| float | value |
| Damage reduction multiplier. | |
Static Public Attributes | |
| static const float | NONE |
| static const float | LIGHT |
| static const float | MEDIUM |
| static const float | HEAVY |
| static const float | IMMUNE |
Friends | |
| float | operator*= (float num, Reduction &red) |
| Applies the reduction to the float passed. | |
Damage Reduction, such as Armour or Magic Resistance. Used to reduce damage by an appropriate amount. Usage: Damage::Reduction mArmour = Damage::Reduction::MEDIUM;.