Implements CurePartyStatus

This commit is contained in:
2022-09-10 12:41:33 +02:00
parent 0f85f4f0a4
commit 19706c4c3c
4 changed files with 51 additions and 0 deletions

View File

@@ -178,6 +178,13 @@ impl Pokemon {
}
}
#[cfg(not(feature = "mock_data"))]
pub fn clear_status(&self) {
unsafe {
pokemon_clear_status(self.reference());
}
}
#[cfg(not(feature = "mock_data"))]
pub fn battle_side(&self) -> BattleSide {
self.battle()
@@ -327,6 +334,7 @@ extern "wasm" {
fn pokemon_damage(r: ExternRef<Pokemon>, damage: u32, source: DamageSource);
fn pokemon_heal(r: ExternRef<Pokemon>, amount: u32, allow_revive: bool) -> bool;
fn pokemon_set_weight(r: ExternRef<Pokemon>, weight: f32);
fn pokemon_clear_status(r: ExternRef<Pokemon>);
fn pokemon_add_volatile_by_name(r: ExternRef<Pokemon>, name: *const c_char) -> ScriptPtr;
fn pokemon_add_volatile(r: ExternRef<Pokemon>, script: ScriptPtr) -> ScriptPtr;