1
0
Fork 0
mirror of https://github.com/jugeeya/UltimateTrainingModpack.git synced 2024-11-24 02:44:17 +00:00

Save Levin Aerial Usage (#678)

This commit is contained in:
GradualSyrup 2024-03-29 17:36:47 -05:00 committed by GitHub
parent c88a0991c7
commit 716562c88c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -26,6 +26,7 @@ pub struct RobinCharges {
pub purple_book: i32,
pub levin_charge: i32,
pub levin_recharge: i32,
pub has_levin: bool,
}
#[derive(Serialize, Deserialize, Default, Copy, Clone, Debug)]
@ -324,6 +325,10 @@ pub unsafe fn get_charge(
module_accessor,
*FIGHTER_REFLET_INSTANCE_WORK_ID_INT_THUNDER_SWORD_REVIVAL_COUNT,
);
let has_levin = WorkModule::is_flag(
module_accessor,
*FIGHTER_REFLET_INSTANCE_WORK_ID_FLAG_THUNDER_SWORD_ON,
);
let robin_charges = RobinCharges {
thunder_kind,
yellow_book,
@ -332,6 +337,7 @@ pub unsafe fn get_charge(
purple_book,
levin_charge,
levin_recharge,
has_levin,
};
charge_state.set_robin(robin_charges)
}
@ -968,6 +974,11 @@ pub unsafe fn handle_charge(
robin_charges.levin_recharge,
*FIGHTER_REFLET_INSTANCE_WORK_ID_INT_THUNDER_SWORD_REVIVAL_COUNT,
);
WorkModule::set_flag(
module_accessor,
robin_charges.has_levin,
*FIGHTER_REFLET_INSTANCE_WORK_ID_FLAG_THUNDER_SWORD_ON,
);
});
}
// Incineroar Revenge