This commit is contained in:
Jeff Wadsworth 2022-02-04 14:25:51 -06:00
commit 66cf265a6f

View file

@ -11,8 +11,7 @@ import mage.abilities.effects.common.counter.AddCountersAttachedEffect;
import mage.constants.*;
import mage.abilities.effects.common.AttachEffect;
import mage.counters.CounterType;
import mage.filter.FilterPermanent;
import mage.filter.predicate.Predicates;
import mage.filter.StaticFilters;
import mage.game.Game;
import mage.game.permanent.Permanent;
import mage.target.TargetPermanent;
@ -26,19 +25,13 @@ import mage.cards.CardSetInfo;
*/
public final class AwakenedAwareness extends CardImpl {
private static final FilterPermanent filter = new FilterPermanent("artifact or creature");
static {
filter.add(Predicates.or(CardType.ARTIFACT.getPredicate(), CardType.CREATURE.getPredicate()));
}
public AwakenedAwareness(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{X}{U}{U}");
this.subtype.add(SubType.AURA);
// Enchant artifact or creature
TargetPermanent auraTarget = new TargetPermanent(filter);
TargetPermanent auraTarget = new TargetPermanent(StaticFilters.FILTER_PERMANENT_ARTIFACT_OR_CREATURE);
this.getSpellAbility().addTarget(auraTarget);
this.getSpellAbility().addEffect(new AttachEffect(Outcome.BoostCreature));
this.addAbility(new EnchantAbility(auraTarget.getTargetName()));