Defeat improvements (#1654)

* Fix: civilization not being destroyed when disbanding the initial settler

* Fix: destroyed unit providing visibility until the end of the turn
This commit is contained in:
lyrjie 2020-01-11 23:33:27 +03:00 committed by Yair Morgenstern
parent fd5d38fb01
commit c37ea14df5

View File

@ -416,6 +416,7 @@ class MapUnit {
fun destroy(){ fun destroy(){
removeFromTile() removeFromTile()
civInfo.removeUnit(this) civInfo.removeUnit(this)
civInfo.updateViewableTiles()
} }
fun removeFromTile(){ fun removeFromTile(){
@ -470,6 +471,7 @@ class MapUnit {
destroy() destroy()
if(currentTile.getOwner()==civInfo) if(currentTile.getOwner()==civInfo)
civInfo.gold += baseUnit.getDisbandGold() civInfo.gold += baseUnit.getDisbandGold()
if (civInfo.isDefeated()) civInfo.destroy()
} }
private fun getAncientRuinBonus(tile: TileInfo) { private fun getAncientRuinBonus(tile: TileInfo) {