mirror of
https://github.com/yairm210/Unciv.git
synced 2025-07-19 20:28:56 +07:00
Resolved #1014 - Great Engineers can hurry National Wonders
This commit is contained in:
@ -215,11 +215,14 @@ class UnitActions {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (unit.name == "Great Engineer" && !unit.isEmbarked()) {
|
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",
|
actionList += UnitAction("Hurry Wonder",
|
||||||
unit.currentMovement >0 &&
|
canHurryWonder
|
||||||
tile.isCityCenter() &&
|
|
||||||
tile.getCity()!!.cityConstructions.getCurrentConstruction() is Building &&
|
|
||||||
(tile.getCity()!!.cityConstructions.getCurrentConstruction() as Building).isWonder
|
|
||||||
) {
|
) {
|
||||||
tile.getCity()!!.cityConstructions.apply {
|
tile.getCity()!!.cityConstructions.apply {
|
||||||
addProductionPoints(300 + 30 * tile.getCity()!!.population.population) //http://civilization.wikia.com/wiki/Great_engineer_(Civ5)
|
addProductionPoints(300 + 30 * tile.getCity()!!.population.population) //http://civilization.wikia.com/wiki/Great_engineer_(Civ5)
|
||||||
|
Reference in New Issue
Block a user