forked from External/mage
[CLB] Implemented Ancient Bronze Dragon
This commit is contained in:
parent
57c75b0bca
commit
3b6d82250e
2 changed files with 84 additions and 0 deletions
83
Mage.Sets/src/mage/cards/a/AncientBronzeDragon.java
Normal file
83
Mage.Sets/src/mage/cards/a/AncientBronzeDragon.java
Normal file
|
|
@ -0,0 +1,83 @@
|
|||
package mage.cards.a;
|
||||
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.DealsCombatDamageToAPlayerTriggeredAbility;
|
||||
import mage.abilities.common.delayed.ReflexiveTriggeredAbility;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.counter.AddCountersTargetEffect;
|
||||
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.counters.CounterType;
|
||||
import mage.game.Game;
|
||||
import mage.players.Player;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class AncientBronzeDragon extends CardImpl {
|
||||
|
||||
public AncientBronzeDragon(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{5}{G}{G}");
|
||||
|
||||
this.subtype.add(SubType.ELDER);
|
||||
this.subtype.add(SubType.DRAGON);
|
||||
this.power = new MageInt(7);
|
||||
this.toughness = new MageInt(7);
|
||||
|
||||
// Flying
|
||||
this.addAbility(FlyingAbility.getInstance());
|
||||
|
||||
// When Ancient Bronze Dragon deals combat damage to a player, roll a d20. When you do, put X +1/+1 counters on each of up to two target creatures, where X is the result.
|
||||
this.addAbility(new DealsCombatDamageToAPlayerTriggeredAbility(new AncientBronzeDragonEffect(), false));
|
||||
}
|
||||
|
||||
private AncientBronzeDragon(final AncientBronzeDragon card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public AncientBronzeDragon copy() {
|
||||
return new AncientBronzeDragon(this);
|
||||
}
|
||||
}
|
||||
|
||||
class AncientBronzeDragonEffect extends OneShotEffect {
|
||||
|
||||
AncientBronzeDragonEffect() {
|
||||
super(Outcome.Benefit);
|
||||
staticText = "roll a d20. When you do, put X +1/+1 counters " +
|
||||
"on each of up to two target creatures, where X is the result";
|
||||
}
|
||||
|
||||
private AncientBronzeDragonEffect(final AncientBronzeDragonEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public AncientBronzeDragonEffect copy() {
|
||||
return new AncientBronzeDragonEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player player = game.getPlayer(source.getControllerId());
|
||||
if (player == null) {
|
||||
return false;
|
||||
}
|
||||
int result = player.rollDice(outcome, source, game, 20);
|
||||
ReflexiveTriggeredAbility ability = new ReflexiveTriggeredAbility(
|
||||
new AddCountersTargetEffect(CounterType.P1P1.createInstance(result)), false
|
||||
);
|
||||
ability.addTarget(new TargetCreaturePermanent(0, 2));
|
||||
game.fireReflexiveTriggeredAbility(ability, source);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
@ -30,6 +30,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 Bronze Dragon", 369, Rarity.MYTHIC, mage.cards.a.AncientBronzeDragon.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));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue