mwg API
    Preparing search index...

    Type Alias AdvancementTierKind

    AdvancementTierKind: "points" | "branch" | "capstone"

    Tiered specialization: level-gated tiers that grant points, offer a mutually-exclusive branch choice, or offer a capstone choice.

    The shape a subclass system and an armor-ability slot share: most tiers just add points a game spends elsewhere (through SkillPoints, typically), one tier asks the player to commit to exactly one of several branches for the rest of the run, and a late tier grants exactly one capstone. mwg names none of the options itself - a game's own track definition does, the same way QuestLog takes quest definitions.

    Points are deliberately only a ledger here, not a spend rule: what a point buys is a game's own design (a stat rank, a talent node), so spending stays game-side the way skillCheck is a dice roll and nothing about who is rolling it.

    import { Advancement, type AdvancementTrack } from '@datamoc/mw_games/actors';

    const track: AdvancementTrack = {
    tiers: [
    { threshold: 5, kind: 'points', points: 2 },
    { threshold: 10, kind: 'branch', options: [{ id: 'ranger' }, { id: 'mage' }] },
    ],
    };

    const advancement = new Advancement(track);
    advancement.grant(6); // opens tier 0, granting 2 points
    advancement.grant(10); // opens tier 1, a branch to commit to
    advancement.choose(1, 'ranger', 10);