mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-15 02:08:00 +00:00
- Improve the AI for combat pumps when it comes to timing the activation.
This commit is contained in:
@@ -113,7 +113,8 @@ public class PumpAi extends PumpAiBase {
|
||||
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
|
||||
// stack is empty
|
||||
if (!sa.isCurse() && !SpellAbilityAi.isSorcerySpeed(sa) && !main1Preferred) {
|
||||
|
||||
@@ -460,6 +460,10 @@ public abstract class PumpAiBase extends SpellAbilityAi {
|
||||
if (combat == null || !(combat.isBlocking(card) || combat.isBlocked(card))) {
|
||||
return false;
|
||||
}
|
||||
} else if (keyword.equals("Menace")) {
|
||||
if (combat == null || !combat.isAttacking(card)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user