Corgi Engine
v9.1
|
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 Vector2 | ProcessKnockback (Vector2 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.CorgiEngine.DamageResistance.AlwaysInterruptFeedbackBeforePlay = false |
if this is true, the feedback will always be preventively stopped before playing
bool MoreMountains.CorgiEngine.DamageResistance.ClampDamage = false |
whether or not incoming damage of the specified type should be clamped between a min and a max
bool MoreMountains.CorgiEngine.DamageResistance.ClampKnockback = false |
whether or not incoming knockback of the specified type should be clamped between a min and a max
Vector2 MoreMountains.CorgiEngine.DamageResistance.DamageModifierClamps = new Vector2(0f,10f) |
the values between which to clamp incoming damage
DamageModifierModes MoreMountains.CorgiEngine.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.CorgiEngine.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.CorgiEngine.DamageResistance.DamageTypeMode = DamageTypeModes.BaseDamage |
Whether this resistance impacts base damage or typed damage.
float MoreMountains.CorgiEngine.DamageResistance.FlatDamageReduction = 10f |
In flat mode, the amount of damage to subtract every time that type of damage is received.
float MoreMountains.CorgiEngine.DamageResistance.FlatKnockbackMagnitudeReduction = 10f |
In flat mode, the amount of knockback to subtract every time that type of damage is received.
bool MoreMountains.CorgiEngine.DamageResistance.ImmuneToKnockback = false |
if this is true, knockback force will be ignored and not applied
bool MoreMountains.CorgiEngine.DamageResistance.InterruptibleFeedback = false |
whether or not this feedback can be interrupted (stopped) when that type of damage is interrupted
float MoreMountains.CorgiEngine.DamageResistance.KnockbackMaxMagnitude = 10f |
the values between which to clamp incoming knockback magnitude
KnockbackModifierModes MoreMountains.CorgiEngine.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.CorgiEngine.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.CorgiEngine.DamageResistance.Label = "" |
The label of this damage resistance. Used for organization, and to activate/disactivate a resistance by its label.
MMFeedbacks MoreMountains.CorgiEngine.DamageResistance.OnDamageReceived |
This feedback will only be triggered if damage of the matching type is received.
bool MoreMountains.CorgiEngine.DamageResistance.PreventCharacterConditionChange = false |
whether or not condition change for that type of damage is allowed or not
bool MoreMountains.CorgiEngine.DamageResistance.PreventMovementModifier = false |
whether or not movement modifiers are allowed for that type of damage or not
float MoreMountains.CorgiEngine.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.CorgiEngine.DamageResistance.TriggerFeedbackIfDamageIsZero = false |
whether this feedback should play if damage received is zero
DamageType MoreMountains.CorgiEngine.DamageResistance.TypeResistance |
In TypedDamage mode, the type of damage this resistance will interact with.