Implemented Demanding Dragon

This commit is contained in:
Evan Kranzler 2018-06-21 08:44:06 -04:00
parent db07686008
commit cfb19b21eb
2 changed files with 55 additions and 0 deletions

View file

@ -0,0 +1,54 @@
package mage.cards.d;
import java.util.UUID;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
import mage.abilities.costs.common.SacrificeTargetCost;
import mage.abilities.effects.common.DamageTargetEffect;
import mage.abilities.effects.common.DoUnlessTargetPlayerOrTargetsControllerPaysEffect;
import mage.constants.SubType;
import mage.abilities.keyword.FlyingAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.filter.StaticFilters;
import mage.target.common.TargetControlledCreaturePermanent;
import mage.target.common.TargetOpponent;
/**
*
* @author TheElk801
*/
public final class DemandingDragon extends CardImpl {
public DemandingDragon(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{R}{R}");
this.subtype.add(SubType.DRAGON);
this.power = new MageInt(5);
this.toughness = new MageInt(5);
// Flying
this.addAbility(FlyingAbility.getInstance());
// When Demanding Dragon enters the battlefield, it deals 5 damage to target opponent unless that player sacrifices a creature.
Ability ability = new EntersBattlefieldTriggeredAbility(new DoUnlessTargetPlayerOrTargetsControllerPaysEffect(
new DamageTargetEffect(5),
new SacrificeTargetCost(new TargetControlledCreaturePermanent(
StaticFilters.FILTER_CONTROLLED_CREATURE_SHORT_TEXT
))
).setText("it deals 5 damage to target opponent unless that player sacrifices a creature"));
ability.addTarget(new TargetOpponent());
this.addAbility(ability);
}
public DemandingDragon(final DemandingDragon card) {
super(card);
}
@Override
public DemandingDragon copy() {
return new DemandingDragon(this);
}
}

View file

@ -70,6 +70,7 @@ public final class CoreSet2019 extends ExpansionSet {
cards.add(new SetCardInfo("Daybreak Chaplain", 10, Rarity.COMMON, mage.cards.d.DaybreakChaplain.class));
cards.add(new SetCardInfo("Death Baron", 90, Rarity.RARE, mage.cards.d.DeathBaron.class));
cards.add(new SetCardInfo("Declare Dominance", 175, Rarity.UNCOMMON, mage.cards.d.DeclareDominance.class));
cards.add(new SetCardInfo("Demanding Dragon", 135, Rarity.RARE, mage.cards.d.DemandingDragon.class));
cards.add(new SetCardInfo("Demon of Catastrophes", 91, Rarity.RARE, mage.cards.d.DemonOfCatastrophes.class));
cards.add(new SetCardInfo("Departed Deckhand", 49, Rarity.UNCOMMON, mage.cards.d.DepartedDeckhand.class));
cards.add(new SetCardInfo("Desecrated Tomb", 230, Rarity.RARE, mage.cards.d.DesecratedTomb.class));