diff --git a/Mage.Sets/src/mage/cards/s/SilverflameRitual.java b/Mage.Sets/src/mage/cards/s/SilverflameRitual.java new file mode 100644 index 0000000000..2095301a80 --- /dev/null +++ b/Mage.Sets/src/mage/cards/s/SilverflameRitual.java @@ -0,0 +1,75 @@ +package mage.cards.s; + +import mage.abilities.Ability; +import mage.abilities.condition.common.AdamantCondition; +import mage.abilities.decorator.ConditionalOneShotEffect; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.continuous.GainAbilityControlledEffect; +import mage.abilities.effects.common.counter.AddCountersAllEffect; +import mage.abilities.keyword.VigilanceAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Outcome; +import mage.counters.CounterType; +import mage.filter.StaticFilters; +import mage.game.Game; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class SilverflameRitual extends CardImpl { + + public SilverflameRitual(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{3}{W}"); + + // Put a +1/+1 counter on each creature you control. + this.getSpellAbility().addEffect(new AddCountersAllEffect( + CounterType.P1P1.createInstance(), StaticFilters.FILTER_CONTROLLED_CREATURE + )); + + // Adamant — If at least three white mana was spent to cast this spell, creatures you control gain vigilance until end of turn. + this.getSpellAbility().addEffect(new ConditionalOneShotEffect( + new SilverflameRitualEffect(), AdamantCondition.WHITE, + "
Adamant — If at least three white mana was spent to cast this spell, " + + "creatures you control gain vigilance until end of turn." + )); + } + + private SilverflameRitual(final SilverflameRitual card) { + super(card); + } + + @Override + public SilverflameRitual copy() { + return new SilverflameRitual(this); + } +} + +class SilverflameRitualEffect extends OneShotEffect { + + SilverflameRitualEffect() { + super(Outcome.Benefit); + } + + private SilverflameRitualEffect(final SilverflameRitualEffect effect) { + super(effect); + } + + @Override + public SilverflameRitualEffect copy() { + return new SilverflameRitualEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + game.addEffect(new GainAbilityControlledEffect( + VigilanceAbility.getInstance(), Duration.EndOfTurn, + StaticFilters.FILTER_PERMANENT_CREATURE + ), source); + return true; + } +} diff --git a/Mage.Sets/src/mage/sets/ThroneOfEldraine.java b/Mage.Sets/src/mage/sets/ThroneOfEldraine.java index d7ff3629c5..8042252774 100644 --- a/Mage.Sets/src/mage/sets/ThroneOfEldraine.java +++ b/Mage.Sets/src/mage/sets/ThroneOfEldraine.java @@ -39,6 +39,7 @@ public final class ThroneOfEldraine extends ExpansionSet { cards.add(new SetCardInfo("Maraleaf Pixie", 196, Rarity.UNCOMMON, mage.cards.m.MaraleafPixie.class)); cards.add(new SetCardInfo("Rankle, Master of Pranks", 356, Rarity.MYTHIC, mage.cards.r.RankleMasterOfPranks.class)); cards.add(new SetCardInfo("Run Away Together", 62, Rarity.COMMON, mage.cards.r.RunAwayTogether.class)); + cards.add(new SetCardInfo("Silverflame Ritual", 30, Rarity.COMMON, mage.cards.s.SilverflameRitual.class)); cards.add(new SetCardInfo("Slaying Fire", 143, Rarity.COMMON, mage.cards.s.SlayingFire.class)); cards.add(new SetCardInfo("Tome Raider", 68, Rarity.COMMON, mage.cards.t.TomeRaider.class)); cards.add(new SetCardInfo("Wishful Merfolk", 73, Rarity.COMMON, mage.cards.w.WishfulMerfolk.class));