mwg API
    Preparing search index...

    Class Achievements

    Index
    • the current value of a counter; 0 for one nothing has touched yet

      Parameters

      • counter: string

      Returns number

    • every id unlocked but not yet announced, clearing the queue as it reads

      Returns string[]

    • Adds to a counter, unlocking whatever that newly earns - a multi-criteria achievement unlocks only on the increment that leaves every one of its criteria met.

      Parameters

      • counter: string
      • amount: number = 1

      Returns string[]

      the ids unlocked by exactly this increment, so a game can announce each one once ("Achievement unlocked: ...") rather than re-scanning everything

    • Progress towards a single-criterion achievement: current count and target - throws for an unknown id or a multi-criteria one (use subProgress there instead).

      Parameters

      • id: string

      Returns { count: number; target: number }

    • progress towards each of an achievement's criteria, in definition order - throws for an unknown id

      Parameters

      • id: string

      Returns readonly { count: number; counter: string; met: boolean; target: number }[]

    • whether every one of an achievement's criteria has reached its target - throws for an unknown id

      Parameters

      • id: string

      Returns boolean