mirror of
https://github.com/yairm210/Unciv.git
synced 2025-07-21 05:09:25 +07:00
More tutorial tasks
This commit is contained in:
@ -2,6 +2,7 @@ package com.unciv.logic.battle
|
|||||||
|
|
||||||
import com.badlogic.gdx.graphics.Color
|
import com.badlogic.gdx.graphics.Color
|
||||||
import com.unciv.Constants
|
import com.unciv.Constants
|
||||||
|
import com.unciv.UncivGame
|
||||||
import com.unciv.logic.GameInfo
|
import com.unciv.logic.GameInfo
|
||||||
import com.unciv.logic.automation.UnitAutomation
|
import com.unciv.logic.automation.UnitAutomation
|
||||||
import com.unciv.logic.city.CityInfo
|
import com.unciv.logic.city.CityInfo
|
||||||
@ -254,8 +255,10 @@ class Battle(val gameInfo:GameInfo) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
if (attackerCiv.isPlayerCivilization())
|
if (attackerCiv.isPlayerCivilization()) {
|
||||||
attackerCiv.popupAlerts.add(PopupAlert(AlertType.CityConquered, city.name))
|
attackerCiv.popupAlerts.add(PopupAlert(AlertType.CityConquered, city.name))
|
||||||
|
UncivGame.Current.settings.addCompletedTutorialTask("Conquer a city")
|
||||||
|
}
|
||||||
else {
|
else {
|
||||||
city.puppetCity(attackerCiv)
|
city.puppetCity(attackerCiv)
|
||||||
if (city.population.population < 4) {
|
if (city.population.population < 4) {
|
||||||
|
@ -9,8 +9,8 @@ class GameSettings {
|
|||||||
var singleTapMove: Boolean = false
|
var singleTapMove: Boolean = false
|
||||||
var language: String = "English"
|
var language: String = "English"
|
||||||
var resolution: String = "900x600"
|
var resolution: String = "900x600"
|
||||||
var tutorialsShown = ArrayList<String>()
|
var tutorialsShown = HashSet<String>()
|
||||||
var tutorialTasksCompleted = ArrayList<String>()
|
var tutorialTasksCompleted = HashSet<String>()
|
||||||
var hasCrashedRecently = false
|
var hasCrashedRecently = false
|
||||||
var soundEffectsVolume = 0.5f
|
var soundEffectsVolume = 0.5f
|
||||||
var musicVolume = 0.5f
|
var musicVolume = 0.5f
|
||||||
|
@ -205,6 +205,8 @@ class TileMapHolder(internal val worldScreen: WorldScreen, internal val tileMap:
|
|||||||
if (dto.unit.currentMovement > 0)
|
if (dto.unit.currentMovement > 0)
|
||||||
moveHereButton.onClick(""){
|
moveHereButton.onClick(""){
|
||||||
UncivGame.Current.settings.addCompletedTutorialTask("Move unit")
|
UncivGame.Current.settings.addCompletedTutorialTask("Move unit")
|
||||||
|
if(dto.unit.type.isAirUnit())
|
||||||
|
UncivGame.Current.settings.addCompletedTutorialTask("Move an air unit")
|
||||||
UnitContextMenu(this, dto.unit, dto.tileInfo).onMoveButtonClick()
|
UnitContextMenu(this, dto.unit, dto.tileInfo).onMoveButtonClick()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -223,7 +223,8 @@ class WorldScreen(val viewingCiv:CivilizationInfo) : CameraStageBaseScreen() {
|
|||||||
if(!completedTasks.contains("Enter city screen"))
|
if(!completedTasks.contains("Enter city screen"))
|
||||||
return "Enter the city screen!\nClick the city button twice"
|
return "Enter the city screen!\nClick the city button twice"
|
||||||
if(!completedTasks.contains("Pick technology"))
|
if(!completedTasks.contains("Pick technology"))
|
||||||
return "Pick a technology to research!\nClick on the tech button (greenish, top left) > \n select technology > click 'Research' (bottom right)"
|
return "Pick a technology to research!\nClick on the tech button (greenish, top left) > " +
|
||||||
|
"\n select technology > click 'Research' (bottom right)"
|
||||||
if(!completedTasks.contains("Pick construction"))
|
if(!completedTasks.contains("Pick construction"))
|
||||||
return "Pick a construction!\nEnter city screen > Click on a unit or building (left side)"
|
return "Pick a construction!\nEnter city screen > Click on a unit or building (left side)"
|
||||||
if(!completedTasks.contains("Pass a turn"))
|
if(!completedTasks.contains("Pass a turn"))
|
||||||
@ -239,6 +240,18 @@ class WorldScreen(val viewingCiv:CivilizationInfo) : CameraStageBaseScreen() {
|
|||||||
return "Construct an improvement!\nConstruct a Worker unit > Move to a Plains or Grassland tile > " +
|
return "Construct an improvement!\nConstruct a Worker unit > Move to a Plains or Grassland tile > " +
|
||||||
"\n Choose 'Create improvement' > Choose the farm > " +
|
"\n Choose 'Create improvement' > Choose the farm > " +
|
||||||
"\n Leave the worker there until it's finished"
|
"\n Leave the worker there until it's finished"
|
||||||
|
if(!completedTasks.contains("Create a trade route")
|
||||||
|
&& viewingCiv.citiesConnectedToCapital.any { it.civInfo==viewingCiv })
|
||||||
|
game.settings.addCompletedTutorialTask("Create a trade route")
|
||||||
|
if(viewingCiv.cities.size>1 && !completedTasks.contains("Create a trade route"))
|
||||||
|
return "Create a trade route!\nConstruct roads between your capital and another city" +
|
||||||
|
"\nOr, automate your worker and let him get to that eventually"
|
||||||
|
if(viewingCiv.isAtWar() && !completedTasks.contains("Conquer a city"))
|
||||||
|
return "Conquer a city!\nBring an enemy city down to low health > " +
|
||||||
|
"\nEnter the city with a melee unit"
|
||||||
|
if(viewingCiv.getCivUnits().any { it.type.isAirUnit() } && !completedTasks.contains("Move an air unit"))
|
||||||
|
return "Move an air unit!\nSelect an air unit > select another city withing range > " +
|
||||||
|
"\nMove the unit to the other city"
|
||||||
|
|
||||||
return ""
|
return ""
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user