Merge pull request #6044 from magefree/ElshaOfTheInfinite

Fixed Elsha of the Infinite
This commit is contained in:
Oleg Agafonov 2019-11-15 07:00:13 +01:00 committed by GitHub
commit 062929847b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -7,7 +7,6 @@ import mage.abilities.effects.common.continuous.CastAsThoughItHadFlashAllEffect;
import mage.abilities.effects.common.continuous.LookAtTopCardOfLibraryAnyTimeEffect;
import mage.abilities.effects.common.continuous.PlayTheTopCardEffect;
import mage.abilities.keyword.ProwessAbility;
import mage.cards.Card;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
@ -16,11 +15,8 @@ import mage.constants.SubType;
import mage.constants.SuperType;
import mage.filter.FilterCard;
import mage.filter.common.FilterNonlandCard;
import mage.filter.predicate.Predicate;
import mage.filter.predicate.Predicates;
import mage.filter.predicate.mageobject.CardTypePredicate;
import mage.game.Game;
import mage.players.Player;
import java.util.UUID;
@ -33,7 +29,6 @@ public final class ElshaOfTheInfinite extends CardImpl {
static {
filter.add(Predicates.not(new CardTypePredicate(CardType.CREATURE)));
filter.add(ElshaOfTheInfinitePredicate.instance);
}
public ElshaOfTheInfinite(UUID ownerId, CardSetInfo setInfo) {
@ -72,13 +67,3 @@ public final class ElshaOfTheInfinite extends CardImpl {
return new ElshaOfTheInfinite(this);
}
}
enum ElshaOfTheInfinitePredicate implements Predicate<Card> {
instance;
@Override
public boolean apply(Card input, Game game) {
Player player = game.getPlayer(input.getOwnerId());
return player != null && player.getLibrary().getFromTop(game).equals(input);
}
}