Class CharacterStats
Character statistics.
Namespace: AutoBattleFramework.Stats
Assembly: cs.temp.dll.dll
Syntax
[Serializable]
public class CharacterStats
Fields
AttackSpeed
Attack speed.
Declaration
public float AttackSpeed
Field Value
Type | Description |
---|---|
Single |
CriticalDamage
In case of critical attack, a multiplicative bonus is applied to the damage.
Declaration
public float CriticalDamage
Field Value
Type | Description |
---|---|
Single |
CriticalProbability
Probability of an attack being critical.
Declaration
public float CriticalProbability
Field Value
Type | Description |
---|---|
Single |
Damage
Physical damage.
Declaration
public float Damage
Field Value
Type | Description |
---|---|
Single |
Defense
Physical defense.
Declaration
public float Defense
Field Value
Type | Description |
---|---|
Single |
Energy
Energy needed by a character to perform a special attack. The energy is recharged with each attack of the character according to EnergyRecoveryPerAttack, and when he receives damage according to EnergyRecoveryOnHit.
Declaration
public int Energy
Field Value
Type | Description |
---|---|
Int32 |
EnergyRecoveryOnHit
A percentage of the damage received is converted into energy.
Declaration
public float EnergyRecoveryOnHit
Field Value
Type | Description |
---|---|
Single |
EnergyRecoveryPerAttack
Amount of energy that the character gains when attacking.
Declaration
public float EnergyRecoveryPerAttack
Field Value
Type | Description |
---|---|
Single |
Health
Health points.
Declaration
public int Health
Field Value
Type | Description |
---|---|
Int32 |
MagicDamage
Magic damage.
Declaration
public float MagicDamage
Field Value
Type | Description |
---|---|
Single |
MagicDefense
Magic defense.
Declaration
public float MagicDefense
Field Value
Type | Description |
---|---|
Single |
MovementSpeed
Movement speed.
Declaration
public float MovementSpeed
Field Value
Type | Description |
---|---|
Single |
Range
Range of attacks.
Declaration
public int Range
Field Value
Type | Description |
---|---|
Int32 |
Methods
AddAmountToStat(CharacterStats.CharacterStat, Single)
Adds a fixed amount to a given stat.
Declaration
public void AddAmountToStat(CharacterStats.CharacterStat stat, float amount)
Parameters
Type | Name | Description |
---|---|---|
CharacterStats.CharacterStat | stat | Stat to be modified. |
Single | amount | Amount to be modified. |
Copy()
Makes a copy of the stats.
Declaration
public CharacterStats Copy()
Returns
Type | Description |
---|---|
CharacterStats | Copy of the stats. |
GetStat(CharacterStats.CharacterStat)
Returns the value of the stat by its enum.
Declaration
public float GetStat(CharacterStats.CharacterStat stat)
Parameters
Type | Name | Description |
---|---|---|
CharacterStats.CharacterStat | stat | Stat enumeration value. |
Returns
Type | Description |
---|---|
Single | Stat value. |
SetStat(CharacterStats.CharacterStat, Single)
Set value of the stat by its enum.
Declaration
public float SetStat(CharacterStats.CharacterStat stat, float value)
Parameters
Type | Name | Description |
---|---|---|
CharacterStats.CharacterStat | stat | Stat enumeration value. |
Single | value |
Returns
Type | Description |
---|---|
Single |