| 1966 | } |
| 1967 | |
| 1968 | void Battle::abortMission(GameState &state) |
| 1969 | { |
| 1970 | killStrandedUnits(state, currentPlayer); |
| 1971 | auto player = state.getPlayer(); |
| 1972 | for (auto &u : units) |
| 1973 | { |
| 1974 | if (u.second->owner == u.second->agent->owner && u.second->owner == player && |
| 1975 | !u.second->isDead() && !u.second->retreated) |
| 1976 | { |
| 1977 | u.second->retreat(state); |
| 1978 | } |
| 1979 | } |
| 1980 | } |
| 1981 | |
| 1982 | void Battle::checkMissionEnd(GameState &state, bool retreated, bool forceReCheck) |
| 1983 | { |
no test coverage detected