diff --git a/android/assets/jsons/Civ V - Vanilla/Buildings.json b/android/assets/jsons/Civ V - Vanilla/Buildings.json index 0db0527b5f..7e6f1d87c6 100644 --- a/android/assets/jsons/Civ V - Vanilla/Buildings.json +++ b/android/assets/jsons/Civ V - Vanilla/Buildings.json @@ -132,7 +132,7 @@ "culture": 1, "greatPersonPoints": {"production": 1}, "isWonder": true, - "uniques": ["Worker construction increased 25%","Provides 2 free workers"], + "uniques": ["Worker construction increased 25%","[2] free [Worker] units appear"], "requiredTech": "Masonry", "quote": "'O, let not the pains of death which come upon thee enter into my body. I am the god Tem, and I am the foremost part of the sky, and the power which protecteth me is that which is with all the gods forever.' - The Book of the Dead, translated by Sir Ernest Alfred Wallis Budge" }, @@ -667,7 +667,7 @@ "culture": 1, "happiness": 4, "isWonder": true, - "uniques": ["2 free Great Artists appear"], + "uniques": ["[2] free [Great Artist] units appear"], "requiredTech": "Archaeology", "quote": "'Every genuine work of art has as much reason for being as the earth and the sun' - Ralph Waldo Emerson" }, @@ -955,7 +955,7 @@ "isWonder": true, "greatPersonPoints": {"science": 1}, "providesFreeBuilding": "Spaceship Factory", - "uniques": ["2 free great scientists appear", + "uniques": ["[2] free [Great Scientist] units appear", "+[25]% production when building [Spaceship part] in this city"], "requiredTech": "Satellites", "quote": "'The wonder is, not that the field of stars is so vast, but that man has measured it.' - Anatole France" diff --git a/core/src/com/unciv/logic/automation/BarbarianAutomation.kt b/core/src/com/unciv/logic/automation/BarbarianAutomation.kt index be4a2922c9..a094603664 100644 --- a/core/src/com/unciv/logic/automation/BarbarianAutomation.kt +++ b/core/src/com/unciv/logic/automation/BarbarianAutomation.kt @@ -66,7 +66,7 @@ class BarbarianAutomation(val civInfo: CivilizationInfo) { // 3 - trying to attack enemy // if a embarked melee unit can land and attack next turn, do not attack from water. if (BattleHelper.tryDisembarkUnitToAttackPosition(unit)) return - if (BattleHelper.tryAttackNearbyEnemy(unit)) return + if (!unit.type.isCivilian() && BattleHelper.tryAttackNearbyEnemy(unit)) return // 4 - trying to pillage tile or route if (UnitAutomation.tryPillageImprovement(unit)) return diff --git a/core/src/com/unciv/models/ruleset/Building.kt b/core/src/com/unciv/models/ruleset/Building.kt index 74ea67239d..85d75fb502 100644 --- a/core/src/com/unciv/models/ruleset/Building.kt +++ b/core/src/com/unciv/models/ruleset/Building.kt @@ -352,6 +352,7 @@ class Building : NamedStats(), IConstruction { for (unique in uniqueObjects) UniqueTriggerActivation.triggerCivwideUnique(unique, civInfo) + // ALL these are deprecated as of 3.10.10 and are currently here to not break mods relying on them if ("2 free Great Artists appear" in uniques) { civInfo.addUnit("Great Artist", cityConstructions.cityInfo) civInfo.addUnit("Great Artist", cityConstructions.cityInfo) @@ -364,6 +365,8 @@ class Building : NamedStats(), IConstruction { civInfo.addUnit(Constants.worker, cityConstructions.cityInfo) civInfo.addUnit(Constants.worker, cityConstructions.cityInfo) } + + if ("Enemy land units must spend 1 extra movement point when inside your territory (obsolete upon Dynamite)" in uniques) civInfo.updateHasActiveGreatWall() diff --git a/core/src/com/unciv/models/ruleset/Unique.kt b/core/src/com/unciv/models/ruleset/Unique.kt index 9d8410cf80..4121c16c32 100644 --- a/core/src/com/unciv/models/ruleset/Unique.kt +++ b/core/src/com/unciv/models/ruleset/Unique.kt @@ -34,6 +34,12 @@ object UniqueTriggerActivation { if (civInfo.cities.any { it.isCapital() } && (unitName != Constants.settler || !civInfo.isOneCityChallenger())) civInfo.addUnit(unitName, civInfo.getCapital()) } + "[] free [] units appear" -> { + val unitName = unique.params[1] + if (civInfo.cities.any { it.isCapital() } && (unitName != Constants.settler || !civInfo.isOneCityChallenger())) + for (i in 1..unique.params[0].toInt()) + civInfo.addUnit(unitName, civInfo.getCapital()) + } "Free Social Policy" -> civInfo.policies.freePolicies++ "Empire enters golden age" -> civInfo.goldenAges.enterGoldenAge()