mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 12:48:00 +00:00
- The AI will now take "CARDNAME can't be blocked except by three or more creatures." into account when attacking.
This commit is contained in:
@@ -983,9 +983,7 @@ public class AiAttackController {
|
|||||||
numberOfPossibleBlockers += 1;
|
numberOfPossibleBlockers += 1;
|
||||||
if (isWorthLessThanAllKillers && ComputerUtilCombat.canDestroyAttacker(ai, attacker, defender, combat, false)
|
if (isWorthLessThanAllKillers && ComputerUtilCombat.canDestroyAttacker(ai, attacker, defender, combat, false)
|
||||||
&& !(attacker.hasKeyword("Undying") && attacker.getCounters(CounterType.P1P1) == 0)) {
|
&& !(attacker.hasKeyword("Undying") && attacker.getCounters(CounterType.P1P1) == 0)) {
|
||||||
canBeKilledByOne = true; // there is a single creature on
|
canBeKilledByOne = true; // there is a single creature on the battlefield that can kill the creature
|
||||||
// the battlefield that can kill
|
|
||||||
// the creature
|
|
||||||
// see if the defending creature is of higher or lower
|
// see if the defending creature is of higher or lower
|
||||||
// value. We don't want to attack only to lose value
|
// value. We don't want to attack only to lose value
|
||||||
if (isWorthLessThanAllKillers && !attacker.hasSVar("SacMe")
|
if (isWorthLessThanAllKillers && !attacker.hasSVar("SacMe")
|
||||||
@@ -1027,7 +1025,9 @@ public class AiAttackController {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (numberOfPossibleBlockers > 1 || (numberOfPossibleBlockers == 1 && CombatUtil.canAttackerBeBlockedWithAmount(attacker, 1, combat))) {
|
if (numberOfPossibleBlockers > 2
|
||||||
|
|| (numberOfPossibleBlockers >= 1 && CombatUtil.canAttackerBeBlockedWithAmount(attacker, 1, combat))
|
||||||
|
|| (numberOfPossibleBlockers == 2 && CombatUtil.canAttackerBeBlockedWithAmount(attacker, 2, combat))) {
|
||||||
canBeBlocked = true;
|
canBeBlocked = true;
|
||||||
}
|
}
|
||||||
/*System.out.println(attacker + " canBeKilledByOne: " + canBeKilledByOne + " canKillAll: "
|
/*System.out.println(attacker + " canBeKilledByOne: " + canBeKilledByOne + " canKillAll: "
|
||||||
|
|||||||
Reference in New Issue
Block a user