diff --git a/Mage.Sets/src/mage/cards/l/LeavesFromTheVine.java b/Mage.Sets/src/mage/cards/l/LeavesFromTheVine.java new file mode 100644 index 00000000000..1046163cc73 --- /dev/null +++ b/Mage.Sets/src/mage/cards/l/LeavesFromTheVine.java @@ -0,0 +1,86 @@ +package mage.cards.l; + +import mage.abilities.common.SagaAbility; +import mage.abilities.condition.Condition; +import mage.abilities.condition.common.CardsInControllerGraveyardCondition; +import mage.abilities.decorator.ConditionalOneShotEffect; +import mage.abilities.effects.common.CreateTokenEffect; +import mage.abilities.effects.common.DrawCardSourceControllerEffect; +import mage.abilities.effects.common.MillCardsControllerEffect; +import mage.abilities.effects.common.counter.AddCountersTargetEffect; +import mage.abilities.hint.ConditionHint; +import mage.abilities.hint.Hint; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SagaChapter; +import mage.constants.SubType; +import mage.counters.CounterType; +import mage.filter.FilterCard; +import mage.filter.predicate.Predicates; +import mage.game.permanent.token.FoodToken; +import mage.target.common.TargetControlledCreaturePermanent; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class LeavesFromTheVine extends CardImpl { + + private static final FilterCard filter = new FilterCard(); + + static { + filter.add(Predicates.or( + CardType.CREATURE.getPredicate(), + SubType.LESSON.getPredicate() + )); + } + + private static final Condition condition = new CardsInControllerGraveyardCondition(1, filter); + private static final Hint hint = new ConditionHint( + condition, "There's a creature or Lesson card in your graveyard" + ); + + public LeavesFromTheVine(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{1}{G}"); + + this.subtype.add(SubType.SAGA); + + // (As this Saga enters and after your draw step, add a lore counter. Sacrifice after III.) + SagaAbility sagaAbility = new SagaAbility(this); + + // I -- Mill three cards, then create a Food token. + sagaAbility.addChapterEffect( + this, SagaChapter.CHAPTER_I, + new MillCardsControllerEffect(3), + new CreateTokenEffect(new FoodToken()).concatBy(", then") + ); + + // II -- Put a +1/+1 counter on each of up to two target creatures you control. + sagaAbility.addChapterEffect( + this, SagaChapter.CHAPTER_II, + new AddCountersTargetEffect(CounterType.P1P1.createInstance()), + new TargetControlledCreaturePermanent(0, 2) + ); + + // III -- Draw a card if there's a creature or Lesson card in your graveyard. + sagaAbility.addChapterEffect( + this, SagaChapter.CHAPTER_III, + new ConditionalOneShotEffect( + new DrawCardSourceControllerEffect(1), condition, + "draw a card if there's a creature or Lesson card in your graveyard" + ) + ); + this.addAbility(sagaAbility); + } + + private LeavesFromTheVine(final LeavesFromTheVine card) { + super(card); + } + + @Override + public LeavesFromTheVine copy() { + return new LeavesFromTheVine(this); + } +} diff --git a/Mage.Sets/src/mage/sets/AvatarTheLastAirbender.java b/Mage.Sets/src/mage/sets/AvatarTheLastAirbender.java index 536ca36d4a7..e9caa7e3d37 100644 --- a/Mage.Sets/src/mage/sets/AvatarTheLastAirbender.java +++ b/Mage.Sets/src/mage/sets/AvatarTheLastAirbender.java @@ -106,6 +106,7 @@ public final class AvatarTheLastAirbender extends ExpansionSet { cards.add(new SetCardInfo("Katara, the Fearless", 305, Rarity.RARE, mage.cards.k.KataraTheFearless.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Katara, the Fearless", 350, Rarity.RARE, mage.cards.k.KataraTheFearless.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Katara, the Fearless", 361, Rarity.RARE, mage.cards.k.KataraTheFearless.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Leaves from the Vine", 185, Rarity.UNCOMMON, mage.cards.l.LeavesFromTheVine.class)); cards.add(new SetCardInfo("Lightning Strike", 146, Rarity.COMMON, mage.cards.l.LightningStrike.class)); cards.add(new SetCardInfo("Long Feng, Grand Secretariat", 233, Rarity.UNCOMMON, mage.cards.l.LongFengGrandSecretariat.class)); cards.add(new SetCardInfo("Master Pakku", 63, Rarity.UNCOMMON, mage.cards.m.MasterPakku.class));