| 271 | } |
| 272 | |
| 273 | bool Scene_Battle::UpdateEvents() { |
| 274 | auto& interp = Game_Battle::GetInterpreterBattle(); |
| 275 | interp.Update(); |
| 276 | status_window->Refresh(); |
| 277 | |
| 278 | if (interp.IsForceFleeEnabled()) { |
| 279 | if (state != State_Escape) { |
| 280 | SetState(State_Escape); |
| 281 | } |
| 282 | } |
| 283 | |
| 284 | auto call = TakeRequestedScene(); |
| 285 | if (call && (call->type == Scene::Gameover || call->type == Scene::Settings)) { |
| 286 | Scene::Push(std::move(call)); |
| 287 | } |
| 288 | |
| 289 | if (interp.IsAsyncPending()) { |
| 290 | auto aop = interp.GetAsyncOp(); |
| 291 | |
| 292 | if (aop.GetType() == AsyncOp::eTerminateBattle) { |
| 293 | EndBattle(static_cast<BattleResult>(aop.GetBattleResult())); |
| 294 | return false; |
| 295 | } |
| 296 | |
| 297 | if (CheckSceneExit(aop)) { |
| 298 | return false; |
| 299 | } |
| 300 | } |
| 301 | |
| 302 | return true; |
| 303 | } |
| 304 | |
| 305 | bool Scene_Battle::UpdateTimers() { |
| 306 | const int timer1 = Main_Data::game_party->GetTimerSeconds(Game_Party::Timer1); |
nothing calls this directly
no test coverage detected