OKAY FOUND THE BUG!

So, now military units can't enter tiles which have an enemy civilian unit in them.
Honestly I would not have guessed that this was the problem.
This commit is contained in:
Yair Morgenstern 2018-06-03 13:56:03 +03:00
parent 431c5449f3
commit 0fb3c2256e

View file

@ -158,7 +158,7 @@ class MapUnit {
if(tile.isCityCenter() && tile.getOwner()!!.civName!=owner) return false
if (getBaseUnit().unitType==UnitType.Civilian)
return tile.civilianUnit==null && (tile.militaryUnit==null || tile.militaryUnit!!.owner==owner)
else return tile.militaryUnit==null
else return tile.militaryUnit==null && (tile.civilianUnit==null || tile.civilianUnit!!.owner==owner)
}
fun isIdle(): Boolean {