Merge branch 'cantblock' into 'master'

CantBlockBy as Static Ability

See merge request core-developers/forge!218
This commit is contained in:
Michael Kamensky
2018-02-18 08:05:59 +00:00
48 changed files with 291 additions and 203 deletions

View File

@@ -1802,6 +1802,10 @@ public class AiController {
List<SpellAbility> evolve = filterList(putCounter, SpellAbilityPredicates.hasParam("Evolve"));
List<SpellAbility> token = filterListByApi(activePlayerSAs, ApiType.Token);
List<SpellAbility> pump = filterListByApi(activePlayerSAs, ApiType.Pump);
List<SpellAbility> pumpAll = filterListByApi(activePlayerSAs, ApiType.PumpAll);
// do mandatory discard early if hand is empty or has DiscardMe card
boolean discardEarly = false;
CardCollectionView playerHand = player.getCardsIn(ZoneType.Hand);
@@ -1810,6 +1814,11 @@ public class AiController {
result.addAll(mandatoryDiscard);
}
// token should be added first so they might get the pump bonus
result.addAll(token);
result.addAll(pump);
result.addAll(pumpAll);
// do Evolve Trigger before other PutCounter SpellAbilities
// do putCounter before Draw/Discard because it can cause a Draw Trigger
result.addAll(evolve);
@@ -1825,6 +1834,9 @@ public class AiController {
}
result.addAll(activePlayerSAs);
//need to reverse because of magic stack
Collections.reverse(result);
return result;
}