AI is displeased when you become the new ally of a city-state it was the ally of

This commit is contained in:
yairm210 2024-09-12 21:09:14 +03:00
parent 6a52382956
commit cd537a1f9a
3 changed files with 6 additions and 0 deletions

View File

@ -316,6 +316,10 @@ class CityStateFunctions(val civInfo: Civilization) {
NotificationCategory.Diplomacy, civInfo.civName,
NotificationIcon.Diplomacy
)
if (newAllyName != null && oldAllyCiv.knows(newAllyName)){
val diplomacyManager = oldAllyCiv.getDiplomacyManager(newAllyName)!!
diplomacyManager.addModifier(DiplomaticModifiers.StoleOurAlly, -10f)
}
oldAllyCiv.cache.updateViewableTiles()
oldAllyCiv.cache.updateCivResources()
}

View File

@ -104,6 +104,7 @@ enum class DiplomaticModifiers(val text: String) {
BulliedProtectedMinor("You demanded tribute from City-States that were under our protection!"),
SidedWithProtectedMinor("You sided with a City-State over us"),
SpiedOnUs("You spied on us!"),
StoleOurAlly("You took the alliance we had with a City-State"),
// Positive
YearsOfPeace("Years of peace have strengthened our relations."),

View File

@ -292,6 +292,7 @@ object DiplomacyTurnManager {
revertToZero(DiplomaticModifiers.DenouncedOurEnemies, 1 / 4f)
revertToZero(DiplomaticModifiers.Denunciation, 1 / 8f) // That's personal, it'll take a long time to fade
revertToZero(DiplomaticModifiers.SpiedOnUs, 1 / 4f)
revertToZero(DiplomaticModifiers.StoleOurAlly, 1 / 2f) // Fair enough, don't like it but not directly against us per se
// Positives
revertToZero(DiplomaticModifiers.GaveUsUnits, 1 / 4f)