Bring Legion Unit closer to wiki? (#2439)

This commit is contained in:
SomeTroglodyte 2020-04-17 09:15:41 +02:00 committed by GitHub
parent fce4b41aaa
commit 64ec6bd26e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View file

@ -324,7 +324,6 @@
"cost": 75,
"requiredTech": "Iron Working",
"upgradesTo": "Longswordsman",
"obsoleteTech": "Steel",
"requiredResource": "Iron",
"uniques": ["Can construct roads"],
"hurryCostModifier": 20,

View file

@ -110,16 +110,17 @@ object UnitActions {
}
private fun addConstructRoadsAction(unit: MapUnit, tile: TileInfo, actionList: ArrayList<UnitAction>) {
val improvement = RoadStatus.Road.improvement(unit.civInfo.gameInfo.ruleSet) ?: return
if (unit.hasUnique("Can construct roads")
&& tile.roadStatus == RoadStatus.None
&& tile.improvementInProgress != "Road"
&& tile.isLand
&& unit.civInfo.tech.isResearched(RoadStatus.Road.improvement(unit.civInfo.gameInfo.ruleSet)!!.techRequired!!))
&& (improvement.techRequired==null || unit.civInfo.tech.isResearched(improvement.techRequired!!)))
actionList += UnitAction(
type = UnitActionType.ConstructRoad,
action = {
tile.improvementInProgress = "Road"
tile.turnsToImprovement = 4
tile.turnsToImprovement = improvement.getTurnsToBuild(unit.civInfo)
}.takeIf { unit.currentMovement > 0 })
}