Class CharacterBase
[Serializable]
public abstract class CharacterBase : ICloneable
- Inheritance
-
CharacterBase
- Implements
- Derived
- Inherited Members
Constructors
CharacterBase(Simulator, CharacterStats, int, ElementalType, Row, SizeType, float, float)
protected CharacterBase(Simulator simulator, CharacterStats stat, int characterId, ElementalType elementalType, CharacterSheet.Row rowData = null, SizeType sizeType = SizeType.XL, float attackRange = 4, float runSpeed = 0.3)
Parameters
simulator
Simulatorstat
CharacterStatscharacterId
intelementalType
ElementalTyperowData
CharacterSheet.RowsizeType
SizeTypeattackRange
floatrunSpeed
float
CharacterBase(Simulator, CharacterSheet, int, int, IEnumerable<StatModifier>)
protected CharacterBase(Simulator simulator, CharacterSheet characterSheet, int characterId, int level, IEnumerable<StatModifier> optionalStatModifiers = null)
Parameters
simulator
SimulatorcharacterSheet
CharacterSheetcharacterId
intlevel
intoptionalStatModifiers
IEnumerable<StatModifier>
CharacterBase(CharacterBase)
protected CharacterBase(CharacterBase value)
Parameters
value
CharacterBase
CharacterBase(Row)
protected CharacterBase(CharacterSheet.Row row)
Parameters
row
CharacterSheet.Row
Fields
BuffSkills
public readonly Skills BuffSkills
Field Value
Buffs
public readonly Dictionary<int, Buff> Buffs
Field Value
CriticalMultiplier
public const decimal CriticalMultiplier = 1.5
Field Value
Id
public readonly Guid Id
Field Value
Simulator
[NonSerialized]
public Simulator Simulator
Field Value
Skills
public readonly Skills Skills
Field Value
Targets
public readonly List<CharacterBase> Targets
Field Value
atkElementType
public ElementalType atkElementType
Field Value
attackRange
public float attackRange
Field Value
defElementType
public ElementalType defElementType
Field Value
Properties
ATK
public long ATK { get; }
Property Value
ActionBuffs
public IEnumerable<ActionBuff> ActionBuffs { get; }
Property Value
AdditionalHP
public long AdditionalHP { get; }
Property Value
ArmorPenetration
public long ArmorPenetration { get; }
Property Value
AttackCount
public int AttackCount { get; set; }
Property Value
AttackCountMax
public int AttackCountMax { get; protected set; }
Property Value
CDMG
public long CDMG { get; }
Property Value
CRI
public long CRI { get; }
Property Value
CharacterId
public int CharacterId { get; }
Property Value
CurrentHP
public long CurrentHP { get; set; }
Property Value
DEF
public long DEF { get; }
Property Value
DRR
public long DRR { get; }
Property Value
DRV
public long DRV { get; }
Property Value
HIT
public long HIT { get; }
Property Value
HP
public long HP { get; }
Property Value
IsDead
public bool IsDead { get; }
Property Value
Level
public int Level { get; set; }
Property Value
RowData
public CharacterSheet.Row RowData { get; }
Property Value
RunSpeed
public float RunSpeed { get; }
Property Value
SPD
public long SPD { get; }
Property Value
SizeType
public SizeType SizeType { get; }
Property Value
StatBuffs
public IEnumerable<StatBuff> StatBuffs { get; }
Property Value
Stats
public CharacterStats Stats { get; }
Property Value
Thorn
public long Thorn { get; }
Property Value
usedSkill
public Skill usedSkill { get; set; }
Property Value
Methods
AddBuff(Buff, bool)
Add buff/debuff to target; it means buff/debuff is used by caster.
When Dispel
is used, it can remove prev. debuffs on target.
All the removed debuffs will be returned and saved in battle log.
public IEnumerable<Buff> AddBuff(Buff buff, bool updateImmediate = true)
Parameters
Returns
- IEnumerable<Buff>
An enumerable of removed debuffs from target.
null
will be returned if nothing eliminated.
Clone()
Creates a new object that is a copy of the current instance.
public abstract object Clone()
Returns
- object
A new object that is a copy of this instance.
Die()
public void Die()
EndTurn()
protected virtual void EndTurn()
GetChance(int)
public bool GetChance(int chance)
Parameters
chance
int
Returns
GetDamage(long, bool)
public long GetDamage(long damage, bool considerAttackCount = true)
Parameters
Returns
Heal(long)
public void Heal(long heal)
Parameters
heal
long
InitAI()
public virtual void InitAI()
InitAIV1()
[Obsolete("Use InitAI")]
public void InitAIV1()
InitAIV2()
[Obsolete("Use InitAI")]
public void InitAIV2()
IsCritical(bool)
public bool IsCritical(bool considerAttackCount = true)
Parameters
considerAttackCount
bool
Returns
IsHit(CharacterBase)
public virtual bool IsHit(CharacterBase caster)
Parameters
caster
CharacterBase
Returns
IsHit(ElementalResult)
public bool IsHit(ElementalResult result)
Parameters
result
ElementalResult
Returns
OnDead()
protected virtual void OnDead()
OnPostSkill(Skill)
protected virtual void OnPostSkill(Skill usedSkill)
Parameters
usedSkill
Skill
OnPreSkill()
protected virtual bool OnPreSkill()
Returns
ReduceSkillCooldown()
protected virtual void ReduceSkillCooldown()
RemoveActionBuff(ActionBuff)
public void RemoveActionBuff(ActionBuff removedBuff)
Parameters
removedBuff
ActionBuff
RemoveRecentStatBuff()
public void RemoveRecentStatBuff()
RemoveStatBuff(StatBuff)
public void RemoveStatBuff(StatBuff removedBuff)
Parameters
removedBuff
StatBuff
ResetCurrentHP()
public void ResetCurrentHP()
SetSkill()
protected virtual void SetSkill()
Tick()
public void Tick()
UseSkill()
protected virtual Skill UseSkill()