Minor changes and fixes

This commit is contained in:
2023-01-04 11:55:14 +01:00
parent f3f5b2acb0
commit 3c6aecb0e9
9 changed files with 22 additions and 12 deletions

View File

@@ -51,6 +51,7 @@ impl Battle {
unsafe { battle_get_pokemon(self.inner.reference, side, index).get_value() }
}
#[cfg(not(feature = "mock_data"))]
pub fn find_party_for_pokemon(&self, pokemon: &Pokemon) -> Option<BattleParty> {
unsafe {
battle_find_party_for_pokemon(self.inner.reference, pokemon.reference()).get_value()

View File

@@ -23,6 +23,7 @@ impl ExternalReferenceType for ChoiceQueue {
}
}
#[cfg(not(feature = "mock_data"))]
extern "wasm" {
fn choice_queue_move_pokemon_choice_next(
r: ExternRef<ChoiceQueue>,

View File

@@ -126,6 +126,7 @@ impl ExternalReferenceType for HitData {
}
}
#[cfg(not(feature = "mock_data"))]
extern "wasm" {
fn executing_move_get_number_of_targets(r: ExternRef<ExecutingMove>) -> usize;
fn executing_move_get_number_of_hits(r: ExternRef<ExecutingMove>) -> u8;