From 8d4f44bee6ef98a67e70d8a6bb051a12f007f1e6 Mon Sep 17 00:00:00 2001 From: Jeff Date: Tue, 13 Nov 2018 11:27:44 -0600 Subject: [PATCH] - Added Veil of Birds and Veiled Apparition. --- Mage.Sets/src/mage/cards/v/VeilOfBirds.java | 66 +++++++++++++++++ .../src/mage/cards/v/VeiledApparition.java | 74 +++++++++++++++++++ Mage.Sets/src/mage/sets/UrzasSaga.java | 2 + 3 files changed, 142 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/v/VeilOfBirds.java create mode 100644 Mage.Sets/src/mage/cards/v/VeiledApparition.java diff --git a/Mage.Sets/src/mage/cards/v/VeilOfBirds.java b/Mage.Sets/src/mage/cards/v/VeilOfBirds.java new file mode 100644 index 0000000000..53e476fca4 --- /dev/null +++ b/Mage.Sets/src/mage/cards/v/VeilOfBirds.java @@ -0,0 +1,66 @@ +package mage.cards.v; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.TriggeredAbility; +import mage.abilities.common.SpellCastOpponentTriggeredAbility; +import mage.abilities.condition.common.SourceMatchesFilterCondition; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; +import mage.abilities.effects.common.continuous.BecomesCreatureSourceEffect; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.SubType; +import mage.filter.FilterSpell; +import mage.filter.StaticFilters; +import mage.game.permanent.token.TokenImpl; + +/** + * + * @author jeffwadsworth + */ +public final class VeilOfBirds extends CardImpl { + + private static final FilterSpell filter = new FilterSpell(); + + public VeilOfBirds(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{U}"); + + // When an opponent casts a spell, if Veil of Birds is an enchantment, Veil of Birds becomes a 1/1 Bird creature with flying. + TriggeredAbility ability = new SpellCastOpponentTriggeredAbility(new BecomesCreatureSourceEffect(new VeilOfBirdsToken(), "", Duration.WhileOnBattlefield, true, false), + filter, false); + this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, new SourceMatchesFilterCondition(StaticFilters.FILTER_ENCHANTMENT_PERMANENT), + "Whenever an opponent casts a spell, if Veil of Birds is an enchantment, Veil of Birds becomes a 1/1 Bird creature with flying.")); + } + + public VeilOfBirds(final VeilOfBirds card) { + super(card); + } + + @Override + public VeilOfBirds copy() { + return new VeilOfBirds(this); + } +} + +class VeilOfBirdsToken extends TokenImpl { + + public VeilOfBirdsToken() { + super("Bird", "1/1 creature with flying"); + cardType.add(CardType.CREATURE); + subtype.add(SubType.BIRD); + power = new MageInt(1); + toughness = new MageInt(1); + this.addAbility(FlyingAbility.getInstance()); + } + + public VeilOfBirdsToken(final VeilOfBirdsToken token) { + super(token); + } + + public VeilOfBirdsToken copy() { + return new VeilOfBirdsToken(this); + } +} diff --git a/Mage.Sets/src/mage/cards/v/VeiledApparition.java b/Mage.Sets/src/mage/cards/v/VeiledApparition.java new file mode 100644 index 0000000000..2bf24f1339 --- /dev/null +++ b/Mage.Sets/src/mage/cards/v/VeiledApparition.java @@ -0,0 +1,74 @@ +package mage.cards.v; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.TriggeredAbility; +import mage.abilities.common.BeginningOfUpkeepTriggeredAbility; +import mage.abilities.common.SpellCastOpponentTriggeredAbility; +import mage.abilities.condition.common.SourceMatchesFilterCondition; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility; +import mage.abilities.effects.common.DoUnlessControllerPaysEffect; +import mage.abilities.effects.common.SacrificeSourceEffect; +import mage.abilities.effects.common.continuous.BecomesCreatureSourceEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.SubType; +import mage.constants.TargetController; +import mage.filter.FilterSpell; +import mage.filter.StaticFilters; +import mage.game.permanent.token.TokenImpl; + +/** + * + * @author jeffwadsworth + */ +public final class VeiledApparition extends CardImpl { + + private static final FilterSpell filter = new FilterSpell(); + + public VeiledApparition(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{1}{U}"); + + + // When an opponent casts a spell, if Veiled Apparition is an enchantment, Veiled Apparition becomes a 3/3 Illusion creature with flying and "At the beginning of your upkeep, sacrifice Veiled Apparition unless you pay {1}{U}." + TriggeredAbility ability = new SpellCastOpponentTriggeredAbility(new BecomesCreatureSourceEffect(new VeilApparitionToken(), "", Duration.WhileOnBattlefield, true, false), + filter, false); + this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, new SourceMatchesFilterCondition(StaticFilters.FILTER_ENCHANTMENT_PERMANENT), + "Whenever an opponent casts a spell, if Veiled Apparition is an enchantment, Veiled Apparition becomes a 3/3 Illusion creature with flying and \"At the beginning of your upkeep, sacrifice Veiled Apparition unless you pay {1}{U}.")); + + } + + public VeiledApparition(final VeiledApparition card) { + super(card); + } + + @Override + public VeiledApparition copy() { + return new VeiledApparition(this); + } +} + +class VeilApparitionToken extends TokenImpl { + + public VeilApparitionToken() { + super("Illusion", "3/3 Illusion creature with flying and \"At the beginning of your upkeep, sacrifice Veiled Apparition unless you pay {1}{U}."); + cardType.add(CardType.CREATURE); + subtype.add(SubType.ILLUSION); + power = new MageInt(3); + toughness = new MageInt(3); + Ability ability = new BeginningOfUpkeepTriggeredAbility(new DoUnlessControllerPaysEffect(new SacrificeSourceEffect(), new ManaCostsImpl("{1}{U}")), TargetController.YOU, false); + this.addAbility(ability); + } + + public VeilApparitionToken(final VeilApparitionToken token) { + super(token); + } + + public VeilApparitionToken copy() { + return new VeilApparitionToken(this); + } +} \ No newline at end of file diff --git a/Mage.Sets/src/mage/sets/UrzasSaga.java b/Mage.Sets/src/mage/sets/UrzasSaga.java index 6d65f27d39..5d3633fe30 100644 --- a/Mage.Sets/src/mage/sets/UrzasSaga.java +++ b/Mage.Sets/src/mage/sets/UrzasSaga.java @@ -335,6 +335,8 @@ public final class UrzasSaga extends ExpansionSet { cards.add(new SetCardInfo("Urza's Armor", 313, Rarity.UNCOMMON, mage.cards.u.UrzasArmor.class)); cards.add(new SetCardInfo("Vampiric Embrace", 164, Rarity.UNCOMMON, mage.cards.v.VampiricEmbrace.class)); cards.add(new SetCardInfo("Vebulid", 165, Rarity.RARE, mage.cards.v.Vebulid.class)); + cards.add(new SetCardInfo("Veil of Birds", 106, Rarity.COMMON, mage.cards.v.VeilOfBirds.class)); + cards.add(new SetCardInfo("Veiled Apparition", 107, Rarity.UNCOMMON, mage.cards.v.VeiledApparition.class)); cards.add(new SetCardInfo("Venomous Fangs", 280, Rarity.COMMON, mage.cards.v.VenomousFangs.class)); cards.add(new SetCardInfo("Vernal Bloom", 281, Rarity.RARE, mage.cards.v.VernalBloom.class)); cards.add(new SetCardInfo("Viashino Outrider", 223, Rarity.COMMON, mage.cards.v.ViashinoOutrider.class));