A change to one stat from one source: an item, an upgrade, a buff.
Each number goes to its own bucket, so one modifier may set several.
Plain data, so a save and a room can carry it as it is.
| Property |
Type |
Description |
flat? |
number |
Added to the base. |
more? |
number |
Multiplied with the stat’s other mores: 0.2 is ×1.2. |
percent? |
number |
Summed with the stat’s other percents: 0.2 is +20%. |
saved? |
boolean |
False for a modifier its source puts back itself, as a worn item does from the item as it is now: the stats save leaves it out, and a restore keeps the one the entity holds. Left out, it is saved. |
seconds? |
number |
Simulated seconds it lasts before the step drops it; left out, it stays until its source is removed. A stat holds the tick it ends on instead, as a StoredStatModifier. |
source |
string |
What added it, and what removes it: "boots", "haste". |