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

Method GetAverageLevel

src/game_party.cpp:640–655  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

638}
639
640int Game_Party::GetAverageLevel() {
641 int party_lvl = 0;
642
643 std::vector<Game_Actor*> actors = GetActors();
644 std::vector<Game_Actor*>::iterator it;
645
646 if (actors.empty()) {
647 return 0;
648 }
649
650 for (it = actors.begin(); it != actors.end(); ++it) {
651 party_lvl += (*it)->GetLevel();
652 }
653
654 return party_lvl / (int)actors.size();
655}
656
657int Game_Party::GetFatigue() {
658 const auto& actors = GetActors();

Callers 2

IsActionValidFunction · 0.80
enemyai.cppFile · 0.80

Calls 5

GetLevelMethod · 0.80
emptyMethod · 0.45
beginMethod · 0.45
endMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected