mirror of
https://github.com/yairm210/Unciv.git
synced 2025-07-04 23:40:01 +07:00
AIs no longer double-pick the same policy...
This commit is contained in:
@ -35,6 +35,7 @@ class PolicyManager {
|
|||||||
fun isAdopted(policyName: String): Boolean = adoptedPolicies.contains(policyName)
|
fun isAdopted(policyName: String): Boolean = adoptedPolicies.contains(policyName)
|
||||||
|
|
||||||
fun isAdoptable(policy: Policy): Boolean {
|
fun isAdoptable(policy: Policy): Boolean {
|
||||||
|
if(isAdopted(policy.name)) return false
|
||||||
if (policy.name.endsWith("Complete")) return false
|
if (policy.name.endsWith("Complete")) return false
|
||||||
if (!getAdoptedPolicies().containsAll(policy.requires!!)) return false
|
if (!getAdoptedPolicies().containsAll(policy.requires!!)) return false
|
||||||
if (policy.getBranch().era > civInfo.getEra()) return false
|
if (policy.getBranch().era > civInfo.getEra()) return false
|
||||||
|
Reference in New Issue
Block a user