mirror of
https://github.com/yairm210/Unciv.git
synced 2025-07-04 07:17:50 +07:00
#4963 - All city-state influences recalculate ally civ, which recalculates resources, which recalculates stats.
This commit is contained in:
@ -132,8 +132,6 @@ class CityStateFunctions(val civInfo: CivilizationInfo) {
|
||||
donorCiv.addGold(-giftAmount)
|
||||
civInfo.addGold(giftAmount)
|
||||
civInfo.getDiplomacyManager(donorCiv).addInfluence(influenceGainedByGift(donorCiv, giftAmount).toFloat())
|
||||
updateAllyCivForCityState()
|
||||
donorCiv.updateStatsForNextTurn()
|
||||
}
|
||||
|
||||
fun getProtectorCivs() : List<CivilizationInfo> {
|
||||
@ -380,8 +378,6 @@ class CityStateFunctions(val civInfo: CivilizationInfo) {
|
||||
civInfo.getDiplomacyManager(demandingCiv).addInfluence(-15f)
|
||||
cityStateBullied(demandingCiv)
|
||||
civInfo.addFlag(CivFlags.RecentlyBullied.name, 20)
|
||||
updateAllyCivForCityState()
|
||||
civInfo.updateStatsForNextTurn()
|
||||
}
|
||||
|
||||
fun tributeWorker(demandingCiv: CivilizationInfo) {
|
||||
@ -398,7 +394,6 @@ class CityStateFunctions(val civInfo: CivilizationInfo) {
|
||||
civInfo.getDiplomacyManager(demandingCiv).addInfluence(-50f)
|
||||
cityStateBullied(demandingCiv)
|
||||
civInfo.addFlag(CivFlags.RecentlyBullied.name, 20)
|
||||
updateAllyCivForCityState()
|
||||
}
|
||||
|
||||
fun canGiveStat(statType: Stat): Boolean {
|
||||
|
@ -172,5 +172,6 @@ class CivInfoTransientUpdater(val civInfo: CivilizationInfo) {
|
||||
for ((resource, amount) in unit.baseUnit.getResourceRequirements())
|
||||
newDetailedCivResources.add(civInfo.gameInfo.ruleSet.tileResources[resource]!!, -amount, "Units")
|
||||
civInfo.detailedCivResources = newDetailedCivResources
|
||||
civInfo.updateStatsForNextTurn() // More or less resources = more or less happiness, with potential domino effects
|
||||
}
|
||||
}
|
@ -716,7 +716,6 @@ class CivilizationInfo {
|
||||
goldenAges.endTurn(getHappiness())
|
||||
getCivUnits().forEach { it.endTurn() } // This is the most expensive part of endTurn
|
||||
diplomacy.values.toList().forEach { it.nextTurn() } // we copy the diplomacy values so if it changes in-loop we won't crash
|
||||
updateAllyCivForCityState()
|
||||
updateHasActiveGreatWall()
|
||||
|
||||
cachedMilitaryMight = -1 // Reset so we don't use a value from a previous turn
|
||||
|
@ -675,7 +675,6 @@ class DiplomacyManager() {
|
||||
otherCivDiplomacy.totalOfScienceDuringRA = 0
|
||||
}
|
||||
otherCivDiplomacy.removeFlag(DiplomacyFlags.ResearchAgreement)
|
||||
if (otherCiv.isCityState()) otherCiv.updateAllyCivForCityState()
|
||||
|
||||
if (!civInfo.isCityState()) {
|
||||
for (thirdCiv in civInfo.getKnownCivs()) {
|
||||
|
Reference in New Issue
Block a user