mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-18 19:58:00 +00:00
- Logic fix in prioritizing creatures worth removing.
This commit is contained in:
@@ -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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user