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