Fixes for interop with host

This commit is contained in:
2022-09-16 11:01:17 +02:00
parent 3c8bd5f7c5
commit f3f5b2acb0
9 changed files with 29 additions and 36 deletions

View File

@@ -18,7 +18,7 @@ impl Script for Automize {
&[ScriptCapabilities::OnSecondaryEffect]
}
fn on_secondary_effect(&self, mv: ExecutingMove, target: Pokemon, hit: u8) {
fn on_secondary_effect(&self, mv: ExecutingMove, _target: Pokemon, _hit: u8) {
let user = mv.user();
let stats = user.boosted_stats();
let original_speed = stats.speed();

View File

@@ -33,7 +33,7 @@ impl Script for ChangeAllTargetStats {
fn on_initialize(
&self,
library: &DynamicLibrary,
_library: &DynamicLibrary,
parameters: Option<ImmutableList<EffectParameter>>,
) {
self.amount.store(

View File

@@ -1,4 +1,3 @@
use crate::script;
use core::any::Any;
use core::sync::atomic::{AtomicI8, Ordering};
use pkmn_lib_interface::app_interface::list::ImmutableList;

View File

@@ -41,7 +41,7 @@ impl Script for Struggle {
*number_of_hits = 1
}
fn on_secondary_effect(&self, mv: ExecutingMove, _target: Pokemon, hit: u8) {
fn on_secondary_effect(&self, mv: ExecutingMove, _target: Pokemon, _hit: u8) {
let mut damage = mv.user().max_health() / 4;
if damage == 0 {
damage = 1

View File

@@ -58,6 +58,7 @@ pub fn get_script(category: ScriptCategory, name: &StringKey) -> Option<Box<dyn
}
ScriptCategory::Side => {}
ScriptCategory::ItemBattleTrigger => {}
ScriptCategory::Weather => {}
}
None