Civs clearing an encampment now get gold

This commit is contained in:
Yair Morgenstern
2019-06-01 22:47:41 +03:00
parent 8040cb01b9
commit f60ebbb7e1
3 changed files with 17 additions and 8 deletions

View File

@ -17,7 +17,7 @@ class UnCivGame(val version: String) : Game() {
* This exists so that when debugging we can see the entire map.
* Remember to turn this to false before commit and upload!
*/
val viewEntireMapForDebug = true
val viewEntireMapForDebug = false
// For when you need to test something in an advanced game and don't have time to faff around
val superchargedForDebug = false

View File

@ -459,11 +459,18 @@ class MapUnit {
if(tile.improvement==Constants.ancientRuins && !civInfo.isBarbarianCivilization())
getAncientRuinBonus()
if(tile.improvement==Constants.barbarianEncampment && !civInfo.isBarbarianCivilization())
tile.improvement=null // todo get bonus from clearing encampment
clearEncampment(tile)
updateViewableTiles()
}
private fun clearEncampment(tile: TileInfo) {
tile.improvement=null
val goldToAdd = 25 // game-speed-dependant
civInfo.gold+=goldToAdd
civInfo.addNotification("We have captured a barbarian encampment and recovered [$goldToAdd] gold!", tile.position, Color.RED)
}
fun disband(){
destroy()
if(currentTile.isCityCenter() && currentTile.getOwner()==civInfo)