2019-08-01 13:27:29 -07:00
|
|
|
#include "common.hpp"
|
|
|
|
|
|
|
|
namespace Tech {
|
2019-08-01 18:57:30 -07:00
|
|
|
void init_settings(u64 module_accessor, int status_kind, bool& replace) {
|
2019-08-01 13:27:29 -07:00
|
|
|
if (ESCAPE_STATE == ESCAPE_TECH && is_training_mode() && is_operation_cpu(module_accessor)) {
|
|
|
|
if (status_kind == FIGHTER_STATUS_KIND_DOWN) {
|
|
|
|
const int NUM_TECH_STATUSES = 4;
|
|
|
|
int random_statuses[NUM_TECH_STATUSES] = {
|
|
|
|
FIGHTER_STATUS_KIND_DOWN,
|
|
|
|
FIGHTER_STATUS_KIND_PASSIVE,
|
|
|
|
FIGHTER_STATUS_KIND_PASSIVE_FB,
|
|
|
|
FIGHTER_STATUS_KIND_PASSIVE_FB
|
|
|
|
};
|
|
|
|
|
|
|
|
int random_status_index = app::sv_math::rand(hash40("fighter"), NUM_TECH_STATUSES);
|
2019-08-01 18:57:30 -07:00
|
|
|
if (random_statuses[random_status_index] != FIGHTER_STATUS_KIND_DOWN) {
|
|
|
|
StatusModule::change_status_request_from_script(module_accessor, random_statuses[random_status_index], 1);
|
|
|
|
replace = true;
|
|
|
|
return;
|
|
|
|
}
|
2019-08-01 13:27:29 -07:00
|
|
|
}
|
|
|
|
|
2019-08-01 18:57:30 -07:00
|
|
|
// else if (status_kind == FIGHTER_STATUS_KIND_PASSIVE) {
|
|
|
|
// const int NUM_TECH_STATUSES = 2;
|
|
|
|
// int random_statuses[NUM_TECH_STATUSES] = {
|
|
|
|
// FIGHTER_STATUS_KIND_PASSIVE,
|
|
|
|
// FIGHTER_STATUS_KIND_PASSIVE_FB
|
|
|
|
// };
|
2019-08-01 13:27:29 -07:00
|
|
|
|
2019-08-01 18:57:30 -07:00
|
|
|
// int random_status_index = app::sv_math::rand(hash40("fighter"), NUM_TECH_STATUSES);
|
|
|
|
// if (random_statuses[random_status_index] != FIGHTER_STATUS_KIND_PASSIVE)
|
|
|
|
// StatusModule::change_status_request_from_script(module_accessor, random_statuses[random_status_index], 1);
|
|
|
|
// }
|
2019-08-01 13:27:29 -07:00
|
|
|
}
|
2019-08-01 18:57:30 -07:00
|
|
|
|
|
|
|
replace = false;
|
|
|
|
return;
|
2019-08-01 13:27:29 -07:00
|
|
|
}
|
|
|
|
}
|