From 42e16ec80ac3d7b2332bb4cd98b09fb63eb6d4a4 Mon Sep 17 00:00:00 2001 From: lishaoxia1985 <49801619+lishaoxia1985@users.noreply.github.com> Date: Fri, 24 Jan 2020 02:12:24 +0800 Subject: [PATCH] Now we and AI can sign research agreement. (#1671) --- android/assets/jsons/Buildings.json | 2 +- .../Nations/Nations_Simplified_Chinese.json | 2 +- android/assets/jsons/Policies.json | 2 +- android/assets/jsons/Techs.json | 2 +- .../translationsByLanguage/Czech.properties | 4 + .../translationsByLanguage/Dutch.properties | 4 + .../translationsByLanguage/English.properties | 4 + .../translationsByLanguage/French.properties | 4 + .../translationsByLanguage/German.properties | 4 + .../Indonesian.properties | 4 + .../translationsByLanguage/Italian.properties | 4 + .../translationsByLanguage/Korean.properties | 4 + .../translationsByLanguage/Malay.properties | 4 + .../translationsByLanguage/Polish.properties | 4 + .../Portuguese.properties | 4 + .../Romanian.properties | 4 + .../translationsByLanguage/Russian.properties | 4 + .../Simplified_Chinese.properties | 458 +++++++++++++++++- .../translationsByLanguage/Spanish.properties | 4 + .../translationsByLanguage/Thai.properties | 4 + .../Traditional_Chinese.properties | 22 +- .../translationsByLanguage/Turkish.properties | 4 + .../Ukrainian.properties | 4 + .../template.properties | 2 + core/src/com/unciv/Constants.kt | 1 + .../logic/automation/NextTurnAutomation.kt | 59 +++ core/src/com/unciv/logic/city/CityStats.kt | 2 - .../logic/civilization/CivilizationInfo.kt | 12 + .../unciv/logic/civilization/TechManager.kt | 16 + .../diplomacy/DiplomacyManager.kt | 32 +- .../com/unciv/logic/trade/TradeEvaluation.kt | 53 +- core/src/com/unciv/logic/trade/TradeLogic.kt | 5 + core/src/com/unciv/logic/trade/TradeOffer.kt | 2 +- .../src/com/unciv/ui/trade/DiplomacyScreen.kt | 41 +- .../com/unciv/ui/trade/OffersListScroll.kt | 2 +- 35 files changed, 729 insertions(+), 54 deletions(-) diff --git a/android/assets/jsons/Buildings.json b/android/assets/jsons/Buildings.json index 6822368079..4eb704cd51 100644 --- a/android/assets/jsons/Buildings.json +++ b/android/assets/jsons/Buildings.json @@ -662,7 +662,7 @@ "culture": 1, "greatPersonPoints": {"science": 2}, "isWonder": true, - "uniques": ["Free great scientist appears","Production to science conversion in cities increased by 33%"], + "uniques": ["Free great scientist appears","Science gained from research agreements +50%"], "requiredTech": "Architecture", "quote": "'Things always seem fairer when we look back at them, and it is out of that inaccessible tower of the past that Longing leans and beckons.' - James Russell Lowell" }, diff --git a/android/assets/jsons/Nations/Nations_Simplified_Chinese.json b/android/assets/jsons/Nations/Nations_Simplified_Chinese.json index 44af8ea2ae..3bdeec01a9 100644 --- a/android/assets/jsons/Nations/Nations_Simplified_Chinese.json +++ b/android/assets/jsons/Nations/Nations_Simplified_Chinese.json @@ -221,7 +221,7 @@ "startIntroPart1": "祝福您,至高无上的叶卡捷琳娜陛下,俄罗斯人民完美的女皇。在您治下的是一个世界上最庞大的国家。强大的俄罗斯帝国,拥有着东起太平洋、西至波罗的海之间的广袤土地。尽管受到战争、干旱和种种灾祸的威胁,英勇的俄罗斯人民成功地生存了下来,并走向兴旺发达,他们的艺术家和科学家们更是世界上数一数二的。时至今日,俄罗斯仍然是人类历史上最为强盛的国家之一,是一个真正的超级强权,驾驭着发明史上最为巨大的破坏性力量。", "startIntroPart2": "叶卡捷琳娜啊,您的人民期盼地看着您,带领他们迈向帝国和人民光辉的岁月,大地重新变得活力四射,文明的奇迹再次降临。您会引导您的人民走向辉煌吗?您能建立起一个经受得住时间考验的文明吗?", - "declaringWar": "如果我可以活到两百岁,整个世界都将匍匐在我脚下,现在首先从你开始!。", + "declaringWar": "如果我可以活到两百岁,整个世界都将匍匐在我脚下,现在首先从你开始!", "attacked": "运气为而备,一旦遭受欺辱,我们绝不放弃还击。", "defeated": "没有实力的愤怒毫无意义,一旦可能,我们会血债血偿!", "introduction": "如果你的智慧和理性能像你的相貌那样出众,我们可以谈谈人生哲理。", diff --git a/android/assets/jsons/Policies.json b/android/assets/jsons/Policies.json index b037be93e3..1bcfed0de6 100644 --- a/android/assets/jsons/Policies.json +++ b/android/assets/jsons/Policies.json @@ -293,7 +293,7 @@ }, { "name": "Scientific Revolution", - "description": "Gain 2 free technologies", + "description": "Science gained from research agreements +50%", "requires": ["Free Thought"], "row": 3, "column": 1 diff --git a/android/assets/jsons/Techs.json b/android/assets/jsons/Techs.json index b4f9d77bed..f5c989e5ff 100644 --- a/android/assets/jsons/Techs.json +++ b/android/assets/jsons/Techs.json @@ -218,7 +218,7 @@ "name": "Education", "row": 3, "prerequisites": ["Theology","Civil Service"], - "uniques": ["Enables conversion of city production to science"], + "uniques": ["Enables conversion of city production to science","Enables Research agreements"], "quote": "'Education is the best provision for old age.' - Aristotle" }, { diff --git a/android/assets/jsons/translationsByLanguage/Czech.properties b/android/assets/jsons/translationsByLanguage/Czech.properties index fdc0d03c9f..93c1befabd 100644 --- a/android/assets/jsons/translationsByLanguage/Czech.properties +++ b/android/assets/jsons/translationsByLanguage/Czech.properties @@ -161,6 +161,8 @@ Cost of acquiring new tiles reduced by 25% = Cena za nákup nového území měs Porcelain Tower = Porcelánová pagoda 'Things always seem fairer when we look back at them, and it is out of that inaccessible tower of the past that Longing leans and beckons.' - James Russell Lowell = 'Věci se vždy zdají spravedlivější, když se na ně podíváme zpět, a to je z té nepřístupné věže minulosti, která se dlouze naklání a kývá.' - James Russell Lowell Free great scientist appears = Získáme Velkého Vědce zdarma + # Requires translation! +Science gained from research agreements +50% = Ironworks = Železárny Armory = Zbrojnice @@ -1384,6 +1386,8 @@ Who knows what the future holds? = Kdo ví, co nám přinese budoucnost? +10% science and production in all cities = +10% Výzkum a Produkce ve všech městech Improves movement speed on roads = Zvyšuje rychlost pohybu na cestách Enables conversion of city production to science = Dovoluje přepnout městskou produkci na výzkum + # Requires translation! +Enables Research agreements = Enables conversion of city production to gold = Dovoluje přepnout městskou produkci na zlato Enables embarkation for land units = Zpřístupní možnost nalodění se pozemním jednotkám Enables embarked units to enter ocean tiles = Umožňuje naloděným jednotkám vyplout na oceán diff --git a/android/assets/jsons/translationsByLanguage/Dutch.properties b/android/assets/jsons/translationsByLanguage/Dutch.properties index f2d81350f0..6b1d239196 100644 --- a/android/assets/jsons/translationsByLanguage/Dutch.properties +++ b/android/assets/jsons/translationsByLanguage/Dutch.properties @@ -228,6 +228,8 @@ Porcelain Tower = 'Things always seem fairer when we look back at them, and it is out of that inaccessible tower of the past that Longing leans and beckons.' - James Russell Lowell = # Requires translation! Free great scientist appears = + # Requires translation! +Science gained from research agreements +50% = # Requires translation! Ironworks = @@ -2153,6 +2155,8 @@ Improves movement speed on roads = # Requires translation! Enables conversion of city production to science = # Requires translation! +Enables Research agreements = + # Requires translation! Enables conversion of city production to gold = # Requires translation! Enables embarkation for land units = diff --git a/android/assets/jsons/translationsByLanguage/English.properties b/android/assets/jsons/translationsByLanguage/English.properties index 4cbb7d8930..2bfca968b2 100644 --- a/android/assets/jsons/translationsByLanguage/English.properties +++ b/android/assets/jsons/translationsByLanguage/English.properties @@ -268,6 +268,8 @@ Porcelain Tower = 'Things always seem fairer when we look back at them, and it is out of that inaccessible tower of the past that Longing leans and beckons.' - James Russell Lowell = # Requires translation! Free great scientist appears = + # Requires translation! +Science gained from research agreements +50% = # Requires translation! Ironworks = @@ -2425,6 +2427,8 @@ Improves movement speed on roads = # Requires translation! Enables conversion of city production to science = # Requires translation! +Enables Research agreements = + # Requires translation! Enables conversion of city production to gold = # Requires translation! Enables embarkation for land units = diff --git a/android/assets/jsons/translationsByLanguage/French.properties b/android/assets/jsons/translationsByLanguage/French.properties index 1cad00318a..f232b2cc10 100644 --- a/android/assets/jsons/translationsByLanguage/French.properties +++ b/android/assets/jsons/translationsByLanguage/French.properties @@ -156,6 +156,8 @@ Cost of acquiring new tiles reduced by 25% = Coût d'acquisition de nouvelles ca Porcelain Tower = Tour de Porcelaine 'Things always seem fairer when we look back at them, and it is out of that inaccessible tower of the past that Longing leans and beckons.' - James Russell Lowell = 'Les choses semblent toujours plus juste quand nous les observons à posteriori, c'est de cette tour inaccessible du passé que Longing se penche et fait signe.' - James Russell Lowell Free great scientist appears = Un scientifique illustre gratuit apparaît + # Requires translation! +Science gained from research agreements +50% = Ironworks = Atelier métallurgique Armory = Arsenal @@ -1330,6 +1332,8 @@ Who knows what the future holds? = Qui sait ce que l'avenir réserve? +10% science and production in all cities = +10% science et production dans toutes les villes Improves movement speed on roads = Améliore la vitesse de déplacement sur les routes Enables conversion of city production to science = Permet la conversion de la production des villes en science + # Requires translation! +Enables Research agreements = Enables conversion of city production to gold = Permet la conversion de la production des villes en or Enables embarkation for land units = Permet d'embarquer les unités terrestres Enables embarked units to enter ocean tiles = Permet aux unités embarqués de traverser les cases d'océan diff --git a/android/assets/jsons/translationsByLanguage/German.properties b/android/assets/jsons/translationsByLanguage/German.properties index ecb53f61fa..d3adefdd3a 100644 --- a/android/assets/jsons/translationsByLanguage/German.properties +++ b/android/assets/jsons/translationsByLanguage/German.properties @@ -162,6 +162,8 @@ Cost of acquiring new tiles reduced by 25% = Kosten um neue Felder zu kaufen ist Porcelain Tower = Porzellan Turm 'Things always seem fairer when we look back at them, and it is out of that inaccessible tower of the past that Longing leans and beckons.' - James Russell Lowell = 'Die Dinge erscheinen immer schöner, wenn wir auf sie zurückblicken, und aus diesem unzugänglichen Turm die Vergangenheit Sehnsüchtig lehnt und winkt.' - James Russell Lowell Free great scientist appears = Eine kostenlose Große Wissenschaftlerin erscheint + # Requires translation! +Science gained from research agreements +50% = Ironworks = Eisenhüttenwerk Armory = Waffenkammer @@ -1395,6 +1397,8 @@ Who knows what the future holds? = Wer weiß was die Zukunft für uns bereithäl +10% science and production in all cities = +10% Wissenschaft und Produktion in allen Städten Improves movement speed on roads = Erhöht die Bewegungsgeschwindigkeit auf Straßen Enables conversion of city production to science = Erlaubt das Umwandeln von städtischer Produktion in Wissenschaft + # Requires translation! +Enables Research agreements = Enables conversion of city production to gold = Erlaubt das Umwandeln von städtischer Produktion in Gold Enables embarkation for land units = Ermöglicht das Einbooten von Landeinheiten Enables embarked units to enter ocean tiles = Erlaubt es, eingebooteten Einheiten Ozeanfelder zu überqueren diff --git a/android/assets/jsons/translationsByLanguage/Indonesian.properties b/android/assets/jsons/translationsByLanguage/Indonesian.properties index 3b057b75c3..a48a858d18 100644 --- a/android/assets/jsons/translationsByLanguage/Indonesian.properties +++ b/android/assets/jsons/translationsByLanguage/Indonesian.properties @@ -164,6 +164,8 @@ Porcelain Tower = Menara Porselen # Requires translation! 'Things always seem fairer when we look back at them, and it is out of that inaccessible tower of the past that Longing leans and beckons.' - James Russell Lowell = Free great scientist appears = Ilmuwan hebat gratis muncul + # Requires translation! +Science gained from research agreements +50% = Ironworks = Pandai Besi Armory = Gudang Senjata @@ -1596,6 +1598,8 @@ Improves movement speed on roads = # Requires translation! Enables conversion of city production to science = # Requires translation! +Enables Research agreements = + # Requires translation! Enables conversion of city production to gold = # Requires translation! Enables embarkation for land units = diff --git a/android/assets/jsons/translationsByLanguage/Italian.properties b/android/assets/jsons/translationsByLanguage/Italian.properties index eae0cc7a14..4b55ef8244 100644 --- a/android/assets/jsons/translationsByLanguage/Italian.properties +++ b/android/assets/jsons/translationsByLanguage/Italian.properties @@ -156,6 +156,8 @@ Cost of acquiring new tiles reduced by 25% = -25% costo per l'acquisto di nuove Porcelain Tower = Torre di Porcellana 'Things always seem fairer when we look back at them, and it is out of that inaccessible tower of the past that Longing leans and beckons.' - James Russell Lowell = 'Le cose sembrano sempre più belle quando ci voltiamo indietro per guardarle, ed è dall'inaccessibile torre del passato che la nostalgia si protende e chiama.' - James Russel Lowell Free great scientist appears = Appare un Grande Scienziato + # Requires translation! +Science gained from research agreements +50% = Ironworks = Ferriera Armory = Armeria @@ -1304,6 +1306,8 @@ Who knows what the future holds? = Chi sa cosa riservano i prossimi anni? +10% science and production in all cities = +10% Scienza e Produzione in tutte le città Improves movement speed on roads = Migliora la velocità di movimento sulle strade Enables conversion of city production to science = Consente di convertire la Produzione nelle città in Scienza + # Requires translation! +Enables Research agreements = Enables conversion of city production to gold = Consente di convertire la Produzione nelle città in Oro Enables embarkation for land units = Permette alle unità terrestri di imbarcarsi e attraversare le caselle acquatiche. Enables embarked units to enter ocean tiles = Permette alle unità di imbarcarsi nelle caselle oceaniche diff --git a/android/assets/jsons/translationsByLanguage/Korean.properties b/android/assets/jsons/translationsByLanguage/Korean.properties index 2ad49df823..0191382a3e 100644 --- a/android/assets/jsons/translationsByLanguage/Korean.properties +++ b/android/assets/jsons/translationsByLanguage/Korean.properties @@ -173,6 +173,8 @@ Cost of acquiring new tiles reduced by 25% = 새로운 타일을 확보하는데 Porcelain Tower = 영곡탑 'Things always seem fairer when we look back at them, and it is out of that inaccessible tower of the past that Longing leans and beckons.' - James Russell Lowell = '만사는 지나고 나서 돌아보면 더 좋아보이며, 바로 그 다가갈 수 없는 과거의 탑으로부터 동경은 몸을 내밀어 우리를 부른다.' - 제임스 러셀 로웰 Free great scientist appears = 근처에 위대한 과학자 하나가 무료로 출현 + # Requires translation! +Science gained from research agreements +50% = Ironworks = 제철소 Armory = 무기고 @@ -1408,6 +1410,8 @@ Who knows what the future holds? = 미래에 무엇이 일어날지 그 누가 +10% science and production in all cities = 모든 도시의 과학 +10%, 생산력 +10% Improves movement speed on roads = 도로 위에서의 이동 속도 증가 Enables conversion of city production to science = 도시의 생산력을 과학으로 전환할 수 있음 + # Requires translation! +Enables Research agreements = Enables conversion of city production to gold = 도시의 생산력을 금으로 전환할 수 있음 Enables embarkation for land units = 지상 유닛이 배로 승선할 수 있음 Enables embarked units to enter ocean tiles = 승선한 유닛이 대양으로 이동할 수 있음 diff --git a/android/assets/jsons/translationsByLanguage/Malay.properties b/android/assets/jsons/translationsByLanguage/Malay.properties index 113d9ff71d..34c7673428 100644 --- a/android/assets/jsons/translationsByLanguage/Malay.properties +++ b/android/assets/jsons/translationsByLanguage/Malay.properties @@ -244,6 +244,8 @@ Porcelain Tower = 'Things always seem fairer when we look back at them, and it is out of that inaccessible tower of the past that Longing leans and beckons.' - James Russell Lowell = # Requires translation! Free great scientist appears = + # Requires translation! +Science gained from research agreements +50% = # Requires translation! Ironworks = @@ -2240,6 +2242,8 @@ Improves movement speed on roads = # Requires translation! Enables conversion of city production to science = # Requires translation! +Enables Research agreements = + # Requires translation! Enables conversion of city production to gold = # Requires translation! Enables embarkation for land units = diff --git a/android/assets/jsons/translationsByLanguage/Polish.properties b/android/assets/jsons/translationsByLanguage/Polish.properties index bd4d758e4a..9536ad123c 100644 --- a/android/assets/jsons/translationsByLanguage/Polish.properties +++ b/android/assets/jsons/translationsByLanguage/Polish.properties @@ -156,6 +156,8 @@ Cost of acquiring new tiles reduced by 25% = Koszt zakupu nowych pól obniżony Porcelain Tower = Porcelanowa Wieża 'Things always seem fairer when we look back at them, and it is out of that inaccessible tower of the past that Longing leans and beckons.' - James Russell Lowell = 'Kiedy patrzymy w przeszłość, wszystko wydaje się piękniejsze i właśnie w tej niedostępnej wieży przeszłości rodzi się Tęsknota.' - James Russell Lowell Free great scientist appears = Pojawia się darmowy Wielki Naukowiec + # Requires translation! +Science gained from research agreements +50% = Ironworks = Huta Armory = Zbrojownia @@ -1301,6 +1303,8 @@ Who knows what the future holds? = Kto wie, co kryje przyszłość? +10% science and production in all cities = +10% nauki i produkcji we wszystkich miastach Improves movement speed on roads = Zwiększa prędkość poruszania się na drogach Enables conversion of city production to science = Umożliwia konwersję produkcji miejskiej na naukę + # Requires translation! +Enables Research agreements = Enables conversion of city production to gold = Umożliwia konwersję produkcji miejskiej na złoto Enables embarkation for land units = Umożliwia jednostkom naziemnym zaokrętować Enables embarked units to enter ocean tiles = Umożliwia zaokrętowanym jednostkom wpłynąć na pola oceanu diff --git a/android/assets/jsons/translationsByLanguage/Portuguese.properties b/android/assets/jsons/translationsByLanguage/Portuguese.properties index 9307fd178f..dc06bf2f9a 100644 --- a/android/assets/jsons/translationsByLanguage/Portuguese.properties +++ b/android/assets/jsons/translationsByLanguage/Portuguese.properties @@ -161,6 +161,8 @@ Cost of acquiring new tiles reduced by 25% = Custo de compra de novos terrenos r Porcelain Tower = Torre de Porcelana 'Things always seem fairer when we look back at them, and it is out of that inaccessible tower of the past that Longing leans and beckons.' - James Russell Lowell = 'As coisas sempre parecem mais justas quando nos lembramos delas, e é dessa torre inacessível do passado que a saudade se inclina e acena.' - James Russel Lowell Free great scientist appears = Aparece um Grande Cientista grátis + # Requires translation! +Science gained from research agreements +50% = Ironworks = Siderurgia Armory = Arsenal @@ -1560,6 +1562,8 @@ Who knows what the future holds? = Quem sabe o que o futuro reserva? +10% science and production in all cities = +10% de ciência e produção em todas as cidades Improves movement speed on roads = Melhora velocidade de movimento em estradas Enables conversion of city production to science = Habilita a conversão de produção das cidades para ciência + # Requires translation! +Enables Research agreements = Enables conversion of city production to gold = Habilita a conversão da produção das cidades para ouro Enables embarkation for land units = Permite o embarque de unidades terrestres Enables embarked units to enter ocean tiles = Permite que unidades embarcadas entrem em hexágonos oceânicos diff --git a/android/assets/jsons/translationsByLanguage/Romanian.properties b/android/assets/jsons/translationsByLanguage/Romanian.properties index f9b2b605dc..7a7cd49105 100644 --- a/android/assets/jsons/translationsByLanguage/Romanian.properties +++ b/android/assets/jsons/translationsByLanguage/Romanian.properties @@ -189,6 +189,8 @@ Porcelain Tower = Turnul de Porțelan # Requires translation! 'Things always seem fairer when we look back at them, and it is out of that inaccessible tower of the past that Longing leans and beckons.' - James Russell Lowell = Free great scientist appears = Apare un mare om de știință gratuit + # Requires translation! +Science gained from research agreements +50% = Ironworks = Fierărie Armory = Depozit de arme @@ -1584,6 +1586,8 @@ Who knows what the future holds? = Cine poate ști ce ne rezervă viitorul? +10% science and production in all cities = +10% știință și producție în toate orașele Improves movement speed on roads = Îmbunătățește viteza de deplasare pe drumuri Enables conversion of city production to science = Permite conversia producției orașului la știință + # Requires translation! +Enables Research agreements = Enables conversion of city production to gold = Permite conversia producției orașului la aur Enables embarkation for land units = Permite îmbarcarea unităților terestre Enables embarked units to enter ocean tiles = Permite unităților îmbarcate să meargă în celulele ocean diff --git a/android/assets/jsons/translationsByLanguage/Russian.properties b/android/assets/jsons/translationsByLanguage/Russian.properties index 232ef0c446..20d9208f44 100644 --- a/android/assets/jsons/translationsByLanguage/Russian.properties +++ b/android/assets/jsons/translationsByLanguage/Russian.properties @@ -156,6 +156,8 @@ Cost of acquiring new tiles reduced by 25% = Сокращает стоимост Porcelain Tower = Фарфоровая башня 'Things always seem fairer when we look back at them, and it is out of that inaccessible tower of the past that Longing leans and beckons.' - James Russell Lowell = 'Многое начинает казаться лучше, когда остается в прошлом - и из этой неприступной башни Прошлого нас зовет и манит рукою Тоска.' - Джеймс Расселл Лоуэлл Free great scientist appears = Появляется бесплатный Великий Учёный + # Requires translation! +Science gained from research agreements +50% = Ironworks = Металлургический завод Armory = Оружейная @@ -1300,6 +1302,8 @@ Who knows what the future holds? = Кто знает, что ждет в буд +10% science and production in all cities = +10% науки и производства во всех городах Improves movement speed on roads = Улучшает скорость передвижения по дорогам Enables conversion of city production to science = Разрешает конверсию производства в науку + # Requires translation! +Enables Research agreements = Enables conversion of city production to gold = Разрешает конверсию производства в золото Enables embarkation for land units = Позволяет наземным единицам передвигаться по воде Enables embarked units to enter ocean tiles = Позволяет наземным единицам выходить в океан diff --git a/android/assets/jsons/translationsByLanguage/Simplified_Chinese.properties b/android/assets/jsons/translationsByLanguage/Simplified_Chinese.properties index 470dbc821a..416add6b8a 100644 --- a/android/assets/jsons/translationsByLanguage/Simplified_Chinese.properties +++ b/android/assets/jsons/translationsByLanguage/Simplified_Chinese.properties @@ -159,6 +159,8 @@ Cost of acquiring new tiles reduced by 25% = 购买新地块花费-25% Porcelain Tower = 大报恩寺塔 'Things always seem fairer when we look back at them, and it is out of that inaccessible tower of the past that Longing leans and beckons.' - James Russell Lowell = “我们所失去的总是要在回望之时才更知道它的美好,而那曾经不可一世的高塔如今是多么的渴望能够有所依靠。”——詹姆斯·罗素·洛威尔(美国诗人) Free great scientist appears = 免费的大科学家出现 + # Requires translation! +Science gained from research agreements +50% = 科研协定产出的科研+50% Ironworks = 钢铁厂 Armory = 军械所 @@ -329,10 +331,10 @@ Indeed! = 这是无比正确的命运抉择! Denounce ([numberOfTurns] turns) = 谴责([numberOfTurns]回合) We will remember this. = 这种侮辱我们绝不会忘记。请好自为之! -[civName] has declared war on [targetCivName]! = [civName] 向 [targetCivName]宣战! -[civName] and [targetCivName] have signed the Peace Treaty! = [civName] 和 [targetCivName]签署了和平条约! -[civName] and [targetCivName] have signed the Declaration of Friendship! = [civName] 和 [targetCivName]签署了友谊宣言! -[civName] has denounced [targetCivName]! = [civName] 已经谴责了 [targetCivName]! +[civName] has declared war on [targetCivName]! = [civName]向[targetCivName]宣战! +[civName] and [targetCivName] have signed the Peace Treaty! = [civName]和[targetCivName]签署了和平条约! +[civName] and [targetCivName] have signed the Declaration of Friendship! = [civName]和[targetCivName]签署了友谊宣言! +[civName] has denounced [targetCivName]! = [civName]谴责了[targetCivName]! Unforgivable = 仇深似海 Enemy = 宿命之敌 @@ -837,8 +839,8 @@ Are you sure you want to sell this [building]? = 您真的想卖掉[building]吗 Great person points = 伟人点数 Current points = 当前点数 Points per turn = 获得点数/回合 -Convert production to gold at a rate of 4 to 1 = 转化1/4产能为金钱 -Convert production to science at a rate of 4 to 1 = 转化1/4产能为科研 +Convert production to gold at a rate of 4 to 1 = 按4:1的比例转化产能为金钱 +Convert production to science at a rate of 4 to 1 = 按4:1的比例转化产能为科研 The city will not produce anything. = 城市将不会建造/组建任何项目 # Technology UI @@ -1131,7 +1133,7 @@ Free Speech = 言论自由 Democracy = 民主主义 Specialists produce half normal unhappiness = 城市人口中专业人员产生的不满减半 Freedom Complete = 完整的自由政策 -Tile yield from great improvement +100%, golden ages increase by 50% = 建有设施的地块产出+100%,黄金时代持续时间+50% +Tile yield from great improvement +100%, golden ages increase by 50% = 建有伟人设施的地块产出+100%,黄金时代持续时间+50% Autocracy = 独裁政策 -33% unit upkeep costs = 单位维护费-33% @@ -1238,4 +1240,444 @@ Archaeology = 考古学 Industrialization = 工业化 'Industrialization based on machinery, already referred to as a characteristic of our age, is but one aspect of the revolution that is being wrought by technology.' - Emily Greene Balch = “由机械的发展而产生的工业化大生产,虽被看作我们这个时代的标志,但它其实不过是科技进步带来的诸多革命之一。”——艾米莉·格伦尼·巴尔奇(美国女经济学家) Rifling = 膛线 -'I +'It is well that war is so terrible, or we should grow too fond of it.' - Robert E. Lee = “幸好战争是如此恐怖,否则我们将会打到乐此不疲。”——罗伯特·爱德华·李 +Military Science = 军事科学 +'Wars may be fought with weapons, but they are won by men. It is the spirit of the men who follow and of the man who leads that gains the victory.' - George S. Patton = “战争是武器间的较量,但胜利必定要由人来夺取。是引领者及其追随者们的精神力量使他们赢得了胜利。”——乔治·史密斯·巴顿 +Fertilizer = 化肥 +'The nation that destroys its soil destroys itself.' - Franklin Delano Roosevelt = “一个毁掉自己所有土壤的国家也将毁灭自身。”——富兰克林·德拉诺·罗斯福 +Biology = 生物学 +'If the brain were so simple we could understand it, we would be so simple we couldn't.' - Lyall Watson = “如果大脑简单到能让我们理解,我们的思维就会简单到不能理解大脑。”——莱尔·沃森(南非生物学家) +Electricity = 电学 +'Is it a fact - or have I dreamt it - that, by means of electricity, the world of matter has become a great nerve, vibrating thousands of miles in a breathless point of time?' - Nathaniel Hawthorne = “这是事实还是我的空想:电流能把物质世界变成一个巨大的神经网络,让震颤在瞬息之间传送数千英里?”——纳撒尼尔·霍桑(美国作家) +Steam Power = 蒸汽机 +'The nations of the West hope that by means of steam communication all the world will become as one family.' - Townsend Harris = “西方国家希望蒸汽机所推动的相互交流能让全世界亲如一家。”——唐森·哈利斯(美国政治家) +Dynamite = 炸药 +'As soon as men decide that all means are permitted to fight an evil, then their good becomes indistinguishable from the evil that they set out to destroy.' - Christopher Dawson = “当人们决定可以使用一切方式来同邪恶斗争时,他们的善良将变得和他们想要消灭的邪恶一样可怕。”——克里斯托弗·道森(英国学者) +Refrigeration = 制冷 +'And homeless near a thousand homes I stood, and near a thousand tables pined and wanted food.' - William Wordsworth = “我站在无数无家可归者身边,无数空空如也的桌子面前,渴求着食物。”——威廉·华兹华斯 +Replaceable Parts = 可更换部件 +'Nothing is particularly hard if you divide it into small jobs.' - Henry Ford = “如果你把大任务分解成小任务,任何事都不会特别难。”——亨利·福特 +Radio = 无线电 +'The whole country was tied together by radio. We all experienced the same heroes and comedians and singers. They were giants.' - Woody Allen = “整个国家被无线电联结在一起,我们都熟识同样的英雄、同样的喜剧演员和同样的歌手。他们都是时代的巨人。”——伍迪·艾伦 +Combustion = 内燃机 +'Any man who can drive safely while kissing a pretty girl is simply not giving the kiss the attention it deserves.' - Albert Einstein = “任何能够在安全行驶的同时亲吻一个年轻姑娘的男人一定没有给那个吻应有的注意力。”——阿尔伯特·爱因斯坦 +Plastics = 塑料 +'Ben, I want to say one word to you, just one word: plastics.' - Buck Henry and Calder Willingham, The Graduate = “本,我只想对你说一个词,就一个词:塑料。”——巴克·亨利/卡尔德·威灵汉姆,《毕业生》 +Electronics = 电子学 +'There's a basic principle about consumer electronics: it gets more powerful all the time and it gets cheaper all the time.' - Trip Hawkins = “消费类电子产品有一个基本法则:它的功能越来越强,它的价格越来越低。”——崔普·霍金斯(美国艺电(EA)公司创始人) +Ballistics = 弹道学 +'Men, like bullets, go farthest when they are smoothest.' - Jean Paul = “人就像子弹,最圆滑的才走得最远。”——让·保罗 +Mass Media = 大众传媒 +Flight = 航空 +'Aeronautics was neither an industry nor a science. It was a miracle.' - Igor Sikorsky = “航空既不是一种工业也不是一门科学。它是一个奇迹。”——伊戈尔·西科尔斯基(美籍俄裔飞机设计师) +'The introduction of so powerful an agent as steam to a carriage on wheels will make a great change in the situation of man.' - Thomas Jefferson = “引入蒸汽这样一个强大的助手来驱动车轮进行运输,将极大地改变人类的境地。”——托马斯·杰斐逊 +Pharmaceuticals = 制药学 +'In nothing do men more nearly approach the gods than in giving health to men.' - Cicero = “没有什么比给予他人健康更使人接近诸神。”——西塞罗 +Radar = 雷达 +'Vision is the art of seeing things invisible.' - Jonathan Swift = “洞察力是看到不可见事物的艺术。”——乔纳森·斯威夫特(英国作家) +Atomic Theory = 原子理论 +'The unleashed power of the atom has changed everything save our modes of thinking, and we thus drift toward unparalleled catastrophes.' - Albert Einstein = “被释放的原子能已经改变了一切,除了我们的思维模式,因此我们正在滑向空前的灾难。”——阿尔伯特·爱因斯坦 +Computers = 电子计算机 +'Computers are like Old Testament gods: lots of rules and no mercy.' - Joseph Campbell = “计算机就如同旧约中的上帝:诸多戒命且没有怜悯。”——约瑟夫·坎贝尔(美国学者) +Mobile Tactics = 机动战术 +'All men can see these tactics whereby I conquer, but what none can see is the strategy out of which victory is evolved.' - Sun Tzu = “人皆知吾所以胜之形,而莫知吾所以制胜之形”——孙子 +Combined Arms = 协同作战 +'The root of the evil is not the construction of new, more dreadful weapons. It is the spirit of conquest.' - Ludwig von Mises = “邪恶的根源并不是什么不断更新的致命武器,而是人对征服的欲望。”——路德维希·冯·米塞斯 +Nuclear Fission = 核裂变 +'I am become Death, the destroyer of worlds.' - J. Robert Oppenheimer = “我成了死神,世界的毁灭者。”——尤利乌斯·罗伯特·奥本海默 +Ecology = 生态学 +'Only within the moment of time represented by the present century has one species, man, acquired significant power to alter the nature of his world.' - Rachel Carson = “直到进入本世纪的时候,作为一个物种的人类才获得了足以改变他所在世界的本质的强大能力。”——雷切尔·卡森(美国生态学家) +Rocketry = 火箭 +'A good rule for rocket experimenters to follow is this: always assume that it will explode.' - Astronautics Magazine, 1937 = “火箭研究人员要遵守的最好规矩就是:永远要假定它会爆炸。”——航天学杂志,1937 +Robotics = 机器人学 +'1. A robot may not injure a human being or, through inaction, allow a human being to come to harm. 2. A robot must obey any orders given to it by human beings, except when such orders would conflict with the First Law. 3. A robot must protect its own existence as long as such protection does not conflict with the First or Second Law.' - Isaac Asimov = “1、机器人不得伤害人,也不得见人受到伤害而袖手旁观。2、机器人应服从人的一切命令,但不得违反第一定律。3、机器人应保护自身的安全,但不得违反第一、第二定律。”——艾萨克·阿西莫夫 +Lasers = 激光 +'The night is far spent, the day is at hand: let us therefore cast off the works of darkness, and let us put on the armor of light.' - The Holy Bible: Romans, 13:12 = “黑夜已深,白昼将近:我们当脱去暗昧的行为,带上光明的兵器。”——圣经·罗马书 13:12 +Nanotechnology = 纳米技术 +'The impact of nanotechnology is expected to exceed the impact that the electronics revolution has had on our lives.' - Richard Schwartz = “纳米技术给我们的生活所带来的冲击预计将超过电子革命。”——理查德·舒瓦茨(美国学者) +Satellites = 人造卫星 +'Now, somehow, in some new way, the sky seemed almost alien.' - Lyndon B. Johnson = “现在,不知怎的,通过某种新的手段,天空好像都被别国所占据了。”——林登·贝恩斯·约翰逊 +Particle Physics = 粒子物理 +'Every particle of matter is attracted by or gravitates to every other particle of matter with a force inversely proportional to the squares of their distances.' - Isaac Newton = “任何物质粒子都会与其他物质粒子相互吸引,产生的引力和距离的平方成反比。”——艾萨克·牛顿 +Future Tech = 未来科技 +'I think we agree, the past is over.' - George W. Bush = “我想我们都同意:过去已经结束了。”——乔治·沃克·布什 + +# Technology uniques + +Who knows what the future holds? = 谁知道未来会怎样? ++10% science and production in all cities = 所有城市+10%的科研和产能产出 +Improves movement speed on roads = 提高道路上的移动速度 +Enables conversion of city production to science = 可将城市产能转化为科研 + # Requires translation! +Enables Research agreements = +Enables conversion of city production to gold = 可将城市产能转化为金钱 +Enables embarkation for land units = 陆军单位拥有船运能力 +Enables embarked units to enter ocean tiles = 拥有船运能力的单位能够进入海洋 +Increases embarked movement +1 = 陆军单位处于船运状态时的移动力+1 + +# Tech eras + +Ancient era = 远古时代 +Classical era = 古典时代 +Medieval era = 中古时代 +Renaissance era = 启蒙时代 +Industrial era = 工业时代 +Modern era = 电气时代 +Information era = 信息时代 +Future era = 未来时代 + +# Terrains + +Grassland = 草原 +Plains = 平原 +Tundra = 冻土 +Desert = 沙漠 +Lakes = 湖泊 +Hill = 丘陵 +Mountain = 山脉 +Forest = 森林 +Jungle = 丛林 +Marsh = 沼泽 +Fallout = 核辐射 +Oasis = 绿洲 +Snow = 雪原 +Coast = 海滨 +Ocean = 海洋 +Flood plains = 冲积平原 +Impassible = 不能通行 + +# Natural Wonders + +Barringer Crater = 巴林杰陨石坑 +Grand Mesa = 大平顶山 +Great Barrier Reef = 大堡礁 +Krakatoa = 喀拉喀托火山 +Mount Fuji = 富士山 +Old Faithful = 老忠实间歇泉 +Rock of Gibraltar = 直布罗陀巨岩 +Cerro de Potosi = 富饶山 +El Dorado = 黄金国 +Fountain of Youth = 青春之泉 + +# Natural Wonders Uniques + + # Requires translation! +Grants 500 Gold to the first civilization to discover it = + # Requires translation! +Grants Rejuvenation (all healing effects doubled) to adjacent military land units for the rest of the game = + +# Resources + +Cattle = 牛群 +Sheep = 绵羊 +Deer = 野鹿 +Bananas = 香蕉 +Wheat = 小麦 +Stone = 花岗石 +Fish = 鱼群 +Bison = 野牛 +Horses = 马 +Iron = 铁 +Coal = 煤 +Oil = 石油 +Aluminum = 铝 +Uranium = 铀 +Furs = 毛皮 +Cotton = 棉花 +Dyes = 染料 +Gems = 宝石 +Silver = 白银 +Incense = 熏香 +Ivory = 象牙 +Silk = 丝绸 +Spices = 香料 +Wine = 红酒 +Sugar = 蔗糖 +Marble = 大理石 +Pearls = 珍珠 +Whales = 鲸鱼 +Copper = 赤铜 +Cocoa = 可可 +Crab = 螃蟹 +Citrus = 柑橘 +Truffles = 松露 +Farm = 农场 +Lumber mill = 锯木场 +Mine = 矿井 +Trading post = 贸易站 +Camp = 猎场 +Oil well = 油井 +Pasture = 牧场 +Plantation = 种植园 +Quarry = 采石场 +Fishing Boats = 渔船 +Road = 道路 +Remove Road = 拆毁道路 +Railroad = 铁路 +Remove Railroad = 拆除铁路 +Remove Forest = 砍伐森林 +Remove Jungle = 砍伐丛林 +Remove Marsh = 移除沼泽 +Remove Fallout = 消除核辐射 +Ancient ruins = 远古遗迹 +City ruins = 城市废墟 +Academy = 学院 +Landmark = 风景地标 +Manufactory = 制造中心 +Customs house = 海关 +Moai = 摩艾石像群 ++1 additional Culture for each adjacent Moai = 每个相邻的摩艾石像群额外+1文化 +Can only be built on Coastal tiles = 只能建造在沿海地块 +Barbarian encampment = 蛮族营地 + +# Unit types + +Civilian = 平民单位 +land units = 陆军单位 +water units = 海军单位 +air units = 空军单位 +WaterCivilian = 海上平民单位 +Melee = 近战单位 +WaterMelee = 海军近战单位 +Ranged = 远程单位 +WaterRanged = 海军远程单位 +WaterSubmarine = 海军潜艇单位 +Siege = 攻坚能力 +Mounted = 骑乘单位 +Scout = 斥候 +Armor = 装甲单位 +City = 城市 + +# Units + +Founds a new city = 建立一座城市,组建此单位时城市的食物积累停止 +Worker = 工人 +Can build improvements on tiles = 可以在地块上建造设施 +Ignores terrain cost = 所有地形都只消耗1移动力 +Brute = 蛮族勇士 +Warrior = 勇士 +Maori Warrior = 毛利勇士 +Archer = 弓箭手 +Bowman = 巴比伦弓手 +Work Boats = 工船 +Cannot enter ocean tiles until Astronomy = 研究出天文学之前不能进入海洋地块 +May create improvements on water resources = 可在水上资源建造设施(工船将被消耗掉) +Trireme = 三列桨战船 +Cannot enter ocean tiles = 不能进入海洋地块 +Chariot Archer = 战车射手 +No defensive terrain bonus = 无地形防御力加成 +Rough terrain penalty = 复杂地形惩罚 +War Chariot = 埃及战车 +Spearman = 枪兵 +Hoplite = 希腊重步兵 +Persian Immortal = 波斯长生军 ++10 HP when healing = 生命回复时额外回复10生命值 +Composite Bowman = 复合弓兵 +Catapult = 投石车 +Must set up to ranged attack = 必须架设才能远程攻击 +Ballista = 罗马弩炮 +Swordsman = 剑士 +Mohawk Warrior = 莫霍克战士 ++33% combat bonus in Forest/Jungle = 位于森林/丛林时战斗力+33% +Legion = 古罗马军团 +Can construct roads = 可以建造道路 +Horseman = 骑手 +Can move after attacking = 攻击后可移动 +Companion Cavalry = 马其顿禁卫骑兵 +War Elephant = 印度战象 +Galleass = 桨帆战舰 +Crossbowman = 弩手 +Longbowman = 长弓手 +Chu-Ko-Nu = 诸葛弩兵 +Logistics = 后勤补给 +1 additional attack per turn = 每回合有一次额外的攻击机会 +Trebuchet = 抛石机 +Hwach'a = 火厢车 +Limited Visibility = 视野受限 +Longswordsman = 长剑士 +Pikeman = 长枪兵 +Landsknecht = 自由佣兵 +Knight = 骑士 +Camel Archer = 骆驼骑射手 + # Requires translation! +Conquistador = + # Requires translation! +Mandekalu Cavalry = + # Requires translation! +Defense bonus when embarked = +Naresuan's Elephant = 纳黎萱战象 +Samurai = 日本武士 +Combat very likely to create Great Generals = 战斗能更快地产生出大军事家 +Caravel = 轻帆船 +Turtle Ship = 龟船 ++1 Visibility Range = +1视野 + # Requires translation! ++2 Visibility Range = +Cannon = 加农炮 +Musketman = 火枪手 +Musketeer = 法国火枪手 +Janissary = 苏丹亲兵 + # Requires translation! +Tercio = +Heals [amountHealed] damage if it kills a unit = 消灭敌方单位后回复[amountHealed]生命值 +Minuteman = 快速民兵 +Frigate = 护卫舰 +Ship of the Line = 主力舰 +Lancer = 枪骑兵 +Sipahi = 西帕希骑兵 +No movement cost to pillage = 劫掠不消耗移动力 +Gatling Gun = 加特林机枪 +Rifleman = 来复枪兵 +Cavalry = 近代骑兵 +Cossack = 哥萨克骑兵 +Artillery = 火炮 +Indirect Fire = 间瞄射击 +Ironclad = 铁甲舰 +Double movement in coast = 海滨移动时双倍移动力 +Landship = 履带战车 +Great War Infantry = 一战步兵 +Foreign Legion = 外籍军团 ++20% bonus outside friendly territory = 境外作战时战斗力+20% +Foreign Land = 境外 +Destroyer = 驱逐舰 +Can attack submarines = 能够发现和攻击潜艇单位 +Machine Gun = 机关枪 +Anti-Aircraft Gun = 高射炮 +Infantry = 现代步兵 +Battleship = 战列舰 +Submarine = 潜艇 +Bonus as Attacker [amount]% = 主动发起攻击时+[amount]%战斗力 +Invisible to others = 对其他单位隐形 +Can only attack water = 只能攻击海上目标 +Carrier = 航空母舰 +Triplane = 三翼机 +[percent]% chance to intercept air attacks = [percent]%几率拦截来袭的敌军飞机 +Requires Manhattan Project = 需要完成曼哈顿计划 +6 tiles in every direction always visible = 全方向6格视野范围 +Great War Bomber = 一战轰炸机 +Rocket Artillery = 火箭炮 +Anti-Tank Gun = 反坦克炮 +Marine = 海军陆战队 +Mobile SAM = 防空导弹车 +Paratrooper = 伞兵 +Tank = 坦克 +Panzer = “虎II”坦克 +Bomber = 轰炸机 +Mechanized Infantry = 机械化步兵 +Modern Armor = 现代坦克 +B17 = B-17“空中堡垒” +Fighter = 战斗机 +Zero = 零式战斗机 +Helicopter Gunship = 武装直升机 +Atomic Bomb = 原子弹 +Nuclear Missile = 核导弹 +Great Artist = 大艺术家 +Unbuildable = 不可组建单位 +Can start an 8-turn golden age = 可以开启8回合黄金时代 +Can build improvement: Landmark = 可以建造设施:风景地标 +Great Scientist = 大科学家 +Can hurry technology research = 可以加速科技研究 +Can build improvement: Academy = 可以建造设施:学院 +Great Merchant = 大商业家 +Can undertake a trade mission with City-State, giving a large sum of gold and [influenceAmount] Influence = 可以拓展与城邦的贸易,获得大笔金钱和[influenceAmount]影响力 +Can build improvement: Customs house = 可以建造设施:海关 +Great Engineer = 大工程师 +Can speed up construction of a wonder = 可以加快一座奇观的建造速度 +Can build improvement: Manufactory = 可以建造设施:制造中心 +Great General = 大军事家 +Bonus for units in 2 tile radius 15% = 周围2格地块内所有我方陆军单位+15%战斗力 + +# Promotions + +Pick promotion = 选择晋升项 + OR = 或 +Bonus vs [unitType] = 对战[unitType]时战斗力+ +Penalty vs [unitType] = 对战[unitType]时战斗力- +Accuracy I = 精准I级 +Accuracy II = 精准II级 +Accuracy III = 精准III级 +units in open terrain = 位于开阔地形的单位 +units in rough terrain = 位于复杂地形的单位 +Barrage I = 弹幕I级 +Barrage II = 弹幕II级 +Barrage III = 弹幕III级 +Shock I = 冲击I级 +Shock II = 冲击II级 +Shock III = 冲击III级 +Drill I = 操练I级 +Drill II = 操练II级 +Drill III = 操练III级 +Scouting I = 侦察I级 +Scouting II = 侦察II级 +Scouting III = 侦察III级 ++1 Movement = +1移动力 +Cover I = 隐蔽I级 +Cover II = 隐蔽II级 ++25% Defence against ranged attacks = 遭受远程攻击时+25%防御力 +March = 长途行军 +Charge = 猛烈冲锋 +wounded units = 受伤单位 +Mobility = 机动能力 +Volley = 齐射能力 +Sentry = 警戒能力 +Extended Range = 射程拓展 ++1 Range = +1射程 +Ranged attacks may be performed over obstacles = 越过障碍进行远程攻击 +Formation I = 列阵I级 +Formation II = 列阵II级 +Blitz = 闪击战术 +Bombardment I = 轰炸I级 +Bombardment II = 轰炸II级 +Bombardment III = 轰炸III级 +Boarding Party I = 接舷I级 +Boarding Party II = 接舷II级 +Boarding Party III = 接舷III级 +Coastal Raider I = 海掠I级 +Coastal Raider II = 海掠II级 +Coastal Raider III = 海掠III级 +Targeting I = 定位I级 +Targeting II = 定位II级 +Targeting III = 定位III级 +Wolfpack I = 狼群I级 +Wolfpack II = 狼群II级 +Wolfpack III = 狼群III级 +Woodsman = 林地幽灵 +Double movement rate through Forest and Jungle = 通过森林或丛林时移动速度加倍 +Heal Instantly = 浴火重生 +Heal this Unit by 50 HP; Doing so will consume this opportunity to choose a Promotion = 立即回复50生命值,同时放弃本次晋升机会 +Medic = 治疗I级 +Medic II = 治疗II级 +This unit and all others in adjacent tiles heal 5 additional HP per turn = 本单位及其相邻单位每回合额外回复5生命值 +This unit and all others in adjacent tiles heal 5 additional HP. This unit heals 5 additional HP outside of friendly territory. = 本单位及其相邻单位每回合额外回复5生命值,该单位在己方领土以外每回合额外回复5生命值 +Targeting I (air) = 空中定位I级 +Targeting II (air) = 空中定位II级 +Targeting III (air) = 空中定位III级 +Air Repair = 空中维修 +Unit will heal every turn, even if it performs an action = 每回合回复生命值(包括执行指令后) +Operational Range = 航程拓展 ++2 Range = +2航程 +Sortie = 连续出击 +1 extra Interception may be made per turn = +1额外拦截次数/回合 +Bonus when performing air sweep [bonusAmount]% = 空中游猎时+[bonusAmount]%战斗力 +Dogfighting I = 缠斗I级 +Dogfighting II = 缠斗II级 +Dogfighting III = 缠斗III级 +Bonus when intercepting [bonusAmount]% = 拦截敌方飞机时+[bonusAmount]%战斗力 +Interception I = 拦截I级 +Interception II = 拦截II级 +Interception III = 拦截III级 +Siege I = 攻坚I级 +Siege II = 攻坚II级 +Siege III = 攻坚III级 +Evasion = 规避能力 +Reduces damage taken from interception by 50% = 遭受拦截时的损伤-50% +Bonus when intercepting [amount]% = 执行拦截任务时+[amount]%战斗力 +Ambush I = 伏击I级 +Ambush II = 伏击II级 + # Requires translation! +Can carry 2 aircraft = +Haka War Dance = 哈卡战舞 +-10% combat strength for adjacent enemy units = 相邻的敌方单位-10%战斗力 +Rejuvenation = 返老還童 + # Requires translation! +All healing effects doubled = diff --git a/android/assets/jsons/translationsByLanguage/Spanish.properties b/android/assets/jsons/translationsByLanguage/Spanish.properties index dce8947f81..3934031199 100644 --- a/android/assets/jsons/translationsByLanguage/Spanish.properties +++ b/android/assets/jsons/translationsByLanguage/Spanish.properties @@ -156,6 +156,8 @@ Cost of acquiring new tiles reduced by 25% = El coste de adquirir nuevas casilla Porcelain Tower = Torre de Porcelana 'Things always seem fairer when we look back at them, and it is out of that inaccessible tower of the past that Longing leans and beckons.' - James Russell Lowell = 'Las cosas parecen más justas cuando volvemos la vista atrás para verlas, y es por esa inaccesible torre del pasado que el anhelo se asoma y nos llama con la mano.' - James Russell Lowell Free great scientist appears = Aparece un Gran Científico gratis + # Requires translation! +Science gained from research agreements +50% = Ironworks = Herrería Armory = Armería @@ -1330,6 +1332,8 @@ Who knows what the future holds? = ¿Quién sabe qué nos depara el futuro? +10% science and production in all cities = +10% de ciencia y producción en todas las ciudades Improves movement speed on roads = Mejora la velocidad de movimiento en carreteras Enables conversion of city production to science = Habilita la conversión de producción a ciencia + # Requires translation! +Enables Research agreements = Enables conversion of city production to gold = Habilita la conversión de producción a oro Enables embarkation for land units = Habilita la embarcacion a las unidades de tierra Enables embarked units to enter ocean tiles = Habilita a las unidades embarcadas a entrar en océanos diff --git a/android/assets/jsons/translationsByLanguage/Thai.properties b/android/assets/jsons/translationsByLanguage/Thai.properties index db47cb00a7..b334aa8750 100644 --- a/android/assets/jsons/translationsByLanguage/Thai.properties +++ b/android/assets/jsons/translationsByLanguage/Thai.properties @@ -152,6 +152,8 @@ Cost of acquiring new tiles reduced by 25% = ค่าใช้จ่ายใ Porcelain Tower = เจดีย์กระเบื้องเคลือบ 'Things always seem fairer when we look back at them, and it is out of that inaccessible tower of the past that Longing leans and beckons.' - James Russell Lowell = เรื่องราวต่างๆดูเสมอภาคขึ้นเมื่อเรามองย้อนไป และมันอยู่นอกหอคอยแห่งอดีตที่เข้าถึงไม่ได้ กำลังโหยหาและควักมือเรียกเราอยู่' - เจมส์ รัสเซล โลเวลล์ Free great scientist appears = นักวิทยาศาสตร์ผู้ยิ่งใหญ่มาแบบฟรีๆ + # Requires translation! +Science gained from research agreements +50% = Ironworks = โรงทำเหล็ก Armory = คลังอาวุธ @@ -1211,6 +1213,8 @@ Who knows what the future holds? = ใครจะรู้ว่าในอน +10% science and production in all cities = +10% วิทยาศาสตร์และการผลิตในทุกเมือง Improves movement speed on roads = ปรับปรุงความเร็วในการเดินบนถนน Enables conversion of city production to science = เปิดใช้งานการแปลงการผลิตให้เป็นวิทยาศาสตร์ + # Requires translation! +Enables Research agreements = Enables conversion of city production to gold = เปิดใช้งานการแปลงการผลิตให้เป็นทอง Enables embarkation for land units = เปิดใช้งานการลงเรือให้กับยูนิตทัพบก Enables embarked units to enter ocean tiles = เปิดใช้งานการลงเรือให้ไปมหาสมุทรได้ diff --git a/android/assets/jsons/translationsByLanguage/Traditional_Chinese.properties b/android/assets/jsons/translationsByLanguage/Traditional_Chinese.properties index a36696facb..5563656d80 100644 --- a/android/assets/jsons/translationsByLanguage/Traditional_Chinese.properties +++ b/android/assets/jsons/translationsByLanguage/Traditional_Chinese.properties @@ -160,6 +160,8 @@ Cost of acquiring new tiles reduced by 25% = 購買新地塊花費-25% Porcelain Tower = 大報恩寺塔 'Things always seem fairer when we look back at them, and it is out of that inaccessible tower of the past that Longing leans and beckons.' - James Russell Lowell = “我們所失去的總是要在回望之時才更知道它的美好,而那曾經不可一世的高塔如今是多麼的可望能夠有所依靠。”——詹姆斯·羅素·洛威爾(美國詩人) Free great scientist appears = 免費的大科學家出現 + # Requires translation! +Science gained from research agreements +50% = 科研協定產出的科研+50% Ironworks = 鋼鐵廠 Armory = 軍械所 @@ -339,14 +341,10 @@ Indeed! = 這是無比正確的選擇! Denounce ([numberOfTurns] turns) = 譴責([numberOfTurns]回合) We will remember this. = 這種侮辱我們絕不會忘記。請好自為之! - # Requires translation! -[civName] has declared war on [targetCivName]! = - # Requires translation! -[civName] and [targetCivName] have signed the Peace Treaty! = - # Requires translation! -[civName] and [targetCivName] have signed the Declaration of Friendship! = - # Requires translation! -[civName] has denounced [targetCivName]! = +[civName] has declared war on [targetCivName]! = [civName]向[targetCivName]宣戰! +[civName] and [targetCivName] have signed the Peace Treaty! = [civName]和[targetCivName]簽署了和平條約! +[civName] and [targetCivName] have signed the Declaration of Friendship! = [civName]和[targetCivName]簽署了友誼宣言! +[civName] has denounced [targetCivName]! = [civName]譴責了[targetCivName]! Unforgivable = 仇深似海 Enemy = 宿命之敵 @@ -893,8 +891,8 @@ Are you sure you want to sell this [building]? = 您真的想賣掉[building]嗎 Great person points = 偉人點數 Current points = 目前點數 Points per turn = 獲得點數/回合 -Convert production to gold at a rate of 4 to 1 = 轉換1/4產能為金錢 -Convert production to science at a rate of 4 to 1 = 轉換1/4產能為科研 +Convert production to gold at a rate of 4 to 1 = 按4:1的比例轉化產能為金錢 +Convert production to science at a rate of 4 to 1 = 按4:1的比例轉化產能為科研 The city will not produce anything. = 城市將不會建造/訓練任何項目 # Technology UI @@ -1210,7 +1208,7 @@ Free Speech = 言論自由 Democracy = 民主主義 Specialists produce half normal unhappiness = 城市人口中專業人員產生的不滿減半 Freedom Complete = 完整的自由政策 -Tile yield from great improvement +100%, golden ages increase by 50% = 建有設施的地區產出+100%,黃金時代持續時間+50% +Tile yield from great improvement +100%, golden ages increase by 50% = 建有偉人設施的地區產出+100%,黃金時代持續時間+50% Autocracy = 獨裁政策 -33% unit upkeep costs = 單位維護費-33% @@ -1385,6 +1383,8 @@ Who knows what the future holds? = 誰知道未來會怎樣? +10% science and production in all cities = 所有城市+10%的科研和產能輸出 Improves movement speed on roads = 提高道路上的移動速度 Enables conversion of city production to science = 可將城市產能轉化為科研 + # Requires translation! +Enables Research agreements = Enables conversion of city production to gold = 可將城市產能轉化為金錢 Enables embarkation for land units = 陸軍單位擁有船運能力 Enables embarked units to enter ocean tiles = 擁有船運能力的單位能夠進入海洋 diff --git a/android/assets/jsons/translationsByLanguage/Turkish.properties b/android/assets/jsons/translationsByLanguage/Turkish.properties index 90d44d37bb..689c37ddf7 100644 --- a/android/assets/jsons/translationsByLanguage/Turkish.properties +++ b/android/assets/jsons/translationsByLanguage/Turkish.properties @@ -156,6 +156,8 @@ Cost of acquiring new tiles reduced by 25% = Yeni bölge alma maliyeti 25% azalt Porcelain Tower = Porselen Kule 'Things always seem fairer when we look back at them, and it is out of that inaccessible tower of the past that Longing leans and beckons.' - James Russell Lowell = “Onlara baktığımızda işler her zaman daha adil gözüküyor ve Longing'in eğildiği ve çıldırdığı geçmişin erişilemeyen kulesinin dışında.” - James Russell Lowell Free great scientist appears = Ücretsiz büyük bilim adamı ortaya çıkar + # Requires translation! +Science gained from research agreements +50% = Ironworks = Demirhane Armory = Cephanelik @@ -1300,6 +1302,8 @@ Who knows what the future holds? = kim bilir gelecek ne gösterecek? +10% science and production in all cities = Bütün şehirlerde +10% bilim ve üretim Improves movement speed on roads = Yollardaki hareket hızını artırır Enables conversion of city production to science = Şehir üretiminin bilime dönüştürülmesini sağlar + # Requires translation! +Enables Research agreements = Enables conversion of city production to gold = Şehir üretiminin altına dönüşmesini sağlar Enables embarkation for land units = Kara birimleri için gemiye binmeyi mümkün kılar Enables embarked units to enter ocean tiles = Gemiye giren birimlerin okyanusa girmesini sağlar diff --git a/android/assets/jsons/translationsByLanguage/Ukrainian.properties b/android/assets/jsons/translationsByLanguage/Ukrainian.properties index 33262be049..f477e9c79b 100644 --- a/android/assets/jsons/translationsByLanguage/Ukrainian.properties +++ b/android/assets/jsons/translationsByLanguage/Ukrainian.properties @@ -156,6 +156,8 @@ Cost of acquiring new tiles reduced by 25% = Вартість отримання Porcelain Tower = Порцелянова пагода 'Things always seem fairer when we look back at them, and it is out of that inaccessible tower of the past that Longing leans and beckons.' - James Russell Lowell = «Речі завжди здаються справедливішими, коли ми дивимось на них з тієї неприступної вежі минулого, де туга сховалася і манить» - Джеймс Расселл Ловелл Free great scientist appears = Безкоштовно з’являється видатний науковець + # Requires translation! +Science gained from research agreements +50% = Ironworks = Чавуноливарня Armory = Зброярня @@ -1300,6 +1302,8 @@ Who knows what the future holds? = Хто знає, що ховає майбут +10% science and production in all cities = Наука і виробництво у всіх містах +10% Improves movement speed on roads = Підвищує швидкість руху дорогами Enables conversion of city production to science = Дозволяє перемкнути виробництво міста на науку + # Requires translation! +Enables Research agreements = Enables conversion of city production to gold = Дозволяє перемкнути виробництво міста на золото Enables embarkation for land units = Дозволяє посадку на судно наземним підрозділам Enables embarked units to enter ocean tiles = Дозволяє підрозділам на борту потрапляти до океанських клітинок diff --git a/android/assets/jsons/translationsByLanguage/template.properties b/android/assets/jsons/translationsByLanguage/template.properties index 357777e2ac..b52894e257 100644 --- a/android/assets/jsons/translationsByLanguage/template.properties +++ b/android/assets/jsons/translationsByLanguage/template.properties @@ -156,6 +156,7 @@ Cost of acquiring new tiles reduced by 25% = Porcelain Tower = 'Things always seem fairer when we look back at them, and it is out of that inaccessible tower of the past that Longing leans and beckons.' - James Russell Lowell = Free great scientist appears = +Science gained from research agreements +50% = Ironworks = Armory = @@ -1303,6 +1304,7 @@ Who knows what the future holds? = +10% science and production in all cities = Improves movement speed on roads = Enables conversion of city production to science = +Enables Research agreements = Enables conversion of city production to gold = Enables embarkation for land units = Enables embarked units to enter ocean tiles = diff --git a/core/src/com/unciv/Constants.kt b/core/src/com/unciv/Constants.kt index 82dc7c3521..d042d4f3cd 100644 --- a/core/src/com/unciv/Constants.kt +++ b/core/src/com/unciv/Constants.kt @@ -34,6 +34,7 @@ class Constants{ const val ancientRuins = "Ancient ruins" const val peaceTreaty = "Peace Treaty" + const val researchAgreement = "Research Agreement" const val openBorders = "Open Borders" const val random = "Random" val greatImprovements = listOf("Academy", "Landmark", "Manufactory", "Customs house") diff --git a/core/src/com/unciv/logic/automation/NextTurnAutomation.kt b/core/src/com/unciv/logic/automation/NextTurnAutomation.kt index 7bb0cc22a8..ffdfc1ab62 100644 --- a/core/src/com/unciv/logic/automation/NextTurnAutomation.kt +++ b/core/src/com/unciv/logic/automation/NextTurnAutomation.kt @@ -10,6 +10,7 @@ import com.unciv.logic.civilization.diplomacy.DiplomaticStatus import com.unciv.logic.civilization.diplomacy.RelationshipLevel import com.unciv.logic.map.MapUnit import com.unciv.logic.trade.* +import com.unciv.models.metadata.GameSpeed import com.unciv.models.ruleset.VictoryType import com.unciv.models.ruleset.tech.Technology import com.unciv.models.translations.tr @@ -25,7 +26,9 @@ class NextTurnAutomation{ respondToTradeRequests(civInfo) if(civInfo.isMajorCiv()) { + offerDeclarationOfFriendship(civInfo) offerPeaceTreaty(civInfo) + offerResearchAgreement(civInfo) exchangeTechs(civInfo) exchangeLuxuries(civInfo) issueRequests(civInfo) @@ -309,6 +312,62 @@ class NextTurnAutomation{ return cityDistances.minBy { it.arialDistance }!! } + private fun offerDeclarationOfFriendship(civInfo: CivilizationInfo) { + val canDeclareFriendshipCiv = civInfo.getKnownCivs() + .asSequence() + .filter { it.isMajorCiv() } + .filter { !it.isAtWarWith(civInfo) } + .filter { it.getDiplomacyManager(civInfo).relationshipLevel() > RelationshipLevel.Neutral } + .filter { !civInfo.getDiplomacyManager(it).hasFlag(DiplomacyFlags.DeclarationOfFriendship) } + .filter { !civInfo.getDiplomacyManager(it).hasFlag(DiplomacyFlags.Denunceation) } + .sortedByDescending { it.getDiplomacyManager(civInfo).relationshipLevel() } + .toList() + for (civ in canDeclareFriendshipCiv) { + // Default setting is 5, this will be changed according to different civ. + if ((1..10).random()<=5) civInfo.getDiplomacyManager(civ).signDeclarationOfFriendship() + else continue + } + } + + private fun offerResearchAgreement(civInfo: CivilizationInfo) { + // if Civ has researched future tech, they will not want to sign RA. + if (civInfo.tech.getTechUniques().contains("Enables Research agreements") + && civInfo.gold >= civInfo.goldCostOfSignResearchAgreement() + && civInfo.gameInfo.ruleSet.technologies.values.any { !civInfo.tech.isResearched(it.name) && civInfo.tech.canBeResearched(it.name) }){ + val canSignResearchAgreementCiv = civInfo.getKnownCivs() + .asSequence() + .filter { it.isMajorCiv() } + .filter { civInfo.getDiplomacyManager(it).hasFlag(DiplomacyFlags.DeclarationOfFriendship) } + .filter { !civInfo.getDiplomacyManager(it).hasFlag(DiplomacyFlags.ResearchAgreement) } + .filter { !it.getDiplomacyManager(civInfo).hasFlag(DiplomacyFlags.ResearchAgreement) } + .filter { it.tech.getTechUniques().contains("Enables Research agreements") } + .filter { it.gold >= civInfo.goldCostOfSignResearchAgreement() } + .sortedByDescending { it.statsForNextTurn.science } + .toList() + val duration = when(civInfo.gameInfo.gameParameters.gameSpeed) { + GameSpeed.Quick -> 25 + GameSpeed.Standard -> 30 + GameSpeed.Epic -> 45 + } + for (otherCiv in canSignResearchAgreementCiv) { + // if otherCiv has researched future tech, they will not want to sign RA. + if (otherCiv.gameInfo.ruleSet.technologies.values.none { !otherCiv.tech.isResearched(it.name) && otherCiv.tech.canBeResearched(it.name) }) + continue + // Default setting is 5, this will be changed according to different civ. + if ((1..10).random()<=5 + && civInfo.gold >= civInfo.goldCostOfSignResearchAgreement()) { + val tradeLogic = TradeLogic(civInfo, otherCiv) + tradeLogic.currentTrade.ourOffers.add(TradeOffer(Constants.researchAgreement, TradeType.Treaty, duration, civInfo.goldCostOfSignResearchAgreement())) + tradeLogic.currentTrade.theirOffers.add(TradeOffer(Constants.researchAgreement, TradeType.Treaty, duration, civInfo.goldCostOfSignResearchAgreement())) + if (otherCiv.isPlayerCivilization()) + otherCiv.tradeRequests.add(TradeRequest(civInfo.civName, tradeLogic.currentTrade.reverse())) + // Default setting is 5, this will be changed according to different civ. + else if ((1..10).random()<=5) tradeLogic.acceptTrade() + } + } + } + } + private fun offerPeaceTreaty(civInfo: CivilizationInfo) { if (!civInfo.isAtWar() || civInfo.cities.isEmpty() || civInfo.diplomacy.isEmpty()) return diff --git a/core/src/com/unciv/logic/city/CityStats.kt b/core/src/com/unciv/logic/city/CityStats.kt index 6d12313f1a..119fecc453 100644 --- a/core/src/com/unciv/logic/city/CityStats.kt +++ b/core/src/com/unciv/logic/city/CityStats.kt @@ -63,8 +63,6 @@ class CityStats { "Gold" -> stats.gold += production / 4 "Science" -> { var scienceProduced = production / 4 - if (cityInfo.civInfo.containsBuildingUnique("Production to science conversion in cities increased by 33%")) - scienceProduced *= 1.33f if (cityInfo.civInfo.policies.isAdopted("Rationalism")) scienceProduced *= 1.33f stats.science += scienceProduced } diff --git a/core/src/com/unciv/logic/civilization/CivilizationInfo.kt b/core/src/com/unciv/logic/civilization/CivilizationInfo.kt index a581263e03..f5154b5aaf 100644 --- a/core/src/com/unciv/logic/civilization/CivilizationInfo.kt +++ b/core/src/com/unciv/logic/civilization/CivilizationInfo.kt @@ -495,6 +495,18 @@ class CivilizationInfo { updateStatsForNextTurn() } + fun goldCostOfSignResearchAgreement(): Int { + // https://forums.civfanatics.com/resources/research-agreements-bnw.25568/ + val basicGoldCostOfSignResearchAgreement = when(getEra()){ + TechEra.Medieval, TechEra.Renaissance -> 250 + TechEra.Industrial -> 300 + TechEra.Modern -> 350 + TechEra.Information, TechEra.Future -> 400 + else -> 0 + } + return (basicGoldCostOfSignResearchAgreement * gameInfo.gameParameters.gameSpeed.getModifier()).toInt() + } + fun giftMilitaryUnitTo(otherCiv: CivilizationInfo) { val city = NextTurnAutomation().getClosestCities(this, otherCiv).city1 val militaryUnit = city.cityConstructions.getConstructableUnits() diff --git a/core/src/com/unciv/logic/civilization/TechManager.kt b/core/src/com/unciv/logic/civilization/TechManager.kt index 53a5c6c364..61280e1f1c 100644 --- a/core/src/com/unciv/logic/civilization/TechManager.kt +++ b/core/src/com/unciv/logic/civilization/TechManager.kt @@ -31,6 +31,7 @@ class TechManager { var freeTechs = 0 /** For calculating Great Scientist yields - see https://civilization.fandom.com/wiki/Great_Scientist_(Civ5) */ var scienceOfLast8Turns = IntArray(8){0} + var scienceFromResearchAgreements = 0 var techsResearched = HashSet() /** When moving towards a certain tech, the user doesn't have to manually pick every one. */ var techsToResearch = ArrayList() @@ -45,6 +46,7 @@ class TechManager { toReturn.techsInProgress.putAll(techsInProgress) toReturn.techsToResearch.addAll(techsToResearch) toReturn.scienceOfLast8Turns=scienceOfLast8Turns.clone() + toReturn.scienceFromResearchAgreements=scienceFromResearchAgreements toReturn.overflowScience=overflowScience return toReturn } @@ -161,11 +163,25 @@ class TechManager { getRuleset().technologies[currentTechnologyName()]!!.cost)) } + private fun scienceFromResearchAgreements(): Int { + // https://forums.civfanatics.com/resources/research-agreements-bnw.25568/ + var researchAgreementModifier = 0.5f + if (civInfo.policies.isAdopted("Scientific Revolution")) + researchAgreementModifier += 0.25f + if (civInfo.containsBuildingUnique("Science gained from research agreements +50%")) + researchAgreementModifier += 0.25f + return (scienceFromResearchAgreements / 3 * researchAgreementModifier).toInt() + } + fun nextTurn(scienceForNewTurn: Int) { addCurrentScienceToScienceOfLast8Turns() val currentTechnology = currentTechnologyName() if (currentTechnology == null) return techsInProgress[currentTechnology] = researchOfTech(currentTechnology) + scienceForNewTurn + if (scienceFromResearchAgreements != 0){ + techsInProgress[currentTechnology] = techsInProgress[currentTechnology]!! + scienceFromResearchAgreements() + scienceFromResearchAgreements = 0 + } if (overflowScience != 0){ // https://forums.civfanatics.com/threads/the-mechanics-of-overflow-inflation.517970/ val techsResearchedKnownCivs = civInfo.getKnownCivs().count { it.isMajorCiv() && it.tech.isResearched(currentTechnologyName()!!) } val undefeatedCivs = UncivGame.Current.gameInfo.civilizations.count { it.isMajorCiv() && !it.isDefeated() } diff --git a/core/src/com/unciv/logic/civilization/diplomacy/DiplomacyManager.kt b/core/src/com/unciv/logic/civilization/diplomacy/DiplomacyManager.kt index 8b91de34c0..d863ef2507 100644 --- a/core/src/com/unciv/logic/civilization/diplomacy/DiplomacyManager.kt +++ b/core/src/com/unciv/logic/civilization/diplomacy/DiplomacyManager.kt @@ -2,10 +2,7 @@ package com.unciv.logic.civilization.diplomacy import com.badlogic.gdx.graphics.Color import com.unciv.Constants -import com.unciv.logic.civilization.AlertType -import com.unciv.logic.civilization.CityStateType -import com.unciv.logic.civilization.CivilizationInfo -import com.unciv.logic.civilization.PopupAlert +import com.unciv.logic.civilization.* import com.unciv.logic.trade.Trade import com.unciv.logic.trade.TradeType import com.unciv.models.ruleset.tile.ResourceSupplyList @@ -28,6 +25,7 @@ enum class DiplomacyFlags{ DeclinedPeace, DeclaredWar, DeclarationOfFriendship, + ResearchAgreement, Denunceation, BorderConflict, SettledCitiesNearUs, @@ -84,6 +82,9 @@ class DiplomacyManager() { /** For city-states. Resting point is the value of Influence at which it ceases changing by itself */ var restingPoint = 0f + /** Total of each turn Science during Research Agreement */ + var totalOfScienceDuringRA = 0 + fun clone(): DiplomacyManager { val toReturn = DiplomacyManager() toReturn.otherCivName=otherCivName @@ -93,6 +94,7 @@ class DiplomacyManager() { toReturn.restingPoint = restingPoint toReturn.flagsCountdown.putAll(flagsCountdown) toReturn.diplomaticModifiers.putAll(diplomaticModifiers) + toReturn.totalOfScienceDuringRA=totalOfScienceDuringRA return toReturn } @@ -186,6 +188,15 @@ class DiplomacyManager() { return goldPerTurnForUs } + fun sciencefromResearchAgreement(){ + // https://forums.civfanatics.com/resources/research-agreements-bnw.25568/ + val scienceFromResearchAgreement = min(totalOfScienceDuringRA, otherCivDiplomacy().totalOfScienceDuringRA) + civInfo.tech.scienceFromResearchAgreements += scienceFromResearchAgreement + otherCiv().tech.scienceFromResearchAgreements += scienceFromResearchAgreement + totalOfScienceDuringRA = 0 + otherCivDiplomacy().totalOfScienceDuringRA = 0 + } + fun resourcesFromTrade(): ResourceSupplyList { val counter = ResourceSupplyList() for(trade in trades){ @@ -272,8 +283,13 @@ class DiplomacyManager() { private fun nextTurnFlags() { for (flag in flagsCountdown.keys.toList()) { + if (flag == DiplomacyFlags.ResearchAgreement.name){ + totalOfScienceDuringRA += civInfo.statsForNextTurn.science.toInt() + } flagsCountdown[flag] = flagsCountdown[flag]!! - 1 if (flagsCountdown[flag] == 0) { + if (flag == DiplomacyFlags.ResearchAgreement.name && !otherCivDiplomacy().hasFlag(DiplomacyFlags.ResearchAgreement)) + sciencefromResearchAgreement() if (flag == DiplomacyFlags.ProvideMilitaryUnit.name && civInfo.cities.isEmpty() || otherCiv().cities.isEmpty()) continue flagsCountdown.remove(flag) @@ -389,6 +405,12 @@ class DiplomacyManager() { } } otherCivDiplomacy.removeFlag(DiplomacyFlags.DeclarationOfFriendship) + if(hasFlag(DiplomacyFlags.ResearchAgreement)) { + removeFlag(DiplomacyFlags.ResearchAgreement) + totalOfScienceDuringRA = 0 + otherCivDiplomacy.totalOfScienceDuringRA = 0 + } + otherCivDiplomacy.removeFlag(DiplomacyFlags.ResearchAgreement) if (otherCiv.isCityState()) otherCiv.updateAllyCivForCityState() if (!civInfo.isCityState()) { @@ -471,6 +493,8 @@ class DiplomacyManager() { otherCivDiplomacy().setModifier(DiplomaticModifiers.DeclarationOfFriendship,35f) setFlag(DiplomacyFlags.DeclarationOfFriendship,30) otherCivDiplomacy().setFlag(DiplomacyFlags.DeclarationOfFriendship,30) + if (otherCiv().playerType == PlayerType.Human) + otherCiv().addNotification("[${civInfo.civName}] and [${otherCiv().civName}] have signed the Declaration of Friendship!", null, Color.WHITE) for (thirdCiv in getCommonKnownCivs().filter { it.isMajorCiv() }) { thirdCiv.addNotification("[${civInfo.civName}] and [${otherCiv().civName}] have signed the Declaration of Friendship!", null, Color.WHITE) diff --git a/core/src/com/unciv/logic/trade/TradeEvaluation.kt b/core/src/com/unciv/logic/trade/TradeEvaluation.kt index 94472e6f95..de7dc2856b 100644 --- a/core/src/com/unciv/logic/trade/TradeEvaluation.kt +++ b/core/src/com/unciv/logic/trade/TradeEvaluation.kt @@ -49,7 +49,7 @@ class TradeEvaluation{ // If we're making a peace treaty, don't try to up the bargain for people you don't like. // Leads to spartan behaviour where you demand more, the more you hate the enemy...unhelpful - if(trade.ourOffers.none { it.name==Constants.peaceTreaty }) { + if(trade.ourOffers.none { it.name==Constants.peaceTreaty || it.name==Constants.researchAgreement }) { val relationshipLevel = evaluator.getDiplomacyManager(tradePartner).relationshipLevel() if (relationshipLevel == RelationshipLevel.Enemy) sumOfTheirOffers = (sumOfTheirOffers * 1.5).toInt() else if (relationshipLevel == RelationshipLevel.Unforgivable) sumOfTheirOffers *= 2 @@ -64,9 +64,12 @@ class TradeEvaluation{ TradeType.Gold -> return offer.amount TradeType.Gold_Per_Turn -> return offer.amount * offer.duration TradeType.Treaty -> { - if (offer.name == Constants.peaceTreaty) - return evaluatePeaceCostForThem(civInfo,tradePartner) // Since it will be evaluated twice, once when they evaluate our offer and once when they evaluate theirs - else return 1000 + return when (offer.name) { + // Since it will be evaluated twice, once when they evaluate our offer and once when they evaluate theirs + Constants.peaceTreaty -> evaluatePeaceCostForThem(civInfo,tradePartner) + Constants.researchAgreement -> evaluateResearchAgreementCostForThem(civInfo, tradePartner) + else -> 1000 + } } TradeType.Luxury_Resource -> { @@ -155,14 +158,17 @@ class TradeEvaluation{ TradeType.Gold -> return offer.amount TradeType.Gold_Per_Turn -> return offer.amount * offer.duration TradeType.Treaty -> { - if (offer.name == Constants.peaceTreaty) - return evaluatePeaceCostForThem(civInfo,tradePartner) // Since it will be evaluated twice, once when they evaluate our offer and once when they evaluate theirs - else return 1000 + return when (offer.name) { + // Since it will be evaluated twice, once when they evaluate our offer and once when they evaluate theirs + Constants.peaceTreaty -> evaluatePeaceCostForThem(civInfo, tradePartner) + Constants.researchAgreement -> evaluateResearchAgreementCostForThem(civInfo, tradePartner) + else -> 1000 + } } TradeType.Luxury_Resource -> { - if(civInfo.getCivResourcesByName()[offer.name]!!>1) - return 250 // fair price - else return 500 // you want to take away our last lux of this type?! + return if(civInfo.getCivResourcesByName()[offer.name]!!>1) + 250 // fair price + else 500 // you want to take away our last lux of this type?! } TradeType.Strategic_Resource -> { if(!civInfo.isAtWar()) return 50*offer.amount @@ -194,12 +200,12 @@ class TradeEvaluation{ val civToDeclareWarOn = civInfo.gameInfo.getCivilization(offer.name) val threatToUs = Automation().threatAssessment(civInfo, civToDeclareWarOn) - when (threatToUs) { - ThreatLevel.VeryLow -> return 100 - ThreatLevel.Low -> return 250 - ThreatLevel.Medium -> return 500 - ThreatLevel.High -> return 1000 - ThreatLevel.VeryHigh -> return 10000 // no way boyo + return when (threatToUs) { + ThreatLevel.VeryLow -> 100 + ThreatLevel.Low -> 250 + ThreatLevel.Medium -> 500 + ThreatLevel.High -> 1000 + ThreatLevel.VeryHigh -> 10000 // no way boyo } } @@ -211,12 +217,12 @@ class TradeEvaluation{ } TradeType.Agreement -> { if(offer.name == Constants.openBorders){ - when(civInfo.getDiplomacyManager(tradePartner).relationshipLevel()){ - RelationshipLevel.Unforgivable -> return 10000 - RelationshipLevel.Enemy -> return 2000 - RelationshipLevel.Competitor -> return 500 - RelationshipLevel.Neutral -> return 200 - RelationshipLevel.Favorable,RelationshipLevel.Friend,RelationshipLevel.Ally -> return 100 + return when(civInfo.getDiplomacyManager(tradePartner).relationshipLevel()){ + RelationshipLevel.Unforgivable -> 10000 + RelationshipLevel.Enemy -> 2000 + RelationshipLevel.Competitor -> 500 + RelationshipLevel.Neutral -> 200 + RelationshipLevel.Favorable,RelationshipLevel.Friend,RelationshipLevel.Ally -> 100 } } throw Exception("Invalid agreement type!") @@ -242,4 +248,7 @@ class TradeEvaluation{ } } + fun evaluateResearchAgreementCostForThem(ourCivilization: CivilizationInfo, otherCivilization: CivilizationInfo): Int { + return -100 * (ourCivilization.getEra().ordinal-otherCivilization.getEra().ordinal) + } } \ No newline at end of file diff --git a/core/src/com/unciv/logic/trade/TradeLogic.kt b/core/src/com/unciv/logic/trade/TradeLogic.kt index 5a72523345..1e752c1667 100644 --- a/core/src/com/unciv/logic/trade/TradeLogic.kt +++ b/core/src/com/unciv/logic/trade/TradeLogic.kt @@ -2,6 +2,7 @@ package com.unciv.logic.trade import com.unciv.Constants import com.unciv.logic.civilization.CivilizationInfo +import com.unciv.logic.civilization.diplomacy.DiplomacyFlags import com.unciv.logic.civilization.diplomacy.DiplomaticStatus import com.unciv.models.ruleset.tile.ResourceType import com.unciv.models.translations.tr @@ -102,6 +103,10 @@ class TradeLogic(val ourCivilization:CivilizationInfo, val otherCivilization: Ci } if (offer.type == TradeType.Treaty) { if (offer.name == Constants.peaceTreaty) to.getDiplomacyManager(from).makePeace() + if (offer.name == Constants.researchAgreement) { + to.gold -= offer.amount + to.getDiplomacyManager(from).setFlag(DiplomacyFlags.ResearchAgreement, offer.duration) + } } if (offer.type == TradeType.Introduction) to.meetCivilization(to.gameInfo.getCivilization(offer.name)) diff --git a/core/src/com/unciv/logic/trade/TradeOffer.kt b/core/src/com/unciv/logic/trade/TradeOffer.kt index 4c5abbb993..a0495758d4 100644 --- a/core/src/com/unciv/logic/trade/TradeOffer.kt +++ b/core/src/com/unciv/logic/trade/TradeOffer.kt @@ -22,7 +22,7 @@ data class TradeOffer(var name:String, var type: TradeType, TradeType.City -> UncivGame.Current.gameInfo.getCities().first{ it.id == name }.name else -> name }.tr() - if (type !in tradesToNotHaveNumbers) offerText += " ($amount)" + if (type !in tradesToNotHaveNumbers || name=="Research Agreement") offerText += " ($amount)" if (duration > 0) offerText += "\n" + duration + " {turns}".tr() return offerText } diff --git a/core/src/com/unciv/ui/trade/DiplomacyScreen.kt b/core/src/com/unciv/ui/trade/DiplomacyScreen.kt index e8377c6679..33c03bbf22 100644 --- a/core/src/com/unciv/ui/trade/DiplomacyScreen.kt +++ b/core/src/com/unciv/ui/trade/DiplomacyScreen.kt @@ -18,6 +18,7 @@ import com.unciv.logic.civilization.diplomacy.RelationshipLevel import com.unciv.logic.trade.TradeLogic import com.unciv.logic.trade.TradeOffer import com.unciv.logic.trade.TradeType +import com.unciv.models.metadata.GameSpeed import com.unciv.models.translations.tr import com.unciv.ui.utils.* import com.unciv.ui.utils.YesNoPopup @@ -187,7 +188,13 @@ class DiplomacyScreen(val viewingCiv:CivilizationInfo):CameraStageBaseScreen() { if(!viewingCiv.isAtWarWith(otherCiv)) { val tradeButton = TextButton("Trade".tr(), skin) - tradeButton.onClick { setTrade(otherCiv) } + tradeButton.onClick { + setTrade(otherCiv).apply { + tradeLogic.ourAvailableOffers.apply { remove(firstOrNull { it.type==TradeType.Treaty }) } + tradeLogic.theirAvailableOffers.apply { remove(firstOrNull { it.type==TradeType.Treaty }) } + offerColumnsTable.update() + } + } diplomacyTable.add(tradeButton).row() if(isNotPlayersTurn()) tradeButton.disable() } @@ -223,6 +230,38 @@ class DiplomacyScreen(val viewingCiv:CivilizationInfo):CameraStageBaseScreen() { if(isNotPlayersTurn()) declareFriendshipButton.disable() } + if(diplomacyManager.hasFlag(DiplomacyFlags.DeclarationOfFriendship) + && !diplomacyManager.hasFlag(DiplomacyFlags.ResearchAgreement) + && !otherCivDiplomacyManager.hasFlag(DiplomacyFlags.ResearchAgreement) + && viewingCiv.tech.getTechUniques().contains("Enables Research agreements") + && otherCiv.tech.getTechUniques().contains("Enables Research agreements") + && viewingCiv.gold >= viewingCiv.goldCostOfSignResearchAgreement() + && otherCiv.gold >= viewingCiv.goldCostOfSignResearchAgreement() + && viewingCiv.gameInfo.ruleSet.technologies.values.any { !viewingCiv.tech.isResearched(it.name) && viewingCiv.tech.canBeResearched(it.name) } + && otherCiv.gameInfo.ruleSet.technologies.values.any { !otherCiv.tech.isResearched(it.name) && otherCiv.tech.canBeResearched(it.name) }){ + val researchAgreementButton = TextButton("Research Agreement".tr(),skin) + researchAgreementButton.onClick { + val tradeTable = setTrade(otherCiv) + val duration = when(viewingCiv.gameInfo.gameParameters.gameSpeed) { + GameSpeed.Quick -> 25 + GameSpeed.Standard -> 30 + GameSpeed.Epic -> 45 + } + val researchAgreement = TradeOffer(Constants.researchAgreement, TradeType.Treaty, duration, viewingCiv.goldCostOfSignResearchAgreement()) + val goldCostOfSignResearchAgreement = TradeOffer("Gold".tr(), TradeType.Gold, 0, -viewingCiv.goldCostOfSignResearchAgreement()) + tradeTable.tradeLogic.currentTrade.theirOffers.add(researchAgreement) + tradeTable.tradeLogic.ourAvailableOffers.add(researchAgreement) + tradeTable.tradeLogic.ourAvailableOffers.add(goldCostOfSignResearchAgreement) + tradeTable.tradeLogic.currentTrade.ourOffers.add(researchAgreement) + tradeTable.tradeLogic.theirAvailableOffers.add(researchAgreement) + tradeTable.tradeLogic.theirAvailableOffers.add(goldCostOfSignResearchAgreement) + tradeTable.offerColumnsTable.update() + } + if (isNotPlayersTurn()) researchAgreementButton.disable() + + diplomacyTable.add(researchAgreementButton).row() + } + if(!diplomacyManager.hasFlag(DiplomacyFlags.Denunceation) && !diplomacyManager.hasFlag(DiplomacyFlags.DeclarationOfFriendship)){ val denounceButton = TextButton("Denounce ([30] turns)".tr(),skin) diff --git a/core/src/com/unciv/ui/trade/OffersListScroll.kt b/core/src/com/unciv/ui/trade/OffersListScroll.kt index 5d37935096..ff53d74c14 100644 --- a/core/src/com/unciv/ui/trade/OffersListScroll.kt +++ b/core/src/com/unciv/ui/trade/OffersListScroll.kt @@ -54,7 +54,7 @@ class OffersListScroll(val onOfferClicked: (TradeOffer) -> Unit) : ScrollPane(nu val amountPerClick = if (offer.type == Gold) 50 else 1 - if (offer.amount > 0 && offer.name != Constants.peaceTreaty) // can't disable peace treaty! + if (offer.amount > 0 && offer.name != Constants.peaceTreaty && offer.name != Constants.researchAgreement) // can't disable peace treaty! tradeButton.onClick { val amountTransferred = min(amountPerClick, offer.amount) onOfferClicked(offer.copy(amount = amountTransferred))