A lot more work on WASM script execution
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:
6
src/dynamic_data/models/battle_party.rs
Normal file → Executable file
6
src/dynamic_data/models/battle_party.rs
Normal file → Executable file
@@ -6,6 +6,7 @@ use crate::dynamic_data::models::pokemon_party::PokemonParty;
|
||||
/// A battle party is a wrapper around a party, with the indices for which the party is responsible
|
||||
/// on the field attached.
|
||||
#[derive(Debug)]
|
||||
#[cfg_attr(feature = "wasm", derive(unique_type_id_derive::UniqueTypeId))]
|
||||
pub struct BattleParty {
|
||||
/// The party the BattleParty is holding.
|
||||
party: Arc<PokemonParty>,
|
||||
@@ -47,4 +48,9 @@ impl BattleParty {
|
||||
pub fn get_pokemon(&self, index: usize) -> &Option<Arc<Pokemon>> {
|
||||
self.party.at(index)
|
||||
}
|
||||
|
||||
/// Gets the underlying Pokemon Party
|
||||
pub fn party(&self) -> &Arc<PokemonParty> {
|
||||
&self.party
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user