| 568 | } |
| 569 | |
| 570 | void Scene_Battle::ActionSelectedCallback(Game_Battler* for_battler) { |
| 571 | assert(for_battler->GetBattleAlgorithm() != nullptr); |
| 572 | |
| 573 | auto single_target = for_battler->GetBattleAlgorithm()->GetOriginalSingleTarget(); |
| 574 | auto group_targets = for_battler->GetBattleAlgorithm()->GetOriginalPartyTarget(); |
| 575 | // Target: 0 None, 1 Single Enemy, 2 All Enemies, 3 Single Ally, 4 All Allies |
| 576 | Game_Battle::ManiacBattleHook( |
| 577 | Game_Interpreter_Battle::ManiacBattleHookType::Targetting, |
| 578 | for_battler->GetType() == Game_Battler::Type_Enemy, |
| 579 | for_battler->GetPartyIndex(), |
| 580 | for_battler->GetBattleAlgorithm()->GetActionType(), |
| 581 | for_battler->GetBattleAlgorithm()->GetActionId(), |
| 582 | single_target |
| 583 | ? (single_target->GetType() != Game_Battler::Type_Enemy ? 1 : 3) |
| 584 | : (group_targets->GetRandomActiveBattler()->GetType() != Game_Battler::Type_Enemy ? 2 : 4), |
| 585 | single_target ? single_target->GetPartyIndex() : 0 |
| 586 | ); |
| 587 | |
| 588 | if (for_battler->GetBattleAlgorithm() == nullptr) { |
| 589 | Output::Warning("ActionSelectedCallback: Invalid action for battler {} ({})", |
| 590 | for_battler->GetId(), for_battler->GetName()); |
| 591 | Output::Warning("Please report a bug!"); |
| 592 | } |
| 593 | |
| 594 | battle_actions.push_back(for_battler); |
| 595 | } |
| 596 | |
| 597 | bool Scene_Battle::CallDebug() { |
| 598 | if (Player::debug_flag) { |
nothing calls this directly
no test coverage detected