Fixes for interop with host
This commit is contained in:
@@ -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();
|
||||
|
||||
@@ -33,7 +33,7 @@ impl Script for ChangeAllTargetStats {
|
||||
|
||||
fn on_initialize(
|
||||
&self,
|
||||
library: &DynamicLibrary,
|
||||
_library: &DynamicLibrary,
|
||||
parameters: Option<ImmutableList<EffectParameter>>,
|
||||
) {
|
||||
self.amount.store(
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -58,6 +58,7 @@ pub fn get_script(category: ScriptCategory, name: &StringKey) -> Option<Box<dyn
|
||||
}
|
||||
ScriptCategory::Side => {}
|
||||
ScriptCategory::ItemBattleTrigger => {}
|
||||
ScriptCategory::Weather => {}
|
||||
}
|
||||
|
||||
None
|
||||
|
||||
Reference in New Issue
Block a user