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

Method GetNumberOfAttacks

src/game_actor.cpp:1378–1385  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1376}
1377
1378int Game_Actor::GetNumberOfAttacks(Weapon weapon) const {
1379 if (GetWeapon() == nullptr && Get2ndWeapon() == nullptr && dbActor->easyrpg_dual_attack) {
1380 return 2;
1381 }
1382 int hits = 1;
1383 ForEachEquipment<true, false>(GetWholeEquipment(), [&](auto& item) { hits = std::max(hits, Algo::GetNumberOfAttacks(GetId(), item)); }, weapon);
1384 return hits;
1385}
1386
1387bool Game_Actor::HasAttackAll(Weapon weapon) const {
1388 if (GetWeapon() == nullptr && Get2ndWeapon() == nullptr) {

Callers 5

InitMethod · 0.45
game_actor.cppFile · 0.45
testWeapon3Function · 0.45

Calls 2

maxFunction · 0.85
GetNumberOfAttacksFunction · 0.85

Tested by

no test coverage detected