mwg API
    Preparing search index...

    Interface LevelScale

    Level-scaled item modifiers: the shape passive gear whose bonus grows with its own upgrade level shares, without any one game's scaling curve.

    A ring that grants +1 evasion per level and a weapon that hastes 5% per level are the same thing here: each entry names a stat, an op, a value at level 0, and a per-level increment, resolved to plain Modifiers for a given level. mwg picks no curve beyond linear - anything fancier (diminishing returns, breakpoints) is a game's own from function on a derived stat, not a framework formula.

    import { scaledModifiers, type LevelScale } from '@datamoc/mw_games/actors';

    const ringScales: LevelScale[] = [{ stat: 'evasion', op: 'add', base: 1, perLevel: 1 }];
    const modifiers = scaledModifiers(3, ringScales); // [{ stat: 'evasion', op: 'add', value: 4 }]
    interface LevelScale {
        base: number;
        op: ModifierOp;
        perLevel: number;
        stat: string;
    }
    Index
    base: number

    the modifier value at level 0

    perLevel: number

    added once per level above 0

    stat: string