StatChange

Methods
14
Fields
None

Methods

MethodReturnsDescription
getStat()Stat?The stat changed, or nil before one is set.
getRelative()numberThe change if the item is used now.
getTheoretical()numberThe change before the boost cap is applied.
getAbsolute()numberThe stat's value after the change.
getPositivity()Positivity?How good the change is, or nil before one is set.
getFormattedRelative()stringThe relative change as "+n"/"-n" (a range: "+min~max", "±n", ...).
getFormattedTheoretical()stringThe theoretical change, formatted as getFormattedRelative().
setStat(Stat)()Set the stat.
setRelative(number)()Set the relative change.
setTheoretical(number)()Set the theoretical change.
setAbsolute(number)()Set the value after the change.
setPositivity(Positivity?)()Set how good the change is (nil: none).
toString()stringStatChange(stat=…, relative=…, theoretical=…, absolute=…, positivity=…), or `RangeStatChange(minRelative=…, minTheoretical=…, minAbsolute…
equals(any)booleanWhether other equals this StatChange, as == answers it (false for a value of another class).

Returned by

MethodReturnsDescription
StatsChanges.getStatChanges{StatChange}The changes, 1-based. Copies: setting one does not change this set. The empty slots of a StatsChanges.new(len) not yet set are left out;…

Method details

toString

toString: (StatChange) -> string

StatChange(stat=…, relative=…, theoretical=…, absolute=…, positivity=…), or RangeStatChange(minRelative=…, minTheoretical=…, minAbsolute=…) for a range change.

equals

equals: (StatChange, any) -> boolean

Whether other equals this StatChange, as == answers it (false for a value of another class).