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