diff --git a/android/assets/jsons/Nations.json b/android/assets/jsons/Nations.json index 289f587c..3aee1422 100644 --- a/android/assets/jsons/Nations.json +++ b/android/assets/jsons/Nations.json @@ -5,6 +5,7 @@ leaderName:"Nebuchadnezzar II", adjective:["Babylonian"], startBias:["Avoid Tundra"], + preferredVictoryType:"Scientific", startIntroPart1: "May the blessings of heaven be upon you, O great Nebuchadnezzar, father of mighty and ancient Babylon! Young was the world when Sargon built Babylon some five thousand years ago, long did it grow and prosper, gaining its first empire the eighteenth century BC, under godlike Hammurabi, the giver of law. Although conquered by the Kassites and then by the Assyrians, Babylon endured, emerging phoenix-like from its ashes of destruction and regaining its independence despite its many enemies. Truly was Babylon the center of arts and learning in the ancient world. O Nebuchadnezzar, your empire endured but a short time after your death, falling to the mighty Persians, and then to the Greeks, until the great city was destroyed by 141 BC.", startIntroPart2: "But is Babylon indeed gone forever, great Nebuchadnezzar? Your people look to you to bring the empire back to life once more. Will you accept the challenge? Will you build a civilization that will stand the test of time?", @@ -40,6 +41,7 @@ leaderName:"Alexander", adjective:["Greek"], startBias:["Coast"], + // preferredVictoryType:"Diplomatic", startIntroPart1: "May the blessings of the gods be upon you, oh great King Alexander! You are the ruler of the mighty Greek nation. Your people lived for so many years in isolated city-states - legendary cities such as Athens, Sparta, Thebes - where they gave the world many great things, such as democracy, philosophy, ragedy, art and architecture, the very foundation of Western Civilization. Although few in number and often hostile to each other, in the 5th century BC they were able to defeat their much larger neighbor, Persia, on land and sea." startIntroPart2: "Alexander, your people stand ready to march to war, to spread the great Greek culture to millions and to bring you everlasting glory. Are you ready to accept your destiny, King Alexander? Will you lead your people to triumph and greatness? Can you build a civilization that will stand the test of time?" @@ -76,6 +78,7 @@ name:"China", leaderName:"Wu Zetian", adjective:["Chinese"], + preferredVictoryType:"Scientific", startIntroPart1: "The Blessings of Heaven be upon you. Empress Wu Zetian, most beautiful and haughty ruler of China! Oh great Empress, whose shadow causes the flowers to blossom and the rivers to flow! You are the leader of the Chinese, the oldest and the greatest civilization that humanity has ever produced. China's history stretches back into the mists of time, its people achieving many great things long before the other upstart civilizations were even conceived. China's contributions to the arts and sciences are too many and too wondrous to do justice to - the printing press, gunpowder, the works of Confucius - these are but a few of the gifts China has given to an undeserving world!" startIntroPart2: "You, great Queen, who, with cunning and beauty, rose from the position of lowly concubine to that of Divine Empress - your people call out to you to lead them! Great China is once again beset on all sides by barbarians. Can you defeat all your many foes and return your country to greatness? Can you build a civilization to stand the test of time?" @@ -111,6 +114,7 @@ leaderName:"Ramesses II", adjective:["Egyptian"], startBias:["Avoid Jungle","Avoid Forest"], + preferredVictoryType:"Cultural", startIntroPart1: "We greet thee, oh great Ramesses, Pharaoh of Egypt, who causes the sun to rise and the Nile to flow, and who blesses his fortunate people with all the good things of life! Oh great lord, from time immemorial your people lived on the banks of the Nile river, where they brought writing to the world, and advanced mathematics, sculpture, and architecture. Thousands of years ago they created the great monuments which still stand tall and proud.", startIntroPart2: "Oh, Ramesses, for uncounted years your people endured, as other petty nations around them have risen and then fallen into dust. They look to you to lead them once more into greatness. Can you honor the gods and bring Egypt back to her rightful place at the very center of the world? Can you build a civilization that will stand the test of time?", @@ -146,6 +150,7 @@ leaderName:"Elizabeth", adjective:["English"], startBias:["Coast"], + //preferredVictoryType:"Diplomatic", startIntroPart1: "Praises upon her serene highness, Queen Elizabeth Gloriana. You lead and protect the celebrated maritime nation of England. England is an ancient land, settled as early as 35,000 years ago. The island has seen countless waves of invaders, each in turn becoming a part of the fabric of the people. Although England is a small island, for many years your people dominated the world stage. Their matchless navy, brilliant artists and shrewd merchants, giving them power and influence far in excess of their mere numbers." startIntroPart2: "Queen Elizabeth, will you bring about a new golden age for the English people? They look to you once more to return peace and prosperity to the nation. Will you take up the mantle of greatness? Can you build a civilization that will stand the test of time?" @@ -180,6 +185,7 @@ name:"France", leaderName:"Napoleon", adjective:["French"], + preferredVictoryType:"Cultural", startIntroPart1: "Long life and triumph to you, First Consul and Emperor of France, Napoleon I, ruler of the French people. France lies at the heart of Europe. Long has Paris been the world center of culture, arts and letters. Although surrounded by competitors - and often enemies - France has endured as a great nation. Its armies have marched triumphantly into battle from one end of the world to the other, its soldiers and generals among the best in history." startIntroPart2: "Napoleon Bonaparte, France yearns for you to rebuild your empire, to lead her once more to glory and greatness, to make France once more the epicenter of culture and refinement. Emperor, will you ride once more against your foes? Can you build a civilization that will stand the test of time?" @@ -215,6 +221,7 @@ leaderName:"Catherine", adjective:["Russian"], startBias:["Tundra"], + preferredVictoryType:"Scientific", startIntroPart1: "Greetings upon thee, Your Imperial Majesty Catherine, wondrous Empress of all the Russias. At your command lies the largest country in the world. Mighty Russia stretches from the Pacific Ocean in the east to the Baltic Sea in the west. Despite wars, droughts, and every manner of disaster the heroic Russian people survive and prosper, their artists and scientists among the best in the world. The Empire today remains one of the strongest ever seen in human history - a true superpower, with the greatest destructive force ever devised at her command." startIntroPart2: "Catherine, your people look to you to bring forth glorious days for Russia and her people, to revitalize the land and recapture the wonder of the Enlightenment. Will you lead your people once more into greatness? Can you build a civilization that will stand the test of time?" @@ -249,6 +256,7 @@ name:"Rome", leaderName:"Augustus Caesar", adjective:["Roman"], + preferredVictoryType:"Scientific", startIntroPart1: "The blessings of the gods be upon you, Caesar Augustus, emperor of Rome and all her holdings. Your empire was the greatest and longest lived of all in Western civilization. And your people single handedly shaped its culture, law, art, and warfare like none other, before or since. Through years of glorious conquest, Rome came to dominate all the lands of the Mediterranean from Spain in the west to Syria in the east. And her dominion would eventually expand to cover much of England and northern Germany. Roman art and architecture still awe and inspire the world. And she remains the envy of all lesser civilizations who have followed." startIntroPart2: "O mighty emperor, your people turn to you to once more reclaim the glory of Rome! Will you see to it that your empire rises again, bringing peace and order to all? Will you make Rome once again center of the world? Can you build a civilization that will stand the test of time?" @@ -284,6 +292,7 @@ leaderName:"Harun al-Rashid", adjective:["Arabian"], startBias:["Desert"], + preferredVictoryType:"Scientific", startIntroPart1: "Blessings of God be upon you oh great caliph Harun al-Rashid, leader of the pious Arabian people! The Muslim empire, the Caliphate was born in the turbulent years after the death of the prophet Muhammad in 632 AD, as his followers sought to extend the rule of God to all of the people of the earth. The caliphate grew mighty indeed at the height of its power, ruling Spain, North Africa, the Middle East, Anatolia, the Balkans and Persia. An empire as great as or even greater than that of Rome. The arts and sciences flourished in Arabia during the Middle Ages, even as the countries of Europe descended into ignorance and chaos. The Caliphate survived for six hundred years, until finally succumbing to attack from the Mongols, those destroyers of Empires." startIntroPart2: "Great Caliph Harun al Rashid, your people look to you to return them to greatness! To make Arabia once again an enlightened land of arts and knowledge, a powerful nation who needs fear no enemy! Oh Caliph, will you take up the challenge? Can you build a civilization that will stand the test of time?" @@ -318,6 +327,7 @@ name:"America", leaderName:"Washington", adjective:["American"], + preferredVictoryType:"Scientific", startIntroPart1: "Welcome President Washington! You lead the industrious American civilization! Formed in the conflagration of revolution in the 18th century, within a hundred years, the young nation became embroiled in a terrible civil war that nearly tore the country apart, but it was just a few short years later in the 20th century that the United States reached the height of its power, emerging triumphant and mighty from the two terrible wars that destroyed so many other great nations. The United States is a nation of immigrants, filled with optimism and determination. They lack only a leader to help them fulfill their promise." startIntroPart2: "President Washington, can you lead the American people to greatness? Can you build a civilization that will stand the test of time?" @@ -353,6 +363,7 @@ leaderName:"Oda Nobunaga", adjective:["Japanese"], startBias:["Coast"], + preferredVictoryType:"Domination", startIntroPart1: "Blessings upon you, noble Oda Nobunaga, ruler of Japan, the land of the Rising Sun! May you long walk among its flowering blossoms. The Japanese are an island people, proud and pious with a rich culture of arts and letters. Your civilization stretches back thousands of years, years of bloody warfare, expansion and isolation, great wealth and great poverty. In addition to their prowess on the field of battle, your people are also immensely industrious, and their technological innovation and mighty factories are the envy of lesser people everywhere." startIntroPart2: "Legendary damiyo, will you grab the reins of destiny? Will you bring your family and people the honor and glory they deserve? Will you once again pick up the sword and march to triumph? Will you build a civilization that stands the test of time?" @@ -379,13 +390,17 @@ secondaryColor:[185,0,0], uniqueName:"Bushido" unique: "Units fight as though they were at full strength even when damaged", - cities:["Kyoto","Osaka","Tokyo","Satsuma","Kagoshima","Nara","Nagoya","Izumo","Nagasaki","Yokohama","Shimonoseki","Matsuyama","Sapporo","Hakodate","Ise","Toyama","Fukushima","Suo","Bizen","Echizen","Izumi","Omi","Echigo","Kozuke","Sado","Kobe","Nagano","Hiroshima","Takayama","Akita","Fukuoka","Aomori","Kamakura","Kochi","Naha","Sendai","Gifu","Yamaguchi","Ota","Tottori"] + cities:["Kyoto","Osaka","Tokyo","Satsuma","Kagoshima","Nara","Nagoya","Izumo","Nagasaki","Yokohama", + "Shimonoseki","Matsuyama","Sapporo","Hakodate","Ise","Toyama","Fukushima","Suo","Bizen","Echizen", + "Izumi","Omi","Echigo","Kozuke","Sado","Kobe","Nagano","Hiroshima","Takayama","Akita","Fukuoka","Aomori", + "Kamakura","Kochi","Naha","Sendai","Gifu","Yamaguchi","Ota","Tottori"] }, { name:"India", leaderName:"Gandhi", adjective:["Indian"], startBias:["Grassland"], + preferredVictoryType:"Cultural", startIntroPart1: "Greetings, President Mahatma Gandhi, great souled leader of India! You are the ruler of one of the oldest countries in the world with history stretching back almost 10'000 years. A spiritual country, India is the birthplace of three of the world's great religions - Hinduism, Buddhism and Jainism. This is a passionate land of music and color, a land of great wealth and grinding poverty. For centuries, India was divided into kingdoms who fought constantly with each other and against outside invaders. That was, horever, after empires such as Maratha, Maurya and Gupta. In the 12th century AD, India was conquered by Muslim Turks fled from the Mongols. In the early 17th century, the English arrived, and thought a combination of shrewd diplomacy and technological supeiority, they conquered your fragmented nation. England remained in power for some two centuries until driven out by a rising wave of Indian nationalism, a peaceful rebellion unlike any before seen in history, one led by you!" startIntroPart2: "Gandhi, your people look to you to lead them to even greater heights of glory! Can you help your people realize their great potential, to once again become the world's center of arts, culture and religion? Can you build a civilization that will stand the test of time?" @@ -420,6 +435,7 @@ name:"Germany", leaderName:"Otto von Bismark", adjective:["German"], + preferredVictoryType:"Scientific", startIntroPart1: "Hail mighty Bismark, first canchellor of Germany and her empire! Germany is an upstart nation, fashioned from the ruins of the Holy Roman Empire and finally unified in 1871, a little more than a century ago. The German people have proven themselves to be creative, industrious a ferocious warriors. Despite enduring great catastrophes in the first half of the 20th century, Germany remains a worldwide economic, artistic and technological leader." startIntroPart2: "Great Prince Bismark, the German people look up too you to lead them to greater days of glory. Their determination is strong, and now they turn to you, their beloved iron chancellor, to guide them once more. Will you rile and conquer through blood and iron, or foster the Germanic arts and industry? Can you build a civilization that will stand the test of time?" @@ -460,7 +476,7 @@ adjective:["Aztec"], startBias:["Jungle"], - startIntroPart1: "Welcome, o divine Montezuma! We grovel in awe at your magnificence! May the heaven shower all manner of good things upon you all the days of your life! Your are the leader of the mighty Aztec people, wandering nomads from a lost home in the north who in the 12th century came to live in the mesa central in the heart of what would come to be call Mexico. Surrounded by many tribes fighting to control the rich land surrounding the sacred lakes of Texoco, Xaltocan and Zampango. Through cunning alliances and martial prowess, within a mere two hundred years, the Aztecs came to dominate the Central American basin, ruling a mighty empire stretching from sea to sea. But the empire fell soon under the assault of the accursed Spaniards, wielding fiendish weapons the likes of which your faithful warriors had never seen." + startIntroPart1: "Welcome, O divine Montezuma! We grovel in awe at your magnificence! May the heaven shower all manner of good things upon you all the days of your life! Your are the leader of the mighty Aztec people, wandering nomads from a lost home in the north who in the 12th century came to live in the mesa central in the heart of what would come to be call Mexico. Surrounded by many tribes fighting to control the rich land surrounding the sacred lakes of Texoco, Xaltocan and Zampango. Through cunning alliances and martial prowess, within a mere two hundred years, the Aztecs came to dominate the Central American basin, ruling a mighty empire stretching from sea to sea. But the empire fell soon under the assault of the accursed Spaniards, wielding fiendish weapons the likes of which your faithful warriors had never seen." startIntroPart2: "O great king Montezuma, your people call upon you once more, to rise up and lead them to glory, bring them wealth and power, and give them dominion over their foes and rivals. Will you answer their call, glorious leader? Will you build a civilization that stands the test of time?" declaringWar:"Xi-miqa-can! Xi-miqa-can! Xi-miqa-can! (Die, die, die!)" diff --git a/core/src/com/unciv/logic/automation/Automation.kt b/core/src/com/unciv/logic/automation/Automation.kt index 094db807..93cc93f8 100644 --- a/core/src/com/unciv/logic/automation/Automation.kt +++ b/core/src/com/unciv/logic/automation/Automation.kt @@ -8,6 +8,7 @@ import com.unciv.logic.city.CityInfo import com.unciv.logic.civilization.CityAction import com.unciv.logic.civilization.CivilizationInfo import com.unciv.logic.map.TileInfo +import com.unciv.models.gamebasics.VictoryType import com.unciv.models.gamebasics.unit.BaseUnit import com.unciv.models.gamebasics.unit.UnitType import com.unciv.models.stats.Stat @@ -87,6 +88,7 @@ class Automation { && cityInfo.getTiles().any { it.isWater && it.hasViewableResource(cityInfo.civInfo) && it.improvement == null } val isAtWar = cityInfo.civInfo.isAtWar() + val preferredVictoryType = cityInfo.civInfo.getNation().preferredVictoryType data class ConstructionChoice(val choice:String, var choiceModifier:Float){ val remainingWork:Int = getRemainingWork(choice) @@ -125,7 +127,10 @@ class Automation { val scienceBuilding = buildableNotWonders.filter { it.isStatRelated(Stat.Science) } .minBy{it.cost} if (scienceBuilding!=null) { - val choice = ConstructionChoice(scienceBuilding.name,1.1f) + var modifier = 1.1f + if(preferredVictoryType==VictoryType.Scientific) + modifier*=1.4f + val choice = ConstructionChoice(scienceBuilding.name,modifier) relativeCostEffectiveness.add(choice) } @@ -143,7 +148,10 @@ class Automation { val wartimeBuilding = buildableNotWonders.filter { it.xpForNewUnits>0 || it.cityStrength>0 } .minBy { it.cost } if (wartimeBuilding!=null) { - relativeCostEffectiveness.add(ConstructionChoice(wartimeBuilding.name,0.9f)) + var modifier = 0.9f + if(preferredVictoryType==VictoryType.Domination) + modifier *= 1.3f + relativeCostEffectiveness.add(ConstructionChoice(wartimeBuilding.name,modifier)) } //Wonders @@ -154,6 +162,14 @@ class Automation { relativeCostEffectiveness.add(ConstructionChoice(wonder.name,3.5f / (citiesBuildingWonders + 1))) } + // culture buildings + val cultureBuilding = buildableNotWonders.filter { it.isStatRelated(Stat.Culture) }.minBy { it.cost } + if(cultureBuilding!=null){ + var modifier = 0.8f + if(preferredVictoryType==VictoryType.Cultural) modifier =1.4f + relativeCostEffectiveness.add(ConstructionChoice(cultureBuilding.name, modifier)) + } + //other buildings val other = buildableNotWonders.minBy{it.cost} if (other!=null) { diff --git a/core/src/com/unciv/logic/automation/NextTurnAutomation.kt b/core/src/com/unciv/logic/automation/NextTurnAutomation.kt index b6e35363..5f78e866 100644 --- a/core/src/com/unciv/logic/automation/NextTurnAutomation.kt +++ b/core/src/com/unciv/logic/automation/NextTurnAutomation.kt @@ -9,6 +9,7 @@ import com.unciv.logic.civilization.diplomacy.RelationshipLevel import com.unciv.logic.map.MapUnit import com.unciv.logic.trade.* import com.unciv.models.gamebasics.GameBasics +import com.unciv.models.gamebasics.VictoryType import com.unciv.models.gamebasics.tech.Technology import com.unciv.models.gamebasics.tr import kotlin.math.min @@ -352,6 +353,7 @@ class NextTurnAutomation{ private fun trainSettler(civInfo: CivilizationInfo) { if(civInfo.isCityState()) return if(civInfo.isAtWar()) return // don't train settlers when you could be training troops. + if(civInfo.getNation().preferredVictoryType==VictoryType.Cultural && civInfo.cities.size >3) return if (civInfo.cities.any() && civInfo.happiness > civInfo.cities.size + 5 && civInfo.getCivUnits().none { it.name == Constants.settler } diff --git a/core/src/com/unciv/models/gamebasics/Building.kt b/core/src/com/unciv/models/gamebasics/Building.kt index b59204df..7d1d6a79 100644 --- a/core/src/com/unciv/models/gamebasics/Building.kt +++ b/core/src/com/unciv/models/gamebasics/Building.kt @@ -169,8 +169,9 @@ class Building : NamedStats(), IConstruction{ } override fun getProductionCost(adoptedPolicies: HashSet): Int { - return if (!isWonder && culture != 0f && adoptedPolicies.contains("Piety")) (cost * 0.85).toInt() - else cost + if (!isWonder && culture != 0f && adoptedPolicies.contains("Piety")) + return (cost * 0.85).toInt() + else return cost } override fun getGoldCost(civInfo: CivilizationInfo, baseCost: Boolean): Int { diff --git a/core/src/com/unciv/models/gamebasics/Nation.kt b/core/src/com/unciv/models/gamebasics/Nation.kt index ffe69fff..6a394669 100644 --- a/core/src/com/unciv/models/gamebasics/Nation.kt +++ b/core/src/com/unciv/models/gamebasics/Nation.kt @@ -5,6 +5,13 @@ import com.unciv.logic.civilization.CityStateType import com.unciv.models.stats.INamed import com.unciv.ui.utils.colorFromRGB +enum class VictoryType{ + Neutral, + Cultural, + Domination, + Scientific +} + class Nation : INamed { override lateinit var name: String var translatedName="" @@ -18,6 +25,7 @@ class Nation : INamed { else "[$leaderName] of [${getNameTranslation()}]" var cityStateType: CityStateType?=null + var preferredVictoryType:VictoryType = VictoryType.Neutral var declaringWar="" var attacked="" var defeated=""