mwg API
    Preparing search index...

    Class Creature

    One individual: a species, a level and experience (via mwg/actors' Progression), and a StatBlock so it can carry the same equipment modifiers any other actor can. Reuses both rather than reimplementing them, since a creature's stats are not a different shape from a character's - a level and a growth curve, feeding a StatBlock.

    import { Creature, type Species } from '@datamoc/mw_games/battle';

    const fireling: Species = { id: 'fireling', types: ['fire'], baseStats: { attack: 10, speed: 8 } };

    const wild = new Creature({ species: fireling, level: 5 });
    console.log(wild.stats.get('attack'));
    Index
    progression: Progression
    species: Species
    stats: StatBlock
    • recomputes base stats for the current level - call after a level gained mid-battle

      Returns void