mirror of
https://github.com/yairm210/Unciv.git
synced 2025-07-07 00:41:39 +07:00
Civs clearing an encampment now get gold
This commit is contained in:
@ -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
|
||||
|
@ -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)
|
||||
|
Reference in New Issue
Block a user