Align (reduce) Embarked Defense Strength per Era (#6231)

* Change Embarked Defending Strength per era. Update Tutorial a little

* Use JSON implementation of EmbarkDefense

Co-authored-by: itanasi <spellman23@gmail.com>
This commit is contained in:
itanasi 2022-02-28 09:41:13 -08:00 committed by GitHub
parent 8a6b4de84f
commit f360eda047
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 23 additions and 2 deletions

View File

@ -11,6 +11,7 @@
"startingMilitaryUnit": "Warrior",
"settlerPopulation": 1,
"baseUnitBuyCost": 200,
"embarkDefense": 3,
"startPercent": 0,
"friendBonus": {
"Cultured": ["Provides [+3 Culture] per turn"],
@ -39,6 +40,7 @@
"startingCulture": 100,
"settlerPopulation": 1,
"baseUnitBuyCost": 200,
"embarkDefense": 4,
"startPercent": 10,
"friendBonus": {
"Cultured": ["Provides [+3 Culture] per turn"],
@ -69,6 +71,7 @@
"settlerBuildings": ["Shrine","Monument"],
"startingObsoleteWonders": ["Temple of Artemis", "Stonehenge", "The Great Library", "Mausoleum of Halicarnassus", "The Pyramids", "Statue of Zeus"],
"baseUnitBuyCost": 200,
"embarkDefense": 6,
"startPercent": 25,
"friendBonus": {
"Cultured": ["Provides [+6 Culture] per turn"],
@ -100,6 +103,7 @@
"startingObsoleteWonders": ["Temple of Artemis", "Stonehenge", "The Great Library", "Mausoleum of Halicarnassus", "The Pyramids", "Statue of Zeus",
"The Great Lighthouse", "Hanging Gardens", "Terracotta Army", "The Oracle", "Petra", "Great Wall", "Colossus"],
"baseUnitBuyCost": 300,
"embarkDefense": 8,
"startPercent": 37,
"friendBonus": {
"Cultured": ["Provides [+6 Culture] per turn"],
@ -132,6 +136,7 @@
"The Great Lighthouse", "Hanging Gardens", "Terracotta Army", "The Oracle", "Petra", "Great Wall", "Colossus",
"Hagia Sophia", "Chichen Itza", "Machu Picchu", "Angkor Wat", "Alhambra", "Notre Dame"],
"baseUnitBuyCost": 400,
"embarkDefense": 10,
"startPercent": 50,
"friendBonus": {
"Cultured": ["Provides [+13 Culture] per turn"],
@ -169,6 +174,7 @@
"Hagia Sophia", "Chichen Itza", "Machu Picchu", "Angkor Wat", "Alhambra", "Notre Dame",
"Sistine Chapel", "Forbidden Palace", "Leaning Tower of Pisa", "Himeji Castle", "Taj Mahal", "Porcelain Tower", "Kremlin"],
"baseUnitBuyCost": 600,
"embarkDefense": 13,
"startPercent": 65,
"friendBonus": {
"Cultured": ["Provides [+13 Culture] per turn"],
@ -207,6 +213,7 @@
"Sistine Chapel", "Forbidden Palace", "Leaning Tower of Pisa", "Himeji Castle", "Taj Mahal", "Porcelain Tower", "Kremlin",
"The Louvre", "Big Ben", "Brandenburg Gate"],
"baseUnitBuyCost": 800,
"embarkDefense": 16,
"startPercent": 65,
"friendBonus": {
"Cultured": ["Provides [+13 Culture] per turn"],
@ -246,6 +253,7 @@
"The Louvre", "Big Ben", "Brandenburg Gate",
"Eiffel Tower", "Statue of Liberty", "Neuschwanstein", "Cristo Redentor"],
"baseUnitBuyCost": 1000,
"embarkDefense": 20,
"startPercent": 80,
// So theoretically this is always just all the wonders at least 2 eras old. So we could just use that.
// But where is the modularity? The excluding of very specific wonders? That is no fun.
@ -291,6 +299,7 @@
"The Louvre", "Big Ben", "Brandenburg Gate",
"Eiffel Tower", "Statue of Liberty", "Neuschwanstein", "Cristo Redentor"],
"baseUnitBuyCost": 1000,
"embarkDefense": 25,
"startPercent": 80,
"friendBonus": {
"Cultured": ["Provides [+13 Culture] per turn"],

View File

@ -11,6 +11,7 @@
"startingMilitaryUnit": "Warrior",
"settlerPopulation": 1,
"baseUnitBuyCost": 200,
"embarkDefense": 3,
"startPercent": 0,
"friendBonus": {
"Cultured": ["Provides [+3 Culture] per turn"],
@ -39,6 +40,7 @@
"startingCulture": 100,
"settlerPopulation": 1,
"baseUnitBuyCost": 200,
"embarkDefense": 4,
"startPercent": 10,
"friendBonus": {
"Cultured": ["Provides [+3 Culture] per turn"],
@ -69,6 +71,7 @@
"settlerBuildings": ["Monument"],
"startingObsoleteWonders": ["Temple of Artemis", "Stonehenge", "The Great Library", "Mausoleum of Halicarnassus", "The Pyramids", "Statue of Zeus"],
"baseUnitBuyCost": 200,
"embarkDefense": 6,
"startPercent": 25,
"friendBonus": {
"Cultured": ["Provides [+6 Culture] per turn"],
@ -100,6 +103,7 @@
"startingObsoleteWonders": ["Temple of Artemis", "Stonehenge", "The Great Library", "Mausoleum of Halicarnassus", "The Pyramids", "Statue of Zeus",
"The Great Lighthouse", "Hanging Gardens", "The Oracle", "Great Wall", "Colossus"],
"baseUnitBuyCost": 300,
"embarkDefense": 8,
"startPercent": 37,
"friendBonus": {
"Cultured": ["Provides [+6 Culture] per turn"],
@ -132,6 +136,7 @@
"The Great Lighthouse", "Hanging Gardens", "The Oracle", "Great Wall", "Colossus",
"Hagia Sophia", "Chichen Itza", "Machu Picchu", "Angkor Wat", "Notre Dame"],
"baseUnitBuyCost": 400,
"embarkDefense": 10,
"startPercent": 50,
"friendBonus": {
"Cultured": ["Provides [+13 Culture] per turn"],
@ -165,6 +170,7 @@
"Hagia Sophia", "Chichen Itza", "Machu Picchu", "Angkor Wat", "Notre Dame",
"Sistine Chapel", "Forbidden Palace", "Himeji Castle", "Taj Mahal", "Porcelain Tower", "Kremlin"],
"baseUnitBuyCost": 600,
"embarkDefense": 13,
"startPercent": 65,
"friendBonus": {
"Cultured": ["Provides [+13 Culture] per turn"],
@ -199,6 +205,7 @@
"Sistine Chapel", "Forbidden Palace", "Himeji Castle", "Taj Mahal", "Porcelain Tower", "Kremlin",
"The Louvre", "Big Ben", "Brandenburg Gate"],
"baseUnitBuyCost": 800,
"embarkDefense": 16,
"startPercent": 65,
"friendBonus": {
"Cultured": ["Provides [+13 Culture] per turn"],
@ -234,6 +241,7 @@
"The Louvre", "Big Ben", "Brandenburg Gate",
"Eiffel Tower", "Statue of Liberty", "Cristo Redentor"],
"baseUnitBuyCost": 1000,
"embarkDefense": 20,
"startPercent": 80,
// So theoretically this is always just all the wonders at least 2 eras old. So we could just use that.
// But where is the modularity? The excluding of very specific wonders? That is no fun.
@ -275,6 +283,7 @@
"The Louvre", "Big Ben", "Brandenburg Gate",
"Eiffel Tower", "Statue of Liberty", "Cristo Redentor"],
"baseUnitBuyCost": 1000,
"embarkDefense": 25,
"startPercent": 80,
"friendBonus": {
"Cultured": ["Provides [+13 Culture] per turn"],

View File

@ -85,7 +85,8 @@
"Siege units are extremely powerful against cities, but need to be Set Up before they can attack.\nOnce your siege unit is set up, it can attack from the current tile,\n but once moved to another tile, it will need to be set up again."
],
Embarking: [
"Once a certain tech is researched, your land units can embark, allowing them to traverse water tiles.\nEntering or leaving water takes the entire turn.\nUnits are defenseless while embarked (cannot use modifiers) and have a fixed Defending Strength based on your tech Era, so be careful!\nRanged Units can't attack, Melee Units have a Strength penalty, and all have limited vision."
"Once a certain tech is researched, your land units can embark, allowing them to traverse water tiles.\nEntering or leaving water takes the entire turn.",
"Units are defenseless while embarked (cannot use modifiers), and have a fixed Defending Strength based on your tech Era, so be careful!\nRanged Units can't attack, Melee Units have a Strength penalty, and all have limited vision."
],
Idle_Units: [
"If you don't want to move a unit this turn, you can skip it by clicking 'Next unit' again.\nIf you won't be moving it for a while, you can have the unit enter Fortify or Sleep mode - \n units in Fortify or Sleep are not considered idle units.\nIf you want to disable the 'Next unit' feature entirely, you can toggle it in Menu -> Check for idle units."

View File

@ -35,7 +35,8 @@ class MapUnitCombatant(val unit: MapUnit) : ICombatant {
}
override fun getDefendingStrength(): Int {
return if (unit.isEmbarked() && !isCivilian()) 5 * getCivInfo().getEraNumber()
return if (unit.isEmbarked() && !isCivilian())
unit.civInfo.getEra().embarkDefense
else unit.baseUnit().strength
}

View File

@ -23,6 +23,7 @@ class Era : RulesetObject(), IHasUniques {
var settlerBuildings = ArrayList<String>()
var startingObsoleteWonders = ArrayList<String>()
var baseUnitBuyCost = 200
var embarkDefense = 3
var startPercent = 0
var friendBonus = HashMap<String, List<String>>()