mwg API
    Preparing search index...

    Class StatBlock

    Index
    • the unmodified base value; 0 for a name that was never given one

      Parameters

      • name: string

      Returns number

    • the final value: a base attribute or a derived stat, with every modifier resolved

      Parameters

      • name: string

      Returns number

    • removes every modifier carrying this source, such as an item just unequipped

      Parameters

      • source: unknown

      Returns void

    • Parameters

      • name: string
      • value: number

      Returns void

    • Base attribute values, and deliberately nothing else.

      Modifiers are not saved, because every one of them is owned by whatever applied it: a worn item through EquipmentSlots, a timed effect through applyStatusEffect, an adjacency bonus through AuraField. Each of those reapplies its own on load, tagged with its own source, so saving them here as well would double every bonus the instant a restored character re-equipped what it was already wearing. Derived stats are definitions, supplied fresh on load like every other definition in this framework.

      Returns { base: Stats }