New wonders: Mausoleum of Halicarnassus, Statue of Zeus (#2301)

* New wonder: Mausoleum of Halicarnassus

* New wonder: Statue of Zeus

* Obsolete tests are removed
This commit is contained in:
Jack Rainy 2020-04-01 20:12:25 +03:00 committed by GitHub
parent 4ab154ea99
commit dde01738de
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 43 additions and 45 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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) {

View file

@ -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
}
}
}
}

View file

@ -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<UnitAction>, unit: MapUnit, unitTable: UnitTable) {
val action = UnitAction(

View file

@ -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

View file

@ -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<String> = 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<String> = 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<String> = ruleset.terrains.keys