diff --git a/Mage.Sets/src/mage/cards/a/AncientGoldDragon.java b/Mage.Sets/src/mage/cards/a/AncientGoldDragon.java new file mode 100644 index 00000000000..7510c3ded48 --- /dev/null +++ b/Mage.Sets/src/mage/cards/a/AncientGoldDragon.java @@ -0,0 +1,75 @@ +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.FaerieDragonToken; +import mage.players.Player; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class AncientGoldDragon extends CardImpl { + + public AncientGoldDragon(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{5}{W}{W}"); + + this.subtype.add(SubType.ELDER); + this.subtype.add(SubType.DRAGON); + this.power = new MageInt(7); + this.toughness = new MageInt(10); + + // Flying + this.addAbility(FlyingAbility.getInstance()); + + // Whenever Ancient Gold Dragon deals combat damage to a player, roll a d20. You create a number of 1/1 blue Faerie Dragon creature tokens with flying equal to the result. + this.addAbility(new DealsCombatDamageToAPlayerTriggeredAbility(new AncientGoldDragonEffect(), false)); + } + + private AncientGoldDragon(final AncientGoldDragon card) { + super(card); + } + + @Override + public AncientGoldDragon copy() { + return new AncientGoldDragon(this); + } +} + +class AncientGoldDragonEffect extends OneShotEffect { + + AncientGoldDragonEffect() { + super(Outcome.Benefit); + staticText = "roll a d20. You create a number of 1/1 blue " + + "Faerie Dragon creature tokens with flying equal to the result"; + } + + private AncientGoldDragonEffect(final AncientGoldDragonEffect effect) { + super(effect); + } + + @Override + public AncientGoldDragonEffect copy() { + return new AncientGoldDragonEffect(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); + return new FaerieDragonToken().putOntoBattlefield(amount, game, source); + } +} diff --git a/Mage.Sets/src/mage/sets/CommanderLegendsBattleForBaldursGate.java b/Mage.Sets/src/mage/sets/CommanderLegendsBattleForBaldursGate.java index da35f8fa28f..2ca259d3e1b 100644 --- a/Mage.Sets/src/mage/sets/CommanderLegendsBattleForBaldursGate.java +++ b/Mage.Sets/src/mage/sets/CommanderLegendsBattleForBaldursGate.java @@ -31,6 +31,7 @@ public final class CommanderLegendsBattleForBaldursGate extends ExpansionSet { 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("Ancient Gold Dragon", 3, Rarity.MYTHIC, mage.cards.a.AncientGoldDragon.class)); cards.add(new SetCardInfo("Ancient Silver Dragon", 56, Rarity.MYTHIC, mage.cards.a.AncientSilverDragon.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));