1
0
Fork 0
mirror of https://github.com/jugeeya/UltimateTrainingModpack.git synced 2024-11-20 08:54:15 +00:00

Add Bowser UpB Workaround (#109)

* Add Bowser UpB Workaround

Bowser uses a different status during upB for some reason

* Use Constants
This commit is contained in:
sidschingis 2020-07-09 20:35:44 +02:00 committed by GitHub
parent 6f5c30fd18
commit c735ad5c6e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -386,14 +386,32 @@ unsafe fn get_flag(
status: i32,
action_flag: i32,
) -> i32 {
if StatusModule::status_kind(module_accessor) == status {
let current_status = StatusModule::status_kind(module_accessor);
if current_status == status {
// Reset Buffer
reset();
}
// Workaround for Bowser upB
check_bowser_up_b(current_status);
return action_flag;
}
fn check_bowser_up_b(current_status: i32) {
// Grounded up B
if current_status == *FIGHTER_KOOPA_STATUS_KIND_SPECIAL_HI_G {
reset();
return;
}
// Aerial up B
if current_status == *FIGHTER_KOOPA_STATUS_KIND_SPECIAL_HI_A {
reset();
return;
}
}
pub unsafe fn perform_defensive_option() {
reset();