More work on mocking and removing the impls from the interface

This commit is contained in:
2023-01-05 12:54:18 +01:00
parent 6e15a26813
commit 417b776a83
19 changed files with 1107 additions and 950 deletions

View File

@@ -1,7 +1,8 @@
use crate::script;
use alloc::rc::Rc;
use core::any::Any;
use core::sync::atomic::{AtomicI8, Ordering};
use pkmn_lib_interface::app_interface::list::ImmutableList;
use pkmn_lib_interface::app_interface::list::{ImmutableList, ImmutableListTrait};
use pkmn_lib_interface::app_interface::{
DynamicLibrary, EffectParameter, ExecutingMove, Pokemon, Statistic,
};
@@ -34,7 +35,7 @@ impl Script for ChangeAllTargetStats {
fn on_initialize(
&self,
_library: &DynamicLibrary,
parameters: Option<ImmutableList<EffectParameter>>,
parameters: Option<ImmutableList<Rc<EffectParameter>>>,
) {
self.amount.store(
parameters.unwrap().get(0).unwrap().as_int() as i8,