mirror of
https://github.com/correl/mage.git
synced 2024-12-24 11:50:45 +00:00
parent
aea8c82728
commit
54896b3564
2 changed files with 6 additions and 17 deletions
|
@ -16,7 +16,7 @@ import mage.cards.CardSetInfo;
|
|||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.SuperType;
|
||||
import mage.filter.FilterStackObject;
|
||||
import mage.filter.FilterSpell;
|
||||
import mage.filter.predicate.Predicates;
|
||||
import mage.filter.predicate.mageobject.ColorlessPredicate;
|
||||
|
||||
|
@ -25,7 +25,7 @@ import mage.filter.predicate.mageobject.ColorlessPredicate;
|
|||
*/
|
||||
public final class EmrakulTheAeonsTorn extends CardImpl {
|
||||
|
||||
private static final FilterStackObject filter = new FilterStackObject("spells that are one or more colors");
|
||||
private static final FilterSpell filter = new FilterSpell("spells that are one or more colors");
|
||||
|
||||
static {
|
||||
filter.add(Predicates.not(ColorlessPredicate.instance));
|
||||
|
|
|
@ -95,23 +95,12 @@ public class ProtectionAbility extends StaticAbility {
|
|||
}
|
||||
|
||||
if (filter instanceof FilterSpell) {
|
||||
if (source instanceof Spell) {
|
||||
// Problem here is that for the check if a player can play a Spell, the source
|
||||
// object is still a card and not a spell yet.
|
||||
if (source instanceof Spell || game.inCheckPlayableState() && source.isInstantOrSorcery(game)) {
|
||||
return !filter.match(source, game);
|
||||
}
|
||||
// Problem here is that for the check if a player can play a Spell, the source
|
||||
// object is still a card and not a spell yet. So return only if the source object can't be a spell
|
||||
// otherwise the following FilterObject check will be applied
|
||||
if (source instanceof StackObject
|
||||
|| !source.isInstantOrSorcery(game)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
// Emrakul, the Aeons Torn
|
||||
if (filter instanceof FilterStackObject) {
|
||||
if (filter.match(source, game)) {
|
||||
return !source.isInstantOrSorcery(game);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
if (filter instanceof FilterObject) {
|
||||
|
|
Loading…
Reference in a new issue