MCPcopy Create free account
hub / github.com/EasyRPG/Player / ProcessBattleActionConditions

Method ProcessBattleActionConditions

src/scene_battle_rpg2k3.cpp:2210–2241  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2208}
2209
2210Scene_Battle_Rpg2k3::BattleActionReturn Scene_Battle_Rpg2k3::ProcessBattleActionConditions(Game_BattleAlgorithm::AlgorithmBase* action) {
2211 (void)action;
2212
2213 std::vector<Game_Battler*> battlers;
2214 Main_Data::game_party->GetActiveBattlers(battlers);
2215 Main_Data::game_enemyparty->GetActiveBattlers(battlers);
2216
2217 for (auto* b : battlers) {
2218 b->BattleStateHeal();
2219 int damageTaken = b->ApplyConditions();
2220 if (damageTaken != 0) {
2221 DrawFloatText(
2222 b->GetBattlePosition().x,
2223 b->GetBattlePosition().y,
2224 damageTaken < 0 ? Font::ColorDefault : Font::ColorHeal,
2225 std::to_string(std::abs(damageTaken)),
2226 b,
2227 damageTaken < 0 ? Scene_Battle_Rpg2k3::FloatTextType::Damage : Scene_Battle_Rpg2k3::FloatTextType::Heal);
2228 }
2229 if (b->GetType() == Game_Battler::Type_Ally) {
2230 auto* sprite = static_cast<Game_Actor*>(b)->GetActorBattleSprite();
2231 if (sprite) {
2232 sprite->DetectStateChange();
2233 }
2234 }
2235 }
2236
2237 status_window->Refresh();
2238
2239 SetBattleActionState(BattleActionState_Notify);
2240 return BattleActionReturn::eContinue;
2241}
2242
2243Scene_Battle_Rpg2k3::BattleActionReturn Scene_Battle_Rpg2k3::ProcessBattleActionNotify(Game_BattleAlgorithm::AlgorithmBase* action) {
2244 std::string notification = action->GetStartMessage(0);

Callers

nothing calls this directly

Calls 8

GetActiveBattlersMethod · 0.80
BattleStateHealMethod · 0.80
ApplyConditionsMethod · 0.80
GetBattlePositionMethod · 0.80
GetActorBattleSpriteMethod · 0.80
DetectStateChangeMethod · 0.80
GetTypeMethod · 0.45
RefreshMethod · 0.45

Tested by

no test coverage detected