Implemented Rafter Demon

This commit is contained in:
Evan Kranzler 2018-12-18 19:56:04 -05:00
parent 4416834e2c
commit 226628bb1b
2 changed files with 54 additions and 0 deletions

View file

@ -0,0 +1,53 @@
package mage.cards.r;
import mage.MageInt;
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
import mage.abilities.condition.common.SpectacleCondition;
import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility;
import mage.abilities.dynamicvalue.common.StaticValue;
import mage.abilities.effects.common.discard.DiscardEachPlayerEffect;
import mage.abilities.keyword.SpectacleAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.TargetController;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class RafterDemon extends CardImpl {
public RafterDemon(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{B}{R}");
this.subtype.add(SubType.DEMON);
this.power = new MageInt(4);
this.toughness = new MageInt(2);
// Spectacle {3}{B}{R}
this.addAbility(new SpectacleAbility(this, new ManaCostsImpl("{3}{B}{R}")));
// When Rafter Demon enters the battlefield, if its spectacle cost was paid, each opponent discards a card.
this.addAbility(new ConditionalInterveningIfTriggeredAbility(
new EntersBattlefieldTriggeredAbility(new DiscardEachPlayerEffect(
new StaticValue(1), false, TargetController.OPPONENT
)), SpectacleCondition.instance,
"When {this} enters the battlefield, " +
"if its spectacle cost was paid, " +
"each opponent discards a card."
));
}
public RafterDemon(final RafterDemon card) {
super(card);
}
@Override
public RafterDemon copy() {
return new RafterDemon(this);
}
}

View file

@ -35,6 +35,7 @@ public final class RavnicaAllegiance extends ExpansionSet {
cards.add(new SetCardInfo("Growth Spiral", 178, Rarity.COMMON, mage.cards.g.GrowthSpiral.class));
cards.add(new SetCardInfo("Imperious Oligarch", 184, Rarity.COMMON, mage.cards.i.ImperiousOligarch.class));
cards.add(new SetCardInfo("Mortify", 192, Rarity.UNCOMMON, mage.cards.m.Mortify.class));
cards.add(new SetCardInfo("Rafter Demon", 196, Rarity.COMMON, mage.cards.r.RafterDemon.class));
cards.add(new SetCardInfo("Rix Maadi Reveler", 109, Rarity.RARE, mage.cards.r.RixMaadiReveler.class));
cards.add(new SetCardInfo("The Haunt of Hightower", 273, Rarity.MYTHIC, mage.cards.t.TheHauntOfHightower.class));
}