void Game_Battler::ResetBattle() { gauge = GetMaxGauge() / 2; charged = false; defending = false; battle_turn = 0; last_battle_action = -1; atk_modifier = 0; def_modifier = 0; spi_modifier = 0; agi_modifier = 0; }
void Game_Battler::UpdateGauge(int multiplier) { if (!Exists()) { return; } if (gauge > GetMaxGauge()) { return; } gauge += GetAgi() * multiplier; //printf("%s: %.2f\n", GetName().c_str(), ((float)gauge / EASYRPG_GAUGE_MAX_VALUE) * 100); }
void Game_Battler::ResetBattle() { gauge = GetMaxGauge(); if (!HasPreemptiveAttack()) { gauge /= 2; } charged = false; defending = false; battle_turn = 0; last_battle_action = -1; atk_modifier = 0; def_modifier = 0; spi_modifier = 0; agi_modifier = 0; battle_combo_command_id = -1; battle_combo_times = -1; attribute_shift.clear(); attribute_shift.resize(Data::attributes.size()); }
bool Game_Battler::IsGaugeFull() const { return gauge >= GetMaxGauge(); }
void Game_Battler::SetGauge(int new_gauge) { new_gauge = min(max(new_gauge, 0), 100); gauge = new_gauge * (GetMaxGauge() / 100); }
int Game_Battler::GetGauge() const { return gauge / (GetMaxGauge() / 100); }