diff --git a/android/Images/BuildingIcons/Mausoleum of Halicarnassus.png b/android/Images/BuildingIcons/Mausoleum of Halicarnassus.png new file mode 100644 index 0000000000..9ed0bd5dae Binary files /dev/null and b/android/Images/BuildingIcons/Mausoleum of Halicarnassus.png differ diff --git a/android/Images/BuildingIcons/Statue of Zeus.png b/android/Images/BuildingIcons/Statue of Zeus.png new file mode 100644 index 0000000000..d3c8acd5e8 Binary files /dev/null and b/android/Images/BuildingIcons/Statue of Zeus.png differ diff --git a/android/assets/jsons/Buildings.json b/android/assets/jsons/Buildings.json index 3538dc0941..9fcc851d63 100644 --- a/android/assets/jsons/Buildings.json +++ b/android/assets/jsons/Buildings.json @@ -144,12 +144,11 @@ "uniques": ["Culture and Gold costs of acquiring new tiles reduced by 25% in this city"], "requiredTech": "Bronze Working" }, - /* { "name": "Statue of Zeus", "culture": 1, "isWonder": true, - "uniques": ["+15% Combat Strenght when attacking Cities."], + "uniques": ["+15% Combat Strength for all units when attacking Cities"], "requiredTech": "Bronze Working" "quote": "'He spoke, the son of Kronos, and nodded his head with the dark brows, and the immortally anointed hair of the great god swept from his divine head, and all Olympos was shaken' - The Iliad" }, @@ -158,11 +157,10 @@ "culture": 1, "greatPersonPoints": {"gold": 1}, "isWonder": true, - "uniques": ["Gain 100 Gold when you use a Great Person.","+2 Gold from every source of Marble and Stone"], + "uniques": ["Provides a sum of gold each time you spend a Great Person", "+2 Gold for each source of Marble and Stone"], "requiredTech": "Masonry" "quote": "'The whole earth is the tomb of heroic men and their story is not given only on stone over their clay but abides everywhere without visible symbol woven into the stuff of other men's lives.' - Pericles" }, - */ // Classical Era diff --git a/android/assets/jsons/translations/Ukrainian.properties b/android/assets/jsons/translations/Ukrainian.properties index 98800c7c06..894785293d 100644 --- a/android/assets/jsons/translations/Ukrainian.properties +++ b/android/assets/jsons/translations/Ukrainian.properties @@ -481,6 +481,7 @@ Received [goldAmount] Gold for capturing [cityName] = Отримано [goldAmou Our proposed trade request is no longer relevant! = Наша торгівельна пропозиція більше не дійсна! [defender] could not withdraw from a [attacker] - blocked. = [defender] не зміг втекти від [attacker], бо був заблокований. [defender] withdrew from a [attacker] = [defender] втік від [attacker] +[building] has provided [amount] Gold! = [building] приносить [amount] золота! # World Screen UI diff --git a/android/assets/jsons/translations/template.properties b/android/assets/jsons/translations/template.properties index 853de79200..efd9d890ee 100644 --- a/android/assets/jsons/translations/template.properties +++ b/android/assets/jsons/translations/template.properties @@ -481,6 +481,7 @@ Received [goldAmount] Gold for capturing [cityName] = Our proposed trade request is no longer relevant! = [defender] could not withdraw from a [attacker] - blocked. = [defender] withdrew from a [attacker] = +[building] has provided [amount] Gold! = # World Screen UI diff --git a/core/src/com/unciv/logic/battle/BattleDamage.kt b/core/src/com/unciv/logic/battle/BattleDamage.kt index c60d5e0faa..d0233faca2 100644 --- a/core/src/com/unciv/logic/battle/BattleDamage.kt +++ b/core/src/com/unciv/logic/battle/BattleDamage.kt @@ -142,6 +142,10 @@ class BattleDamage{ if (policies.isAdopted("Autocracy Complete") && (policies.autocracyCompletedTurns > 0)) modifiers["Autocracy Complete"] = 0.2f + + if (defender is CityCombatant && + attacker.getCivInfo().containsBuildingUnique("+15% Combat Strength for all units when attacking Cities")) + modifiers["Statue of Zeus"] = 0.15f } else if (attacker is CityCombatant) { diff --git a/core/src/com/unciv/logic/map/TileInfo.kt b/core/src/com/unciv/logic/map/TileInfo.kt index 060c7e0285..04a6d37234 100644 --- a/core/src/com/unciv/logic/map/TileInfo.kt +++ b/core/src/com/unciv/logic/map/TileInfo.kt @@ -189,18 +189,23 @@ open class TileInfo { val resourceBuilding = tileMap.gameInfo.ruleSet.buildings[resource.building!!]!! stats.add(resourceBuilding.resourceBonusStats!!) // resource-specific building (eg forge, stable) bonus } - if(resource.resourceType==ResourceType.Strategic + if (resource.resourceType==ResourceType.Strategic && observingCiv.nation.unique == UniqueAbility.SIBERIAN_RICHES) - stats.production+=1 - if(resource.name=="Oil" && city!=null - && city.containsBuildingUnique("+2 Gold for each source of Oil and oasis")) - stats.gold += 2 - if(city!=null && isWater){ - if(city.containsBuildingUnique("+1 production from all sea resources worked by the city")) - stats.production+=1 - if(city.containsBuildingUnique("+1 production and gold from all sea resources worked by the city")){ - stats.production+=1 - stats.gold+=1 + stats.production += 1 + if (city != null) { + if (resource.name == "Oil" + && city.containsBuildingUnique("+2 Gold for each source of Oil and oasis")) + stats.gold += 2 + if ((resource.name == "Marble" || resource.name == "Stone") + && city.containsBuildingUnique("+2 Gold for each source of Marble and Stone")) + stats.gold += 2 + if (isWater) { + if(city.containsBuildingUnique("+1 production from all sea resources worked by the city")) + stats.production += 1 + if(city.containsBuildingUnique("+1 production and gold from all sea resources worked by the city")){ + stats.production += 1 + stats.gold += 1 + } } } } diff --git a/core/src/com/unciv/ui/worldscreen/unit/UnitActions.kt b/core/src/com/unciv/ui/worldscreen/unit/UnitActions.kt index 3ef970b7e2..34a3f354ea 100644 --- a/core/src/com/unciv/ui/worldscreen/unit/UnitActions.kt +++ b/core/src/com/unciv/ui/worldscreen/unit/UnitActions.kt @@ -5,6 +5,7 @@ import com.unciv.Constants import com.unciv.UncivGame import com.unciv.logic.automation.UnitAutomation import com.unciv.logic.automation.WorkerAutomation +import com.unciv.logic.civilization.CivilizationInfo import com.unciv.logic.map.MapUnit import com.unciv.logic.map.RoadStatus import com.unciv.logic.map.TileInfo @@ -277,6 +278,7 @@ object UnitActions { uncivSound = UncivSound.Chimes, action = { unit.civInfo.tech.hurryResearch() + addGoldPerGreatPersonUsage(unit.civInfo) unit.destroy() }.takeIf { unit.civInfo.tech.currentTechnologyName() != null && unit.currentMovement > 0 }) } @@ -287,6 +289,7 @@ object UnitActions { uncivSound = UncivSound.Chimes, action = { unit.civInfo.goldenAges.enterGoldenAge() + addGoldPerGreatPersonUsage(unit.civInfo) unit.destroy() }.takeIf { unit.currentMovement > 0 }) } @@ -306,6 +309,7 @@ object UnitActions { addProductionPoints(300 + 30 * tile.getCity()!!.population.population) //http://civilization.wikia.com/wiki/Great_engineer_(Civ5) constructIfEnough() } + addGoldPerGreatPersonUsage(unit.civInfo) unit.destroy() }.takeIf { canHurryWonder }) } @@ -327,6 +331,7 @@ object UnitActions { val influenceEarned = Regex("\\d+").find(relevantUnique)!!.value.toInt() tile.owningCity!!.civInfo.getDiplomacyManager(unit.civInfo).influence += influenceEarned unit.civInfo.addNotification("Your trade mission to [${tile.owningCity!!.civInfo}] has earned you [${goldEarned.toInt()}] gold and [$influenceEarned] influence!", null, Color.GOLD) + addGoldPerGreatPersonUsage(unit.civInfo) unit.destroy() }.takeIf { canConductTradeMission }) } @@ -354,12 +359,24 @@ object UnitActions { city.cityStats.update() city.civInfo.updateDetailedCivResources() } + addGoldPerGreatPersonUsage(unit.civInfo) unit.destroy() }.takeIf { unit.currentMovement > 0f && !tile.isWater && !tile.isCityCenter() && !tile.getLastTerrain().impassable }) } return null } + private fun addGoldPerGreatPersonUsage(civInfo: CivilizationInfo) { + val uniqueText = "Provides a sum of gold each time you spend a Great Person" + val cityWithMausoleum = civInfo.cities.firstOrNull { it.containsBuildingUnique(uniqueText) } + ?: return + val goldEarned = (100 * civInfo.gameInfo.gameParameters.gameSpeed.modifier).toInt() + civInfo.gold += goldEarned + + val mausoleum = cityWithMausoleum.cityConstructions.getBuiltBuildings().first { it.uniques.contains(uniqueText) } + civInfo.addNotification("[${mausoleum.name}] has provided [$goldEarned] Gold!", cityWithMausoleum.location, Color.GOLD) + } + private fun addFortifyActions(actionList: ArrayList, unit: MapUnit, unitTable: UnitTable) { val action = UnitAction( diff --git a/docs/Credits.md b/docs/Credits.md index 97ecd13eea..b69ab1a342 100644 --- a/docs/Credits.md +++ b/docs/Credits.md @@ -169,6 +169,8 @@ Unless otherwise specified, all the following are from [the Noun Project](https: * [Paper](https://thenounproject.com/term/paper/1443472/) By anam * [Circus](https://thenounproject.com/term/circus/743734/) By Ralph Schmitzer * [Stonehenge](https://thenounproject.com/term/stonehenge/543289/) By icon 54 +* [Ho Chi Minh mausoleum](https://thenounproject.com/thanhloc1009/collection/asia-landmark/?i=2412921) By Phạm Thanh Lộc for Mausoleum of Halicarnassus +* Icon for Statue of Zeus made by [JackRainy](https://github.com/JackRainy), based on [King](https://thenounproject.com/eucalyp/collection/game-elements-glyph1/?i=3155251) By Eucalyp ### Classical Era diff --git a/tests/src/com/unciv/testing/TranslationTests.kt b/tests/src/com/unciv/testing/TranslationTests.kt index 12cd57f103..2da10c3aeb 100644 --- a/tests/src/com/unciv/testing/TranslationTests.kt +++ b/tests/src/com/unciv/testing/TranslationTests.kt @@ -45,36 +45,6 @@ class TranslationTests { allUnitActionsHaveTranslation) } - @Test - fun allBuildingsHaveTranslation() { - val allBuildingsHaveTranslation = allStringAreTranslated(ruleset.buildings.keys) - Assert.assertTrue("This test will only pass when there is a translation for all buildings", - allBuildingsHaveTranslation) - } - - @Test - fun allBuildingUniquesHaveTranslation() { - val strings: MutableSet = HashSet() - for (building in ruleset.buildings.values) { - strings.addAll(building.uniques) - } - val allStringsHaveTranslation = allStringAreTranslated(strings) - Assert.assertTrue("This test will only pass when there is a translation for all building uniques", - allStringsHaveTranslation) - } - - @Test - fun allBuildingQuotesHaveTranslation() { - val strings: MutableSet = HashSet() - for (building in ruleset.buildings.values) { - if (building.quote == "") continue - strings.add(building.quote) - } - val allStringsHaveTranslation = allStringAreTranslated(strings) - Assert.assertTrue("This test will only pass when there is a translation for all building quotes", - allStringsHaveTranslation) - } - @Test fun allTerrainsHaveTranslation() { val strings: Set = ruleset.terrains.keys