[MID] Implemented Augur of Autumn

This commit is contained in:
Daniel Bomar 2021-09-07 15:43:22 -05:00
parent cfd3761904
commit e6e802033b
No known key found for this signature in database
GPG key ID: C86C8658F4023918
3 changed files with 77 additions and 1 deletions

View file

@ -0,0 +1,66 @@
package mage.cards.a;
import java.util.UUID;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.condition.common.CovenCondition;
import mage.abilities.decorator.ConditionalAsThoughEffect;
import mage.abilities.effects.Effect;
import mage.abilities.effects.common.continuous.LookAtTopCardOfLibraryAnyTimeEffect;
import mage.abilities.effects.common.continuous.PlayTheTopCardEffect;
import mage.abilities.hint.common.CovenHint;
import mage.constants.AbilityWord;
import mage.constants.SubType;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.TargetController;
import mage.filter.FilterCard;
import mage.filter.common.FilterCreatureCard;
import mage.filter.common.FilterLandCard;
/**
*
* @author weirddan455
*/
public final class AugurOfAutumn extends CardImpl {
private static final FilterCard filter = new FilterLandCard("play lands");
private static final FilterCard filter2 = new FilterCreatureCard("cast creature spells");
public AugurOfAutumn(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{G}{G}");
this.subtype.add(SubType.HUMAN);
this.subtype.add(SubType.DRUID);
this.power = new MageInt(2);
this.toughness = new MageInt(3);
// You may look at the top card of your library any time.
this.addAbility(new SimpleStaticAbility(new LookAtTopCardOfLibraryAnyTimeEffect()));
// You may play lands from the top of your library.
this.addAbility(new SimpleStaticAbility(new PlayTheTopCardEffect(TargetController.YOU, filter, false)));
// Coven As long as you control three or more creatures with different powers, you may cast creature spells from the top of your library.
Effect effect = new ConditionalAsThoughEffect(
new PlayTheTopCardEffect(TargetController.YOU, filter2, false),
CovenCondition.instance
);
effect.setText("As long as you control three or more creatures with different powers, you may cast creature spells from the top of your library");
Ability ability = new SimpleStaticAbility(effect);
ability.setAbilityWord(AbilityWord.COVEN);
ability.addHint(CovenHint.instance);
this.addAbility(ability);
}
private AugurOfAutumn(final AugurOfAutumn card) {
super(card);
}
@Override
public AugurOfAutumn copy() {
return new AugurOfAutumn(this);
}
}

View file

@ -32,6 +32,7 @@ public final class InnistradMidnightHunt extends ExpansionSet {
this.numBoosterDoubleFaced = 1;
cards.add(new SetCardInfo("Arrogant Outlaw", 84, Rarity.COMMON, mage.cards.a.ArrogantOutlaw.class));
cards.add(new SetCardInfo("Augur of Autumn", 168, Rarity.RARE, mage.cards.a.AugurOfAutumn.class));
cards.add(new SetCardInfo("Bladestitched Skaab", 212, Rarity.UNCOMMON, mage.cards.b.BladestitchedSkaab.class));
cards.add(new SetCardInfo("Briarbridge Tracker", 172, Rarity.RARE, mage.cards.b.BriarbridgeTracker.class));
cards.add(new SetCardInfo("Brimstone Vandal", 130, Rarity.COMMON, mage.cards.b.BrimstoneVandal.class));

View file

@ -43,7 +43,16 @@ public class LookAtTopCardOfLibraryAnyTimeEffect extends ContinuousEffectImpl {
default:
throw new IllegalArgumentException("Unknown target library type: " + targetLibrary);
}
staticText = duration.toString().isEmpty() ? "" : duration + " you may look at the top card of " + libInfo + " any time.";
StringBuilder sb = new StringBuilder();
String durationString = duration.toString();
if (durationString != null && !durationString.isEmpty()) {
sb.append(durationString);
sb.append(' ');
}
sb.append("you may look at the top card of ");
sb.append(libInfo);
sb.append(" any time");
staticText = sb.toString();
}
protected LookAtTopCardOfLibraryAnyTimeEffect(final LookAtTopCardOfLibraryAnyTimeEffect effect) {