mirror of
https://github.com/yairm210/Unciv.git
synced 2025-07-12 08:49:22 +07:00
New uniques for border expansion - "-[]% Gold cost of acquiring tiles []" and "-[]% Culture cost of acquiring tiles []" (#3565)
* no message
* Revert "no message"
This reverts commit 9ece60bd58
.
* Renamed Haka War Dance effect to Intimidation, to make it more applicable to non-Maori Warrior units.
* no message
* Parameterized civUnique for extra experience from combat
* Update build.gradle.kts
* Update BattleDamage.kt
* Update Policies.json
* Update Battle.kt
* Fully parameterized nationwide XP gain
* New parameterized uniques for border expansion - "-[]% Gold cost of acquiring tiles []" and "-[]% Culture cost of acquiring tiles []"
* Parameterized uniques for acquiring new tiles via either culture or gold
* Parameterizing expansion unique - improved calculation method
* Improved parameterization for border expansion uniques
This commit is contained in:
@ -160,7 +160,7 @@
|
|||||||
"xpForNewUnits": 15,
|
"xpForNewUnits": 15,
|
||||||
"hurryCostModifier": 25,
|
"hurryCostModifier": 25,
|
||||||
"maintenance": 1,
|
"maintenance": 1,
|
||||||
"uniques": ["Culture and Gold costs of acquiring new tiles reduced by 25% in this city"],
|
"uniques": ["-[25]% Culture cost of acquiring tiles [in this city]","-[25]% Gold cost of acquiring tiles [in this city]"],
|
||||||
"requiredTech": "Bronze Working"
|
"requiredTech": "Bronze Working"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -532,7 +532,7 @@
|
|||||||
"culture": 1,
|
"culture": 1,
|
||||||
"greatPersonPoints": {"production": 1},
|
"greatPersonPoints": {"production": 1},
|
||||||
"isWonder": true,
|
"isWonder": true,
|
||||||
"uniques": ["Cost of acquiring new tiles reduced by 25%"],
|
"uniques": ["-[25]% Culture cost of acquiring tiles [in all cities]","-[25]% Gold cost of acquiring tiles [in all cities]"],
|
||||||
"requiredTech": "Chivalry",
|
"requiredTech": "Chivalry",
|
||||||
"quote": "'The temple is like no other building in the world. It has towers and decoration and all the refinements which the human genius can conceive of.' - Antonio da Magdalena"
|
"quote": "'The temple is like no other building in the world. It has towers and decoration and all the refinements which the human genius can conceive of.' - Antonio da Magdalena"
|
||||||
},
|
},
|
||||||
|
@ -262,7 +262,7 @@
|
|||||||
"outerColor": [ 28,51,119],
|
"outerColor": [ 28,51,119],
|
||||||
"innerColor": [255,255,255],
|
"innerColor": [255,255,255],
|
||||||
"uniqueName": "Manifest Destiny",
|
"uniqueName": "Manifest Destiny",
|
||||||
"uniques": ["+1 Sight for all land military units", "-50% cost when purchasing tiles"],
|
"uniques": ["+1 Sight for all land military units", "-[50]% Gold cost of acquiring tiles [in all cities]"],
|
||||||
"cities": ["Washington","New York","Boston","Philadelphia","Atlanta","Chicago","Seattle","San Francisco","Los Angeles","Houston",
|
"cities": ["Washington","New York","Boston","Philadelphia","Atlanta","Chicago","Seattle","San Francisco","Los Angeles","Houston",
|
||||||
"Portland","St. Louis","Miami","Buffalo","Detroit","New Orleans","Baltimore","Denver","Cincinnati","Dallas","Memphis",
|
"Portland","St. Louis","Miami","Buffalo","Detroit","New Orleans","Baltimore","Denver","Cincinnati","Dallas","Memphis",
|
||||||
"Cleveland","Kansas City","San Diego","Richmond","Las Vegas","Phoenix","Albuquerque","Minneapolis","Pittsburgh",
|
"Cleveland","Kansas City","San Diego","Richmond","Las Vegas","Phoenix","Albuquerque","Minneapolis","Pittsburgh",
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
{
|
{
|
||||||
"name": "Tradition",
|
"name": "Tradition",
|
||||||
"era": "Ancient era",
|
"era": "Ancient era",
|
||||||
"uniques": ["[+3 Culture] in capital", "Increased rate of border expansion"],
|
"uniques": ["[+3 Culture] in capital", "-[25]% Culture cost of acquiring tiles [in all cities]"],
|
||||||
"policies": [
|
"policies": [
|
||||||
{
|
{
|
||||||
"name": "Aristocracy",
|
"name": "Aristocracy",
|
||||||
|
@ -33,11 +33,17 @@ class CityExpansionManager {
|
|||||||
// The second seems to be more based, so I'll go with that
|
// The second seems to be more based, so I'll go with that
|
||||||
fun getCultureToNextTile(): Int {
|
fun getCultureToNextTile(): Int {
|
||||||
var cultureToNextTile = 6 * (max(0, tilesClaimed()) + 1.4813).pow(1.3)
|
var cultureToNextTile = 6 * (max(0, tilesClaimed()) + 1.4813).pow(1.3)
|
||||||
|
for (unique in cityInfo.civInfo.getMatchingUniques("-[]% Culture cost of acquiring tiles []")) {
|
||||||
|
if (cityInfo.matchesFilter(unique.params[1]))
|
||||||
|
cultureToNextTile *= (100 - unique.params[0].toFloat()) / 100
|
||||||
|
}
|
||||||
|
// Deprecated as of 3.12.10 - replaced with "-[]% Culture cost of acquiring tiles []", either [in capital] or [in this city] or [in all cities]
|
||||||
if (cityInfo.civInfo.hasUnique("Cost of acquiring new tiles reduced by 25%"))
|
if (cityInfo.civInfo.hasUnique("Cost of acquiring new tiles reduced by 25%"))
|
||||||
cultureToNextTile *= 0.75 //Speciality of Angkor Wat
|
cultureToNextTile *= 0.75 //Speciality of Angkor Wat
|
||||||
if (cityInfo.containsBuildingUnique("Culture and Gold costs of acquiring new tiles reduced by 25% in this city"))
|
if (cityInfo.containsBuildingUnique("Culture and Gold costs of acquiring new tiles reduced by 25% in this city"))
|
||||||
cultureToNextTile *= 0.75 // Specialty of Krepost
|
cultureToNextTile *= 0.75 // Specialty of Krepost
|
||||||
if (cityInfo.civInfo.hasUnique("Increased rate of border expansion")) cultureToNextTile *= 0.75
|
if (cityInfo.civInfo.hasUnique("Increased rate of border expansion")) cultureToNextTile *= 0.75
|
||||||
|
|
||||||
return cultureToNextTile.roundToInt()
|
return cultureToNextTile.roundToInt()
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -56,14 +62,18 @@ class CityExpansionManager {
|
|||||||
val distanceFromCenter = tileInfo.aerialDistanceTo(cityInfo.getCenterTile())
|
val distanceFromCenter = tileInfo.aerialDistanceTo(cityInfo.getCenterTile())
|
||||||
var cost = baseCost * (distanceFromCenter - 1) + tilesClaimed() * 5.0
|
var cost = baseCost * (distanceFromCenter - 1) + tilesClaimed() * 5.0
|
||||||
|
|
||||||
|
for (unique in cityInfo.civInfo.getMatchingUniques("-[]% Gold cost of acquiring tiles []")) {
|
||||||
|
if (cityInfo.matchesFilter(unique.params[1]))
|
||||||
|
cost *= (100 - unique.params[0].toFloat()) / 100
|
||||||
|
}
|
||||||
|
// Deprecated as of 3.12.10 - replaced with "-[]% Gold cost of acquiring tiles []", either [in capital] or [in this city] or [in all cities]
|
||||||
if (cityInfo.civInfo.hasUnique("Cost of acquiring new tiles reduced by 25%"))
|
if (cityInfo.civInfo.hasUnique("Cost of acquiring new tiles reduced by 25%"))
|
||||||
cost *= 0.75 //Speciality of Angkor Wat
|
cost *= 0.75 //Speciality of Angkor Wat
|
||||||
if (cityInfo.containsBuildingUnique("Culture and Gold costs of acquiring new tiles reduced by 25% in this city"))
|
if (cityInfo.containsBuildingUnique("Culture and Gold costs of acquiring new tiles reduced by 25% in this city"))
|
||||||
cost *= 0.75 // Specialty of Krepost
|
cost *= 0.75 // Specialty of Krepost
|
||||||
|
|
||||||
if (cityInfo.civInfo.hasUnique("-50% cost when purchasing tiles"))
|
if (cityInfo.civInfo.hasUnique("-50% cost when purchasing tiles"))
|
||||||
cost /= 2
|
cost /= 2
|
||||||
return cost.toInt()
|
return cost.roundToInt()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user