use crate::api::moves::{Move, MoveId};
use crate::api::overlay::OverlayLoadLease;
use crate::ffi;
pub trait DungeonMoveExt {
fn move_is_not_physical(&self, _ov29: &OverlayLoadLease<29>) -> bool;
fn is_hyper_beam_variant(&self, _ov29: &OverlayLoadLease<29>) -> bool;
}
pub trait DungeonMoveIdExt {
fn move_is_not_physical(&self, _ov29: &OverlayLoadLease<29>) -> bool;
}
impl DungeonMoveExt for Move {
fn move_is_not_physical(&self, _ov29: &OverlayLoadLease<29>) -> bool {
self.id.val().move_is_not_physical(_ov29)
}
fn is_hyper_beam_variant(&self, _ov29: &OverlayLoadLease<29>) -> bool {
unsafe { ffi::IsHyperBeamVariant(force_mut_ptr!(self)) > 0 }
}
}
impl DungeonMoveIdExt for MoveId {
fn move_is_not_physical(&self, _ov29: &OverlayLoadLease<29>) -> bool {
unsafe { ffi::MoveIsNotPhysical(*self) > 0 }
}
}