Merge remote-tracking branch 'upstream/master'

update
This commit is contained in:
YueR 2019-09-18 17:46:15 +08:00
commit 74490fe9fb
2 changed files with 4 additions and 3 deletions

View file

@ -341,7 +341,7 @@
{
name:"Logistics",
prerequisites:["Accuracy III","Barrage III","Targeting III", "Wolfpack III",
"Bombardment III", "Coastal Raider III","Boarding Party III","Siege III","Bombardment III"],
"Bombardment III", "Coastal Raider III","Boarding Party III","Siege III"],
effect:"1 additional attack per turn",
unitTypes:["Ranged","Siege","WaterMelee","WaterRanged","WaterSubmarine","Fighter","Bomber"]
}

View file

@ -103,12 +103,13 @@ class GameInfo {
currentPlayerCiv = getCivilization(currentPlayer)
// Start our turn immediately before the player can made decisions - affects whether our units can commit automated actions and then be attacked immediately etc.
val viewableInvisibleTiles = thisPlayer.viewableInvisibleUnitsTiles.map { it.position }
val enemyUnitsCloseToTerritory = thisPlayer.viewableTiles
.filter {
it.militaryUnit != null && it.militaryUnit!!.civInfo != thisPlayer
&& thisPlayer.isAtWarWith(it.militaryUnit!!.civInfo)
&& (it.getOwner() == thisPlayer || it.neighbors.any { neighbor -> neighbor.getOwner() == thisPlayer })
&& (it.getOwner() == thisPlayer || it.neighbors.any { neighbor -> neighbor.getOwner() == thisPlayer }
&& (!it.militaryUnit!!.isInvisible() || viewableInvisibleTiles.contains(it.position)))
}
// enemy units ON our territory