Skip to main content

Stat

Stat

Kind: global class

new Stat(value)

ParamType
valuenumber

stat.id : number

Unique identifier of a stat, such a health, armor etc.

Kind: instance property of Stat

stat.base : Vector1

Kind: instance property of Stat

stat.postprocess : function

Kind: instance property of Stat

stat.onModifierAdded ⇒ Signal.<LinearModifier>

Kind: instance property of Stat

stat.onModifierRemoved ⇒ Signal.<LinearModifier>

Kind: instance property of Stat

stat.onChanged ⇒ Signal

Kind: instance property of Stat

stat.isStat : boolean

Kind: instance property of Stat
Read only: true

stat.resetModifiers()

Remove all modifiers from the stat

Kind: instance method of Stat

stat.valueOf() ⇒ number

Kind: instance method of Stat

stat.toString() ⇒ string

Kind: instance method of Stat

stat.getValue() ⇒ number

Kind: instance method of Stat

stat.getBaseValue() ⇒ number

Kind: instance method of Stat

stat.setBaseValue(v)

Kind: instance method of Stat

ParamType
vnumber

stat.getModifiers() ⇒ Array.<LinearModifier>

NOTE: do not modify result

Kind: instance method of Stat

stat.addModifier(mod)

Kind: instance method of Stat

ParamType
modLinearModifier

stat.hasModifier(mod) ⇒ boolean

Kind: instance method of Stat

ParamType
modLinearModifier

stat.removeModifier(mod) ⇒ boolean

Kind: instance method of Stat

ParamType
modLinearModifier

stat.equals(other) ⇒ boolean

Kind: instance method of Stat

ParamType
otherStat

stat.copy(other)

Kind: instance method of Stat

ParamType
otherStat

stat.copyBase(other)

Copy base value from another stat

Kind: instance method of Stat

ParamType
otherStat

stat.setBaseFromParametricFunction(f, v)

Kind: instance method of Stat

ParamType
ffunction
vnumber

stat.addNonTransientModifiersFromStat(other)

Kind: instance method of Stat

ParamType
otherStat

Stat.applyModifiers(input, modifiers) ⇒ number

Kind: static method of Stat

ParamType
inputnumber
modifiersList.<LinearModifier>