diff --git a/Mage.Sets/src/mage/cards/a/AncientCopperDragon.java b/Mage.Sets/src/mage/cards/a/AncientCopperDragon.java new file mode 100644 index 00000000000..46e3b8ef494 --- /dev/null +++ b/Mage.Sets/src/mage/cards/a/AncientCopperDragon.java @@ -0,0 +1,77 @@ +package mage.cards.a; + +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.DealsCombatDamageToAPlayerTriggeredAbility; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.keyword.FlyingAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.constants.SubType; +import mage.game.Game; +import mage.game.permanent.token.TreasureToken; +import mage.players.Player; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class AncientCopperDragon extends CardImpl { + + public AncientCopperDragon(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{R}{R}"); + + this.subtype.add(SubType.ELDER); + this.subtype.add(SubType.DRAGON); + this.power = new MageInt(6); + this.toughness = new MageInt(5); + + // Flying + this.addAbility(FlyingAbility.getInstance()); + + // Whenever Ancient Copper Dragon deals combat damage to a player, roll a d20. You create a number of Treasure tokens equal to the result. + this.addAbility(new DealsCombatDamageToAPlayerTriggeredAbility(new AncientCopperDragonEffect(), false)); + } + + private AncientCopperDragon(final AncientCopperDragon card) { + super(card); + } + + @Override + public AncientCopperDragon copy() { + return new AncientCopperDragon(this); + } +} + +class AncientCopperDragonEffect extends OneShotEffect { + + AncientCopperDragonEffect() { + super(Outcome.Benefit); + staticText = "roll a d20. You create a number of Treasure tokens equal to the result"; + } + + private AncientCopperDragonEffect(final AncientCopperDragonEffect effect) { + super(effect); + } + + @Override + public AncientCopperDragonEffect copy() { + return new AncientCopperDragonEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player player = game.getPlayer(source.getControllerId()); + if (player == null) { + return false; + } + int amount = player.rollDice(Outcome.Benefit, source, game, 20); + if (amount > 0) { + new TreasureToken().putOntoBattlefield(amount, game, source); + } + return true; + } +} diff --git a/Mage.Sets/src/mage/sets/CommanderLegendsBattleForBaldursGate.java b/Mage.Sets/src/mage/sets/CommanderLegendsBattleForBaldursGate.java index 29d72542d77..daae39ac6d5 100644 --- a/Mage.Sets/src/mage/sets/CommanderLegendsBattleForBaldursGate.java +++ b/Mage.Sets/src/mage/sets/CommanderLegendsBattleForBaldursGate.java @@ -28,6 +28,7 @@ public final class CommanderLegendsBattleForBaldursGate extends ExpansionSet { cards.add(new SetCardInfo("Ambition's Cost", 110, Rarity.UNCOMMON, mage.cards.a.AmbitionsCost.class)); cards.add(new SetCardInfo("Amethyst Dragon", 160, Rarity.UNCOMMON, mage.cards.a.AmethystDragon.class)); cards.add(new SetCardInfo("Ancient Brass Dragon", 111, Rarity.MYTHIC, mage.cards.a.AncientBrassDragon.class)); + cards.add(new SetCardInfo("Ancient Copper Dragon", 161, Rarity.MYTHIC, mage.cards.a.AncientCopperDragon.class)); cards.add(new SetCardInfo("Arcane Encyclopedia", 297, Rarity.UNCOMMON, mage.cards.a.ArcaneEncyclopedia.class)); cards.add(new SetCardInfo("Arcane Signet", 298, Rarity.UNCOMMON, mage.cards.a.ArcaneSignet.class)); cards.add(new SetCardInfo("Archivist of Oghma", 4, Rarity.RARE, mage.cards.a.ArchivistOfOghma.class));