- Further tweaks to surprise pump experimental feature.

This commit is contained in:
Agetian
2017-09-07 05:27:33 +00:00
parent e410eab336
commit a00a6734b3
2 changed files with 7 additions and 2 deletions

View File

@@ -1126,7 +1126,9 @@ public class AiAttackController {
}
}
if (canKillAllDangerous && !hasAttackEffect && !hasCombatEffect && this.attackers.size() <= defenders.size()) {
if (canKillAllDangerous
&& !hasAttackEffect && !hasCombatEffect
&& (this.attackers.size() <= defenders.size() || attacker.getNetPower() <= 0)) {
if (ai.getController().isAI()) {
if (((PlayerControllerAi)ai.getController()).getAi().getBooleanProperty(AiProps.TRY_TO_AVOID_ATTACKING_INTO_CERTAIN_BLOCK)) {
// We can't kill a blocker, there is no reason to attack unless we can cripple a

View File

@@ -1242,7 +1242,10 @@ public class ComputerUtilCard {
// cast it during Declare Blockers, thus ruining its attacker
if (holdCombatTricks && sa.getApi() == ApiType.Pump
&& sa.hasParam("NumAtt") && sa.getHostCard() != null
&& sa.getHostCard().getZone() != null && sa.getHostCard().getZone().is(ZoneType.Hand)) {
&& sa.getHostCard().getZone() != null && sa.getHostCard().getZone().is(ZoneType.Hand)
&& c.getNetPower() > 0 // too obvious if attacking with a 0-power creature
&& sa.getHostCard().isInstant() // only do it for instant speed spells in hand
&& ComputerUtilMana.hasEnoughManaSourcesToCast(sa, ai)) {
combatTrick = true;
final List<String> kws = sa.hasParam("KW") ? Arrays.asList(sa.getParam("KW").split(" & "))