Loads more work on battling, initial stretch to run a turn done.
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2022-06-16 17:59:33 +02:00
parent a33369afcc
commit ff541b0696
50 changed files with 105871 additions and 497 deletions

View File

@@ -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;
}
}