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

Mash Fixes (#140)

* Fix Shield Toggle

Fixed air dodging when shield is buffered

* Update Mash Reset

Fixed followups not being cleared on reset (training mode/ save state/ tech)

Fixed resetting when landing after a mash toggle

* Version +

* Use Existing Constant

* Adjust Versioning
This commit is contained in:
sidschingis 2020-08-18 00:05:40 +02:00 committed by GitHub
parent 1835be9cfb
commit 53c361686f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 19 additions and 16 deletions

View file

@ -38,7 +38,7 @@ include $(DEVKITPRO)/libnx/switch_rules
# NACP building is skipped as well.
#---------------------------------------------------------------------------------
APP_TITLE := Training Modpack
APP_VERSION := 2.6beta
APP_VERSION := 2.4.1beta
TARGET := ovlTrainingModpack
BUILD := build

View file

@ -3,8 +3,8 @@ use crate::common::*;
use crate::training::character_specific;
use crate::training::fast_fall;
use crate::training::full_hop;
use crate::training::shield;
use crate::training::sdi;
use crate::training::shield;
use smash::app::{self, lua_bind::*};
use smash::lib::lua_const::*;
@ -52,7 +52,7 @@ pub fn get_current_buffer() -> Action {
}
}
pub fn reset() {
fn reset() {
unsafe {
QUEUE.pop();
}
@ -60,6 +60,14 @@ pub fn reset() {
shield::suspend_shield(get_current_buffer());
}
pub fn full_reset(){
unsafe{
while QUEUE.len() > 0 {
reset();
}
}
}
pub fn set_aerial(attack: Action) {
if !shield::is_aerial(attack) {
return;
@ -113,7 +121,7 @@ unsafe fn check_buffer(module_accessor: &mut app::BattleObjectModuleAccessor) {
and to reset when using the training mode reset
*/
if should_reset(module_accessor) {
reset();
full_reset();
}
return;
@ -137,16 +145,8 @@ fn should_reset(module_accessor: &mut app::BattleObjectModuleAccessor) -> bool {
prev_status = StatusModule::prev_status_kind(module_accessor, 0);
}
// Don't reset after teching
if prev_status == *FIGHTER_STATUS_KIND_DOWN {
return false;
}
if prev_status == *FIGHTER_STATUS_KIND_PASSIVE {
return false;
}
if prev_status == *FIGHTER_STATUS_KIND_PASSIVE_FB {
// Only reset on training mode reset
if prev_status != *FIGHTER_STATUS_KIND_NONE {
return false;
}
@ -233,6 +233,9 @@ unsafe fn perform_action(module_accessor: &mut app::BattleObjectModuleAccessor)
);
}
Action::SHIELD => {
if !is_grounded(module_accessor) {
return 0;
}
/*
Doesn't actually cause the shield, but will clear the buffer once shield is possible.
Shield hold is performed through shield::should_hold_shield and request_shield
@ -454,7 +457,7 @@ fn try_change_status(
}
pub unsafe fn perform_defensive_option() {
reset();
full_reset();
let action = match MENU.defensive_state.get_random() {
Defensive::ROLL_F => Action::ROLL_F,

View file

@ -95,7 +95,7 @@ pub unsafe fn save_states(module_accessor: &mut app::BattleObjectModuleAccessor,
SAVE_STATE_PLAYER.state = KillPlayer;
SAVE_STATE_CPU.state = KillPlayer;
}
mash::reset();
mash::full_reset();
return;
}