More documentation for script hooks, reworks stat changes to only be changeable through a function that allows for script hooks, and events.
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
@@ -3,8 +3,8 @@ use std::fmt::{Debug, Formatter};
|
||||
use crate::dynamic_data::DamageSource;
|
||||
use crate::dynamic_data::ExecutingMove;
|
||||
use crate::dynamic_data::Pokemon;
|
||||
use crate::static_data::Form;
|
||||
use crate::static_data::Species;
|
||||
use crate::static_data::{Form, Statistic};
|
||||
|
||||
/// The event hook is used to store external functions that listen to events.
|
||||
///
|
||||
@@ -108,4 +108,15 @@ pub enum Event<'own, 'battle, 'library> {
|
||||
},
|
||||
/// The turn is finished running, waiting for new input.
|
||||
EndTurn,
|
||||
/// A pokemon had its stat boost changed
|
||||
StatBoostChange {
|
||||
/// The pokemon that had its stat boosts changed.
|
||||
user: &'own Pokemon<'battle, 'library>,
|
||||
/// The statistic that changed.
|
||||
stat: Statistic,
|
||||
/// The value of the stat before the change.
|
||||
old_value: i8,
|
||||
/// The value of the stat after the change.
|
||||
new_value: i8,
|
||||
},
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user