Class DamageInstance
Inheritance
object
UnityEngine.Object
UnityEngine.Component
UnityEngine.Behaviour
UnityEngine.MonoBehaviour
Mirror.NetworkBehaviour
DamageInstance
Assembly: Dew.Core.dll
Syntax
public abstract class DamageInstance : AbilityInstance, ILogicUpdate, ICleanup, ICustomDestroyRoutine
Fields
applyElemental
Declaration
public bool applyElemental
Field Value
attackEffect
Declaration
public float attackEffect
Field Value
attackEffectType
Declaration
[ShowIf("@attackEffect > 0.001f", true)]
public AttackEffectType attackEffectType
Field Value
cancelIfCasterDead
Declaration
public bool cancelIfCasterDead
Field Value
closeEnemyDistanceThreshold
Declaration
public float closeEnemyDistanceThreshold
Field Value
closeEnemyMultiplier
Declaration
public float closeEnemyMultiplier
Field Value
cooldownTime
Declaration
[ShowIf("_isCooldownCheck", true)]
public float cooldownTime
Field Value
destroyWhenDone
Declaration
public bool destroyWhenDone
Field Value
dmgFactor
Declaration
public ScalingValue dmgFactor
Field Value
doKnockback
Declaration
Field Value
duplicateCheck
Declaration
public DamageInstance.DuplicateCheckType duplicateCheck
Field Value
elemental
Declaration
[ShowIf("applyElemental", true)]
public ElementalType elemental
Field Value
elementalChance
Declaration
[ShowIf("applyElemental", true)]
public float elementalChance
Field Value
forceMergeNumbers
Declaration
public bool forceMergeNumbers
Field Value
heroDamageMultiplier
Declaration
public float heroDamageMultiplier
Field Value
hitEffect
Declaration
[Title("Effects", null, TitleAlignments.Left, true, true)]
public GameObject hitEffect
Field Value
| Type |
Description |
| UnityEngine.GameObject |
|
hittable
Declaration
public AbilityTargetValidator hittable
Field Value
isDamageOverTime
Declaration
public bool isDamageOverTime
Field Value
knockbackSettings
Declaration
[ShowIf("doKnockback", true)]
[InlineProperty]
[HideLabel]
public Knockback knockbackSettings
Field Value
knockupAmount
Declaration
[Title("Extras", null, TitleAlignments.Left, true, true)]
public float knockupAmount
Field Value
mainEffect
Declaration
[LabelText("Main Effect (Obsolete, Use Start Effect)")]
[HideIf("@mainEffect == null", true)]
public GameObject mainEffect
Field Value
| Type |
Description |
| UnityEngine.GameObject |
|
monsterDamageMultiplier
Declaration
public float monsterDamageMultiplier
Field Value
multiplyDamageByMaxHp
Declaration
public bool multiplyDamageByMaxHp
Field Value
onHit
Declaration
public SafeAction<Entity> onHit
Field Value
origin
Declaration
public DamageInstance.OriginType origin
Field Value
procCoefficient
Declaration
public float procCoefficient
Field Value
range
Declaration
[Title("General", null, TitleAlignments.Left, true, true)]
public DewCollider range
Field Value
strengthMultiplier
Affects damage amount, knockup amount and proc coefficient.
Declaration
public float strengthMultiplier
Field Value
type
Declaration
[Title("Damage", null, TitleAlignments.Left, true, true)]
public DamageData.SourceType type
Field Value
useDirectionOfCast
Declaration
[ShowIf("doKnockback", true)]
public bool useDirectionOfCast
Field Value
Methods
AddToDuplicateTracker(Entity)
Declaration
protected void AddToDuplicateTracker(Entity ent)
Parameters
| Type |
Name |
Description |
| Entity |
ent |
|
CheckShouldBeDestroyed()
Declaration
protected bool CheckShouldBeDestroyed()
Returns
DoCollisionChecks()
Can be called multiple times. Duplicates will be excluded.
Declaration
protected void DoCollisionChecks()
IsDuplicate(Entity)
Declaration
protected bool IsDuplicate(Entity ent)
Parameters
| Type |
Name |
Description |
| Entity |
ent |
|
Returns
OnBeforeDispatchDamage(ref DamageData, Entity)
Called on server to process damage before applying it.
Declaration
protected virtual void OnBeforeDispatchDamage(ref DamageData dmg, Entity target)
Parameters
OnCollisionCheck()
Declaration
protected virtual void OnCollisionCheck()
OnCreate()
Declaration
protected override void OnCreate()
Overrides
OnDestroyActor()
Declaration
protected override void OnDestroyActor()
Overrides
OnHit(Entity)
Called on server when this instance hits an entity.
Declaration
protected virtual void OnHit(Entity entity)
Parameters
| Type |
Name |
Description |
| Entity |
entity |
|
OnValidateTarget(Entity)
Called on server to validate hits on entity. Return false here to ignore certain hit on an entity.
Declaration
protected virtual bool OnValidateTarget(Entity entity)
Parameters
| Type |
Name |
Description |
| Entity |
entity |
|
Returns
ShouldUseDefaultAbilityTargetValidator()
Declaration
protected virtual bool ShouldUseDefaultAbilityTargetValidator()
Returns
Implements
Extension Methods