Skip to main content

Module party

Module party 

Source
Expand description

Generic, game-agnostic party / monster model (milestone P0a).

This module lifts the party/monster/box model out of any specific game into the engine. The engine knows nothing game-specific: species, moves, items, stat formulas, EXP curves, and evolution conditions are all supplied by the game through provider traits, mirroring the existing crate::GameData / crate::battle::BattleProvider / crate::battle::ItemProvider pattern.

The engine offers mechanism (storing instances, driving level-up / evolution / party transitions); the game supplies policy (the numbers).

There is no rand dependency: if a game needs randomness (e.g. for DV/IV generation) it computes the value itself and hands the result to the engine, which only ever stores it.

Structs§

BoxStore
A collection of storage boxes plus a “currently selected” box, with both the box count and per-box capacity supplied by the game.
LevelUp
Result of an EXP gain: what happened to the monster’s level.
MonsterInstance
A generic monster instance: species, level, exp, computed stats, status, and known moves. All numbers are delegated to the MonsterProvider.
MoveSlot
A single known move with its current and bonus PP.
Party
An ordered party of monsters with a provider/param-defined capacity.
PartyFull
Error returned when adding to a full Party or StorageBox.
StatSet
A small map from P::Stat to u16.
StorageBox
A single storage box with a game-defined capacity. Same add/remove/len/ is_full surface as Party.

Enums§

EvolutionTrigger
What caused an evolution check. Parameterized by the game’s opaque item id so the engine stays decoupled from any item system.
MonsterStatus
Engine-level status condition for a stored monster.

Traits§

EvolutionProvider
Evolution hooks. Layered on top of MonsterProvider.
ExpProvider
Total EXP / leveling hooks. Layered on top of MonsterProvider so the same id types are reused.
MonsterProvider
Game-supplied definition of how monsters work.