From d6543db8d3200aecc8641c6bdc87208a1837b420 Mon Sep 17 00:00:00 2001 From: jugeeya Date: Fri, 21 Jun 2019 15:48:28 -0700 Subject: [PATCH] add all grounded random options --- source/training_mods.hpp | 90 ++++++++++++++++++++-------------------- 1 file changed, 45 insertions(+), 45 deletions(-) diff --git a/source/training_mods.hpp b/source/training_mods.hpp index 825d619..8ff8794 100644 --- a/source/training_mods.hpp +++ b/source/training_mods.hpp @@ -201,56 +201,56 @@ int get_command_flag_cat_replace(u64 module_accessor, int category) { } } - if (TOGGLE_STATE == MASH_RANDOM) - if (category == FIGHTER_PAD_COMMAND_CATEGORY1) { - int situation_kind = StatusModule::situation_kind(module_accessor); +if (TOGGLE_STATE == MASH_RANDOM) + if (category == FIGHTER_PAD_COMMAND_CATEGORY1) { + int situation_kind = StatusModule::situation_kind(module_accessor); - if (situation_kind == SITUATION_KIND_AIR) { - const int NUM_AIR_COMMANDS = 11; - int random_commands[NUM_AIR_COMMANDS] = { - FIGHTER_PAD_CMD_CAT1_FLAG_AIR_ESCAPE, - FIGHTER_PAD_CMD_CAT1_FLAG_JUMP_BUTTON, - // one for each aerial - FIGHTER_PAD_CMD_CAT1_FLAG_ATTACK_N, - FIGHTER_PAD_CMD_CAT1_FLAG_ATTACK_N, - FIGHTER_PAD_CMD_CAT1_FLAG_ATTACK_N, - FIGHTER_PAD_CMD_CAT1_FLAG_ATTACK_N, - FIGHTER_PAD_CMD_CAT1_FLAG_ATTACK_N, - FIGHTER_PAD_CMD_CAT1_FLAG_SPECIAL_N, - FIGHTER_PAD_CMD_CAT1_FLAG_SPECIAL_S, - FIGHTER_PAD_CMD_CAT1_FLAG_SPECIAL_HI, - FIGHTER_PAD_CMD_CAT1_FLAG_SPECIAL_LW, - }; + if (situation_kind == SITUATION_KIND_AIR) { + const int NUM_AIR_COMMANDS = 11; + int random_commands[NUM_AIR_COMMANDS] = { + FIGHTER_PAD_CMD_CAT1_FLAG_AIR_ESCAPE, + FIGHTER_PAD_CMD_CAT1_FLAG_JUMP_BUTTON, + // one for each aerial + FIGHTER_PAD_CMD_CAT1_FLAG_ATTACK_N, + FIGHTER_PAD_CMD_CAT1_FLAG_ATTACK_N, + FIGHTER_PAD_CMD_CAT1_FLAG_ATTACK_N, + FIGHTER_PAD_CMD_CAT1_FLAG_ATTACK_N, + FIGHTER_PAD_CMD_CAT1_FLAG_ATTACK_N, + FIGHTER_PAD_CMD_CAT1_FLAG_SPECIAL_N, + FIGHTER_PAD_CMD_CAT1_FLAG_SPECIAL_S, + FIGHTER_PAD_CMD_CAT1_FLAG_SPECIAL_HI, + FIGHTER_PAD_CMD_CAT1_FLAG_SPECIAL_LW, + }; - int random_cmd_index = app::sv_math::rand(hash40("fighter"), NUM_AIR_COMMANDS); + int random_cmd_index = app::sv_math::rand(hash40("fighter"), NUM_AIR_COMMANDS); - flag |= random_commands[random_cmd_index]; - } else if (situation_kind == SITUATION_KIND_GROUND) { - const int NUM_GROUND_COMMANDS = 16; - int random_commands[NUM_GROUND_COMMANDS] = { - FIGHTER_PAD_CMD_CAT1_FLAG_JUMP_BUTTON, - FIGHTER_PAD_CMD_CAT1_FLAG_ATTACK_N, - FIGHTER_PAD_CMD_CAT1_FLAG_ATTACK_S3, - FIGHTER_PAD_CMD_CAT1_FLAG_ATTACK_HI3, - FIGHTER_PAD_CMD_CAT1_FLAG_ATTACK_LW3, - FIGHTER_PAD_CMD_CAT1_FLAG_ATTACK_S4, - FIGHTER_PAD_CMD_CAT1_FLAG_ATTACK_HI4, - FIGHTER_PAD_CMD_CAT1_FLAG_ATTACK_LW4, - FIGHTER_PAD_CMD_CAT1_FLAG_SPECIAL_HI, - FIGHTER_PAD_CMD_CAT1_FLAG_SPECIAL_S, - FIGHTER_PAD_CMD_CAT1_FLAG_SPECIAL_HI, - FIGHTER_PAD_CMD_CAT1_FLAG_SPECIAL_LW, - FIGHTER_PAD_CMD_CAT1_FLAG_CATCH, - FIGHTER_PAD_CMD_CAT1_FLAG_ESCAPE, - FIGHTER_PAD_CMD_CAT1_FLAG_ESCAPE_F, - FIGHTER_PAD_CMD_CAT1_FLAG_ESCAPE_B, - }; + flag |= random_commands[random_cmd_index]; + } else if (situation_kind == SITUATION_KIND_GROUND) { + const int NUM_GROUND_COMMANDS = 16; + int random_commands[NUM_GROUND_COMMANDS] = { + FIGHTER_PAD_CMD_CAT1_FLAG_JUMP_BUTTON, + FIGHTER_PAD_CMD_CAT1_FLAG_ATTACK_N, + FIGHTER_PAD_CMD_CAT1_FLAG_ATTACK_S3, + FIGHTER_PAD_CMD_CAT1_FLAG_ATTACK_HI3, + FIGHTER_PAD_CMD_CAT1_FLAG_ATTACK_LW3, + FIGHTER_PAD_CMD_CAT1_FLAG_ATTACK_S4, + FIGHTER_PAD_CMD_CAT1_FLAG_ATTACK_HI4, + FIGHTER_PAD_CMD_CAT1_FLAG_ATTACK_LW4, + FIGHTER_PAD_CMD_CAT1_FLAG_SPECIAL_HI, + FIGHTER_PAD_CMD_CAT1_FLAG_SPECIAL_S, + FIGHTER_PAD_CMD_CAT1_FLAG_SPECIAL_HI, + FIGHTER_PAD_CMD_CAT1_FLAG_SPECIAL_LW, + FIGHTER_PAD_CMD_CAT1_FLAG_CATCH, + FIGHTER_PAD_CMD_CAT1_FLAG_ESCAPE, + FIGHTER_PAD_CMD_CAT1_FLAG_ESCAPE_F, + FIGHTER_PAD_CMD_CAT1_FLAG_ESCAPE_B, + }; - int random_cmd_index = app::sv_math::rand(hash40("fighter"), NUM_GROUND_COMMANDS); + int random_cmd_index = app::sv_math::rand(hash40("fighter"), NUM_GROUND_COMMANDS); - flag |= random_commands[random_cmd_index]; - } - } + flag |= random_commands[random_cmd_index]; + } + } } }