mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 04:08:01 +00:00
- Logic fix in prioritizing creatures worth removing.
This commit is contained in:
@@ -1786,18 +1786,23 @@ 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)) {
|
||||||
|
canBeBlocked = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (!canBeBlocked) {
|
||||||
boolean threat = atk.getNetCombatDamage() >= ai.getLife() - lifeInDanger;
|
boolean threat = atk.getNetCombatDamage() >= ai.getLife() - lifeInDanger;
|
||||||
if (!priorityRemovalOnlyInDanger || threat) {
|
if (!priorityRemovalOnlyInDanger || threat) {
|
||||||
priorityCards.add(atk);
|
priorityCards.add(atk);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
if (!priorityCards.isEmpty() && priorityCards.size() <= priorityRemovalThreshold) {
|
if (!priorityCards.isEmpty() && priorityCards.size() <= priorityRemovalThreshold) {
|
||||||
return priorityCards;
|
return priorityCards;
|
||||||
|
|||||||
Reference in New Issue
Block a user