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

Method SelectPreviousActor

src/scene_battle_rpg2k.cpp:1799–1820  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1797}
1798
1799void Scene_Battle_Rpg2k::SelectPreviousActor() {
1800 std::vector<Game_Actor*> allies = Main_Data::game_party->GetActors();
1801
1802 if (allies[0] == active_actor) {
1803 SetState(State_SelectOption);
1804 actor_index = 0;
1805 return;
1806 }
1807
1808 actor_index--;
1809 active_actor = allies[actor_index];
1810
1811 battle_actions.back()->SetBattleAlgorithm(nullptr);
1812 battle_actions.pop_back();
1813
1814 if (!active_actor->IsControllable()) {
1815 SelectPreviousActor();
1816 return;
1817 }
1818
1819 SetState(State_SelectActor);
1820}
1821
1822void Scene_Battle_Rpg2k::CreateExecutionOrder() {
1823 // Define random Agility. Must be done outside of the sort function because of the "strict weak ordering" property, so the sort is consistent

Callers

nothing calls this directly

Calls 3

SetBattleAlgorithmMethod · 0.80
IsControllableMethod · 0.80
GetActorsMethod · 0.45

Tested by

no test coverage detected