CounterPredicates works now with card counters. Handle Exile to Exile movement.

This commit is contained in:
LevelX2 2013-06-23 02:53:55 +02:00
parent 5898f8a798
commit 0e87313e1a
2 changed files with 6 additions and 3 deletions

View file

@ -402,6 +402,9 @@ public abstract class CardImpl<T extends CardImpl<T>> extends MageObjectImpl<T>
case LIBRARY:
game.getPlayer(ownerId).removeFromLibrary(this, game);
break;
case EXILED:
game.getExile().removeCard(this, game);
break;
default:
logger.warn("moveToExile, not fully implemented: from="+fromZone);
}

View file

@ -27,16 +27,16 @@
*/
package mage.filter.predicate.permanent;
import mage.cards.Card;
import mage.counters.CounterType;
import mage.filter.predicate.Predicate;
import mage.game.Game;
import mage.game.permanent.Permanent;
/**
*
* @author jeff
*/
public class CounterPredicate implements Predicate<Permanent> {
public class CounterPredicate implements Predicate<Card> {
private final CounterType counter;
@ -45,7 +45,7 @@ public class CounterPredicate implements Predicate<Permanent> {
}
@Override
public boolean apply(Permanent input, Game game) {
public boolean apply(Card input, Game game) {
return input.getCounters().containsKey(counter);
}