diff --git a/android/assets/jsons/Tutorials/Tutorials_English.json b/android/assets/jsons/Tutorials/Tutorials_English.json index 32c99a5774..73af7e2e63 100644 --- a/android/assets/jsons/Tutorials/Tutorials_English.json +++ b/android/assets/jsons/Tutorials/Tutorials_English.json @@ -2,11 +2,9 @@ // Each entry s a tutorial, but the tutorial may be spread over separate paragraphs. // Entries starting with a _ will NOT be shown in Civilopedia. - + // Civilopedia only, because players said this was too wall-of-text New_Game: [ [ - "Hello, and welcome to Unciv!", - "Civilization games can be complex, so we'll be guiding you step-by-step.", "Your first mission is to found your capital city.", "This is actually an important task because your capital city will probably be your most prosperous.", "Many game bonuses apply only to your capital city and it will probably be the center of your empire." @@ -26,27 +24,6 @@ "You only need to settle right next to resources if you need them immediately – ", " which might be the case now and then, but you’ll usually have the luxury of time." ], - - ], - - - _City_Founded : [ - [ - "You have founded a city!", - "Cities are the lifeblood of your empire, providing gold and science empire-wide,", - " which are displayed on the top bar.", - "You can click the city name to enter the city screen to assign population,", - " choose production, and see information on the city" - ], - ] - - First_Steps : [ - [ - "Once you have your first city up and running you’ll be able to start production of a new unit", - " and you’ll be able to begin your research.", - "I’m not going to delve too deeply into the research element of the game yet – that will be handled later in the guide –", - " so let’s just talk about production." - ], [ "The first thing coming out of your city should be either a Scout or Warrior." "I generally prefer the Warrior because it can be used for defense and because it can be upgraded", @@ -56,21 +33,10 @@ "If you’re a veteran of the 4x strategy genre your first Warrior or Scout will be followed by a Settler.", "Fast expanding is absolutely critical in most games of this type.", ], + ], - Next_Turn : [ - [ - "Once you've done everything you can in this turn, ", - " click the next turn button on the top right to continue." - ], - [ - "Each turn, science, culture and gold are added", - " to your civilization, your cities' construction", - " continues, and they may grow in population or area." - ] - ], - Slow_Start: [ [ "In your first couple of turns,", @@ -117,19 +83,6 @@ ], ], - Technology: [ - [ - "Technology is central to your civilization,", - " as technological progress brings with it", - " more construction options, improvements, and abilities" - ], - [ - "Most technologies are dependent on other technologies being researched - ", - " but you can choose a technology to aspire to,", - " and your civilization will research the necessary technologies to get there" - ] - ], - @@ -155,32 +108,6 @@ ] - World_Map: [ - [ - "The world map is made up of multiple tiles.", - "Each tile can contain units, resources and improvements, which we'll get to later.", - "The position of the icon tells you what it signifies.", - "For more details, you can click on the tile and see the tile information." - ] - ], - - - Tile_Clicked : [ - [ - "Clicking on a tile selects that tile,", - " and displays information on that tile on the bottom-right.", - "If the tile contains a unit, that will become the selected unit," - " and its info and actions will be displayed on the bottom left." - ] - ], - - Unit_Selected : [ - [ - "When a unit is selected, its information will be displayed on the bottom-left corner.", - "The available actions of that unit will appear above the tile information." - ] - ], - Unhappiness: [ [ diff --git a/android/build.gradle b/android/build.gradle index ea79c4ff88..bf4cea18a5 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -21,8 +21,8 @@ android { applicationId "com.unciv.app" minSdkVersion 14 targetSdkVersion 29 - versionCode 339 - versionName "3.3.7" + versionCode 340 + versionName "3.3.7-patch1" archivesBaseName = "Unciv" } diff --git a/core/src/com/unciv/UncivGame.kt b/core/src/com/unciv/UncivGame.kt index 086fe9d7e5..8a9825b6df 100644 --- a/core/src/com/unciv/UncivGame.kt +++ b/core/src/com/unciv/UncivGame.kt @@ -123,7 +123,8 @@ class UncivGame(val version: String) : Game() { } override fun dispose() { - GameSaver().autoSave(gameInfo) + if(::gameInfo.isInitialized) + GameSaver().autoSave(gameInfo) } companion object { diff --git a/core/src/com/unciv/logic/civilization/CivilizationInfo.kt b/core/src/com/unciv/logic/civilization/CivilizationInfo.kt index 97f32ae799..e6020b2de9 100644 --- a/core/src/com/unciv/logic/civilization/CivilizationInfo.kt +++ b/core/src/com/unciv/logic/civilization/CivilizationInfo.kt @@ -254,6 +254,8 @@ class CivilizationInfo { .apply { diplomaticStatus = DiplomaticStatus.Peace } popupAlerts.add(PopupAlert(AlertType.FirstContact,otherCiv.civName)) + if(isCurrentPlayer() || otherCiv.isCurrentPlayer()) + UncivGame.Current.settings.addMissionCompleted("Meet another civilization") } override fun toString(): String {return civName} // for debug diff --git a/core/src/com/unciv/logic/map/MapUnit.kt b/core/src/com/unciv/logic/map/MapUnit.kt index be9d229a04..42267bc7f3 100644 --- a/core/src/com/unciv/logic/map/MapUnit.kt +++ b/core/src/com/unciv/logic/map/MapUnit.kt @@ -3,6 +3,7 @@ package com.unciv.logic.map import com.badlogic.gdx.graphics.Color import com.badlogic.gdx.math.Vector2 import com.unciv.Constants +import com.unciv.UncivGame import com.unciv.logic.automation.UnitAutomation import com.unciv.logic.automation.WorkerAutomation import com.unciv.logic.civilization.CivilizationInfo @@ -324,6 +325,9 @@ class MapUnit { val tile=getTile() tile.turnsToImprovement -= 1 if (tile.turnsToImprovement != 0) return + + if(civInfo.isCurrentPlayer()) + UncivGame.Current.settings.addMissionCompleted("Construct an improvement") when { tile.improvementInProgress!!.startsWith("Remove") -> { val tileImprovement = tile.getTileImprovement() diff --git a/core/src/com/unciv/models/metadata/GameSettings.kt b/core/src/com/unciv/models/metadata/GameSettings.kt index f34c406da8..95c9ff8db5 100644 --- a/core/src/com/unciv/models/metadata/GameSettings.kt +++ b/core/src/com/unciv/models/metadata/GameSettings.kt @@ -10,6 +10,7 @@ class GameSettings { var language: String = "English" var resolution: String = "900x600" var tutorialsShown = ArrayList() + var missionsCompleted = ArrayList() var hasCrashedRecently = false var soundEffectsVolume = 0.5f var musicVolume = 0.5f @@ -28,4 +29,9 @@ class GameSettings { fun save(){ GameSaver().setGeneralSettings(this) } + + fun addMissionCompleted(mission:String){ + missionsCompleted.add(mission) + save() + } } \ No newline at end of file diff --git a/core/src/com/unciv/ui/EmpireOverviewScreen.kt b/core/src/com/unciv/ui/EmpireOverviewScreen.kt index d36f7024b7..cbedee21d5 100644 --- a/core/src/com/unciv/ui/EmpireOverviewScreen.kt +++ b/core/src/com/unciv/ui/EmpireOverviewScreen.kt @@ -423,7 +423,7 @@ class EmpireOverviewScreen : CameraStageBaseScreen(){ labelText = "???" } - civGroup.background = ImageGetter.getTableBackground(backgroundColor) + civGroup.background = ImageGetter.getRoundedEdgeTableBackground(backgroundColor) val label = labelText.toLabel(labelColor) label.setAlignment(Align.center) diff --git a/core/src/com/unciv/ui/cityscreen/CityScreen.kt b/core/src/com/unciv/ui/cityscreen/CityScreen.kt index fca698aa9d..223792a0a9 100644 --- a/core/src/com/unciv/ui/cityscreen/CityScreen.kt +++ b/core/src/com/unciv/ui/cityscreen/CityScreen.kt @@ -48,6 +48,7 @@ class CityScreen(internal val city: CityInfo) : CameraStageBaseScreen() { init { onBackButtonClicked { game.setWorldScreen() } addTiles() + UncivGame.Current.settings.addMissionCompleted("Enter city screen") val tableBackgroundColor = ImageGetter.getBlue().lerp(Color.BLACK,0.5f) @@ -214,8 +215,10 @@ class CityScreen(internal val city: CityInfo) : CameraStageBaseScreen() { if (!city.isPuppet) { selectedTile = tileInfo if (tileGroup.isWorkable && UncivGame.Current.worldScreen.isPlayersTurn) { - if (!tileInfo.isWorked() && city.population.getFreePopulation() > 0) + if (!tileInfo.isWorked() && city.population.getFreePopulation() > 0) { city.workedTiles.add(tileInfo.position) + game.settings.addMissionCompleted("Reassign worked tiles") + } else if (tileInfo.isWorked()) city.workedTiles.remove(tileInfo.position) city.cityStats.update() } diff --git a/core/src/com/unciv/ui/cityscreen/ConstructionsTable.kt b/core/src/com/unciv/ui/cityscreen/ConstructionsTable.kt index 9016d4a9eb..0e748ac3b7 100644 --- a/core/src/com/unciv/ui/cityscreen/ConstructionsTable.kt +++ b/core/src/com/unciv/ui/cityscreen/ConstructionsTable.kt @@ -55,6 +55,7 @@ class ConstructionsTable(val cityScreen: CityScreen) : Table(CameraStageBaseScre cityScreen.city.cityConstructions.currentConstructionIsUserSet = true cityScreen.city.cityStats.update() cityScreen.update() + cityScreen.game.settings.addMissionCompleted("Pick construction") } } diff --git a/core/src/com/unciv/ui/newgamescreen/NewGameScreen.kt b/core/src/com/unciv/ui/newgamescreen/NewGameScreen.kt index 7e32751b95..b5684d36ac 100644 --- a/core/src/com/unciv/ui/newgamescreen/NewGameScreen.kt +++ b/core/src/com/unciv/ui/newgamescreen/NewGameScreen.kt @@ -1,6 +1,7 @@ package com.unciv.ui.newgamescreen import com.badlogic.gdx.Gdx +import com.badlogic.gdx.scenes.scene2d.ui.ScrollPane import com.badlogic.gdx.scenes.scene2d.ui.SelectBox import com.badlogic.gdx.scenes.scene2d.ui.Skin import com.badlogic.gdx.utils.Array @@ -31,7 +32,8 @@ class NewGameScreen: PickerScreen(){ setDefaultCloseAction() val playerPickerTable = PlayerPickerTable(this, newGameParameters) - topTable.add(NewGameScreenOptionsTable(this) { playerPickerTable.update() }) + val newGameScreenOptionsTable = NewGameScreenOptionsTable(this) { playerPickerTable.update() } + topTable.add(ScrollPane(newGameScreenOptionsTable)).height(topTable.parent.height) topTable.add(playerPickerTable).pad(10f) topTable.pack() topTable.setFillParent(true) diff --git a/core/src/com/unciv/ui/newgamescreen/NewGameScreenOptionsTable.kt b/core/src/com/unciv/ui/newgamescreen/NewGameScreenOptionsTable.kt index df7158fa53..fcb9131c3c 100644 --- a/core/src/com/unciv/ui/newgamescreen/NewGameScreenOptionsTable.kt +++ b/core/src/com/unciv/ui/newgamescreen/NewGameScreenOptionsTable.kt @@ -23,7 +23,7 @@ class NewGameScreenOptionsTable(val newGameScreen: NewGameScreen, val onMultipla val ruleset = newGameScreen.ruleSet init { - + pad(10f) add("Map options".toLabel(fontSize = 24)).colspan(2).row() addMapTypeSelection() diff --git a/core/src/com/unciv/ui/pickerscreens/TechButton.kt b/core/src/com/unciv/ui/pickerscreens/TechButton.kt index f96c408e53..48728310b3 100644 --- a/core/src/com/unciv/ui/pickerscreens/TechButton.kt +++ b/core/src/com/unciv/ui/pickerscreens/TechButton.kt @@ -16,7 +16,7 @@ class TechButton(techName:String, val techManager: TechManager, isWorldScreen: B init { touchable = Touchable.enabled defaults().pad(10f) - background = ImageGetter.getTableBackground() + background = ImageGetter.getRoundedEdgeTableBackground() if (ImageGetter.techIconExists(techName)) add(ImageGetter.getTechIconGroup(techName, 60f)) diff --git a/core/src/com/unciv/ui/pickerscreens/TechPickerScreen.kt b/core/src/com/unciv/ui/pickerscreens/TechPickerScreen.kt index df0da768e5..8697a8c623 100644 --- a/core/src/com/unciv/ui/pickerscreens/TechPickerScreen.kt +++ b/core/src/com/unciv/ui/pickerscreens/TechPickerScreen.kt @@ -51,6 +51,7 @@ class TechPickerScreen(internal val civInfo: CivilizationInfo, centerOnTech: Tec setButtonsInfo() rightSideButton.setText("Pick a tech".tr()) rightSideButton.onClick("paper") { + game.settings.addMissionCompleted("Pick technology") if (isFreeTechPick) civTech.getFreeTechnology(selectedTech!!.name) else civTech.techsToResearch = tempTechsToResearch @@ -59,7 +60,6 @@ class TechPickerScreen(internal val civInfo: CivilizationInfo, centerOnTech: Tec dispose() } - displayTutorials("Technology") // per default show current/recent technology, // and possibly select it to show description, diff --git a/core/src/com/unciv/ui/tilegroups/CityButton.kt b/core/src/com/unciv/ui/tilegroups/CityButton.kt index 02030fcae2..297d7080c7 100644 --- a/core/src/com/unciv/ui/tilegroups/CityButton.kt +++ b/core/src/com/unciv/ui/tilegroups/CityButton.kt @@ -47,7 +47,7 @@ class CityButton(val city: CityInfo, internal val tileGroup: WorldTileGroup, ski if (tileGroup.tileInfo.airUnits.isEmpty()) return val secondarycolor = city.civInfo.nation.getInnerColor() val airUnitTable = Table().apply { defaults().pad(5f) } - airUnitTable.background = ImageGetter.getTableBackground(city.civInfo.nation.getOuterColor()) + airUnitTable.background = ImageGetter.getRoundedEdgeTableBackground(city.civInfo.nation.getOuterColor()) val aircraftImage = ImageGetter.getImage("OtherIcons/Aircraft") aircraftImage.color = secondarycolor airUnitTable.add(aircraftImage).size(15f) @@ -92,7 +92,7 @@ class CityButton(val city: CityInfo, internal val tileGroup: WorldTileGroup, ski val secondaryColor = city.civInfo.nation.getInnerColor() val iconTable = Table() iconTable.touchable=Touchable.enabled - iconTable.background = ImageGetter.getTableBackground(city.civInfo.nation.getOuterColor()) + iconTable.background = ImageGetter.getRoundedEdgeTableBackground(city.civInfo.nation.getOuterColor()) if (city.resistanceCounter > 0) { val resistanceImage = ImageGetter.getImage("StatIcons/Resistance") diff --git a/core/src/com/unciv/ui/utils/ImageGetter.kt b/core/src/com/unciv/ui/utils/ImageGetter.kt index 6a8a1d30cc..88d1403ddb 100644 --- a/core/src/com/unciv/ui/utils/ImageGetter.kt +++ b/core/src/com/unciv/ui/utils/ImageGetter.kt @@ -65,7 +65,7 @@ object ImageGetter { else return textureRegionDrawables[whiteDotLocation]!! } - fun getTableBackground(tintColor: Color?=null): Drawable? { + fun getRoundedEdgeTableBackground(tintColor: Color?=null): Drawable? { val drawable = getDrawable("OtherIcons/civTableBackground") drawable.minHeight=0f drawable.minWidth=0f diff --git a/core/src/com/unciv/ui/worldscreen/NotificationsScroll.kt b/core/src/com/unciv/ui/worldscreen/NotificationsScroll.kt index 128a14a710..ef6aa4c726 100644 --- a/core/src/com/unciv/ui/worldscreen/NotificationsScroll.kt +++ b/core/src/com/unciv/ui/worldscreen/NotificationsScroll.kt @@ -35,7 +35,7 @@ class NotificationsScroll(internal val worldScreen: WorldScreen) : ScrollPane(nu listItem.add(ImageGetter.getCircle() .apply { color=notification.color }).size(10f).pad(5f) - listItem.background = ImageGetter.getTableBackground() + listItem.background = ImageGetter.getRoundedEdgeTableBackground() listItem.add(label).pad(5f).padRight(10f) // using a large click area with no gap in between each message item. diff --git a/core/src/com/unciv/ui/worldscreen/TileMapHolder.kt b/core/src/com/unciv/ui/worldscreen/TileMapHolder.kt index af871b7d88..299226cc92 100644 --- a/core/src/com/unciv/ui/worldscreen/TileMapHolder.kt +++ b/core/src/com/unciv/ui/worldscreen/TileMapHolder.kt @@ -205,6 +205,7 @@ class TileMapHolder(internal val worldScreen: WorldScreen, internal val tileMap: if (dto.unit.currentMovement > 0) moveHereButton.onClick(""){ + UncivGame.Current.settings.addMissionCompleted("Move unit") UnitContextMenu(this, dto.unit, dto.tileInfo).onMoveButtonClick() } diff --git a/core/src/com/unciv/ui/worldscreen/WorldScreen.kt b/core/src/com/unciv/ui/worldscreen/WorldScreen.kt index dd765b6c45..d3099baf32 100644 --- a/core/src/com/unciv/ui/worldscreen/WorldScreen.kt +++ b/core/src/com/unciv/ui/worldscreen/WorldScreen.kt @@ -8,6 +8,7 @@ import com.badlogic.gdx.scenes.scene2d.actions.Actions import com.badlogic.gdx.scenes.scene2d.ui.Button import com.badlogic.gdx.scenes.scene2d.ui.Table import com.badlogic.gdx.scenes.scene2d.ui.TextButton +import com.badlogic.gdx.utils.Align import com.unciv.Constants import com.unciv.UncivGame import com.unciv.logic.GameSaver @@ -50,6 +51,7 @@ class WorldScreen(val viewingCiv:CivilizationInfo) : CameraStageBaseScreen() { private val techButtonHolder = Table() private val diplomacyButtonWrapper = Table() private val nextTurnButton = createNextTurnButton() + private val missionTable=Table().apply { background=ImageGetter.getBackground(ImageGetter.getBlue().lerp(Color.BLACK, 0.5f)) } private val notificationsScroll: NotificationsScroll var alertPopupIsOpen = false // if we have an alert popup and then we changed screens, the old one shouldn't affect us @@ -87,6 +89,7 @@ class WorldScreen(val viewingCiv:CivilizationInfo) : CameraStageBaseScreen() { stage.addActor(nextTurnButton) stage.addActor(techPolicyandVictoryHolder) stage.addActor(notificationsScroll) + stage.addActor(missionTable) diplomacyButtonWrapper.defaults().pad(5f) @@ -99,8 +102,8 @@ class WorldScreen(val viewingCiv:CivilizationInfo) : CameraStageBaseScreen() { stage.addActor(unitActionsTable) - displayTutorials("New_Game") - displayTutorials("World_Map") +// displayTutorials("New_Game") +// displayTutorials("World_Map") createNextTurnButton() // needs civ table to be positioned @@ -165,6 +168,17 @@ class WorldScreen(val viewingCiv:CivilizationInfo) : CameraStageBaseScreen() { bottomTileInfoTable.y=if(UncivGame.Current.settings.showMinimap)minimapWrapper.height else 0f battleTable.update() + missionTable.clear() + val mission =getCurrentMission() + if(mission==""){missionTable.isVisible=false} + else { + missionTable.add(mission.toLabel() + .apply { setAlignment(Align.center) }).pad(10f) + missionTable.pack() + missionTable.centerX(stage) + missionTable.y = topBar.y - missionTable.height + } + minimapWrapper.update(viewingCiv) unitActionsTable.update(bottomUnitTable.selectedUnit) unitActionsTable.y = bottomUnitTable.height @@ -200,6 +214,35 @@ class WorldScreen(val viewingCiv:CivilizationInfo) : CameraStageBaseScreen() { } + private fun getCurrentMission(): String { + val completedMissions = game.settings.missionsCompleted + if(!completedMissions.contains("Move unit")) + return "Move a unit!\nClick on a unit > Click on a destination > Click the arrow popup" + if(!completedMissions.contains("Found city")) + return "Found a city!\nSelect the Settler (flag unit) > Click on 'Found city' (bottom-left corner)" + if(!completedMissions.contains("Enter city screen")) + return "Enter the city screen!\nClick the city button twice" + if(!completedMissions.contains("Pick technology")) + return "Pick a technology to research!\nClick on the tech button (greenish, top left) > \n select technology > click 'Research' (bottom right)" + if(!completedMissions.contains("Pick construction")) + return "Pick a construction!\nEnter city screen > Click on a unit or building (left side)" + if(!completedMissions.contains("Pass a turn")) + return "Pass a turn!\nCycle through units with 'Next unit' > Click 'Next turn'" + if(!completedMissions.contains("Reassign worked tiles")) + return "Reassign worked tiles!\nEnter city screen > click the assigned (green) tile to unassign > " + + "\n click an unassigned tile to assign population" + if(!completedMissions.contains("Meet another civilization")) + return "Meet another civilization!\nExplore the map until you encounter another civilization!" + if(!completedMissions.contains("Open the options table")) + return "Open the options table!\nClick the menu button (top left) > click 'Options'" + if(!completedMissions.contains("Construct an improvement")) + return "Construct an improvement!\nConstruct a Worker unit > Move to a Plains or Grassland tile > " + + "\n Choose 'Create improvement' > Choose the farm > " + + "\n Leave the worker there until it's finished" + + return "" + } + private fun displayTutorialsOnUpdate() { if (UncivGame.Current.settings.hasCrashedRecently) { displayTutorials("_GameCrashed") @@ -208,13 +251,6 @@ class WorldScreen(val viewingCiv:CivilizationInfo) : CameraStageBaseScreen() { UncivGame.Current.settings.save() } - if (bottomUnitTable.selectedUnit != null) displayTutorials("Unit_Selected") - if (viewingCiv.cities.isNotEmpty()){ - displayTutorials("_City_Founded") - displayTutorials("First_Steps") - } - if (UncivGame.Current.settings.tutorialsShown.contains("Cities")) displayTutorials("Next_Turn") - if (!UncivGame.Current.settings.tutorialsShown.contains("_EnemyCityNeedsConqueringWithMeleeUnit")) { for (enemyCity in viewingCiv.diplomacy.values.filter { it.diplomaticStatus == DiplomaticStatus.War } @@ -260,7 +296,7 @@ class WorldScreen(val viewingCiv:CivilizationInfo) : CameraStageBaseScreen() { if (viewingCiv.tech.currentTechnology() == null) { val buttonPic = Table() - buttonPic.background = ImageGetter.getTableBackground(colorFromRGB(7, 46, 43)) + buttonPic.background = ImageGetter.getRoundedEdgeTableBackground(colorFromRGB(7, 46, 43)) buttonPic.defaults().pad(20f) buttonPic.add("{Pick a tech}!".toLabel(Color.WHITE,30)) techButtonHolder.add(buttonPic) @@ -312,6 +348,7 @@ class WorldScreen(val viewingCiv:CivilizationInfo) : CameraStageBaseScreen() { return@onClick } + game.settings.addMissionCompleted("Pass a turn") nextTurn() // If none of the above } diff --git a/core/src/com/unciv/ui/worldscreen/optionstable/WorldScreenOptionsTable.kt b/core/src/com/unciv/ui/worldscreen/optionstable/WorldScreenOptionsTable.kt index b86e43d9e7..9cf37ba89f 100644 --- a/core/src/com/unciv/ui/worldscreen/optionstable/WorldScreenOptionsTable.kt +++ b/core/src/com/unciv/ui/worldscreen/optionstable/WorldScreenOptionsTable.kt @@ -30,6 +30,7 @@ class WorldScreenOptionsTable(val worldScreen:WorldScreen) : PopupTable(worldScr var selectedLanguage: String = "English" init { + UncivGame.Current.settings.addMissionCompleted("Open the options table") update() open() } diff --git a/core/src/com/unciv/ui/worldscreen/unit/UnitActions.kt b/core/src/com/unciv/ui/worldscreen/unit/UnitActions.kt index 0423d84523..1c145ab0f4 100644 --- a/core/src/com/unciv/ui/worldscreen/unit/UnitActions.kt +++ b/core/src/com/unciv/ui/worldscreen/unit/UnitActions.kt @@ -132,6 +132,7 @@ class UnitActions { unit.currentMovement >0 && !tile.getTilesInDistance(3).any { it.isCityCenter() }) { + UncivGame.Current.settings.addMissionCompleted("Found city") unit.civInfo.addCity(tile.position) tile.improvement = null unit.destroy()