Skip to content

Commit

Permalink
AI: Preferred victory type only affects AI policy decision if that vi…
Browse files Browse the repository at this point in the history
…ctory type is enabled
  • Loading branch information
yairm210 committed Oct 20, 2024
1 parent d164f7b commit e1dbd65
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ class PolicyManager : IsPartOfGameInfoSerialization {
get() {
val value = HashMap<PolicyBranch, Int>()
for (branch in branches) {
val victoryPriority = branch.priorities[civInfo.nation.preferredVictoryType] ?: 0
val victoryPriority = civInfo.getPreferredVictoryTypes().sumOf { branch.priorities[it] ?: 0}
val personalityPriority = civInfo.getPersonality().priorities[branch.name] ?: 0
value[branch] = victoryPriority + personalityPriority
}
Expand Down

0 comments on commit e1dbd65

Please sign in to comment.