Resolved #1014 - Great Engineers can hurry National Wonders

This commit is contained in:
Yair Morgenstern
2019-09-01 15:13:06 +03:00
parent 62a85cd14a
commit 20493b12b6

View File

@ -215,11 +215,14 @@ class UnitActions {
}
if (unit.name == "Great Engineer" && !unit.isEmbarked()) {
val canHurryWonder = if(unit.currentMovement==0f || !tile.isCityCenter()) false
else {
val currentConstruction = tile.getCity()!!.cityConstructions.getCurrentConstruction()
if(currentConstruction !is Building) false
else currentConstruction.isWonder || currentConstruction.isNationalWonder
}
actionList += UnitAction("Hurry Wonder",
unit.currentMovement >0 &&
tile.isCityCenter() &&
tile.getCity()!!.cityConstructions.getCurrentConstruction() is Building &&
(tile.getCity()!!.cityConstructions.getCurrentConstruction() as Building).isWonder
canHurryWonder
) {
tile.getCity()!!.cityConstructions.apply {
addProductionPoints(300 + 30 * tile.getCity()!!.population.population) //http://civilization.wikia.com/wiki/Great_engineer_(Civ5)