Fix match state remaining mutable after and of match and implement initial work on aerials (#77)
CI / build-and-test (push) Successful in 2m7s
CI / production-build (push) Successful in 11m36s

Reviewed-on: #77
Co-authored-by: Álex Román Núñez <eirexe@eirteam.moe>
This commit was merged in pull request #77.
This commit is contained in:
2026-09-29 12:40:14 +00:00
committed by EIREXE
parent 88ad9ed951
commit adf83ba03f
10 changed files with 300 additions and 26 deletions
+21
View File
@@ -9,6 +9,7 @@ use bevy_ggrs::{PlayerInputs, Rollback};
use strum::IntoEnumIterator;
use strum_macros::EnumIter;
use crate::fighter::FighterFacingDirection;
use crate::fighter::attack::AttackKind;
use crate::game_settings::GameSettings;
use crate::input::FighterInputFrame;
@@ -54,6 +55,26 @@ impl FighterAttackCommandType {
FighterAttackCommandType::TiltAttackRight => AttackKind::ForwardTilt,
}
}
pub fn to_attack_kind_airborne(&self, facing_direction: &FighterFacingDirection) -> AttackKind {
match self {
FighterAttackCommandType::Neutral => AttackKind::NeutralAir,
FighterAttackCommandType::SmashAttackUp | FighterAttackCommandType::TiltAttackUp => AttackKind::UpAir,
FighterAttackCommandType::SmashAttackDown | FighterAttackCommandType::TiltAttackDown => AttackKind::DownAir,
FighterAttackCommandType::SmashAttackLeft | FighterAttackCommandType::TiltAttackLeft => {
match facing_direction {
FighterFacingDirection::Left => AttackKind::ForwardAir,
FighterFacingDirection::Right => AttackKind::BackAir,
}
},
FighterAttackCommandType::SmashAttackRight | FighterAttackCommandType::TiltAttackRight => {
match facing_direction {
FighterFacingDirection::Left => AttackKind::BackAir,
FighterFacingDirection::Right => AttackKind::ForwardAir,
}
},
}
}
}
/// Frames of life remaining for each buffered command. Indexed by