pub struct LevelUp<P: MonsterProvider> {
pub levels_gained: u8,
pub old_level: u8,
pub new_level: u8,
pub learned_moves: Vec<P::MoveId>,
}Expand description
Result of an EXP gain: what happened to the monster’s level.
Parameterized by the MonsterProvider only so it can carry the game’s
opaque move ids in Self::learned_moves; the engine never inspects them.
Fields§
§levels_gained: u8How many levels were gained (0 if none).
old_level: u8Level before the EXP was applied.
new_level: u8Level after the EXP was applied.
learned_moves: Vec<P::MoveId>Moves newly learned across the levels crossed, in ascending-level order
(populated by ExpProvider::learn_moves_on_levelup; empty by default).
Implementations§
Trait Implementations§
Source§impl<P: MonsterProvider> Default for LevelUp<P>
impl<P: MonsterProvider> Default for LevelUp<P>
impl<P: Eq + MonsterProvider> Eq for LevelUp<P>
impl<P: PartialEq + MonsterProvider> StructuralPartialEq for LevelUp<P>
Auto Trait Implementations§
impl<P> Freeze for LevelUp<P>
impl<P> RefUnwindSafe for LevelUp<P>
impl<P> Send for LevelUp<P>
impl<P> Sync for LevelUp<P>
impl<P> Unpin for LevelUp<P>
impl<P> UnsafeUnpin for LevelUp<P>
impl<P> UnwindSafe for LevelUp<P>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more