Mongolia (#1855)
* Mongolia * Translation & Atlas * Remove debug option * Remove erroneous import * Promotions.addXP * Khan heals 15 HP * XP bonus fix * Added 'Mongol Terror' which is the term used for the mongolian combat bonus Co-authored-by: Yair Morgenstern <yairm210@hotmail.com>
BIN
android/Images/NationIcons/Mongolia.png
Normal file
After Width: | Height: | Size: 7.7 KiB |
BIN
android/Images/UnitIcons/Keshik.png
Normal file
After Width: | Height: | Size: 8.0 KiB |
BIN
android/Images/UnitIcons/Khan.png
Normal file
After Width: | Height: | Size: 1.9 KiB |
Before Width: | Height: | Size: 887 KiB After Width: | Height: | Size: 906 KiB |
Before Width: | Height: | Size: 359 KiB After Width: | Height: | Size: 379 KiB |
@ -675,6 +675,38 @@
|
||||
"Kebbi","Boussa","Motpi","Bamako","Wa","Kayes","Awdaghost","Ouadane","Dakar","Tadmekket","Tekedda","Kano",
|
||||
"Agadez","Niamey","Torodi","Ouatagouna","Dori","Bamba","Segou"]
|
||||
},
|
||||
{
|
||||
"name": "Mongolia",
|
||||
"leaderName": "Genghis Khan",
|
||||
"adjective": ["Mongolian"],
|
||||
"startBias": ["Plains"],
|
||||
"preferredVictoryType": "Domination",
|
||||
|
||||
"startIntroPart1": "Greetings, o great Temujin, immortal emperor of the mighty Mongol Empire! Your fists shatter walls of cities and your voice brings despair to your enemies. O Khan! You united the warring tribes of Northern Asia into a mighty people, creating the greatest cavalry force the world has ever witnessed. Your people's cunning diplomacy divided their enemies, making them weak and helpless before Mongolia's conquering armies. In a few short years, your people soldiers conquered most of China and Eastern Asia, and the empire continued to grow until it reached west into Europe and south to Korea. Indeed, it was the greatest empire ever seen, dwarfing those pathetic conquests of the Romans of the Greeks.",
|
||||
"startIntroPart2": "Temujin, your people cann upon you once more to lead them to battle and conquest. Will the world once again trembe at the thunderous sound of your cavalry, sweeping down from the steppes? Will you build a civilization that stands the test of time?",
|
||||
"declaringWar": "You stand in the way of my armies. Let us solve this like warriors!",
|
||||
"attacked": "No more words. Today, Mongolia charges toward your defeat.",
|
||||
"defeated": "You have hobbled the Mongolian clans. My respect for you nearly matches the loathing. I am waiting for my execution.",
|
||||
"introduction": "I am Temuujin, conqueror of cities and countries. Before me lie future Mongolian lands. Behind me is the only cavalry that matters.",
|
||||
"neutralHello": "Hello.",
|
||||
"neutralLetsHearIt": ["I'm listening.","What?"],
|
||||
"neutralNo": ["No.","Of course not!"],
|
||||
"neutralYes": ["Good.","That works.","Of course!"],
|
||||
"hateHello": "So what now?",
|
||||
"hateLetsHearIt": ["And then?","Continue..."],
|
||||
"hateNo": ["Stop playing around.","This is not to be tolerated!"],
|
||||
"hateYes": ["Very well...","Fine!"],
|
||||
"afterPeace": "It seems I have underestimate you. Very well... I won't take you head for now.",
|
||||
"tradeRequest": "I am not always this generous, but we hope you take this rare opportunity we give you.",
|
||||
"outerColor": [81,0,9],
|
||||
"innerColor": [255,120,0],
|
||||
"uniqueName": "Mongol Terror",
|
||||
"unique": "Combat Strength +30% when fighting City-State units or attacking a City-State itself. All mounted units have +1 Movement.",
|
||||
"cities": ["Karakorum","Beshbalik","Turfan","Hsia","Old Sarai","New Sarai","Tabriz","Tiflis","Otrar","Sanchu","Kazan",
|
||||
"Almarikh","Ulaanbaatar","Hovd","Darhan","Dalandzadgad","Mandalgovi","Choybalsan","Erdenet","Tsetserieg",
|
||||
"Baruun-Urt","Ereen","Batshireet","Choyr","Ulaangom","Tosontsengel","Atlay","Uliastay","Bayanhongor",
|
||||
"Har-Ayrag","Nalayh","Tes"]
|
||||
},
|
||||
/*
|
||||
|
||||
{ // REQUIRES RIVERS
|
||||
@ -710,45 +742,13 @@
|
||||
"Jilotzingo","Tlapanaloya","Tultitan","Ecatepec","Coatepec","Chalchiuites","Chiauhita","Chapultepec",
|
||||
"Itzapalapa","Ayotzinco","Iztapam"]
|
||||
},
|
||||
{
|
||||
"name": "Mongolia",
|
||||
"leaderName": "Genghis Khan",
|
||||
"adjective": ["Mongolian"],
|
||||
"startBias": ["Plains"],
|
||||
"preferredVictoryType": "Domination",
|
||||
|
||||
"startIntroPart1": "Greetings, o great Temujin, immortal emperor of the mighty Mongol Empire! Your fists shatter walls of cities and your voice brings despair to your enemies. O Khan! You united the warring tribes of Northern Asia into a mighty people, creating the greatest cavalry force the world has ever witnessed. Your people's cunning diplomacy divided their enemies, making them weak and helpless before Mongolia's conquering armies. In a few short years, your people soldiers conquered most of China and Eastern Asia, and the empire continued to grow until it reached west into Europe and south to Korea. Indeed, it was the greatest empire ever seen, dwarfing those pathetic conquests of the Romans of the Greeks.",
|
||||
"startIntroPart2": "Temujin, your people cann upon you once more to lead them to battle and conquest. Will the world once again trembe at the thunderous sound of your cavalry, sweeping down from the steppes? Will you build a civilization that stands the test of time?",
|
||||
"declaringWar": "You stand in the way of my armies. Let us solve this like warriors!",
|
||||
"attacked": "No more words. Today, Mongolia charges toward your defeat.",
|
||||
"defeated": "You have hobbled the Mongolian clans. My respect for you nearly matches the loathing. I am waiting for my execution.",
|
||||
"introduction": "I am Temuujin, conqueror of cities and countries. Before me lie future Mongolian lands. Behind me is the only cavalry that matters.",
|
||||
"neutralHello": "Hello.",
|
||||
"neutralLetsHearIt": ["I'm listening.","What?"],
|
||||
"neutralNo": ["No.","Of course not!"],
|
||||
"neutralYes": ["Good.","That works.","Of course!"],
|
||||
"hateHello": "So what now?",
|
||||
"hateLetsHearIt": ["And then?","Continue..."],
|
||||
"hateNo": ["Stop playing around.","This is not to be tolerated!"],
|
||||
"hateYes": ["Very well...","Fine!"],
|
||||
"afterPeace": "It seems I have underestimate you. Very well... I won't take you head for now.",
|
||||
"tradeRequest": "I am not always this generous, but we hope you take this rare opportunity we give you.",
|
||||
"outerColor": [51,0,0],
|
||||
"innerColor": [0,204,102],
|
||||
"uniqueName": "Mongol Terror",
|
||||
"unique": "All mounted units have +1 Movement. +30% when assaulting cities,",
|
||||
"cities": ["Karakorum","Beshbalik","Turfan","Hsia","Old Sarai","New Sarai","Tabriz","Tiflis","Otrar","Sanchu","Kazan",
|
||||
"Almarikh","Ulaanbaatar","Hovd","Darhan","Dalandzadgad","Mandalgovi","Choybalsan","Erdenet","Tsetserieg",
|
||||
"Baruun-Urt","Ereen","Batshireet","Choyr","Ulaangom","Tosontsengel","Atlay","Uliastay","Bayanhongor",
|
||||
"Har-Ayrag","Nalayh","Tes"]
|
||||
},
|
||||
{
|
||||
"name": "Incan",
|
||||
"leaderName": "Pachacuti",
|
||||
"adjective": ["Incan"],
|
||||
"startBias": ["Hill"],
|
||||
"preferredVictoryType": "Cultural",
|
||||
|
||||
|
||||
"startIntroPart1": "Oh ye who remakes the world, your loyal subjects greet you, King Pachacuti Sapa Inca, ruler of the Inca people! From the beginnings in the small state of Cusco, the Incans displayed their potential for greatness, marching to war against their many enemies, crushing their armies into dust and carving for themselves a mighty empire stretching from Ecuador to Chile. Indeed, they build the greatest empire ever seen in all pre-Columbian Americas. More than mere soldiers, your people were great builders and artists as well, and the remnants of their works still awe and inspire the world today.",
|
||||
"startIntroPart2": "Oh King Pachacuti, truly are you called 'Earth Shaker'! Will you once again call upon the ground itself to a fight at your side? Your armies await your signal. Will you restore the glory of your empire? Can you build a civilization that will stand the test of time?",
|
||||
"declaringWar": "Resistance is futile! You cannot hope to stand against the mighty Incan empire. If you will not surrender immediately, then prepare for war!",
|
||||
|
@ -630,12 +630,12 @@
|
||||
"hurryCostModifier": 20,
|
||||
"attackSound": "horse"
|
||||
},
|
||||
/*
|
||||
{
|
||||
"name": "Keshik",
|
||||
"replaces": "Knight",
|
||||
"uniqueTo": "Mongolia",
|
||||
"unitType": "Mounted",
|
||||
"range": 2,
|
||||
"movement": 5,
|
||||
"strength": 15,
|
||||
"rangedStrength": 16,
|
||||
@ -643,13 +643,11 @@
|
||||
"requiredTech": "Chivalry",
|
||||
"requiredResource": "Horses",
|
||||
"upgradesTo": "Cavalry",
|
||||
"obsoleteTech": "Military science",
|
||||
"uniques": ["Can move after attacking","No defensive terrain bonus","Combat very likely to create Great Generals","50% Bonus XP gain"],
|
||||
"hurryCostModifier": 20,
|
||||
"attackSound": "arrow"
|
||||
//Mongolian unique unit.
|
||||
// Keshik should have no penalty attacking cities
|
||||
},
|
||||
*/
|
||||
|
||||
// Rennaisance Era
|
||||
|
||||
@ -1328,7 +1326,18 @@
|
||||
"name": "Great General",
|
||||
"unbuildable": true,
|
||||
"unitType": "Civilian",
|
||||
"uniques": ["Can start an 8-turn golden age","Bonus for units in 2 tile radius 15%"] //todo : should be able to build mega-fort
|
||||
"uniques": ["Can start an 8-turn golden age","Bonus for units in 2 tile radius 15%"],
|
||||
//todo : should be able to build mega-fort
|
||||
"movement": 2
|
||||
},
|
||||
{
|
||||
"name": "Khan",
|
||||
"unbuildable": true,
|
||||
"unitType": "Civilian",
|
||||
"uniqueTo": "Mongolia",
|
||||
"replaces": "Great General",
|
||||
"uniques": ["Can start an 8-turn golden age","Bonus for units in 2 tile radius 15%", "Heal adjacent units for an additional 15 HP per turn"],
|
||||
//todo : should be able to build mega-fort
|
||||
"movement": 5
|
||||
}
|
||||
]
|
||||
|
@ -532,6 +532,10 @@ Spain = Spagna
|
||||
Isabella = Isabella
|
||||
100 Gold for discovering a Natural Wonder (bonus enhanced to 500 Gold if first to discover it). Culture, Happiness and tile yields from Natural Wonders doubled. = Otteni Oro bonus (raddoppiato se la scopri per prima) quando scopri una Meraviglia Naturale, che donano il doppio di Cultura, Felicità e rese di casella.
|
||||
|
||||
Mongolia = Mongolia
|
||||
Genghis Khan = Gengis Khan
|
||||
Combat Strength +30% when fighting City-State units or attacking a City-State itself. All mounted units have +1 Movement. = +50% forza di combattimento contro unità di Città-Stato o attaccando la Città-Stato stessa. Tutte le unità a cavallo guadagnano +1 movimento.
|
||||
|
||||
# New game screen
|
||||
|
||||
Uniques = Abilità unica
|
||||
@ -1505,6 +1509,8 @@ Camel Archer = Arciere su cammello
|
||||
Conquistador = Conquistador
|
||||
Mandekalu Cavalry = Cavalleria Mandekalu
|
||||
Defense bonus when embarked = Difesa bonus quando imbarcato
|
||||
Keshik = Keshik
|
||||
50% Bonus XP gain = 50% bonus XP
|
||||
Naresuan's Elephant = Elefante di Naresuan
|
||||
Samurai = Samurai
|
||||
Combat very likely to create Great Generals = Può generare un Grande Generale combattendo
|
||||
@ -1584,6 +1590,8 @@ Can speed up construction of a wonder = Può accelerare la costruzione di una Me
|
||||
Can build improvement: Manufactory = Può costruire il miglioramento: Manifattura
|
||||
Great General = Grande Generale
|
||||
Bonus for units in 2 tile radius 15% = 15% Bonus per le unità nel raggio di 2 caselle
|
||||
Khan = Khan
|
||||
Heal adjacent units for an additional 15 HP per turn = Cura le unità vicine di 15 HP aggiuntivi ogni turno
|
||||
|
||||
# Promotions
|
||||
|
||||
|
@ -532,6 +532,11 @@ Spain =
|
||||
Isabella =
|
||||
100 Gold for discovering a Natural Wonder (bonus enhanced to 500 Gold if first to discover it). Culture, Happiness and tile yields from Natural Wonders doubled. =
|
||||
|
||||
Mongolia =
|
||||
Genghis Khan =
|
||||
Combat Strength +30% when fighting City-State units or attacking a City-State itself. All mounted units have +1 Movement. =
|
||||
Mongol Terror =
|
||||
|
||||
# New game screen
|
||||
|
||||
Uniques =
|
||||
@ -1505,6 +1510,8 @@ Camel Archer =
|
||||
Conquistador =
|
||||
Mandekalu Cavalry =
|
||||
Defense bonus when embarked =
|
||||
Keshik =
|
||||
50% Bonus XP gain =
|
||||
Naresuan's Elephant =
|
||||
Samurai =
|
||||
Combat very likely to create Great Generals =
|
||||
@ -1584,6 +1591,8 @@ Can speed up construction of a wonder =
|
||||
Can build improvement: Manufactory =
|
||||
Great General =
|
||||
Bonus for units in 2 tile radius 15% =
|
||||
Khan =
|
||||
Heal adjacent units for an additional 15 HP per turn =
|
||||
|
||||
# Promotions
|
||||
|
||||
|
@ -2,8 +2,9 @@ package com.unciv
|
||||
|
||||
class Constants{
|
||||
companion object {
|
||||
const val worker="Worker"
|
||||
const val settler="Settler"
|
||||
const val worker = "Worker"
|
||||
const val settler = "Settler"
|
||||
const val greatGeneral = "Great General"
|
||||
|
||||
const val ocean="Ocean"
|
||||
const val mountain="Mountain"
|
||||
|
@ -447,7 +447,7 @@ class NextTurnAutomation{
|
||||
when {
|
||||
unit.type.isRanged() -> rangedUnits.add(unit)
|
||||
unit.type.isMelee() -> meleeUnits.add(unit)
|
||||
unit.name == "Great General" -> generals.add(unit) //generals move after military units
|
||||
unit.name == civInfo.getEquivalentUnit(Constants.greatGeneral).name -> generals.add(unit) //generals move after military units
|
||||
else -> civilianUnits.add(unit)
|
||||
}
|
||||
}
|
||||
|
@ -44,7 +44,7 @@ class UnitAutomation {
|
||||
return SpecificUnitAutomation().automateWorkBoats(unit)
|
||||
}
|
||||
|
||||
if (unit.name == "Great General")
|
||||
if (unit.name == unit.civInfo.getEquivalentUnit(Constants.greatGeneral).name)
|
||||
return SpecificUnitAutomation().automateGreatGeneral(unit)
|
||||
|
||||
if (unit.type == UnitType.Fighter)
|
||||
|
@ -223,17 +223,24 @@ object Battle {
|
||||
if(thisCombatant !is MapUnitCombatant) return
|
||||
if(thisCombatant.unit.promotions.totalXpProduced() >= 30 && otherCombatant.getCivInfo().isBarbarian())
|
||||
return
|
||||
var amountToAdd = amount
|
||||
if(thisCombatant.getCivInfo().policies.isAdopted("Military Tradition")) amountToAdd = (amountToAdd * 1.5f).toInt()
|
||||
thisCombatant.unit.promotions.XP += amountToAdd
|
||||
|
||||
var XPModifier = 1f
|
||||
if (thisCombatant.getCivInfo().policies.isAdopted("Military Tradition")) XPModifier += 0.5f
|
||||
if (thisCombatant.unit.hasUnique("50% Bonus XP gain")) XPModifier += 0.5f
|
||||
|
||||
val XPGained = (amount * XPModifier).toInt()
|
||||
thisCombatant.unit.promotions.XP += XPGained
|
||||
|
||||
|
||||
var greatGeneralPointsModifier = 1f
|
||||
if(thisCombatant.getCivInfo().nation.unique
|
||||
== "Great general provides double combat bonus, and spawns 50% faster")
|
||||
amountToAdd = (amountToAdd * 1.5f).toInt()
|
||||
greatGeneralPointsModifier += 0.5f
|
||||
if(thisCombatant.unit.hasUnique("Combat very likely to create Great Generals"))
|
||||
amountToAdd *= 2
|
||||
greatGeneralPointsModifier += 1f
|
||||
|
||||
thisCombatant.getCivInfo().greatPeople.greatGeneralPoints += amountToAdd
|
||||
val greatGeneralPointsGained = (XPGained * greatGeneralPointsModifier).toInt()
|
||||
thisCombatant.getCivInfo().greatPeople.greatGeneralPoints += greatGeneralPointsGained
|
||||
}
|
||||
|
||||
private fun conquerCity(city: CityInfo, attacker: ICombatant) {
|
||||
|
@ -90,6 +90,9 @@ class BattleDamage{
|
||||
&& combatant.getCivInfo().goldenAges.isGoldenAge())
|
||||
modifiers["Golden Age"] = 0.1f
|
||||
|
||||
if (combatant.getCivInfo().nation.unique == "Combat Strength +30% when fighting City-State units or attacking a City-State itself. All mounted units have +1 Movement."
|
||||
&& enemy.getCivInfo().isCityState())
|
||||
modifiers["Mongol Terror"] = 0.3f
|
||||
}
|
||||
|
||||
if (enemy.getCivInfo().isBarbarian()) {
|
||||
@ -234,7 +237,7 @@ class BattleDamage{
|
||||
/**
|
||||
* Includes attack modifiers
|
||||
*/
|
||||
fun getAttackingStrength(attacker: ICombatant, defender: ICombatant): Float {
|
||||
private fun getAttackingStrength(attacker: ICombatant, defender: ICombatant): Float {
|
||||
val attackModifier = modifiersToMultiplicationBonus(getAttackModifiers(attacker,defender))
|
||||
return attacker.getAttackingStrength() * attackModifier
|
||||
}
|
||||
@ -243,7 +246,7 @@ class BattleDamage{
|
||||
/**
|
||||
* Includes defence modifiers
|
||||
*/
|
||||
fun getDefendingStrength(attacker: ICombatant, defender: ICombatant): Float {
|
||||
private fun getDefendingStrength(attacker: ICombatant, defender: ICombatant): Float {
|
||||
var defenceModifier = 1f
|
||||
if(defender is MapUnitCombatant) defenceModifier = modifiersToMultiplicationBonus(getDefenceModifiers(attacker,defender))
|
||||
return defender.getDefendingStrength() * defenceModifier
|
||||
@ -261,7 +264,7 @@ class BattleDamage{
|
||||
return (damageModifier(ratio,false) * getHealthDependantDamageRatio(attacker)).roundToInt()
|
||||
}
|
||||
|
||||
fun damageModifier(attackerToDefenderRatio:Float, damageToAttacker:Boolean): Float {
|
||||
private fun damageModifier(attackerToDefenderRatio: Float, damageToAttacker:Boolean): Float {
|
||||
// https://forums.civfanatics.com/threads/getting-the-combat-damage-math.646582/#post-15468029
|
||||
val strongerToWeakerRatio = attackerToDefenderRatio.pow(if (attackerToDefenderRatio < 1) -1 else 1)
|
||||
var ratioModifier = ((((strongerToWeakerRatio + 3)/4).pow(4) +1)/2)
|
||||
|
@ -466,8 +466,9 @@ class CivilizationInfo {
|
||||
}
|
||||
|
||||
fun addGreatPerson(greatPerson: String, city:CityInfo) {
|
||||
placeUnitNearTile(city.location, greatPerson)
|
||||
addNotification("A [$greatPerson] has been born in [${city.name}]!", city.location, Color.GOLD)
|
||||
val greatPersonName = getEquivalentUnit(greatPerson).name
|
||||
placeUnitNearTile(city.location, greatPersonName)
|
||||
addNotification("A [$greatPersonName] has been born in [${city.name}]!", city.location, Color.GOLD)
|
||||
}
|
||||
|
||||
fun placeUnitNearTile(location: Vector2, unitName: String, removeImprovement: Boolean = false): MapUnit? {
|
||||
|
@ -104,9 +104,13 @@ class MapUnit {
|
||||
if (type.isWaterUnit() && civInfo.nation.unique == "+2 movement for all naval units")
|
||||
movement += 2
|
||||
|
||||
if(civInfo.goldenAges.isGoldenAge() &&
|
||||
if (type == UnitType.Mounted &&
|
||||
civInfo.nation.unique == "Combat Strength +30% when fighting City-State units or attacking a City-State itself. All mounted units have +1 Movement.")
|
||||
movement += 1
|
||||
|
||||
if (civInfo.goldenAges.isGoldenAge() &&
|
||||
civInfo.nation.unique=="Golden Ages last 50% longer. During a Golden Age, units receive +1 Movement and +10% Strength")
|
||||
movement+=1
|
||||
movement += 1
|
||||
|
||||
return movement
|
||||
}
|
||||
@ -348,6 +352,8 @@ class MapUnit {
|
||||
if(currentTurnsFortified<2)
|
||||
action = action!!.replace(currentTurnsFortified.toString(),(currentTurnsFortified+1).toString(), true)
|
||||
}
|
||||
if (hasUnique("Heal adjacent units for an additional 15 HP per turn"))
|
||||
currentTile.neighbors.flatMap{ it.getUnits() }.forEach{ it.healBy(15) }
|
||||
}
|
||||
|
||||
private fun workOnImprovement() {
|
||||
|
@ -151,9 +151,10 @@ class BaseUnit : INamed, IConstruction {
|
||||
override fun postBuildEvent(construction: CityConstructions) {
|
||||
val unit = construction.cityInfo.civInfo.placeUnitNearTile(construction.cityInfo.location, name)
|
||||
if(unit==null) return // couldn't place the unit, so there's actually no unit =(
|
||||
unit.promotions.XP += construction.getBuiltBuildings().sumBy { it.xpForNewUnits }
|
||||
if(construction.cityInfo.civInfo.policies.isAdopted("Total War"))
|
||||
unit.promotions.XP += 15
|
||||
|
||||
var XP = construction.getBuiltBuildings().sumBy { it.xpForNewUnits }
|
||||
if(construction.cityInfo.civInfo.policies.isAdopted("Total War")) XP += 15
|
||||
unit.promotions.XP = XP
|
||||
|
||||
if(unit.type in listOf(UnitType.Melee,UnitType.Mounted,UnitType.Armor)
|
||||
&& construction.cityInfo.containsBuildingUnique("All newly-trained melee, mounted, and armored units in this city receive the Drill I promotion"))
|
||||
|