mirror of
https://github.com/ApfelTeeSaft/PlanetFleet.git
synced 2026-08-26 19:33:38 +00:00
allowing units move out of blocked source cells
This commit is contained in:
+3
-1
@@ -73,15 +73,17 @@ namespace battleship{
|
||||
bool ship = (unitType == UnitType::UNDERWATER || unitType == UnitType::SEA_LEVEL);
|
||||
Unit *blockingUnit = cells[vertStrich].blockedBy;
|
||||
bool diffBlockingUnit = (blockingUnit && blockingUnit != vehicle);
|
||||
bool throughBlockedCell = (source != vertStrich);
|
||||
|
||||
if(
|
||||
(unitType == UnitType::LAND && (diffBlockingUnit || cells[vertStrich].type != Map::Cell::LAND)) ||
|
||||
(unitType == UnitType::LAND && ((diffBlockingUnit && throughBlockedCell) || cells[vertStrich].type != Map::Cell::LAND)) ||
|
||||
(
|
||||
ship &&
|
||||
(
|
||||
cells[vertStrich].type != Map::Cell::WATER ||
|
||||
(
|
||||
diffBlockingUnit &&
|
||||
throughBlockedCell &&
|
||||
blockingUnit->getUnitClass() == UnitClass::ICE_SHEET &&
|
||||
vehicle->getUnitClass() != UnitClass::ICEBREAKER
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user