Further massive amounts of work

This commit is contained in:
2022-06-06 13:54:59 +02:00
parent df662ce6b5
commit ce33ec0649
33 changed files with 848 additions and 80 deletions

View File

@@ -12,8 +12,9 @@ use std::sync::{Arc, RwLock};
#[derive(Getters, Debug)]
pub struct Battle<'a> {
#[getter(skip)]
library: &'a DynamicLibrary<'a>,
parties: Vec<BattleParty>,
parties: Vec<BattleParty<'a>>,
can_flee: bool,
number_of_sides: u8,
pokemon_per_side: u8,
@@ -33,7 +34,7 @@ pub struct Battle<'a> {
impl<'a> Battle<'a> {
pub fn new(
library: &'a DynamicLibrary<'a>,
parties: Vec<BattleParty>,
parties: Vec<BattleParty<'a>>,
can_flee: bool,
number_of_sides: u8,
pokemon_per_side: u8,
@@ -59,7 +60,7 @@ impl<'a> Battle<'a> {
event_hook: Default::default(),
history_holder: Box::new(HistoryHolder {}),
current_turn: 0,
volatile: ScriptSet {},
volatile: ScriptSet::default(),
last_turn_time: 0,
}));
@@ -77,4 +78,8 @@ impl<'a> Battle<'a> {
pub fn can_slot_be_filled(&self) -> bool {
todo!()
}
pub fn library(&self) -> &'a DynamicLibrary<'a> {
self.library
}
}