mirror of
https://github.com/yairm210/Unciv.git
synced 2025-09-23 03:23:17 -04:00
Generic'd 'fulfilled demand promise' modifier
This commit is contained in:
parent
dee883340d
commit
3eac804b18
@ -8,6 +8,7 @@ enum class Demand(
|
||||
val willIgnoreViolation:DiplomacyFlags,
|
||||
val refusedDiplomaticModifier: DiplomaticModifiers,
|
||||
val betrayedPromiseDiplomacyMpodifier: DiplomaticModifiers,
|
||||
val fulfilledPromiseDiplomacyModifier: DiplomaticModifiers,
|
||||
val demandAlert: AlertType,
|
||||
val violationDiscoveredAlert: AlertType,
|
||||
val agreedToDemandText: String,
|
||||
@ -18,6 +19,7 @@ enum class Demand(
|
||||
willIgnoreViolation = DiplomacyFlags.IgnoreThemSendingSpies,
|
||||
refusedDiplomaticModifier = DiplomaticModifiers.RefusedToNotSendingSpiesToUs,
|
||||
betrayedPromiseDiplomacyMpodifier = DiplomaticModifiers.BetrayedPromiseToNotSendingSpiesToUs,
|
||||
fulfilledPromiseDiplomacyModifier = DiplomaticModifiers.FulfilledPromiseToNotSpy,
|
||||
demandAlert = AlertType.DemandToStopSpyingOnUs,
|
||||
violationDiscoveredAlert = AlertType.SpyingOnUsDespiteOurPromise,
|
||||
agreedToDemandText = "[civName] agreed to stop spying on us!",
|
||||
@ -29,6 +31,7 @@ enum class Demand(
|
||||
willIgnoreViolation = DiplomacyFlags.IgnoreThemSpreadingReligion,
|
||||
refusedDiplomaticModifier = DiplomaticModifiers.RefusedToNotSpreadReligionToUs,
|
||||
betrayedPromiseDiplomacyMpodifier = DiplomaticModifiers.BetrayedPromiseToNotSpreadReligionToUs,
|
||||
fulfilledPromiseDiplomacyModifier = DiplomaticModifiers.FulfilledPromiseToNotSpreadReligion,
|
||||
demandAlert = AlertType.DemandToStopSpreadingReligion,
|
||||
violationDiscoveredAlert = AlertType.ReligionSpreadDespiteOurPromise,
|
||||
agreedToDemandText = "[civName] agreed to stop spreading religion to us!",
|
||||
@ -40,6 +43,7 @@ enum class Demand(
|
||||
willIgnoreViolation = DiplomacyFlags.IgnoreThemSettlingNearUs,
|
||||
refusedDiplomaticModifier = DiplomaticModifiers.RefusedToNotSettleCitiesNearUs,
|
||||
betrayedPromiseDiplomacyMpodifier = DiplomaticModifiers.BetrayedPromiseToNotSettleCitiesNearUs,
|
||||
fulfilledPromiseDiplomacyModifier = DiplomaticModifiers.FulfilledPromiseToNotSettleCitiesNearUs,
|
||||
demandAlert = AlertType.DemandToStopSettlingCitiesNear,
|
||||
violationDiscoveredAlert = AlertType.CitySettledNearOtherCivDespiteOurPromise,
|
||||
agreedToDemandText = "[civName] agreed to stop settling cities near us!",
|
||||
|
@ -127,6 +127,7 @@ enum class DiplomaticModifiers(val text: String) {
|
||||
OpenBorders("Our open borders have brought us closer together."),
|
||||
FulfilledPromiseToNotSettleCitiesNearUs("You fulfilled your promise to stop settling cities near us!"),
|
||||
FulfilledPromiseToNotSpreadReligion("You fulfilled your promise to stop spreading religion to us!"),
|
||||
FulfilledPromiseToNotSpy("You fulfilled your promise to stop spying on us!"),
|
||||
GaveUsUnits("You gave us units!"),
|
||||
GaveUsGifts("We appreciate your gifts"),
|
||||
ReturnedCapturedUnits("You returned captured units to us"),
|
||||
|
@ -186,12 +186,7 @@ object DiplomacyTurnManager {
|
||||
else
|
||||
otherCiv().cityStateFunctions.giveMilitaryUnitToPatron(civInfo)
|
||||
}
|
||||
DiplomacyFlags.AgreedToNotSettleNearUs.name -> {
|
||||
addModifier(DiplomaticModifiers.FulfilledPromiseToNotSettleCitiesNearUs, 10f)
|
||||
}
|
||||
DiplomacyFlags.AgreedToNotSettleNearUs.name -> {
|
||||
addModifier(DiplomaticModifiers.FulfilledPromiseToNotSpreadReligion, 10f)
|
||||
}
|
||||
|
||||
DiplomacyFlags.RecentlyAttacked.name -> {
|
||||
civInfo.cityStateFunctions.askForUnitGifts(otherCiv())
|
||||
}
|
||||
@ -208,6 +203,11 @@ object DiplomacyTurnManager {
|
||||
DiplomacyFlags.RememberSidedWithProtectedMinor.name -> { // 25
|
||||
removeModifier(DiplomaticModifiers.SidedWithProtectedMinor)
|
||||
}
|
||||
else -> {
|
||||
for (demand in Demand.entries){
|
||||
if (demand.agreedToDemand.name == flag) addModifier(demand.fulfilledPromiseDiplomacyModifier, 10f)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
flagsCountdown.remove(flag)
|
||||
|
Loading…
x
Reference in New Issue
Block a user