More deprecation

This commit is contained in:
Yair Morgenstern 2021-07-14 23:30:47 +03:00
parent e3e08732db
commit df2cf711ba
2 changed files with 2 additions and 11 deletions

View File

@ -100,7 +100,7 @@
}, },
{ {
"name": "Discipline", "name": "Discipline",
"uniques":["+[15]% Strength for [Melee] units which have another [Military] unit in an adjacent tile"], "uniques":["[+15]% Strength for [Melee] units which have another [Military] unit in an adjacent tile"],
"row": 1, "row": 1,
"column": 4 "column": 4
}, },

View File

@ -53,7 +53,7 @@ object BattleDamage {
val adjacentUnits = combatant.getTile().neighbors.flatMap { it.getUnits() } val adjacentUnits = combatant.getTile().neighbors.flatMap { it.getUnits() }
for (unique in civInfo.getMatchingUniques("+[]% Strength for [] units which have another [] unit in an adjacent tile")) { for (unique in civInfo.getMatchingUniques("[]% Strength for [] units which have another [] unit in an adjacent tile")) {
if (combatant.matchesCategory(unique.params[1]) if (combatant.matchesCategory(unique.params[1])
&& adjacentUnits.any { it.civInfo == civInfo && it.matchesFilter(unique.params[2]) } && adjacentUnits.any { it.civInfo == civInfo && it.matchesFilter(unique.params[2]) }
) { ) {
@ -86,15 +86,6 @@ object BattleDamage {
.isCityState() && civInfo.hasUnique("+30% Strength when fighting City-State units and cities") .isCityState() && civInfo.hasUnique("+30% Strength when fighting City-State units and cities")
) )
modifiers["vs [City-States]"] = 30 modifiers["vs [City-States]"] = 30
// Deprecated since 3.14.17
if (civInfo.hasUnique("+15% combat strength for melee units which have another military unit in an adjacent tile")
&& combatant.isMelee()
&& combatant.getTile().neighbors.flatMap { it.getUnits() }
.any { it.civInfo == civInfo && !it.type.isCivilian() && !it.type.isAirUnit() && !it.type.isMissile() }
)
modifiers["Discipline"] = 15
//
} }
if (enemy.getCivInfo().isBarbarian()) { if (enemy.getCivInfo().isBarbarian()) {