Converted Specialist GPP to Counter

Changed jsons of Buildings and Specialists to Great Person names
This commit is contained in:
Yair Morgenstern
2021-07-23 16:15:31 +03:00
parent 0ed47f10a8
commit 570ec1c326
4 changed files with 42 additions and 45 deletions

View File

@ -43,7 +43,7 @@
"name": "Temple of Artemis",
"culture": 1,
"isWonder": true,
"greatPersonPoints": {"production": 1},
"greatPersonPoints": {"Great Engineer": 1},
"uniques": ["+[10]% [Food] [in all cities]", "+[15]% Production when constructing [Ranged] units [in all cities]"],
"requiredTech": "Archery",
"quote": "'It is not so much for its beauty that the forest makes a claim upon men's hearts, as for that subtle something, that quality of air, that emanation from old trees, that so wonderfully changes and renews a weary spirit.' - Robert Louis Stevenson"
@ -65,7 +65,7 @@
"name": "Stonehenge",
"culture": 6,
"isWonder": true,
"greatPersonPoints": {"production": 1},
"greatPersonPoints": {"Great Engineer": 1},
"requiredTech": "Calendar",
"quote": "'Time crumbles things; everything grows old and is forgotten under the power of time' - Aristotle"
},
@ -89,7 +89,7 @@
"name": "The Great Library",
"science": 3,
"culture": 1,
"greatPersonPoints": {"science": 1},
"greatPersonPoints": {"Great Scientist": 1},
"isWonder": true,
"providesFreeBuilding": "Library",
"requiredTech": "Writing",
@ -144,7 +144,7 @@
{
"name": "The Pyramids",
"culture": 1,
"greatPersonPoints": {"production": 1},
"greatPersonPoints": {"Great Engineer": 1},
"isWonder": true,
"uniques": ["[-25]% tile improvement construction time","[2] free [Worker] units appear"],
"requiredTech": "Masonry",
@ -153,7 +153,7 @@
{
"name": "Mausoleum of Halicarnassus",
"culture": 1,
"greatPersonPoints": {"gold": 1},
"greatPersonPoints": {"Great Merchant": 1},
"isWonder": true,
"uniques": ["Provides a sum of gold each time you spend a Great Person",
"[+2 Gold] from [Marble] tiles [in this city]", "[+2 Gold] from [Stone] tiles [in this city]"],
@ -203,7 +203,7 @@
"name": "The Great Lighthouse",
"cost": 185,
"culture": 1,
"greatPersonPoints": {"gold": 1},
"greatPersonPoints": {"Great Merchant": 1},
"isWonder": true,
"providesFreeBuilding": "Lighthouse",
"uniques": ["Must be next to [Coast]", "+[1] Movement for all [{Military} {Water}] units",
@ -241,7 +241,7 @@
},
{
"name": "Hanging Gardens",
"greatPersonPoints": {"culture": 1},
"greatPersonPoints": {"Great Artist": 1},
"food": 6,
"culture": 1,
"isWonder": true,
@ -260,7 +260,7 @@
"name": "Terracotta Army",
"culture": 6,
"isWonder": true,
"greatPersonPoints": {"culture": 1},
"greatPersonPoints": {"Great Artist": 1},
"requiredTech": "Construction",
"quote": "'Regard your soldiers as your children, and they will follow you into the deepest valleys; look on them as your own beloved sons, and they will stand by you even unto death.' - Sun Tzu"
},
@ -287,7 +287,7 @@
{
"name": "The Oracle",
"culture": 3,
"greatPersonPoints": {"science": 1},
"greatPersonPoints": {"Great Scientist": 1},
"isWonder": true,
"uniques": ["Free Social Policy"],
"requiredTech": "Philosophy",
@ -391,7 +391,7 @@
"name": "Petra",
"culture": 1,
"isWonder": true,
"greatPersonPoints": {"production": 1},
"greatPersonPoints": {"Great Engineer": 1},
"uniques": ["Must be next to [Desert]", "[+1 Food, +1 Production] from [Desert] tiles [in this city]", "[-1 Food, -1 Production] from [Flood plains] tiles [in this city]", "[+6 Culture] once [Archaeology] is discovered"],
"requiredTech": "Currency",
"quote": "'...who drinks the water I shall give him, says the Lord, will have a spring inside him welling up for eternal life. Let them bring me to your holy mountain in the place where you dwell. Across the desert and through the mountain to the Canyon of the Crescent Moon...' - Indiana Jones"
@ -406,7 +406,7 @@
{
"name": "Great Wall",
"culture": 3,
"greatPersonPoints": {"production": 1},
"greatPersonPoints": {"Great Engineer": 1},
"isWonder": true,
"providesFreeBuilding": "Walls",
"uniques": ["Enemy land units must spend 1 extra movement point when inside your territory (obsolete upon Dynamite)"],
@ -427,7 +427,7 @@
"cost": 185,
"culture": 1,
"gold": 5,
"greatPersonPoints": {"gold": 1},
"greatPersonPoints": {"Great Merchant": 1},
"isWonder": true,
"uniques": ["Must be next to [Coast]", "[+1 Gold] from [Water] tiles [in this city]"],
"requiredTech": "Iron Working",
@ -455,7 +455,7 @@
{
"name": "Hagia Sophia",
"culture": 1,
"greatPersonPoints": {"culture": 1},
"greatPersonPoints": {"Great Artist": 1},
"isWonder": true,
"uniques": ["[+25]% great person generation [in all cities]"],
"requiredTech": "Theology",
@ -465,7 +465,7 @@
"name": "Chichen Itza",
"culture": 1,
"happiness": 4,
"greatPersonPoints": {"production": 1},
"greatPersonPoints": {"Great Engineer": 1},
"isWonder": true,
"uniques": ["Golden Age length increased by [50]%"],
"requiredTech": "Civil Service",
@ -483,7 +483,7 @@
{
"name": "Machu Picchu",
"gold": 5,
"greatPersonPoints": {"gold": 1},
"greatPersonPoints": {"Great Merchant": 1},
"culture": 1,
"isWonder": true,
"uniques": ["Gold from all trade routes +25%","Must have an owned [Mountain] within [2] tiles"],
@ -568,7 +568,7 @@
{
"name": "Angkor Wat",
"culture": 1,
"greatPersonPoints": {"production": 1},
"greatPersonPoints": {"Great Engineer": 1},
"isWonder": true,
"uniques": ["-[25]% Culture cost of acquiring tiles [in all cities]","-[25]% Gold cost of acquiring tiles [in all cities]"],
"requiredTech": "Education",
@ -599,7 +599,7 @@
{
"name": "Alhambra",
"culture": 1,
"greatPersonPoints": {"culture": 1},
"greatPersonPoints": {"Great Artist": 1},
"isWonder": true,
"providesFreeBuilding": "Castle",
"percentStatBonus": {"culture": 20},
@ -620,7 +620,7 @@
"name": "Notre Dame",
"culture": 3,
"happiness": 10,
"greatPersonPoints": {"gold": 1},
"greatPersonPoints": {"Great Merchant": 1},
"isWonder": true,
"requiredTech": "Physics",
"quote": "'Architecture has recorded the great ideas of the human race. Not only every religious symbol, but every human thought has its page in that vast book.' - Victor Hugo"
@ -659,7 +659,7 @@
"name": "Sistine Chapel",
"culture": 1,
"isWonder": true,
"greatPersonPoints": {"culture": 2},
"greatPersonPoints": {"Great Artist": 2},
"uniques": ["+[25]% [Culture] [in all cities]"],
"requiredTech": "Acoustics",
"quote": "'I live and love in God's peculiar light.' - Michelangelo Buonarroti"
@ -702,7 +702,7 @@
"name": "Forbidden Palace",
"culture": 1,
"isWonder": true,
"greatPersonPoints": {"culture": 1},
"greatPersonPoints": {"Great Artist": 1},
"uniques": ["Unhappiness from population decreased by [10]%"],
"requiredTech": "Banking",
"quote": "'Most of us can, as we choose, make of this world either a palace or a prison' - John Lubbock"
@ -719,7 +719,7 @@
"name": "Leaning Tower of Pisa",
"culture": 1,
"isWonder": true,
"greatPersonPoints": {"culture": 1},
"greatPersonPoints": {"Great Artist": 1},
"uniques": ["[+25]% great person generation [in all cities]", "Free Great Person"],
"requiredTech": "Printing Press",
"quote": "'Don't clap too hard - it's a very old building.' - John Osbourne"
@ -728,7 +728,7 @@
"name": "Himeji Castle",
"culture": 3,
"isWonder": true,
"greatPersonPoints": {"production": 2},
"greatPersonPoints": {"Great Engineer": 2},
"providesFreeBuilding": "Castle",
"uniques": ["+[15]% Strength for units fighting in [Friendly Land]"],
"requiredTech": "Gunpowder",
@ -757,7 +757,7 @@
"name": "Taj Mahal",
"culture": 1,
"happiness": 4,
"greatPersonPoints": {"culture": 2},
"greatPersonPoints": {"Great Artist": 2},
"isWonder": true,
"uniques": ["Empire enters golden age"],
"requiredTech": "Architecture",
@ -766,7 +766,7 @@
{
"name": "Porcelain Tower",
"culture": 1,
"greatPersonPoints": {"science": 2},
"greatPersonPoints": {"Great Scientist": 2},
"isWonder": true,
"uniques": ["Free [Great Scientist] appears","Science gained from research agreements [+50]%"],
"requiredTech": "Architecture",
@ -847,7 +847,7 @@
"name": "Big Ben",
"culture": 1,
"gold": 4,
"greatPersonPoints": {"gold": 2},
"greatPersonPoints": {"Great Merchant": 2},
"isWonder": true,
"uniques": ["Cost of purchasing items in cities reduced by [15]%"],
"requiredTech": "Industrialization",
@ -865,7 +865,7 @@
"name": "Brandenburg Gate",
"culture": 3,
"xpForNewUnits": 15,
"greatPersonPoints": {"science": 2},
"greatPersonPoints": {"Great Scientist": 2},
"isWonder": true,
"uniques": ["Free [Great General] appears"],
"requiredTech": "Military Science",
@ -922,7 +922,7 @@
"name": "Eiffel Tower",
"culture": 1,
"happiness": 5,
"greatPersonPoints": {"gold": 2},
"greatPersonPoints": {"Great Merchant": 2},
"isWonder": true,
"uniques": ["Provides 1 happiness per 2 additional social policies adopted"],
"requiredTech": "Radio",
@ -940,7 +940,7 @@
"name": "Statue of Liberty",
"culture": 1,
"isWonder": true,
"greatPersonPoints": {"production": 2},
"greatPersonPoints": {"Great Engineer": 2},
"uniques": ["[+1 Production] from every specialist"],
"requiredTech": "Replaceable Parts",
"quote": "'Give me your tired, your poor, your huddled masses yearning to breathe free, the wretched refuse of your teeming shore. Send these, the homeless, tempest-tossed to me, I lift my lamp beside the golden door!' - Emma Lazarus"
@ -950,7 +950,7 @@
"happiness": 2,
"culture": 4,
"gold": 6,
"greatPersonPoints": {"gold": 1},
"greatPersonPoints": {"Great Merchant": 1},
"isWonder": true,
"uniques": ["[+1 Happiness, +2 Culture, +3 Gold] from every [Castle]",
"Must have an owned [Mountain] within [2] tiles"],
@ -971,7 +971,7 @@
"name": "Cristo Redentor",
"culture": 5,
"isWonder": true,
"greatPersonPoints": {"culture": 2},
"greatPersonPoints": {"Great Artist": 2},
"uniques": ["Culture cost of adopting new Policies reduced by [10]%"],
"requiredTech": "Plastics",
"quote": "'Come to me, all who labor and are heavy burdened, and I will give you rest.' - New Testament, Matthew 11:28"
@ -998,7 +998,7 @@
"name": "Pentagon",
"isWonder": true,
"culture": 3,
"greatPersonPoints": {"production": 2},
"greatPersonPoints": {"Great Engineer": 2},
"uniques": ["Gold cost of upgrading military units reduced by 33%"],
"requiredTech": "Combined Arms",
"quote": "'In preparing for battle I have always found that plans are useless, but planning is indispensable.' - Dwight D. Eisenhower"
@ -1017,7 +1017,7 @@
{
"name": "Sydney Opera House",
"isWonder": true,
"greatPersonPoints": {"culture": 2},
"greatPersonPoints": {"Great Artist": 2},
"percentStatBonus": {"culture": 50},
"uniques": ["Free Social Policy","Must be next to [Coast]"],
"requiredTech": "Ecology",
@ -1048,7 +1048,7 @@
"name": "CN Tower",
"isWonder": true,
"culture": 1,
"greatPersonPoints": {"gold": 1},
"greatPersonPoints": {"Great Merchant": 1},
"providesFreeBuilding": "Broadcast Tower",
"uniques": ["[+1] population [in all cities]", "[+1 Happiness] [in all cities]"],
"requiredTech": "Telecommunications",
@ -1070,7 +1070,7 @@
{
"name": "Hubble Space Telescope",
"isWonder": true,
"greatPersonPoints": {"science": 1},
"greatPersonPoints": {"Great Scientist": 1},
"providesFreeBuilding": "Spaceship Factory",
// If spaceship parts are changed into units, the spaceship part unique should be changed to
// "+[25]% Production when constructing [Spaceship part] units [in this city]"
@ -1102,7 +1102,7 @@
"name": "United Nations",
"isWonder": true,
"culture": 1,
"greatPersonPoints": {"gold": 2},
"greatPersonPoints": {"Great Merchant": 2},
"uniques": ["Triggers voting for the Diplomatic Victory"],
"quote": "'More than ever before in human history, we share a common destiny. We can master it only if we face it together. And that is why we have the United Nations.' - Kofi Annan"
"requiredTech": "Globalization", // todo doesn't exist yet!

View File

@ -2,25 +2,25 @@
{
"name":"Scientist",
"science":3,
"greatPersonPoints": {"science":3},
"greatPersonPoints": {"Great Scientist":3},
"color": [0,0,255]
},
{
"name":"Merchant",
"gold":3,
"greatPersonPoints": {"gold":3},
"greatPersonPoints": {"Great Merchant":3},
"color": [255,215,0]
},
{
"name":"Artist",
"culture":2,
"greatPersonPoints": {"culture":3},
"greatPersonPoints": {"Great Artist":3},
"color": [160,32,240]
},
{
"name":"Engineer",
"production":2,
"greatPersonPoints": {"production":3},
"greatPersonPoints": {"Great Engineer":3},
"color": [139,69,19]
}
]

View File

@ -323,10 +323,7 @@ class CityInfo {
for ((specialistName, amount) in population.getNewSpecialists())
if (getRuleset().specialists.containsKey(specialistName)) { // To solve problems in total remake mods
val specialist = getRuleset().specialists[specialistName]!!
specialistsCounter.add(
GreatPersonManager.statsToGreatPersonCounter(specialist.greatPersonPoints)
.times(amount)
)
specialistsCounter.add(specialist.greatPersonPoints.times(amount))
}
sourceToGPP["Specialists"] = specialistsCounter

View File

@ -4,6 +4,7 @@ import com.badlogic.gdx.Gdx
import com.badlogic.gdx.files.FileHandle
import com.unciv.JsonParser
import com.unciv.logic.UncivShowableException
import com.unciv.models.Counter
import com.unciv.models.metadata.BaseRuleset
import com.unciv.models.ruleset.tech.TechColumn
import com.unciv.models.ruleset.tech.Technology
@ -15,7 +16,6 @@ import com.unciv.models.ruleset.unit.Promotion
import com.unciv.models.stats.INamed
import com.unciv.models.stats.NamedStats
import com.unciv.models.stats.Stat
import com.unciv.models.stats.Stats
import com.unciv.ui.utils.colorFromRGB
import kotlin.collections.set
@ -474,7 +474,7 @@ object RulesetCache :HashMap<String,Ruleset>() {
class Specialist: NamedStats() {
var color = ArrayList<Int>()
val colorObject by lazy { colorFromRGB(color) }
var greatPersonPoints = Stats()
var greatPersonPoints = Counter<String>()
companion object {
internal fun specialistNameByStat(stat: Stat) = when (stat) {