Registration of MoveTurnChoices

This commit is contained in:
2022-08-16 18:43:02 +02:00
parent f06d46d854
commit 45b16f415f
4 changed files with 80 additions and 7 deletions

View File

@@ -1,6 +1,6 @@
use pkmn_lib_interface::app_interface::list::ImmutableList;
use pkmn_lib_interface::app_interface::{
get_hash, DataLibrary, DynamicLibrary, EffectParameter, TurnChoice,
get_hash, DamageSource, DataLibrary, DynamicLibrary, EffectParameter, TurnChoice,
};
use pkmn_lib_interface::dbg;
use pkmn_lib_interface::handling::{Script, ScriptCapabilities};
@@ -46,5 +46,12 @@ impl Script for TestScript {
"On before turn for user: {}",
choice.user().species().name()
);
choice.user().damage(50, DamageSource::Misc);
if let TurnChoice::Move(d) = choice {
dbg!(
"On before turn for move choice: {}",
d.used_move().move_data().name()
);
}
}
}