TopDown Engine
v4.2
|
Used by the DamageResistanceProcessor, this class defines the resistance versus a certain type of damage. More...
Public Types | |
enum | DamageModifierModes { DamageModifierModes.Multiplier, DamageModifierModes.Flat } |
enum | KnockbackModifierModes { KnockbackModifierModes.Multiplier, KnockbackModifierModes.Flat } |
Public Member Functions | |
virtual float | ProcessDamage (float damage, DamageType type, bool damageApplied) |
When getting damage, goes through damage reduction and outputs the resulting damage More... | |
virtual Vector3 | ProcessKnockback (Vector3 knockback, DamageType type) |
Processes the knockback input value and returns it potentially modified by damage resistances More... | |
Public Attributes | |
float | Priority = 0 |
The priority of this damage resistance. This will be used to determine in what order damage resistances should be evaluated. Lowest priority means evaluated first. More... | |
string | Label = "" |
The label of this damage resistance. Used for organization, and to activate/disactivate a resistance by its label. More... | |
DamageTypeModes | DamageTypeMode = DamageTypeModes.BaseDamage |
Whether this resistance impacts base damage or typed damage. More... | |
DamageType | TypeResistance |
In TypedDamage mode, the type of damage this resistance will interact with. More... | |
DamageModifierModes | DamageModifierMode = DamageModifierModes.Multiplier |
the way to reduce (or increase) received damage. Multiplier will multiply incoming damage by a multiplier, flat will subtract a constant value from incoming damage. More... | |
float | DamageMultiplier = 0.25f |
In multiplier mode, the multiplier to apply to incoming damage. 0.5 will reduce it in half, while a value of 2 will create a weakness to the specified damage type, and damages will double. More... | |
float | FlatDamageReduction = 10f |
In flat mode, the amount of damage to subtract every time that type of damage is received. More... | |
bool | ClampDamage = false |
whether or not incoming damage of the specified type should be clamped between a min and a max More... | |
Vector2 | DamageModifierClamps = new Vector2(0f,10f) |
the values between which to clamp incoming damage More... | |
bool | PreventCharacterConditionChange = false |
whether or not condition change for that type of damage is allowed or not More... | |
bool | PreventMovementModifier = false |
whether or not movement modifiers are allowed for that type of damage or not More... | |
bool | ImmuneToKnockback = false |
if this is true, knockback force will be ignored and not applied More... | |
KnockbackModifierModes | KnockbackModifierMode = KnockbackModifierModes.Multiplier |
the way to reduce (or increase) received knockback. Multiplier will multiply incoming knockback intensity by a multiplier, flat will subtract a constant value from incoming knockback intensity. More... | |
float | KnockbackMultiplier = 1f |
In multiplier mode, the multiplier to apply to incoming knockback. 0.5 will reduce it in half, while a value of 2 will create a weakness to the specified damage type, and knockback intensity will double. More... | |
float | FlatKnockbackMagnitudeReduction = 10f |
In flat mode, the amount of knockback to subtract every time that type of damage is received. More... | |
bool | ClampKnockback = false |
whether or not incoming knockback of the specified type should be clamped between a min and a max More... | |
float | KnockbackMaxMagnitude = 10f |
the values between which to clamp incoming knockback magnitude More... | |
MMFeedbacks | OnDamageReceived |
This feedback will only be triggered if damage of the matching type is received. More... | |
bool | InterruptibleFeedback = false |
whether or not this feedback can be interrupted (stopped) when that type of damage is interrupted More... | |
bool | AlwaysInterruptFeedbackBeforePlay = false |
if this is true, the feedback will always be preventively stopped before playing More... | |
bool | TriggerFeedbackIfDamageIsZero = false |
whether this feedback should play if damage received is zero More... | |
Protected Member Functions | |
virtual void | Awake () |
On awake we initialize our feedback More... | |
Used by the DamageResistanceProcessor, this class defines the resistance versus a certain type of damage.
|
protectedvirtual |
On awake we initialize our feedback
|
virtual |
When getting damage, goes through damage reduction and outputs the resulting damage
damage | |
type | |
damageApplied |
ArgumentOutOfRangeException |
|
virtual |
Processes the knockback input value and returns it potentially modified by damage resistances
damage | |
type | |
damageApplied |
ArgumentOutOfRangeException |
bool MoreMountains.TopDownEngine.DamageResistance.AlwaysInterruptFeedbackBeforePlay = false |
if this is true, the feedback will always be preventively stopped before playing
bool MoreMountains.TopDownEngine.DamageResistance.ClampDamage = false |
whether or not incoming damage of the specified type should be clamped between a min and a max
bool MoreMountains.TopDownEngine.DamageResistance.ClampKnockback = false |
whether or not incoming knockback of the specified type should be clamped between a min and a max
Vector2 MoreMountains.TopDownEngine.DamageResistance.DamageModifierClamps = new Vector2(0f,10f) |
the values between which to clamp incoming damage
DamageModifierModes MoreMountains.TopDownEngine.DamageResistance.DamageModifierMode = DamageModifierModes.Multiplier |
the way to reduce (or increase) received damage. Multiplier will multiply incoming damage by a multiplier, flat will subtract a constant value from incoming damage.
float MoreMountains.TopDownEngine.DamageResistance.DamageMultiplier = 0.25f |
In multiplier mode, the multiplier to apply to incoming damage. 0.5 will reduce it in half, while a value of 2 will create a weakness to the specified damage type, and damages will double.
DamageTypeModes MoreMountains.TopDownEngine.DamageResistance.DamageTypeMode = DamageTypeModes.BaseDamage |
Whether this resistance impacts base damage or typed damage.
float MoreMountains.TopDownEngine.DamageResistance.FlatDamageReduction = 10f |
In flat mode, the amount of damage to subtract every time that type of damage is received.
float MoreMountains.TopDownEngine.DamageResistance.FlatKnockbackMagnitudeReduction = 10f |
In flat mode, the amount of knockback to subtract every time that type of damage is received.
bool MoreMountains.TopDownEngine.DamageResistance.ImmuneToKnockback = false |
if this is true, knockback force will be ignored and not applied
bool MoreMountains.TopDownEngine.DamageResistance.InterruptibleFeedback = false |
whether or not this feedback can be interrupted (stopped) when that type of damage is interrupted
float MoreMountains.TopDownEngine.DamageResistance.KnockbackMaxMagnitude = 10f |
the values between which to clamp incoming knockback magnitude
KnockbackModifierModes MoreMountains.TopDownEngine.DamageResistance.KnockbackModifierMode = KnockbackModifierModes.Multiplier |
the way to reduce (or increase) received knockback. Multiplier will multiply incoming knockback intensity by a multiplier, flat will subtract a constant value from incoming knockback intensity.
float MoreMountains.TopDownEngine.DamageResistance.KnockbackMultiplier = 1f |
In multiplier mode, the multiplier to apply to incoming knockback. 0.5 will reduce it in half, while a value of 2 will create a weakness to the specified damage type, and knockback intensity will double.
string MoreMountains.TopDownEngine.DamageResistance.Label = "" |
The label of this damage resistance. Used for organization, and to activate/disactivate a resistance by its label.
MMFeedbacks MoreMountains.TopDownEngine.DamageResistance.OnDamageReceived |
This feedback will only be triggered if damage of the matching type is received.
bool MoreMountains.TopDownEngine.DamageResistance.PreventCharacterConditionChange = false |
whether or not condition change for that type of damage is allowed or not
bool MoreMountains.TopDownEngine.DamageResistance.PreventMovementModifier = false |
whether or not movement modifiers are allowed for that type of damage or not
float MoreMountains.TopDownEngine.DamageResistance.Priority = 0 |
The priority of this damage resistance. This will be used to determine in what order damage resistances should be evaluated. Lowest priority means evaluated first.
bool MoreMountains.TopDownEngine.DamageResistance.TriggerFeedbackIfDamageIsZero = false |
whether this feedback should play if damage received is zero
DamageType MoreMountains.TopDownEngine.DamageResistance.TypeResistance |
In TypedDamage mode, the type of damage this resistance will interact with.