Added diplomatic reprecissions for demands that the other civs is unwilling to fulfil

Removed WeAgreedNotToSettleNearThem flag - was reverse copy of AgreedNotToSettleNearUs
This commit is contained in:
Yair Morgenstern 2019-06-10 16:19:04 +03:00
parent d5a0894f75
commit 96ee91cb08
3 changed files with 4 additions and 4 deletions

View file

@ -84,8 +84,9 @@ class SpecificUnitAutomation{
val tilesNearCities = unit.civInfo.gameInfo.civilizations.flatMap { it.cities }
.flatMap {
val distanceAwayFromCity =
if (it.civInfo.knows(unit.civInfo.civName)
&& it.civInfo.getDiplomacyManager(unit.civInfo).hasFlag(DiplomacyFlags.WeAgreedNotToSettleNearThem))
if (unit.civInfo.knows(it.civInfo.civName)
// If the CITY OWNER knows that the UNIT OWNER agreed not to settle near them
&& it.civInfo.getDiplomacyManager(unit.civInfo).hasFlag(DiplomacyFlags.AgreedToNotSettleNearUs))
6
else 3
it.getCenterTile().getTilesInDistance(distanceAwayFromCity)

View file

@ -31,7 +31,6 @@ enum class DiplomacyFlags{
BorderConflict,
SettledCitiesNearUs,
AgreedToNotSettleNearUs,
WeAgreedNotToSettleNearThem,
IgnoreThemSettlingNearUs
}

View file

@ -279,7 +279,7 @@ class DiplomacyScreen:CameraStageBaseScreen() {
val threatLevel = Automation().threatAssessment(otherCiv,currentPlayerCiv)
if(threatLevel>ThreatLevel.Medium){
setRightSideFlavorText(otherCiv,"Very well, we shall look for new lands to settle.","Excellent!")
otherCiv.getDiplomacyManager(currentPlayerCiv).setFlag(DiplomacyFlags.WeAgreedNotToSettleNearThem,100)
currentPlayerCiv.getDiplomacyManager(otherCiv).setFlag(DiplomacyFlags.AgreedToNotSettleNearUs,100)
}
else {
setRightSideFlavorText(otherCiv,"We shall do as we please.","Very well.")