From bfe43b67c1c9ff60962f7e00593b9a2333f7d5f2 Mon Sep 17 00:00:00 2001 From: Yair Morgenstern Date: Tue, 17 Apr 2018 23:58:10 +0300 Subject: [PATCH] Added Settler and Worker enemy actions --- core/src/com/unciv/logic/GameInfo.kt | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/core/src/com/unciv/logic/GameInfo.kt b/core/src/com/unciv/logic/GameInfo.kt index bdb3e24c92..b633fd91f9 100644 --- a/core/src/com/unciv/logic/GameInfo.kt +++ b/core/src/com/unciv/logic/GameInfo.kt @@ -80,6 +80,17 @@ class GameInfo { private fun automateMoves(civInfo: CivilizationInfo) { for(unit in civInfo.getCivUnits()){ + if(unit.name=="Settler") { + UnitActions().getUnitActions(unit, UnCivGame.Current.worldScreen!!).first { it.name == "Found city" }.action() + continue + } + + if(unit.name=="Worker") { + unit.doAutomatedAction() + continue + } + + fun healUnit(){ // If we're low on health then heal // todo: go to a more defensible place if there is one