diff --git a/Mage.Sets/src/mage/cards/v/VenerableWarsinger.java b/Mage.Sets/src/mage/cards/v/VenerableWarsinger.java new file mode 100644 index 0000000000..e4e7fafe2d --- /dev/null +++ b/Mage.Sets/src/mage/cards/v/VenerableWarsinger.java @@ -0,0 +1,101 @@ +package mage.cards.v; + +import mage.MageInt; +import mage.abilities.TriggeredAbilityImpl; +import mage.abilities.effects.common.ReturnFromGraveyardToBattlefieldTargetEffect; +import mage.abilities.keyword.TrampleAbility; +import mage.abilities.keyword.VigilanceAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.ComparisonType; +import mage.constants.SubType; +import mage.constants.Zone; +import mage.filter.FilterCard; +import mage.filter.common.FilterCreatureCard; +import mage.filter.predicate.mageobject.ConvertedManaCostPredicate; +import mage.game.Game; +import mage.game.events.DamagedEvent; +import mage.game.events.GameEvent; +import mage.players.Player; +import mage.target.common.TargetCardInYourGraveyard; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class VenerableWarsinger extends CardImpl { + + public VenerableWarsinger(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{R}{W}"); + + this.subtype.add(SubType.SPIRIT); + this.subtype.add(SubType.CLERIC); + this.power = new MageInt(3); + this.toughness = new MageInt(3); + + // Vigilance + this.addAbility(VigilanceAbility.getInstance()); + + // Trample + this.addAbility(TrampleAbility.getInstance()); + + // Whenever Venerable Warsinger deals combat damage to a player, you may return target creature card with mana value X or less from your graveyard to the battlefield, where X is the amount of damage that Venerable Warsinger dealt to that player. + this.addAbility(new VenerableWarsingerTriggeredAbility()); + } + + private VenerableWarsinger(final VenerableWarsinger card) { + super(card); + } + + @Override + public VenerableWarsinger copy() { + return new VenerableWarsinger(this); + } +} + +class VenerableWarsingerTriggeredAbility extends TriggeredAbilityImpl { + + VenerableWarsingerTriggeredAbility() { + super(Zone.BATTLEFIELD, new ReturnFromGraveyardToBattlefieldTargetEffect(), true); + } + + private VenerableWarsingerTriggeredAbility(final VenerableWarsingerTriggeredAbility ability) { + super(ability); + } + + @Override + public VenerableWarsingerTriggeredAbility copy() { + return new VenerableWarsingerTriggeredAbility(this); + } + + @Override + public boolean checkEventType(GameEvent event, Game game) { + return event.getType() == GameEvent.EventType.DAMAGED_PLAYER; + } + + @Override + public boolean checkTrigger(GameEvent event, Game game) { + Player player = game.getPlayer(event.getPlayerId()); + if (player == null + || !event.getSourceId().equals(getSourceId()) + || !((DamagedEvent) event).isCombatDamage()) { + return false; + } + FilterCard filter = new FilterCreatureCard( + "creature card with mana value " + event.getAmount() + " less from your graveyard" + ); + filter.add(new ConvertedManaCostPredicate(ComparisonType.FEWER_THAN, event.getAmount() + 1)); + this.getTargets().clear(); + this.addTarget(new TargetCardInYourGraveyard(filter)); + return true; + } + + @Override + public String getRule() { + return "Whenever {this} deals combat damage to a player, you may return target creature card " + + "with mana value X or less from your graveyard to the battlefield, " + + "where X is the amount of damage that {this} dealt to that player."; + } +} diff --git a/Mage.Sets/src/mage/sets/StrixhavenSchoolOfMages.java b/Mage.Sets/src/mage/sets/StrixhavenSchoolOfMages.java index 610a766449..8e3f5656dd 100644 --- a/Mage.Sets/src/mage/sets/StrixhavenSchoolOfMages.java +++ b/Mage.Sets/src/mage/sets/StrixhavenSchoolOfMages.java @@ -75,6 +75,7 @@ public final class StrixhavenSchoolOfMages extends ExpansionSet { cards.add(new SetCardInfo("Swamp", 371, Rarity.LAND, mage.cards.basiclands.Swamp.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Torrent Sculptor", 159, Rarity.RARE, mage.cards.t.TorrentSculptor.class)); cards.add(new SetCardInfo("Valentin, Dean of the Vein", 161, Rarity.RARE, mage.cards.v.ValentinDeanOfTheVein.class)); + cards.add(new SetCardInfo("Venerable Warsinger", 355, Rarity.RARE, mage.cards.v.VenerableWarsinger.class)); cards.add(new SetCardInfo("Vineglimmer Snarl", 274, Rarity.RARE, mage.cards.v.VineglimmerSnarl.class)); cards.add(new SetCardInfo("Waterfall Aerialist", 61, Rarity.COMMON, mage.cards.w.WaterfallAerialist.class)); cards.add(new SetCardInfo("Witherbloom Apprentice", 247, Rarity.UNCOMMON, mage.cards.w.WitherbloomApprentice.class)); diff --git a/Utils/mtg-cards-data.txt b/Utils/mtg-cards-data.txt index c115e2d9a6..bdcc7c44ec 100644 --- a/Utils/mtg-cards-data.txt +++ b/Utils/mtg-cards-data.txt @@ -40633,6 +40633,7 @@ Necroblossom Snarl|Strixhaven: School of Mages|269|R||Land|||As Necroblossom Sna Shineshadow Snarl|Strixhaven: School of Mages|272|R||Land|||As Shineshadow Snarl enters the battlefield, you may reveal a Plains or Swamp card from your hand. If you don't, Shineshadow Snarl enters the battlefield tapped.${T}: Add {W} or {B}.| Vineglimmer Snarl|Strixhaven: School of Mages|274|R||Land|||As Vineglimmer Snarl enters the battlefield, you may reveal a Forest or Island card from your hand. If you don't, Vineglimmer Snarl enters the battlefield tapped.${T}: Add {G} or {U}.| Rip Apart|Strixhaven: School of Mages|318|U|{R}{W}|Sorcery|||Choose one —$• Rip Apart deals 3 damage to target creature or planeswalker.$• Destroy target artifact or enchantment.| +Venerable Warsinger|Strixhaven: School of Mages|355|R|{1}{R}{W}|Creature - Spirit Cleric|3|3|Vigilance, trample$Whenever Venerable Warsinger deals combat damage to a player, you may return target creature card with mana value X or less from your graveyard to the battlefield, where X is the amount of damage that Venerable Warsinger dealt to that player.| Plains|Strixhaven: School of Mages|366|C||Basic Land - Plains|||({T}: Add {W}.)| Island|Strixhaven: School of Mages|368|C||Basic Land - Island|||({T}: Add {U}.)| Swamp|Strixhaven: School of Mages|370|C||Basic Land - Swamp|||({T}: Add {B}.)|