| 2376 | } |
| 2377 | |
| 2378 | void Battle::giveInterruptChanceToUnits(GameState &state, StateRef<BattleUnit> giver, |
| 2379 | int reactionValue) |
| 2380 | { |
| 2381 | if (mode != Mode::TurnBased) |
| 2382 | { |
| 2383 | return; |
| 2384 | } |
| 2385 | for (auto &u : units) |
| 2386 | { |
| 2387 | if (u.second->visibleEnemies.find(giver) != u.second->visibleEnemies.end()) |
| 2388 | { |
| 2389 | giveInterruptChanceToUnit(state, giver, {&state, u.second->id}, reactionValue); |
| 2390 | } |
| 2391 | } |
| 2392 | } |
| 2393 | |
| 2394 | void Battle::giveInterruptChanceToUnit(GameState &state, StateRef<BattleUnit> giver, |
| 2395 | StateRef<BattleUnit> receiver, int reactionValue) |
no test coverage detected