Merge remote-tracking branch 'origin/master'

This commit is contained in:
yairm210 2021-12-16 22:54:56 +02:00
commit 8a93511a6a
3 changed files with 4 additions and 4 deletions

View File

@ -914,12 +914,12 @@
{ {
"name": "Foreign Legion", "name": "Foreign Legion",
"unitType": "Gunpowder", "unitType": "Gunpowder",
"replaces": "Infantry", "replaces": "Rifleman",
"uniqueTo": "France", "uniqueTo": "France",
"movement": 2, "movement": 2,
"strength": 50, "strength": 50,
"cost": 320, "cost": 320,
"requiredTech": "Replaceable Parts", "requiredTech": "Rifling",
"upgradesTo": "Infantry", "upgradesTo": "Infantry",
"obsoleteTech": "Plastics", "obsoleteTech": "Plastics",
"uniques": ["[+20]% Strength <when fighting in [Foreign Land] tiles>"], "uniques": ["[+20]% Strength <when fighting in [Foreign Land] tiles>"],

View File

@ -767,7 +767,7 @@ object NextTurnAutomation {
unit.baseUnit.isRanged() -> rangedUnits.add(unit) unit.baseUnit.isRanged() -> rangedUnits.add(unit)
unit.baseUnit.isMelee() -> meleeUnits.add(unit) unit.baseUnit.isMelee() -> meleeUnits.add(unit)
unit.hasUnique("Bonus for units in 2 tile radius 15%") unit.hasUnique("Bonus for units in 2 tile radius 15%")
-> generals.add(unit) //generals move after military units -> generals.add(unit) // Generals move after military units
else -> civilianUnits.add(unit) else -> civilianUnits.add(unit)
} }
} }

View File

@ -373,7 +373,7 @@ class Ruleset {
// When not checking the entire ruleset, we can only really detect ruleset-invariant errors in uniques // When not checking the entire ruleset, we can only really detect ruleset-invariant errors in uniques
for (unit in units.values) { for (unit in units.values) {
if (unit.upgradesTo == unit.name) if (unit.upgradesTo == unit.name || (unit.upgradesTo != null && unit.upgradesTo == unit.replaces))
lines += "${unit.name} upgrades to itself!" lines += "${unit.name} upgrades to itself!"
if (!unit.isCivilian() && unit.strength == 0) if (!unit.isCivilian() && unit.strength == 0)
lines += "${unit.name} is a military unit but has no assigned strength!" lines += "${unit.name} is a military unit but has no assigned strength!"