AIs no longer double-pick the same policy...

This commit is contained in:
Yair Morgenstern 2019-06-13 14:36:18 +03:00
parent 8974e02290
commit b0ef219c84

View file

@ -35,6 +35,7 @@ class PolicyManager {
fun isAdopted(policyName: String): Boolean = adoptedPolicies.contains(policyName)
fun isAdoptable(policy: Policy): Boolean {
if(isAdopted(policy.name)) return false
if (policy.name.endsWith("Complete")) return false
if (!getAdoptedPolicies().containsAll(policy.requires!!)) return false
if (policy.getBranch().era > civInfo.getEra()) return false