From 60b86decfb2affc1011a839406ffbcc4c4de736b Mon Sep 17 00:00:00 2001 From: Yair Morgenstern Date: Wed, 31 Oct 2018 14:00:49 +0200 Subject: [PATCH] Added tutorials on injured units and workers --- android/assets/jsons/Tutorials_English.json | 18 ++++++++++++++++++ .../com/unciv/ui/worldscreen/WorldScreen.kt | 6 ++++++ 2 files changed, 24 insertions(+) diff --git a/android/assets/jsons/Tutorials_English.json b/android/assets/jsons/Tutorials_English.json index c25df36b..e92df7bc 100644 --- a/android/assets/jsons/Tutorials_English.json +++ b/android/assets/jsons/Tutorials_English.json @@ -290,4 +290,22 @@ ] ] + InjuredUnits:[ + [ + "One of your units is injured!", + "Injured units deal less damage, but recover after turns that they have been inactive", + "Units heal 5 health per turn in enemy territory, 10 in neutral land," + " 15 inside your territory and 20 in your cities" + ] + ] + + Worker:[ + [ + "You have trained a worker!", + "Workers are vital to your cities' growth, since only they can onstruct improvements on tiles", + "Improvements raise the yield of your tiles, allowing your city to produce more and grow faster", + " while working the same amount of tiles!" + ] + ] + } diff --git a/core/src/com/unciv/ui/worldscreen/WorldScreen.kt b/core/src/com/unciv/ui/worldscreen/WorldScreen.kt index 2f6476bc..6f4480ed 100644 --- a/core/src/com/unciv/ui/worldscreen/WorldScreen.kt +++ b/core/src/com/unciv/ui/worldscreen/WorldScreen.kt @@ -120,6 +120,12 @@ class WorldScreen : CameraStageBaseScreen() { } } + if(gameClone.getPlayerCivilization().getCivUnits().any { it.health<100 }) + displayTutorials("InjuredUnits") + + if(gameClone.getPlayerCivilization().getCivUnits().any { it.name=="Worker" }) + displayTutorials("WorkerTrained") + updateTechButton(cloneCivilization) updateDiplomacyButton(cloneCivilization)