mirror of
https://github.com/yairm210/Unciv.git
synced 2025-09-30 23:41:03 -04:00
Great person uniques can be added to any modded unit
This commit is contained in:
parent
40325a38b4
commit
58059fc59b
@ -283,7 +283,7 @@ object UnitActions {
|
|||||||
|
|
||||||
private fun addGreatPersonActions(unit: MapUnit, actionList: ArrayList<UnitAction>, tile: TileInfo) {
|
private fun addGreatPersonActions(unit: MapUnit, actionList: ArrayList<UnitAction>, tile: TileInfo) {
|
||||||
|
|
||||||
if (unit.name == "Great Scientist" && !unit.isEmbarked()) {
|
if (unit.hasUnique("Can hurry technology research") && !unit.isEmbarked()) {
|
||||||
actionList += UnitAction(
|
actionList += UnitAction(
|
||||||
type = UnitActionType.HurryResearch,
|
type = UnitActionType.HurryResearch,
|
||||||
uncivSound = UncivSound.Chimes,
|
uncivSound = UncivSound.Chimes,
|
||||||
@ -305,7 +305,7 @@ object UnitActions {
|
|||||||
}.takeIf { unit.currentMovement > 0 })
|
}.takeIf { unit.currentMovement > 0 })
|
||||||
}
|
}
|
||||||
|
|
||||||
if (unit.name == "Great Engineer" && !unit.isEmbarked()) {
|
if (unit.hasUnique("Can speed up construction of a wonder") && !unit.isEmbarked()) {
|
||||||
val canHurryWonder = if (unit.currentMovement == 0f || !tile.isCityCenter()) false
|
val canHurryWonder = if (unit.currentMovement == 0f || !tile.isCityCenter()) false
|
||||||
else {
|
else {
|
||||||
val currentConstruction = tile.getCity()!!.cityConstructions.getCurrentConstruction()
|
val currentConstruction = tile.getCity()!!.cityConstructions.getCurrentConstruction()
|
||||||
@ -325,7 +325,8 @@ object UnitActions {
|
|||||||
}.takeIf { canHurryWonder })
|
}.takeIf { canHurryWonder })
|
||||||
}
|
}
|
||||||
|
|
||||||
if (unit.name == "Great Merchant" && !unit.isEmbarked()) {
|
if (unit.hasUnique("Can undertake a trade mission with City-State, giving a large sum of gold and [30] Influence")
|
||||||
|
&& !unit.isEmbarked()) {
|
||||||
val canConductTradeMission = tile.owningCity?.civInfo?.isCityState() == true
|
val canConductTradeMission = tile.owningCity?.civInfo?.isCityState() == true
|
||||||
&& tile.owningCity?.civInfo?.isAtWarWith(unit.civInfo) == false
|
&& tile.owningCity?.civInfo?.isAtWarWith(unit.civInfo) == false
|
||||||
&& unit.currentMovement > 0
|
&& unit.currentMovement > 0
|
||||||
|
Loading…
x
Reference in New Issue
Block a user