mirror of
https://github.com/jugeeya/UltimateTrainingModpack.git
synced 2025-01-31 22:47:25 +00:00
Add SDI Strength Toggle (#182)
This commit is contained in:
parent
509f2383ac
commit
8189c07e30
5 changed files with 67 additions and 28 deletions
|
@ -351,4 +351,15 @@ const std::string attack_angle_help = R""""(
|
|||
Set angleable tilt and smash attacks.)"""";
|
||||
|
||||
const std::string save_damage_help = R""""(
|
||||
Set if save states should apply to damage.)"""";
|
||||
Set if save states should apply to damage.)"""";
|
||||
|
||||
#define NORMAL 0
|
||||
const std::vector<std::string> strength_items{ "Normal", "Medium", "High"};
|
||||
const std::string sdi_strength_help = R""""(
|
||||
How many frames between each SDI input
|
||||
|
||||
Normal 8
|
||||
Medium 6
|
||||
High 4
|
||||
|
||||
)"""";
|
||||
|
|
|
@ -10,31 +10,32 @@
|
|||
|
||||
static struct TrainingModpackMenu
|
||||
{
|
||||
OnOffFlags HITBOX_VIS = OnOffFlag::On;
|
||||
OnOffFlags STAGE_HAZARDS = OnOffFlags::None;
|
||||
Directions DI_STATE = Directions::None;
|
||||
Directions SDI_STATE = Directions::None;
|
||||
Directions AIR_DODGE_DIR = Directions::None;
|
||||
ActionFlags MASH_STATE = ActionFlags::None;
|
||||
ActionFlags FOLLOW_UP = ActionFlags::None;
|
||||
AttackAngleFlags ATTACK_ANGLE = AttackAngleFlags::None;
|
||||
LedgeFlags LEDGE_STATE = LedgeFlags::All;
|
||||
DelayFlags LEDGE_DELAY = DelayFlags::All;
|
||||
TechFlags TECH_STATE = TechFlags::All;
|
||||
MissTechFlags MISS_TECH_STATE = MissTechFlags::All;
|
||||
int SHIELD_STATE = NONE;
|
||||
DefensiveFlags DEFENSIVE_STATE = DefensiveFlags::All;
|
||||
DelayFlags OOS_OFFSET = DelayFlags::None;
|
||||
DelayFlags REACTION_TIME = DelayFlags::None;
|
||||
Directions SHIELD_TILT = Directions::None;
|
||||
OnOffFlags MASH_IN_NEUTRAL = OnOffFlags::None;
|
||||
BoolFlags FAST_FALL = BoolFlags::None;
|
||||
DelayFlags FAST_FALL_DELAY = DelayFlags::None;
|
||||
BoolFlags FALLING_AERIALS = BoolFlags::None;
|
||||
DelayFlags AERIAL_DELAY = DelayFlags::None;
|
||||
BoolFlags FULL_HOP = BoolFlags::None;
|
||||
int INPUT_DELAY = 0;
|
||||
OnOffFlags SAVE_DAMAGE = OnOffFlag::On;
|
||||
OnOffFlags HITBOX_VIS = OnOffFlag::On;
|
||||
OnOffFlags STAGE_HAZARDS = OnOffFlags::None;
|
||||
Directions DI_STATE = Directions::None;
|
||||
Directions SDI_STATE = Directions::None;
|
||||
int SDI_STRENGTH = NORMAL;
|
||||
Directions AIR_DODGE_DIR = Directions::None;
|
||||
ActionFlags MASH_STATE = ActionFlags::None;
|
||||
ActionFlags FOLLOW_UP = ActionFlags::None;
|
||||
AttackAngleFlags ATTACK_ANGLE = AttackAngleFlags::None;
|
||||
LedgeFlags LEDGE_STATE = LedgeFlags::All;
|
||||
DelayFlags LEDGE_DELAY = DelayFlags::All;
|
||||
TechFlags TECH_STATE = TechFlags::All;
|
||||
MissTechFlags MISS_TECH_STATE = MissTechFlags::All;
|
||||
int SHIELD_STATE = NONE;
|
||||
DefensiveFlags DEFENSIVE_STATE = DefensiveFlags::All;
|
||||
DelayFlags OOS_OFFSET = DelayFlags::None;
|
||||
DelayFlags REACTION_TIME = DelayFlags::None;
|
||||
Directions SHIELD_TILT = Directions::None;
|
||||
OnOffFlags MASH_IN_NEUTRAL = OnOffFlags::None;
|
||||
BoolFlags FAST_FALL = BoolFlags::None;
|
||||
DelayFlags FAST_FALL_DELAY = DelayFlags::None;
|
||||
BoolFlags FALLING_AERIALS = BoolFlags::None;
|
||||
DelayFlags AERIAL_DELAY = DelayFlags::None;
|
||||
BoolFlags FULL_HOP = BoolFlags::None;
|
||||
int INPUT_DELAY = 0;
|
||||
OnOffFlags SAVE_DAMAGE = OnOffFlag::On;
|
||||
} menu;
|
||||
|
||||
static struct TrainingModpackMenu defaultMenu = menu;
|
||||
|
@ -337,6 +338,12 @@ tsl::elm::Element* GuiMain::createUI()
|
|||
|
||||
list->addItem(createBitFlagOption(&menu.DI_STATE, "Set DI", di_help, this));
|
||||
list->addItem(createBitFlagOption(&menu.SDI_STATE, "Set SDI", sdi_help, this));
|
||||
|
||||
ValueListItem* sdiItem =
|
||||
new ValueListItem("SDI Strength", strength_items, &menu.SDI_STRENGTH, "SDI Strength", sdi_strength_help);
|
||||
list->addItem(sdiItem);
|
||||
valueListItems.push_back(sdiItem);
|
||||
|
||||
list->addItem(createBitFlagOption(&menu.AIR_DODGE_DIR, "Airdodge Direction", air_dodge_direction_help, this));
|
||||
|
||||
list->addItem(new tsl::elm::CategoryHeader("Shield", true));
|
||||
|
|
|
@ -319,6 +319,7 @@ pub struct TrainingModpackMenu {
|
|||
pub stage_hazards: OnOff,
|
||||
pub di_state: Direction,
|
||||
pub sdi_state: Direction,
|
||||
pub sdi_strength: SdiStrength,
|
||||
pub air_dodge_dir: Direction,
|
||||
pub mash_state: Action,
|
||||
pub follow_up: Action,
|
||||
|
@ -349,3 +350,22 @@ pub enum FighterId {
|
|||
Player = 0,
|
||||
CPU = 1,
|
||||
}
|
||||
|
||||
#[repr(u32)]
|
||||
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
|
||||
#[allow(dead_code)]
|
||||
pub enum SdiStrength {
|
||||
Normal = 0,
|
||||
Medium = 1,
|
||||
High = 2,
|
||||
}
|
||||
|
||||
impl SdiStrength {
|
||||
pub fn into_u32(self) -> u32 {
|
||||
match self {
|
||||
SdiStrength::Normal => 8,
|
||||
SdiStrength::Medium => 6,
|
||||
SdiStrength::High => 4,
|
||||
}
|
||||
}
|
||||
}
|
|
@ -10,6 +10,7 @@ pub static mut MENU_STRUCT: consts::TrainingModpackMenu = consts::TrainingModpac
|
|||
stage_hazards: OnOff::Off,
|
||||
di_state: Direction::empty(),
|
||||
sdi_state: Direction::empty(),
|
||||
sdi_strength: SdiStrength::Normal,
|
||||
air_dodge_dir: Direction::empty(),
|
||||
mash_state: Action::empty(),
|
||||
follow_up: Action::empty(),
|
||||
|
|
|
@ -53,7 +53,7 @@ fn mod_sdi_direction(fighter: &mut L2CFighterCommon) -> Option<f64> {
|
|||
if directional_influence::should_reverse_angle() {
|
||||
PI - angle
|
||||
} else {
|
||||
angle
|
||||
angle
|
||||
}
|
||||
})
|
||||
}
|
||||
|
@ -90,7 +90,7 @@ fn mod_check_hit_stop_delay_command(
|
|||
}
|
||||
|
||||
unsafe {
|
||||
COUNTER = (COUNTER + 1) % 8;
|
||||
COUNTER = (COUNTER + 1) % MENU.sdi_strength.into_u32();
|
||||
}
|
||||
|
||||
unsafe {
|
||||
|
|
Loading…
Reference in a new issue