mirror of
https://github.com/magefree/mage.git
synced 2025-12-26 05:22:02 -08:00
CounterPredicates works now with card counters. Handle Exile to Exile movement.
This commit is contained in:
parent
5898f8a798
commit
0e87313e1a
2 changed files with 6 additions and 3 deletions
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue