[MH3] Implement Winter Moon

This commit is contained in:
theelk801 2024-04-30 16:23:05 -04:00
parent 28853cba17
commit b2e67e3559
3 changed files with 69 additions and 1 deletions

View file

@ -0,0 +1,67 @@
package mage.cards.w;
import mage.abilities.Ability;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.effects.RestrictionUntapNotMoreThanEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.SuperType;
import mage.filter.common.FilterControlledLandPermanent;
import mage.filter.common.FilterControlledPermanent;
import mage.filter.predicate.Predicates;
import mage.game.Game;
import mage.players.Player;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class WinterMoon extends CardImpl {
public WinterMoon(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{2}");
// Players can't untap more than one nonbasic land during their untap steps.
this.addAbility(new SimpleStaticAbility(new WinterMoonEffect()));
}
private WinterMoon(final WinterMoon card) {
super(card);
}
@Override
public WinterMoon copy() {
return new WinterMoon(this);
}
}
class WinterMoonEffect extends RestrictionUntapNotMoreThanEffect {
private static final FilterControlledPermanent filter = new FilterControlledLandPermanent();
static {
filter.add(Predicates.not(SuperType.BASIC.getPredicate()));
}
WinterMoonEffect() {
super(Duration.WhileOnBattlefield, 1, filter);
staticText = "players can't untap more than one nonbasic land during their untap steps";
}
private WinterMoonEffect(final WinterMoonEffect effect) {
super(effect);
}
@Override
public WinterMoonEffect copy() {
return new WinterMoonEffect(this);
}
@Override
public boolean applies(Player player, Ability source, Game game) {
return true;
}
}

View file

@ -47,7 +47,7 @@ class WinterOrbEffect extends RestrictionUntapNotMoreThanEffect {
public WinterOrbEffect() {
super(Duration.WhileOnBattlefield, 1, filter);
staticText = "As long as Winter Orb is untapped, players can't untap more than one land during their untap steps";
staticText = "As long as {this} is untapped, players can't untap more than one land during their untap steps";
}
private WinterOrbEffect(final WinterOrbEffect effect) {

View file

@ -48,6 +48,7 @@ public final class ModernHorizons3 extends ExpansionSet {
cards.add(new SetCardInfo("Sylvan Safekeeper", 287, Rarity.RARE, mage.cards.s.SylvanSafekeeper.class));
cards.add(new SetCardInfo("Urza's Cave", 234, Rarity.UNCOMMON, mage.cards.u.UrzasCave.class));
cards.add(new SetCardInfo("Windswept Heath", 235, Rarity.RARE, mage.cards.w.WindsweptHeath.class));
cards.add(new SetCardInfo("Winter Moon", 213, Rarity.RARE, mage.cards.w.WinterMoon.class));
cards.add(new SetCardInfo("Wooded Foothills", 236, Rarity.RARE, mage.cards.w.WoodedFoothills.class));
}
}