Skip to content

Commit

Permalink
Update NextTurnAutomation.kt (#12754)
Browse files Browse the repository at this point in the history
  • Loading branch information
EmperorPinguin authored Jan 7, 2025
1 parent b1da26c commit 9ef0966
Showing 1 changed file with 4 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ object NextTurnAutomation {
else 0
value += ourInfluence / 10

if (civInfo.gold < 100 && ourInfluence < 30) {
if (ourInfluence < 30) {
// Consider bullying for cash
value -= 5
}
Expand All @@ -227,13 +227,9 @@ object NextTurnAutomation {

private fun protectCityStates(civInfo: Civilization) {
for (state in civInfo.getKnownCivs().filter { !it.isDefeated() && it.isCityState }) {
val diplomacyManager = state.getDiplomacyManager(civInfo.civName)!!
val isAtLeastFriend = diplomacyManager.isRelationshipLevelGE(RelationshipLevel.Friend)
if (isAtLeastFriend && state.cityStateFunctions.otherCivCanPledgeProtection(civInfo)) {
state.cityStateFunctions.addProtectorCiv(civInfo)
} else if (!isAtLeastFriend && state.cityStateFunctions.otherCivCanWithdrawProtection(civInfo)) {
state.cityStateFunctions.removeProtectorCiv(civInfo)
}
if (state.cityStateFunctions.otherCivCanPledgeProtection(civInfo))
state.cityStateFunctions.addProtectorCiv(civInfo)
//Always pledge to protect, as it makes it harder for others to demand tribute, and grants +10 resting Influence
}
}

Expand Down

0 comments on commit 9ef0966

Please sign in to comment.