[CLB] Implemented Ancient Copper Dragon

This commit is contained in:
Evan Kranzler 2022-05-24 19:41:29 -04:00
parent b1e8df2fba
commit a4a58366b5
2 changed files with 78 additions and 0 deletions

View file

@ -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;
}
}

View file

@ -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));