[MH2] Implemented Junkwinder

This commit is contained in:
Evan Kranzler 2021-05-28 07:34:22 -04:00
parent f7b06728d8
commit bd948a267e
2 changed files with 71 additions and 0 deletions

View file

@ -0,0 +1,70 @@
package mage.cards.j;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.EntersBattlefieldControlledTriggeredAbility;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount;
import mage.abilities.effects.common.AffinityEffect;
import mage.abilities.effects.common.DontUntapInControllersNextUntapStepTargetEffect;
import mage.abilities.effects.common.TapTargetEffect;
import mage.abilities.hint.Hint;
import mage.abilities.hint.ValueHint;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.TargetController;
import mage.filter.FilterPermanent;
import mage.filter.common.FilterControlledPermanent;
import mage.filter.common.FilterNonlandPermanent;
import mage.filter.predicate.permanent.TokenPredicate;
import mage.target.TargetPermanent;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class JunkWinder extends CardImpl {
private static final FilterControlledPermanent filter = new FilterControlledPermanent("tokens");
private static final FilterPermanent filter2 = new FilterNonlandPermanent("nonland permanent an opponent controls");
static {
filter.add(TokenPredicate.instance);
filter2.add(TargetController.OPPONENT.getControllerPredicate());
}
private static final Hint hint = new ValueHint("Tokens you control", new PermanentsOnBattlefieldCount(filter));
public JunkWinder(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{5}{U}{U}");
this.subtype.add(SubType.SERPENT);
this.power = new MageInt(5);
this.toughness = new MageInt(6);
// Affinity for tokens
this.addAbility(new SimpleStaticAbility(new AffinityEffect(filter)).addHint(hint));
// Whenever a token enters the battlefield under your control, tap target nonland permanent an opponent controls. It doesn't untap during its controller's next untap step.
Ability ability = new EntersBattlefieldControlledTriggeredAbility(
new TapTargetEffect(), filter, "Whenever a token enters the battlefield " +
"under your control, tap target nonland permanent an opponent controls. " +
"It doesn't untap during its controller's next untap step."
);
ability.addEffect(new DontUntapInControllersNextUntapStepTargetEffect());
ability.addTarget(new TargetPermanent(filter2));
this.addAbility(ability);
}
private JunkWinder(final JunkWinder card) {
super(card);
}
@Override
public JunkWinder copy() {
return new JunkWinder(this);
}
}

View file

@ -68,6 +68,7 @@ public final class ModernHorizons2 extends ExpansionSet {
cards.add(new SetCardInfo("Ignoble Hierarch", 166, Rarity.RARE, mage.cards.i.IgnobleHierarch.class));
cards.add(new SetCardInfo("Imperial Recruiter", 281, Rarity.MYTHIC, mage.cards.i.ImperialRecruiter.class));
cards.add(new SetCardInfo("Island", 483, Rarity.LAND, mage.cards.basiclands.Island.class, NON_FULL_USE_VARIOUS));
cards.add(new SetCardInfo("Junk Winder", 48, Rarity.UNCOMMON, mage.cards.j.JunkWinder.class));
cards.add(new SetCardInfo("Kitchen Imp", 89, Rarity.COMMON, mage.cards.k.KitchenImp.class));
cards.add(new SetCardInfo("Landscaper Colos", 18, Rarity.COMMON, mage.cards.l.LandscaperColos.class));
cards.add(new SetCardInfo("Late to Dinner", 19, Rarity.COMMON, mage.cards.l.LateToDinner.class));