2020-11-10 01:57:35 +00:00
|
|
|
use smash::app::{self};
|
|
|
|
|
2023-02-12 01:07:29 +00:00
|
|
|
use crate::common::consts::*;
|
|
|
|
use crate::common::*;
|
|
|
|
|
2023-07-12 18:36:32 +00:00
|
|
|
static mut DIRECTION: AttackAngle = AttackAngle::NEUTRAL;
|
2020-11-10 01:57:35 +00:00
|
|
|
|
|
|
|
pub fn roll_direction() {
|
|
|
|
unsafe {
|
|
|
|
DIRECTION = MENU.attack_angle.get_random();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
pub unsafe fn mod_get_stick_dir(
|
|
|
|
module_accessor: &mut app::BattleObjectModuleAccessor,
|
|
|
|
) -> Option<f32> {
|
|
|
|
if !is_operation_cpu(module_accessor) {
|
|
|
|
return None;
|
|
|
|
}
|
|
|
|
|
|
|
|
match DIRECTION {
|
|
|
|
AttackAngle::UP => Some(1.0),
|
2021-09-14 21:05:48 +00:00
|
|
|
AttackAngle::DOWN => Some(-1.0),
|
2020-11-10 01:57:35 +00:00
|
|
|
_ => None,
|
|
|
|
}
|
2021-09-14 21:05:48 +00:00
|
|
|
}
|