- Logic fix in prioritizing creatures worth removing.

This commit is contained in:
Agetian
2018-11-07 09:11:22 +03:00
parent f439a7c084
commit a5d6ba2530

View File

@@ -1786,15 +1786,20 @@ public class ComputerUtilCard {
CardCollection priorityCards = new CardCollection(); CardCollection priorityCards = new CardCollection();
for (Card atk : oppCards) { for (Card atk : oppCards) {
boolean canBeBlocked = false;
if (isUselessCreature(atk.getController(), atk)) { if (isUselessCreature(atk.getController(), atk)) {
continue; continue;
} }
for (Card blk : aiCreats) { for (Card blk : aiCreats) {
if (!CombatUtil.canBlock(atk, blk, true)) { if (CombatUtil.canBlock(atk, blk, true)) {
boolean threat = atk.getNetCombatDamage() >= ai.getLife() - lifeInDanger; canBeBlocked = true;
if (!priorityRemovalOnlyInDanger || threat) { break;
priorityCards.add(atk); }
} }
if (!canBeBlocked) {
boolean threat = atk.getNetCombatDamage() >= ai.getLife() - lifeInDanger;
if (!priorityRemovalOnlyInDanger || threat) {
priorityCards.add(atk);
} }
} }
} }