Added Persian civilization

This commit is contained in:
Yair Morgenstern 2019-09-15 15:17:56 +03:00
parent 9665c59782
commit 3084a5bc33
13 changed files with 606 additions and 569 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

File diff suppressed because it is too large Load diff

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1,022 KiB

After

Width:  |  Height:  |  Size: 1 MiB

View file

@ -500,7 +500,6 @@
requiredBuilding:"Market", requiredBuilding:"Market",
requiredTech:"Banking" requiredTech:"Banking"
}, },
/*
{ {
name:"Satrap's Court", name:"Satrap's Court",
replaces:"Bank", replaces:"Bank",
@ -510,11 +509,9 @@
happiness:2, happiness:2,
hurryCostModifier:15, hurryCostModifier:15,
percentStatBonus:{gold:25}, percentStatBonus:{gold:25},
uniques:["+1 Gold per incoming trade route (and +1 Gold for the foreign owner)"],
requiredBuilding:"Market", requiredBuilding:"Market",
requiredTech:"Banking" requiredTech:"Banking"
}, },
*/
{ {
name:"Hanse", name:"Hanse",
replaces:"Bank", replaces:"Bank",

View file

@ -579,6 +579,45 @@
"Chondote","Canajoharie","Nedrow","Oneida Lake","Kanonwalohale","Green Bay","Southwold","Mohawk Valley", "Chondote","Canajoharie","Nedrow","Oneida Lake","Kanonwalohale","Green Bay","Southwold","Mohawk Valley",
"Schoharie","Bay of Quinte","Kanawale","Kanatsiokareke","Tyendinaga","Hahta"] "Schoharie","Bay of Quinte","Kanawale","Kanatsiokareke","Tyendinaga","Hahta"]
}, },
{
name:"Persia",
leaderName:"Darius I",
adjective:["Persian"],
preferredVictoryType:"Scientific",
startIntroPart1: "The blessings of heaven be upon you, beloved king Darius of Persia! You lead a strong and wise people. In the morning of the world, the great Persian leader Cyrus revolted against the mighty Median empire and by 550 BC, the Medes were no more. Through cunning diplomacy and military prowess, great Cyrus conquered wealthy Lydia and powerful Babylon. His son conquering proud Egypt some years later. Over time, Persian might expanded into far away Macedonia, at the very door of the upstart Greek city-states. Long would Persia prosper until the upstart villain Alexander of Macedon, destroyed the great empire in one shocking campaign."
startIntroPart2: "Darius, your people look to you to once again bring back the days of power and glory for Persia! The empire of your ancestors must emerge again, to triumph over its foes and to bring peace and order to the world! O king, will you answer the call? Can you build a civilization that will stand the test of time?"
declaringWar:"Your continue existence is an embarrassment to all leaders everywhere! You must be destroyed!"
attacked:"Curse you! You are beneath me, son of a donkey driver! I will crush you!"
defeated:"You mongrel! Cursed be you! The world will long lament your heinous crime!"
introduction:"Peace be on you! I am Darius, the great and outstanding king of kings of great Persia... but I suppose you knew that."
neutralHello:"Good day to you!"
neutralLetsHearIt:["Go on.","You said?"]
neutralNo:["You are not serious!","Not good enough."]
neutralYes:["Good!","Certainly.","Agreed!"]
hateHello:"Ahh... you..."
hateLetsHearIt:["I'm listening.","Go on!"]
hateNo:["We say... no!","Of course not!"]
hateYes:["Alright!","Agreed."]
afterPeace:"It appears we should call it a tie..."
tradeRequest:"In my endless magnanimity, I am making you this offer. You agree, of course?"
outerColor:[153,5,3],
innerColor:[244,232,54],
uniqueName:"Achaemenid Legacy"
unique:"Golden Ages last 50% longer. During a Golden Age, units receive +1 Movement and +10% Strength",
cities:["Persepolis","Parsagadae","Susa","Ecbatana","Tarsus","Gordium","Bactra","Sardis","Ergili","Dariushkabir",
"Ghulaman","Zohak","Istakhr","Jinjan","Borazjan","Herat","Dakyanus","Bampur","Turengtepe","Rey","Shiraz",
"Thuspa","Hasanlu","Gabae","Merv","Behistun","Kandahar","Altintepe","Bunyan","Charsadda","Uratyube",
"Dura Europos","Aleppo","Qatna","Kabul","Capisa","Kyreskhata","Marakanda","Peshawar","Van","Pteira","Arshada",
"Artakaona","Aspabota","Autiyara","Bagastana","Baxtri","Darmasa","Daphnai","Drapsaka","Eion","Gandutava",
"Gaugamela","Harmozeia","Ekatompylos","Izata","Kampada","Kapisa","Karmana","Kounaxa","Kuganaka","Nautaka",
"Paishiyauvada","Patigrbana","Phrada"]
},
/* /*
{ {
@ -810,45 +849,6 @@
"Huaras","Riobamba","Caxamalca","Sausa","Tambo Colorado","Huaca","Tumbes","Chan Chan","Sipan","Pachacamac", "Huaras","Riobamba","Caxamalca","Sausa","Tambo Colorado","Huaca","Tumbes","Chan Chan","Sipan","Pachacamac",
"Llactapata","Pisac","Kuelap","Pajaten","Chucuito","Choquequirao"] "Llactapata","Pisac","Kuelap","Pajaten","Chucuito","Choquequirao"]
} }
{
name:"Persian",
leaderName:"Darius I",
adjective:["Persian"],
preferredVictoryType:"Scientific",
startIntroPart1: "The blessings of heaven be upon you, beloved king Darius of Persia! You lead a strong and wise people. In the morning of the world, the great Persian leader Cyrus revolted against the mighty Median empire and by 550 BC, the Medes were no more. Through cunning diplomacy and military prowess, great Cyrus conquered wealthy Lydia and powerful Babylon. His son conquering proud Egypt some years later. Over time, Persian might expanded into far away Macedonia, at the very door of the upstart Greek city-states. Long would Persia prosper until the upstart villain Alexander of Macedon, destroyed the great empire in one shocking campaign."
startIntroPart2: "Darius, your people look to you to once again bring back the days of power and glory for Persia! The empire of your ancestors must emerge again, to triumph over its foes and to bring peace and order to the world! O king, will you answer the call? Can you build a civilization that will stand the test of time?"
declaringWar:"Your continue existence is an embarrassment to all leaders everywhere! You must be destroyed!"
attacked:"Curse you! You are beneath me, son of a donkey driver! I will crush you!"
defeated:"You mongrel! Cursed be you! The world will long lament your heinous crime!"
introduction:"Peace be on you! I am Darius, the great and outstanding king of kings of great Persia... but I suppose you knew that."
neutralHello:"Good day to you!"
neutralLetsHearIt:["Go on.","You said?"]
neutralNo:["You are not serious!","Not good enough."]
neutralYes:["Good!","Certainly.","Agreed!"]
hateHello:"Ahh... you..."
hateLetsHearIt:["I'm listening.","Go on!"]
hateNo:["We say... no!","Of course not!"]
hateYes:["Alright!","Agreed."]
afterPeace:"It appears we should call it a tie..."
tradeRequest:"In my endless magnanimity, I am making you this offer. You agree, of course?"
outerColor:[255,0,0],
innerColor:[255,255,0],
uniqueName:"Achaemenid Legacy"
unique:"Golden Ages last 50% longer. During a Golden Age, units receive +1 Movement and +10% Strenght",
cities:["Persepolis","Parsagadae","Susa","Ecbatana","Tarsus","Gordium","Bactra","Sardis","Ergili","Dariushkabir",
"Ghulaman","Zohak","Istakhr","Jinjan","Borazjan","Herat","Dakyanus","Bampur","Turengtepe","Rey","Shiraz",
"Thuspa","Hasanlu","Gabae","Merv","Behistun","Kandahar","Altintepe","Bunyan","Charsadda","Uratyube",
"Dura Europos","Aleppo","Qatna","Kabul","Capisa","Kyreskhata","Marakanda","Peshawar","Van","Pteira","Arshada",
"Artakaona","Aspabota","Autiyara","Bagastana","Baxtri","Darmasa","Daphnai","Drapsaka","Eion","Gandutava",
"Gaugamela","Harmozeia","Ekatompylos","Izata","Kampada","Kapisa","Karmana","Kounaxa","Kuganaka","Nautaka",
"Paishiyauvada","Patigrbana","Phrada"]
},
{ {
name:"Polynesia", name:"Polynesia",
leaderName:"Kamehameha I", leaderName:"Kamehameha I",

View file

@ -1234,6 +1234,22 @@
French:"Les Forêt et les Jungles en territoire alliés ont les mêmes attributs que les routes. A la découverte de la Roue, elles peuvent établir des routes commerciales." French:"Les Forêt et les Jungles en territoire alliés ont les mêmes attributs que les routes. A la découverte de la Roue, elles peuvent établir des routes commerciales."
} }
"Persia":{
Italian:"Persia"
French:"Perse"
Portuguese:"Pérsia"
}
"Darius I":{
}
"Golden Ages last 50% longer. During a Golden Age, units receive +1 Movement and a +10% Combat Strenght bonus.":{
Italian:"+50% durata delle Età dell'Oro, durante le quali le unità ricevono +1 Movimento e +10% Forza."
Portuguese:"Idades douradas duram 50% mais, unidades recebem 1 movimento a mais e um bonus de +10% em força de combate."
French:"Les Ages d'Or durent 50% plus longtemps. Durant les Ages d'Or, les unités gagnent +1 mouvement et +10% de force de Combat."
}
/* /*
"Aztecs":{ "Aztecs":{
Italian:"Azteca" Italian:"Azteca"
@ -1313,17 +1329,6 @@
French:"Peut embarquer et bouger sur les océans dès le début. +1 Vision lorsque embarqué." French:"Peut embarquer et bouger sur les océans dès le début. +1 Vision lorsque embarqué."
} }
"Persia":{
Italian:"Persia"
French:"Perse"
Portuguese:"Pérsia"
}
"Golden Ages last 50% longer. During a Golden Age, units receive +1 Movement and a +10% Combat Strenght bonus.":{
Italian:"+50% durata delle Età dell'Oro, durante le quali le unità ricevono +1 Movimento e +10% Forza."
Portuguese:"Idades douradas duram 50% mais, unidades recebem 1 movimento a mais e um bonus de +10% em força de combate."
French:"Les Ages d'Or durent 50% plus longtemps. Durant les Ages d'Or, les unités gagnent +1 mouvement et +10% de force de Combat."
}
*/ */

View file

@ -382,6 +382,12 @@
French:"Hoplite" French:"Hoplite"
} }
"Immortal":{ // Persian unique
}
"+10 HP when healing":{
}
////// Classical Era Units ////// Classical Era Units
"Composite Bowman":{ "Composite Bowman":{

View file

@ -243,11 +243,10 @@
hurryCostModifier:20, hurryCostModifier:20,
attackSound:"metalhit" attackSound:"metalhit"
}, },
/*
{ {
name:"Immortal", name:"Immortal",
replaces:"Spearman", replaces:"Spearman",
uniqueTo:"Persian", uniqueTo:"Persia",
unitType:"Melee", unitType:"Melee",
movement:2, movement:2,
strength:12, strength:12,
@ -255,12 +254,10 @@
requiredTech:"Bronze Working", requiredTech:"Bronze Working",
obsoleteTech:"Civil Service", obsoleteTech:"Civil Service",
upgradesTo: "Pikeman", upgradesTo: "Pikeman",
uniques:["Bonus vs Mounted 50%","Heals at double rate"], uniques:["Bonus vs Mounted 50%","+10 HP when healing"],
hurryCostModifier:20, hurryCostModifier:20,
attackSound:"metalhit" attackSound:"metalhit"
//Persian unique unit
}, },
*/
/* Classical Era */ /* Classical Era */

View file

@ -81,6 +81,9 @@ class BattleDamage{
modifiers["Great General"] = greatGeneralModifier modifiers["Great General"] = greatGeneralModifier
} }
if(combatant.getCivInfo().nation.unique=="Golden Ages last 50% longer. During a Golden Age, units receive +1 Movement and +10% Strength")
modifiers["Golden Age"] = 0.1f
} }
if (combatant.getCivInfo().policies.isAdopted("Honor") && enemy.getCivInfo().isBarbarian()) if (combatant.getCivInfo().policies.isAdopted("Honor") && enemy.getCivInfo().isBarbarian())

View file

@ -27,6 +27,8 @@ class GoldenAgeManager{
fun enterGoldenAge() { fun enterGoldenAge() {
var turnsToGoldenAge = 10.0 var turnsToGoldenAge = 10.0
if (civInfo.containsBuildingUnique("Golden Age length increases +50%")) turnsToGoldenAge *= 1.5 if (civInfo.containsBuildingUnique("Golden Age length increases +50%")) turnsToGoldenAge *= 1.5
if(civInfo.nation.unique=="Golden Ages last 50% longer. During a Golden Age, units receive +1 Movement and +10% Strength")
turnsToGoldenAge*=1.5
if (civInfo.policies.isAdopted("Freedom Complete")) turnsToGoldenAge *= 1.5 if (civInfo.policies.isAdopted("Freedom Complete")) turnsToGoldenAge *= 1.5
turnsToGoldenAge *= civInfo.gameInfo.gameParameters.gameSpeed.getModifier() turnsToGoldenAge *= civInfo.gameInfo.gameParameters.gameSpeed.getModifier()
turnsLeftForCurrentGoldenAge += turnsToGoldenAge.toInt() turnsLeftForCurrentGoldenAge += turnsToGoldenAge.toInt()

View file

@ -94,6 +94,9 @@ class MapUnit {
if (type.isWaterUnit() && civInfo.nation.unique == "+2 movement for all naval units") if (type.isWaterUnit() && civInfo.nation.unique == "+2 movement for all naval units")
movement += 2 movement += 2
if(civInfo.nation.unique=="Golden Ages last 50% longer. During a Golden Age, units receive +1 Movement and +10% Strength")
movement+=1
return movement return movement
} }
@ -339,6 +342,9 @@ class MapUnit {
private fun heal() { private fun heal() {
if (isEmbarked()) return // embarked units can't heal if (isEmbarked()) return // embarked units can't heal
var amountToHealBy = rankTileForHealing(getTile()) var amountToHealBy = rankTileForHealing(getTile())
if (amountToHealBy == 0) return
if (hasUnique("+10 HP when healing")) amountToHealBy += 10
val adjacentUnits = currentTile.getTilesInDistance(1).flatMap { it.getUnits() } val adjacentUnits = currentTile.getTilesInDistance(1).flatMap { it.getUnits() }
if (adjacentUnits.isNotEmpty()) if (adjacentUnits.isNotEmpty())
amountToHealBy += adjacentUnits.map { it.adjacentHealingBonus() }.max()!! amountToHealBy += adjacentUnits.map { it.adjacentHealingBonus() }.max()!!