Table of Contents

Class CharacterBase

Namespace
Nekoyume.Model
Assembly
Lib9c.dll
[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 Simulator
stat CharacterStats
characterId int
elementalType ElementalType
rowData CharacterSheet.Row
sizeType SizeType
attackRange float
runSpeed float

CharacterBase(Simulator, CharacterSheet, int, int, IEnumerable<StatModifier>)

protected CharacterBase(Simulator simulator, CharacterSheet characterSheet, int characterId, int level, IEnumerable<StatModifier> optionalStatModifiers = null)

Parameters

simulator Simulator
characterSheet CharacterSheet
characterId int
level int
optionalStatModifiers 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

Skills

Buffs

public readonly Dictionary<int, Buff> Buffs

Field Value

Dictionary<int, Buff>

CriticalMultiplier

public const decimal CriticalMultiplier = 1.5

Field Value

decimal

Id

public readonly Guid Id

Field Value

Guid

Simulator

[NonSerialized]
public Simulator Simulator

Field Value

Simulator

Skills

public readonly Skills Skills

Field Value

Skills

Targets

public readonly List<CharacterBase> Targets

Field Value

List<CharacterBase>

atkElementType

public ElementalType atkElementType

Field Value

ElementalType

attackRange

public float attackRange

Field Value

float

defElementType

public ElementalType defElementType

Field Value

ElementalType

Properties

ATK

public long ATK { get; }

Property Value

long

ActionBuffs

public IEnumerable<ActionBuff> ActionBuffs { get; }

Property Value

IEnumerable<ActionBuff>

AdditionalHP

public long AdditionalHP { get; }

Property Value

long

ArmorPenetration

public long ArmorPenetration { get; }

Property Value

long

AttackCount

public int AttackCount { get; set; }

Property Value

int

AttackCountMax

public int AttackCountMax { get; protected set; }

Property Value

int

CDMG

public long CDMG { get; }

Property Value

long

CRI

public long CRI { get; }

Property Value

long

CharacterId

public int CharacterId { get; }

Property Value

int

CurrentHP

public long CurrentHP { get; set; }

Property Value

long

DEF

public long DEF { get; }

Property Value

long

DRR

public long DRR { get; }

Property Value

long

DRV

public long DRV { get; }

Property Value

long

HIT

public long HIT { get; }

Property Value

long

HP

public long HP { get; }

Property Value

long

IsDead

public bool IsDead { get; }

Property Value

bool

Level

public int Level { get; set; }

Property Value

int

RowData

public CharacterSheet.Row RowData { get; }

Property Value

CharacterSheet.Row

RunSpeed

public float RunSpeed { get; }

Property Value

float

SPD

public long SPD { get; }

Property Value

long

SizeType

public SizeType SizeType { get; }

Property Value

SizeType

StatBuffs

public IEnumerable<StatBuff> StatBuffs { get; }

Property Value

IEnumerable<StatBuff>

Stats

public CharacterStats Stats { get; }

Property Value

CharacterStats

Thorn

public long Thorn { get; }

Property Value

long

usedSkill

public Skill usedSkill { get; set; }

Property Value

Skill

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

buff Buff
updateImmediate bool

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

bool

GetDamage(long, bool)

public long GetDamage(long damage, bool considerAttackCount = true)

Parameters

damage long
considerAttackCount bool

Returns

long

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

bool

IsHit(CharacterBase)

public virtual bool IsHit(CharacterBase caster)

Parameters

caster CharacterBase

Returns

bool

IsHit(ElementalResult)

public bool IsHit(ElementalResult result)

Parameters

result ElementalResult

Returns

bool

OnDead()

protected virtual void OnDead()

OnPostSkill(Skill)

protected virtual void OnPostSkill(Skill usedSkill)

Parameters

usedSkill Skill

OnPreSkill()

protected virtual bool OnPreSkill()

Returns

bool

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()

Returns

Skill