FFI for Battle
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2022-10-15 17:21:24 +02:00
parent 6c976216b8
commit ddfb00d36b
10 changed files with 313 additions and 10 deletions

View File

@@ -24,11 +24,12 @@ pub trait ScriptResolver: Debug + ValueIdentifiable {
fn load_item_script(&self, _key: &Item) -> PkmnResult<Option<Arc<dyn ItemScript>>>;
}
use std::fmt::Display;
/// A script category defines a sub-group of scripts. This can be used to have multiple scripts with
/// the same name, but a different script. It should be completely valid for a move to have the same
/// name as an ability, or more commonly: for a script attached to a Pokemon to have the same name as
/// a move that placed it there.
#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash, Display)]
#[repr(u8)]
pub enum ScriptCategory {
/// A script that belongs to a move. This generally is only the script that is attached to a