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

Method GetRandomActiveBattler

src/game_party_base.cpp:84–91  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

82}
83
84Game_Battler* Game_Party_Base::GetRandomActiveBattler() {
85 std::vector<Game_Battler*> battlers;
86 GetActiveBattlers(battlers);
87 if (battlers.empty()) {
88 return NULL;
89 }
90 return battlers[Rand::GetRandomNumber(0, battlers.size() - 1)];
91}
92
93Game_Battler* Game_Party_Base::GetRandomDeadBattler() {
94 std::vector<Game_Battler*> battlers;

Callers 7

PrepareBattleActionMethod · 0.80
MakeAttackFunction · 0.80
MakeAttackAlliesFunction · 0.80
MakeSkillActionFunction · 0.80
SelectNextActorMethod · 0.80

Calls 2

emptyMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected