mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-15 10:18:01 +00:00
Update AiController.java
This commit is contained in:
@@ -713,13 +713,8 @@ public class AiController {
|
||||
if (ComputerUtil.aiLifeInDanger(player, true, 0)) {
|
||||
wasteBuybackAllowed = true;
|
||||
}
|
||||
int copies = 0;
|
||||
int copies = CardLists.filter(player.getCardsIn(ZoneType.Hand), CardPredicates.nameEquals(card.getName())).size();
|
||||
// Have two copies : allow
|
||||
for (Card hand : player.getCardsIn(ZoneType.Hand)) {
|
||||
if (hand.getName().equals(card.getName())) {
|
||||
copies++;
|
||||
}
|
||||
}
|
||||
if (copies >= 2) {
|
||||
wasteBuybackAllowed = true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user