1
0
Fork 0
mirror of https://github.com/jugeeya/UltimateTrainingModpack.git synced 2025-01-20 17:30:13 +00:00
UltimateTrainingModpack/source/training/shield.hpp
David Soler 9b3313ceed Mash now can be performed OOS.
Added Up smash Mash Option.
Added Spot dodge Mash Option.
2019-11-19 23:18:28 +01:00

57 lines
No EOL
1.7 KiB
C++

#include "common.hpp"
#include "useful/crc32.h"
namespace Shield {
float get_param_float(u64 module_accessor, u64 param_type, u64 param_hash, bool& replace) {
if (is_training_mode()) {
if (menu.SHIELD_STATE == SHIELD_INFINITE) {
if (param_type == hash40("common")) {
if (param_hash == hash40("shield_dec1")) {
replace = true;
return 0.0;
}
if (param_hash == hash40("shield_recovery1")) {
replace = true;
return 999.0;
}
// doesn't work, somehow. This parameter isn't checked?
if (param_hash == hash40("shield_damage_mul")) {
replace = true;
return 0.0;
}
}
}
}
replace = false;
return 0.0;
}
bool check_button_on(u64 module_accessor, int button, bool& replace) {
if (button == CONTROL_PAD_BUTTON_GUARD_HOLD || button == CONTROL_PAD_BUTTON_GUARD) {
if (is_training_mode() && is_operation_cpu(module_accessor)) {
if (should_hold_shield(module_accessor)) {
replace = true;
return true;
}
}
}
replace = false;
return false;
}
bool check_button_off(u64 module_accessor, int button, bool& replace) {
if (button == CONTROL_PAD_BUTTON_GUARD_HOLD || button == CONTROL_PAD_BUTTON_GUARD) {
if (is_training_mode() && is_operation_cpu(module_accessor)) {
if (should_hold_shield(module_accessor)) {
replace = true;
return false;
}
}
}
replace = false;
return false;
}
}