| 1376 | } |
| 1377 | |
| 1378 | int 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 | |
| 1387 | bool Game_Actor::HasAttackAll(Weapon weapon) const { |
| 1388 | if (GetWeapon() == nullptr && Get2ndWeapon() == nullptr) { |
no test coverage detected