Skip to content

Class: EntityStatus ​

csharp
[HideMonoScript]
public class EntityStatus : EntityComponent, ILogicUpdate, ICleanup

Fields ​

NameDeclarationDescription
baseStats`[BoxGroup("Stat Settings", true, false, 0)]
public BaseStats baseStats`
bonusStats`[BoxGroup("Stat Settings", true, false, 0)]
[NonSerialized]
[ShowInInspector]
[ReadOnly]
[HideIn(PrefabKind.PrefabInstance|PrefabKind.PrefabAsset)]
public BonusStats bonusStats`
ClientEvent_OnOnFinalStatsUpdatedpublic SafeAction ClientEvent_OnOnFinalStatsUpdated
finalStatspublic FinalStats finalStatsBase stats + scaling stats + bonus stats + basic effect stats
finalStatsProcessorspublic DataProcessorGroup<FinalStats> finalStatsProcessors
manaTypeKeypublic string manaTypeKey
MaximumArmorValuepublic const float MaximumArmorValue = 100000
MinimumArmorValuepublic const float MinimumArmorValue = -300
scalingStats`[BoxGroup("Stat Settings", true, false, 0)]
public BonusStats scalingStats`
statusEffectspublic readonly List<StatusEffect> statusEffectsList of status effects this entity has.

Properties ​

NameDeclarationDescription
abilityHastepublic float abilityHaste { get; }
abilityPowerpublic float abilityPower { get; }
armorpublic float armor { get; }
attackDamagepublic float attackDamage { get; }
attackSpeedMultiplierpublic float attackSpeedMultiplier { get; }
basicEffectMaskpublic BasicEffectMask basicEffectMask { get; }
coldEffectAmppublic float coldEffectAmp { get; }
critAmppublic float critAmp { get; }
critChancepublic float critChance { get; }
currentHealth`[SaveVar(SaveVarFlags.ApplyAfterFrameDelay)]
public float currentHealth { get; }`
currentMana`[SaveVar(SaveVarFlags.ApplyAfterFrameDelay)]
public float currentMana { get; }`
currentShieldpublic float currentShield { get; }
darkEffectAmppublic float darkEffectAmp { get; }
darkStackpublic int darkStack { get; }
fireEffectAmppublic float fireEffectAmp { get; }
fireStackpublic int fireStack { get; }
hasArmorBoostpublic bool hasArmorBoost { get; }
hasArmorReductionpublic bool hasArmorReduction { get; }
hasAttackCriticalpublic bool hasAttackCritical { get; }
hasAttackOverridepublic bool hasAttackOverride { get; }
hasBlindpublic bool hasBlind { get; }
hasColdpublic bool hasCold { get; }
hasCripplepublic bool hasCripple { get; }
hasCrowdControlImmunitypublic bool hasCrowdControlImmunity { get; }
hasDamageImmunitypublic bool hasDamageImmunity { get; }
hasDeathInterruptpublic bool hasDeathInterrupt { get; }
hasHastepublic bool hasHaste { get; }
hasImmobilitypublic bool hasImmobility { get; }
hasInvisiblepublic bool hasInvisible { get; }
hasInvulnerablepublic bool hasInvulnerable { get; }
hasMirageSkinpublic bool hasMirageSkin { get; }
hasProtectedpublic bool hasProtected { get; }
hasRootpublic bool hasRoot { get; }
hasSilencepublic bool hasSilence { get; }
hasSlowpublic bool hasSlow { get; }
hasSpeedpublic bool hasSpeed { get; }
hasStunpublic bool hasStun { get; }
hasUncollidablepublic bool hasUncollidable { get; }
hasUnstoppablepublic bool hasUnstoppable { get; }
healthRegenpublic float healthRegen { get; }
isAlivepublic bool isAlive { get; }
isDeadpublic bool isDead { get; }
isHealthHiddenpublic bool isHealthHidden { get; }
isInConversationpublic bool isInConversation { get; }
isSectionTriggeringDisabledpublic CounterBool isSectionTriggeringDisabled { get; }
level`[SaveVar(SaveVarFlags.Default)]
public int level { get; set; }`
lightEffectAmppublic float lightEffectAmp { get; }
lightStackpublic int lightStack { get; }
manaRegenpublic float manaRegen { get; }
maxHealthpublic float maxHealth { get; }
maxManapublic float maxMana { get; }
mirageSkinInitAmountpublic float mirageSkinInitAmount { get; }
missingHealthpublic float missingHealth { get; }
missingManapublic float missingMana { get; }
movementSpeedMultiplierpublic float movementSpeedMultiplier { get; }
normalizedHealthpublic float normalizedHealth { get; }
normalizedManapublic float normalizedMana { get; }
overridenAttackpublic AbilityTrigger overridenAttack { get; }
specialFillpublic Vector2 specialFill { get; set; }
tenacitypublic float tenacity { get; }
totalArmorFromStatusEffectspublic float totalArmorFromStatusEffects { get; }
totalCripplepublic float totalCripple { get; }
totalFakeMaxHealthpublic float totalFakeMaxHealth { get; }
totalHastepublic float totalHaste { get; }
totalSlowpublic float totalSlow { get; }
totalSpeedpublic float totalSpeed { get; }

Methods ​

AddStatBonus(StatBonus) ​

Add the given bonus stats to this entity.

csharp
public StatBonus AddStatBonus(StatBonus bonus)

Parameters:

NameTypeDescription
bonusStatBonus

Returns: StatBonus

CalculateTotalBonusStat(float, float, float) ​

csharp
public float CalculateTotalBonusStat(float current, float bonusFlat, float bonusPercentage)

Parameters:

NameTypeDescription
currentfloat
bonusFlatfloat
bonusPercentagefloat

Returns: float

DisableSectionTriggering() ​

This entity will not trigger section colliders. Note EnableSectionTriggering() must be done after calling this function.

csharp
public void DisableSectionTriggering()

EnableSectionTriggering() ​

This entity will trigger section colliders. Note this has to be done AFTER calling DisableSectionTriggering().

csharp
public void EnableSectionTriggering()

FindStatusEffect(Type, Func<StatusEffect, bool>) ​

Find a status effect of given type with predicate.

csharp
public StatusEffect FindStatusEffect(Type type, Func<StatusEffect, bool> predicate)

Parameters:

NameTypeDescription
typeSystem.Type
predicateSystem.Func<T, TResult><StatusEffect,bool>

Returns: StatusEffect

FindStatusEffect&lt;T&gt;(Func&lt;T, bool&gt;) ​

Find a status effect of given type with predicate.

csharp
public T FindStatusEffect<T>(Func<T, bool> predicate) where T : StatusEffect

Parameters:

NameTypeDescription
predicateSystem.Func&lt;T, TResult&gt;&lt;T,bool&gt;
``T

Returns: T

GetBonusAbilityPower() ​

csharp
public float GetBonusAbilityPower()

Returns: float

GetBonusArmor() ​

csharp
public float GetBonusArmor()

Returns: float

GetBonusAttackDamage() ​

csharp
public float GetBonusAttackDamage()

Returns: float

GetBonusHealth() ​

csharp
public float GetBonusHealth()

Returns: float

GetElementalAmp(ElementalType) ​

csharp
public float GetElementalAmp(ElementalType type)

Parameters:

NameTypeDescription
typeElementalType

Returns: float

GetElementalStack(ElementalType) ​

csharp
public int GetElementalStack(ElementalType type)

Parameters:

NameTypeDescription
typeElementalType

Returns: int

GetStatusEffect(Type) ​

Get a status effect of given type.

csharp
public StatusEffect GetStatusEffect(Type type)

Parameters:

NameTypeDescription
typeSystem.Type

Returns: StatusEffect

GetStatusEffect&lt;T&gt;() ​

Get a status effect of given type.

csharp
public T GetStatusEffect<T>() where T : StatusEffect

Parameters:

NameTypeDescription
``T

Returns: T

GetStatusEffects(Type) ​

Enumerate all status effects of given type.

csharp
public IEnumerable<StatusEffect> GetStatusEffects(Type type)

Parameters:

NameTypeDescription
typeSystem.Type

Returns: System.Collections.Generic.IEnumerable&lt;T&gt;&lt;StatusEffect&gt;

GetStatusEffects&lt;T&gt;() ​

Enumerate all status effects of given type.

csharp
public IEnumerable<T> GetStatusEffects<T>() where T : StatusEffect

Parameters:

NameTypeDescription
``T

Returns: System.Collections.Generic.IEnumerable&lt;T&gt;&lt;T&gt;

HasElemental(ElementalType) ​

csharp
public bool HasElemental(ElementalType type)

Parameters:

NameTypeDescription
typeElementalType

Returns: bool

HasStatusEffect(Type) ​

Does this entity has a status effect of a certain type?

csharp
public bool HasStatusEffect(Type statusEffectType)

Parameters:

NameTypeDescription
statusEffectTypeSystem.Type

Returns: bool

HasStatusEffect&lt;T&gt;() ​

Does this entity has a status effect of a certain type?

csharp
public bool HasStatusEffect<T>() where T : StatusEffect

Parameters:

NameTypeDescription
``T

Returns: bool

HideHealth() ​

csharp
public void HideHealth()

LogicUpdate(float) ​

csharp
public override void LogicUpdate(float dt)

Parameters:

NameTypeDescription
dtfloat

RemoveStatBonus(StatBonus) ​

Remove the given bonus stats from this entity. Throws if the provided bonus did not exist on this entity.

csharp
public void RemoveStatBonus(StatBonus bonus)

Parameters:

NameTypeDescription
bonusStatBonus

SetHealth(float) ​

csharp
public void SetHealth(float amount)

Parameters:

NameTypeDescription
amountfloat

SetMana(float) ​

csharp
public void SetMana(float amount)

Parameters:

NameTypeDescription
amountfloat

ShowHealth() ​

csharp
public void ShowHealth()

TryGetStatusEffect(Type, out StatusEffect) ​

Try to get an existing status effect instance on this entity.

csharp
public bool TryGetStatusEffect(Type type, out StatusEffect effect)

Parameters:

NameTypeDescription
typeSystem.Type
effectStatusEffect

Returns: bool

TryGetStatusEffect&lt;T&gt;(out T) ​

Try to get an existing status effect instance on this entity.

csharp
public bool TryGetStatusEffect<T>(out T effect) where T : StatusEffect

Parameters:

NameTypeDescription
effectT
``T

Returns: bool

UpdateStats() ​

Recalculate entity stats + stat processors + basic effects + bonus stats immediately.

csharp
public void UpdateStats()

Maintained by the Shape of Dreams Modding Community