refactor CardList to use Predicates and have less methods (to replace it later with pure List<Card>) and perform any special actions (filtering, cmc calculation, max creture power, etc) with predicates

This commit is contained in:
Maxmtg
2012-09-23 10:16:24 +00:00
parent 7786ef990d
commit cc0351db74
37 changed files with 670 additions and 1008 deletions

View File

@@ -23,7 +23,7 @@ import forge.AllZone;
import forge.AllZoneUtil;
import forge.Card;
import forge.CardList;
import forge.CardPredicates;
import forge.CardPredicates.Presets;
import forge.Singletons;
import forge.card.trigger.TriggerType;
import forge.game.player.Player;
@@ -101,7 +101,7 @@ public class PhaseUtil {
Singletons.getModel().getGameAction().resetActivationsPerTurn();
final CardList lands = AllZoneUtil.getPlayerLandsInPlay(turn).filter(CardPredicates.UNTAPPED);
final CardList lands = AllZoneUtil.getPlayerLandsInPlay(turn).filter(Presets.UNTAPPED);
turn.setNumPowerSurgeLands(lands.size());
// anything before this point happens regardless of whether the Untap