Commit f2e2d0f3 authored by Michael Kamensky's avatar Michael Kamensky

Merge branch 'master' into 'master'

AI logic fix in prioritizing creatures worth removing.

See merge request core-developers/forge!1069
parents c865a661 a5d6ba25
......@@ -1786,15 +1786,20 @@ public class ComputerUtilCard {
CardCollection priorityCards = new CardCollection();
for (Card atk : oppCards) {
boolean canBeBlocked = false;
if (isUselessCreature(atk.getController(), atk)) {
continue;
}
for (Card blk : aiCreats) {
if (!CombatUtil.canBlock(atk, blk, true)) {
boolean threat = atk.getNetCombatDamage() >= ai.getLife() - lifeInDanger;
if (!priorityRemovalOnlyInDanger || threat) {
priorityCards.add(atk);
}
if (CombatUtil.canBlock(atk, blk, true)) {
canBeBlocked = true;
break;
}
}
if (!canBeBlocked) {
boolean threat = atk.getNetCombatDamage() >= ai.getLife() - lifeInDanger;
if (!priorityRemovalOnlyInDanger || threat) {
priorityCards.add(atk);
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment