getStat
getStat: (StatChange) -> Stat?The stat changed, or nil before one is set.
| Method | Returns | Description |
|---|---|---|
getStat() | Stat? | The stat changed, or nil before one is set. |
getRelative() | number | The change if the item is used now. |
getTheoretical() | number | The change before the boost cap is applied. |
getAbsolute() | number | The stat's value after the change. |
getPositivity() | Positivity? | How good the change is, or nil before one is set. |
getFormattedRelative() | string | The relative change as "+n"/"-n" (a range: "+min~max", "±n", ...). |
getFormattedTheoretical() | string | The 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() | string | StatChange(stat=…, relative=…, theoretical=…, absolute=…, positivity=…), or `RangeStatChange(minRelative=…, minTheoretical=…, minAbsolute… |
equals(any) | boolean | Whether other equals this StatChange, as == answers it (false for a value of another class). |
| Method | Returns | Description |
|---|---|---|
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;… |
getStatgetStat: (StatChange) -> Stat?The stat changed, or nil before one is set.
getRelativegetRelative: (StatChange) -> numberThe change if the item is used now.
getTheoreticalgetTheoretical: (StatChange) -> numberThe change before the boost cap is applied.
getAbsolutegetAbsolute: (StatChange) -> numberThe stat's value after the change.
getPositivitygetPositivity: (StatChange) -> Positivity?How good the change is, or nil before one is set.
getFormattedRelativegetFormattedRelative: (StatChange) -> stringThe relative change as "+n"/"-n" (a range: "+min~max", "±n", ...).
getFormattedTheoreticalgetFormattedTheoretical: (StatChange) -> stringThe theoretical change, formatted as getFormattedRelative().
setStatsetStat: (StatChange, Stat) -> ()Set the stat.
setRelativesetRelative: (StatChange, number) -> ()Set the relative change.
setTheoreticalsetTheoretical: (StatChange, number) -> ()Set the theoretical change.
setAbsolutesetAbsolute: (StatChange, number) -> ()Set the value after the change.
setPositivitysetPositivity: (StatChange, Positivity?) -> ()Set how good the change is (nil: none).
toStringtoString: (StatChange) -> stringStatChange(stat=…, relative=…, theoretical=…, absolute=…, positivity=…), or RangeStatChange(minRelative=…, minTheoretical=…, minAbsolute=…) for a range change.
equalsequals: (StatChange, any) -> booleanWhether other equals this StatChange, as == answers it (false for a value of another class).