Some more functionality for battling, check if choice is valid, implement target resolvers.
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,2 +1,40 @@
|
||||
use crate::static_data::MoveData;
|
||||
|
||||
#[derive(Debug)]
|
||||
pub struct LearnedMove {}
|
||||
pub struct LearnedMove<'a> {
|
||||
move_data: &'a MoveData,
|
||||
max_pp: u8,
|
||||
remaining_pp: u8,
|
||||
learn_method: MoveLearnMethod,
|
||||
}
|
||||
|
||||
#[derive(Copy, Clone, Debug)]
|
||||
pub enum MoveLearnMethod {
|
||||
Unknown = 0,
|
||||
Level = 1,
|
||||
}
|
||||
|
||||
impl<'a> LearnedMove<'a> {
|
||||
pub fn new(move_data: &'a MoveData, learn_method: MoveLearnMethod) -> Self {
|
||||
Self {
|
||||
move_data,
|
||||
max_pp: move_data.base_usages(),
|
||||
remaining_pp: move_data.base_usages(),
|
||||
learn_method,
|
||||
}
|
||||
}
|
||||
|
||||
pub fn move_data(&self) -> &MoveData {
|
||||
self.move_data
|
||||
}
|
||||
|
||||
pub fn max_pp(&self) -> u8 {
|
||||
self.max_pp
|
||||
}
|
||||
pub fn remaining_pp(&self) -> u8 {
|
||||
self.remaining_pp
|
||||
}
|
||||
pub fn learn_method(&self) -> MoveLearnMethod {
|
||||
self.learn_method
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user