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.
- Monster
Instance - A generic monster instance: species, level, exp, computed stats, status, and
known moves. All numbers are delegated to the
MonsterProvider. - Move
Slot - A single known move with its current and bonus PP.
- Party
- An ordered party of monsters with a provider/param-defined capacity.
- Party
Full - Error returned when adding to a full
PartyorStorageBox. - StatSet
- A small map from
P::Stattou16. - Storage
Box - A single storage box with a game-defined capacity. Same add/remove/len/
is_full surface as
Party.
Enums§
- Evolution
Trigger - What caused an evolution check. Parameterized by the game’s opaque item id so the engine stays decoupled from any item system.
- Monster
Status - Engine-level status condition for a stored monster.
Traits§
- Evolution
Provider - Evolution hooks. Layered on top of
MonsterProvider. - ExpProvider
- Total EXP / leveling hooks. Layered on top of
MonsterProviderso the same id types are reused. - Monster
Provider - Game-supplied definition of how monsters work.