Struct DamageData
Assembly: Dew.Core.dll
Syntax
Constructors
DamageData(SourceType, ScalingValue, Entity, int, float)
Declaration
public DamageData(DamageData.SourceType source, ScalingValue scalingValue, Entity from, int skillLevel, float procCoefficient)
Parameters
DamageData(SourceType, float, float)
Declaration
public DamageData(DamageData.SourceType source, float originalAmount, float procCoefficient)
Parameters
Fields
elemental
Declaration
public ElementalType? elemental
Field Value
source
Source type of this damage.
Declaration
public DamageData.SourceType source
Field Value
Properties
actor
Declaration
public readonly Actor actor { get; }
Property Value
amplificationMultiplier
Damage multiplier for amplications. Amplications are multiplicatively combined. This value will be multiplied to the damage after flatModifier.
Declaration
public readonly float amplificationMultiplier { get; }
Property Value
attackEffectStrength
Attack effect strength (0~1). If this value is above 0, this damage will trigger attack effects.
Declaration
public readonly float attackEffectStrength { get; }
Property Value
attackEffectType
Declaration
public readonly AttackEffectType attackEffectType { get; }
Property Value
attributes
Declaration
public readonly DamageAttribute attributes { get; }
Property Value
currentAmount
Amount of processed damage with current modifications.
Declaration
public float currentAmount { get; }
Property Value
damageToShieldMultiplier
Declaration
public readonly float damageToShieldMultiplier { get; }
Property Value
direction
Direction of this damage.
Declaration
public readonly Vector3? direction { get; }
Property Value
| Type |
Description |
| UnityEngine.Vector3? |
|
flatModifier
Flat damage modifier. This value will be added to the final damage before any other multipliers.
Declaration
public readonly float flatModifier { get; }
Property Value
isBlockedByImmunity
Is this damage currently blocked by immunity?
Declaration
public readonly bool isBlockedByImmunity { get; }
Property Value
originalAmount
Original amount of damage.
Declaration
public readonly float originalAmount { get; }
Property Value
originPosition
Origin position of this damage.
Declaration
public readonly Vector3? originPosition { get; }
Property Value
| Type |
Description |
| UnityEngine.Vector3? |
|
overrideElementalStacks
Declaration
public readonly int? overrideElementalStacks { get; }
Property Value
procCoefficient
Proc coefficient of damage.
Declaration
public readonly float procCoefficient { get; }
Property Value
reductionMultiplier
Damage multiplier for reductions. Reductions are multiplicatively combined. This value will be multiplied to the damage after flatModifier.
Declaration
public readonly float reductionMultiplier { get; }
Property Value
Methods
AddFlatAmount(float)
Add a flat amount to this damage.
Declaration
public DamageData AddFlatAmount(float amount)
Parameters
| Type |
Name |
Description |
| float |
amount |
The amount to add. Must be a positive number or zero.
|
Returns
ApplyAmplification(float)
Amplify this damage by the value specified, stacking multiplicatively.
e.g. One Amplication by 0.5 will cause 50% increase in damage.
Two Amplifications by 0.5 will cause 125% increase in damage.
Declaration
public DamageData ApplyAmplification(float value)
Parameters
| Type |
Name |
Description |
| float |
value |
Amplification value. Must be a positive number or zero.
|
Returns
ApplyDamageToShieldMultiplier(float)
Declaration
public DamageData ApplyDamageToShieldMultiplier(float multiplier)
Parameters
| Type |
Name |
Description |
| float |
multiplier |
|
Returns
ApplyRawMultiplier(float)
Apply raw multiplier to this damage's original amount.
Declaration
public DamageData ApplyRawMultiplier(float multiplier)
Parameters
| Type |
Name |
Description |
| float |
multiplier |
|
Returns
ApplyReduction(float)
Reduce this damage by the value specified, stacking multiplicatively.
e.g. One Reduction by 0.5 will cause 50% decrease in damage.
Two Reductions by 0.5 will cause 75% decrease in damage.
Declaration
public DamageData ApplyReduction(float value)
Parameters
| Type |
Name |
Description |
| float |
value |
Reduction value. This value will be clamped between 0 and 1.
|
Returns
ApplyStrength(float)
Apply the given multiplier to the damage and the proc coefficient.
Declaration
public DamageData ApplyStrength(float multiplier)
Parameters
| Type |
Name |
Description |
| float |
multiplier |
|
Returns
BlockWithImmunity()
Block this damage with damage immunity. Note this will be ignored if IgnoreDamageImmunity is set to true.
Declaration
public DamageData BlockWithImmunity()
Returns
Dispatch(Entity, ReactionChain)
Declaration
public void Dispatch(Entity victim, ReactionChain chain = default)
Parameters
DoAttackEffect(AttackEffectType, float)
Declaration
public DamageData DoAttackEffect(AttackEffectType type, float strength = 1)
Parameters
Returns
HasAttr(DamageAttribute)
Does this damage has specific attribute?
Declaration
public bool HasAttr(DamageAttribute attr)
Parameters
Returns
IsAmountModifiedBy(Actor)
Declaration
public bool IsAmountModifiedBy(Actor actor)
Parameters
| Type |
Name |
Description |
| Actor |
actor |
|
Returns
IsAmountModifiedBy(Type)
Declaration
public bool IsAmountModifiedBy(Type actorType)
Parameters
| Type |
Name |
Description |
| System.Type |
actorType |
|
Returns
SetActor(Actor)
Declaration
public DamageData SetActor(Actor actor)
Parameters
| Type |
Name |
Description |
| Actor |
actor |
|
Returns
SetAmountModifiedBy(Actor)
Declaration
public DamageData SetAmountModifiedBy(Actor actor)
Parameters
| Type |
Name |
Description |
| Actor |
actor |
|
Returns
SetAmountModifiedBy(Type)
Declaration
public DamageData SetAmountModifiedBy(Type actorType)
Parameters
| Type |
Name |
Description |
| System.Type |
actorType |
|
Returns
SetAmountOrigin(FinalDamageData)
If amount of this damage originates from other damage, you can specify it here to make it inherit its modifier flags and attributes.
Declaration
public DamageData SetAmountOrigin(FinalDamageData damage)
Parameters
Returns
SetAmountOrigin(FinalHealData)
If amount of this damage originates from other heal, you can specify it here to make it inherit its modifier flags and isCrit.
Declaration
public DamageData SetAmountOrigin(FinalHealData heal)
Parameters
Returns
SetAttr(DamageAttribute)
Add special attribute for this damage.
Declaration
public DamageData SetAttr(DamageAttribute attr)
Parameters
Returns
SetDirection(Quaternion)
Declaration
public DamageData SetDirection(Quaternion rot)
Parameters
| Type |
Name |
Description |
| UnityEngine.Quaternion |
rot |
|
Returns
SetDirection(Vector3)
Declaration
public DamageData SetDirection(Vector3 dir)
Parameters
| Type |
Name |
Description |
| UnityEngine.Vector3 |
dir |
|
Returns
SetElemental(ElementalType?)
Declaration
public DamageData SetElemental(ElementalType? type)
Parameters
Returns
SetOriginPosition(Vector3)
Declaration
public DamageData SetOriginPosition(Vector3 pos)
Parameters
| Type |
Name |
Description |
| UnityEngine.Vector3 |
pos |
|
Returns
SetOverrideElementalStacks(int)
Set this to override number of elemental stacks this damage applies.
Declaration
public DamageData SetOverrideElementalStacks(int stacks)
Parameters
| Type |
Name |
Description |
| int |
stacks |
|
Returns
SetSourceType(SourceType)
Declaration
public DamageData SetSourceType(DamageData.SourceType type)
Parameters
Returns
SubtractFlatAmount(float)
Subtract a flat amount from this damage.
Declaration
public DamageData SubtractFlatAmount(float amount)
Parameters
| Type |
Name |
Description |
| float |
amount |
The amount to subtract. Must be a positive number or zero.
|
Returns