- Improve the AI for combat pumps when it comes to timing the activation.

This commit is contained in:
Agetian
2019-06-21 18:55:57 +03:00
committed by churrufli
parent 05b2b95cac
commit 1ce2556e99
2 changed files with 6 additions and 1 deletions

View File

@@ -113,7 +113,8 @@ public class PumpAi extends PumpAiBase {
return false; return false;
} }
} }
if (game.getStack().isEmpty() && ph.getPhase().isBefore(PhaseType.COMBAT_BEGIN)) { if (game.getStack().isEmpty() && (ph.getPhase().isBefore(PhaseType.COMBAT_BEGIN)
|| ph.getPhase().isAfter(PhaseType.COMBAT_DECLARE_BLOCKERS))) {
// Instant-speed pumps should not be cast outside of combat when the // Instant-speed pumps should not be cast outside of combat when the
// stack is empty // stack is empty
if (!sa.isCurse() && !SpellAbilityAi.isSorcerySpeed(sa) && !main1Preferred) { if (!sa.isCurse() && !SpellAbilityAi.isSorcerySpeed(sa) && !main1Preferred) {

View File

@@ -460,6 +460,10 @@ public abstract class PumpAiBase extends SpellAbilityAi {
if (combat == null || !(combat.isBlocking(card) || combat.isBlocked(card))) { if (combat == null || !(combat.isBlocking(card) || combat.isBlocked(card))) {
return false; return false;
} }
} else if (keyword.equals("Menace")) {
if (combat == null || !combat.isAttacking(card)) {
return false;
}
} }
return true; return true;
} }