From f0fdd7d1ba19cd1b0e0d33f3340d21165ed03713 Mon Sep 17 00:00:00 2001 From: "maurer.it" Date: Fri, 21 Oct 2011 08:07:00 -0400 Subject: [PATCH] [FIX] Other half of the fix for issue 302 (still testing). --- Mage/src/mage/util/CardUtil.java | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/Mage/src/mage/util/CardUtil.java b/Mage/src/mage/util/CardUtil.java index d292201136..ffbd0f5458 100644 --- a/Mage/src/mage/util/CardUtil.java +++ b/Mage/src/mage/util/CardUtil.java @@ -30,7 +30,6 @@ package mage.util; import mage.Constants; import mage.Mana; -import mage.abilities.Ability; import mage.abilities.SpellAbility; import mage.abilities.costs.mana.GenericManaCost; import mage.abilities.costs.mana.ManaCost; @@ -40,7 +39,6 @@ import mage.cards.Card; import mage.game.permanent.token.Token; import mage.util.functions.CopyFunction; import mage.util.functions.CopyTokenFunction; -import mage.util.functions.Function; /** * @author nantuko @@ -113,4 +111,15 @@ public class CardUtil { return new CopyTokenFunction(target); } + public static boolean isPermanentCard ( Card card ) { + boolean permanent = false; + + permanent |= card.getCardType().contains(Constants.CardType.ARTIFACT); + permanent |= card.getCardType().contains(Constants.CardType.CREATURE); + permanent |= card.getCardType().contains(Constants.CardType.ENCHANTMENT); + permanent |= card.getCardType().contains(Constants.CardType.LAND); + permanent |= card.getCardType().contains(Constants.CardType.PLANESWALKER); + + return permanent; + } }