mirror of
https://github.com/yairm210/Unciv.git
synced 2025-09-29 06:51:30 -04:00
Deprecation
This commit is contained in:
parent
9a35323331
commit
d8d94cb6bd
@ -235,11 +235,7 @@ object BattleDamage {
|
||||
private fun getTileSpecificModifiers(unit: MapUnitCombatant, tile: TileInfo): Counter<String> {
|
||||
val modifiers = Counter<String>()
|
||||
|
||||
for (unique in unit.unit.getMatchingUniques("+[]% Strength in []")
|
||||
+ unit.getCivInfo()
|
||||
// Deprecated since 3.16.7
|
||||
.getMatchingUniques("+[]% Strength for units fighting in []")) {
|
||||
//
|
||||
for (unique in unit.unit.getMatchingUniques("+[]% Strength in []")) {
|
||||
val filter = unique.params[1]
|
||||
if (tile.matchesFilter(filter, unit.getCivInfo()))
|
||||
modifiers.add(filter, unique.params[0].toInt())
|
||||
|
@ -365,18 +365,6 @@ class Building : NamedStats(), INonPerpetualConstruction, ICivilopediaText {
|
||||
var cost = getBaseBuyCost(cityInfo, stat)?.toDouble()
|
||||
if (cost == null) return null
|
||||
|
||||
// Deprecated since 3.15.15
|
||||
if (stat == Stat.Gold) {
|
||||
for (unique in cityInfo.getMatchingUniques("Cost of purchasing items in cities reduced by []%"))
|
||||
cost *= 1 - (unique.params[0].toFloat() / 100)
|
||||
|
||||
for (unique in cityInfo.getMatchingUniques("Cost of purchasing [] buildings reduced by []%")) {
|
||||
if (matchesFilter(unique.params[0]))
|
||||
cost *= 1 - (unique.params[1].toFloat() / 100)
|
||||
}
|
||||
}
|
||||
//
|
||||
|
||||
for (unique in cityInfo.getMatchingUniques("[] cost of purchasing items in cities []%"))
|
||||
if (stat.name == unique.params[0])
|
||||
cost *= unique.params[1].toPercent()
|
||||
|
@ -15,7 +15,6 @@ class Difficulty: INamed, ICivilopediaText {
|
||||
var policyCostModifier:Float = 1f
|
||||
var unhappinessModifier:Float = 1f
|
||||
var barbarianBonus:Float = 0f
|
||||
var startingUnits = ArrayList<String>() // Deprecated since 3.15.8 - with eras
|
||||
var playerBonusStartingUnits = ArrayList<String>()
|
||||
|
||||
var aiCityGrowthModifier:Float = 1f
|
||||
@ -25,9 +24,7 @@ class Difficulty: INamed, ICivilopediaText {
|
||||
var aiBuildingMaintenanceModifier:Float = 1f
|
||||
var aiUnitMaintenanceModifier = 1f
|
||||
var aiFreeTechs = ArrayList<String>()
|
||||
var aiMajorCivStartingUnits = ArrayList<String>() // Deprecated since 3.15.8 - with eras
|
||||
var aiMajorCivBonusStartingUnits = ArrayList<String>()
|
||||
var aiCityStateStartingUnits = ArrayList<String>() // Deprecated since 3.15.8
|
||||
var aiCityStateBonusStartingUnits = ArrayList<String>()
|
||||
var aiUnhappinessModifier = 1f
|
||||
var turnBarbariansCanEnterPlayerTiles = 0
|
||||
|
@ -168,21 +168,6 @@ object UniqueTriggerActivation {
|
||||
return civInfo.addUnit(greatPerson.name, chosenCity) != null
|
||||
}
|
||||
}
|
||||
// Deprecated since 3.15.4
|
||||
"+1 population in each city" -> {
|
||||
for (city in civInfo.cities) {
|
||||
city.population.addPopulation(1)
|
||||
}
|
||||
if (notification != null) {
|
||||
civInfo.addNotification(
|
||||
notification,
|
||||
LocationAction(civInfo.cities.map { it.location }),
|
||||
NotificationIcon.Population
|
||||
)
|
||||
}
|
||||
return true
|
||||
}
|
||||
//
|
||||
"[] population []" -> {
|
||||
val citiesWithPopulationChanged: MutableList<Vector2> = mutableListOf()
|
||||
for (city in civInfo.cities) {
|
||||
|
@ -425,6 +425,7 @@ class BaseUnit : INamed, INonPerpetualConstruction, ICivilopediaText {
|
||||
|
||||
fun addConstructionBonuses(unit: MapUnit, cityConstructions: CityConstructions) {
|
||||
val civInfo = cityConstructions.cityInfo.civInfo
|
||||
|
||||
@Suppress("LocalVariableName")
|
||||
var XP = 0
|
||||
|
||||
@ -437,13 +438,8 @@ class BaseUnit : INamed, INonPerpetualConstruction, ICivilopediaText {
|
||||
}
|
||||
unit.promotions.XP = XP
|
||||
|
||||
for (unique in
|
||||
cityConstructions.cityInfo.getMatchingUniques("All newly-trained [] units [] receive the [] promotion")
|
||||
.filter { cityConstructions.cityInfo.matchesFilter(it.params[1]) } +
|
||||
// Deprecated since 3.15.9
|
||||
cityConstructions.cityInfo.getLocalMatchingUniques("All newly-trained [] units in this city receive the [] promotion")
|
||||
//
|
||||
) {
|
||||
for (unique in cityConstructions.cityInfo.getMatchingUniques("All newly-trained [] units [] receive the [] promotion")
|
||||
.filter { cityConstructions.cityInfo.matchesFilter(it.params[1]) }) {
|
||||
val filter = unique.params[0]
|
||||
val promotion = unique.params.last()
|
||||
|
||||
@ -492,9 +488,6 @@ class BaseUnit : INamed, INonPerpetualConstruction, ICivilopediaText {
|
||||
|
||||
"Nuclear Weapon" -> isNuclearWeapon()
|
||||
"Great Person", "Great" -> isGreatPerson()
|
||||
// Deprecated as of 3.15.2
|
||||
"military water" -> isMilitary() && isWaterUnit()
|
||||
//
|
||||
else -> {
|
||||
if (getType().matchesFilter(filter)) return true
|
||||
if (
|
||||
@ -509,8 +502,7 @@ class BaseUnit : INamed, INonPerpetualConstruction, ICivilopediaText {
|
||||
|
||||
fun isGreatPerson() = uniqueObjects.any { it.placeholderText == "Great Person - []" }
|
||||
|
||||
// "Nuclear Weapon" unique deprecated since 3.15.4
|
||||
fun isNuclearWeapon() = uniqueObjects.any { it.placeholderText == "Nuclear Weapon" || it.placeholderText == "Nuclear weapon of Strength []" }
|
||||
fun isNuclearWeapon() = uniqueObjects.any { it.placeholderText == "Nuclear weapon of Strength []" }
|
||||
|
||||
fun movesLikeAirUnits() = getType().getMovementType() == UnitMovementType.Air
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user