Loads more work on battling, initial stretch to run a turn done.
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:
@@ -1,8 +1,8 @@
|
||||
use crate::static_data::MoveData;
|
||||
|
||||
#[derive(Debug)]
|
||||
pub struct LearnedMove<'a> {
|
||||
move_data: &'a MoveData,
|
||||
pub struct LearnedMove<'library> {
|
||||
move_data: &'library MoveData,
|
||||
max_pp: u8,
|
||||
remaining_pp: u8,
|
||||
learn_method: MoveLearnMethod,
|
||||
@@ -37,4 +37,12 @@ impl<'a> LearnedMove<'a> {
|
||||
pub fn learn_method(&self) -> MoveLearnMethod {
|
||||
self.learn_method
|
||||
}
|
||||
|
||||
pub fn try_use(&mut self, amount: u8) -> bool {
|
||||
if amount > self.remaining_pp {
|
||||
return false;
|
||||
}
|
||||
self.remaining_pp -= amount;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user