mirror of
https://github.com/correl/mage.git
synced 2024-12-24 11:50:45 +00:00
Implemented Rakdos, the Showstopper
This commit is contained in:
parent
4196dec963
commit
43427e0f93
2 changed files with 89 additions and 0 deletions
88
Mage.Sets/src/mage/cards/r/RakdosTheShowstopper.java
Normal file
88
Mage.Sets/src/mage/cards/r/RakdosTheShowstopper.java
Normal file
|
@ -0,0 +1,88 @@
|
|||
package mage.cards.r;
|
||||
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.keyword.FlyingAbility;
|
||||
import mage.abilities.keyword.TrampleAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.SuperType;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.players.Player;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class RakdosTheShowstopper extends CardImpl {
|
||||
|
||||
public RakdosTheShowstopper(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{B}{R}");
|
||||
|
||||
this.addSuperType(SuperType.LEGENDARY);
|
||||
this.subtype.add(SubType.DEMON);
|
||||
this.power = new MageInt(6);
|
||||
this.toughness = new MageInt(6);
|
||||
|
||||
// Flying
|
||||
this.addAbility(FlyingAbility.getInstance());
|
||||
|
||||
// Trample
|
||||
this.addAbility(TrampleAbility.getInstance());
|
||||
|
||||
// When Rakdos, the Showstopper enters the battlefield, flip a coin for each creature that isn't a Demon, Devil, or Imp. Destroy each creature whose coin comes up tails.
|
||||
this.addAbility(new EntersBattlefieldTriggeredAbility(new RakdosTheShowstopperEffect(), false));
|
||||
}
|
||||
|
||||
private RakdosTheShowstopper(final RakdosTheShowstopper card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public RakdosTheShowstopper copy() {
|
||||
return new RakdosTheShowstopper(this);
|
||||
}
|
||||
}
|
||||
|
||||
class RakdosTheShowstopperEffect extends OneShotEffect {
|
||||
|
||||
RakdosTheShowstopperEffect() {
|
||||
super(Outcome.Benefit);
|
||||
staticText = "flip a coin for each creature that isn't a Demon, Devil, or Imp." +
|
||||
" Destroy each creature whose coin comes up tails.";
|
||||
}
|
||||
|
||||
private RakdosTheShowstopperEffect(final RakdosTheShowstopperEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public RakdosTheShowstopperEffect copy() {
|
||||
return new RakdosTheShowstopperEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player player = game.getPlayer(source.getControllerId());
|
||||
if (player == null) {
|
||||
return false;
|
||||
}
|
||||
for (Permanent permanent : game.getBattlefield().getActivePermanents(source.getControllerId(), game)) {
|
||||
if (permanent != null
|
||||
&& !permanent.hasSubtype(SubType.DEMON, game)
|
||||
&& !permanent.hasSubtype(SubType.DEVIL, game)
|
||||
&& !permanent.hasSubtype(SubType.IMP, game)
|
||||
&& !player.flipCoin(game)) {
|
||||
permanent.destroy(source.getSourceId(), game, false);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
|
@ -79,6 +79,7 @@ public final class RavnicaAllegiance extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Rakdos Guildgate", 255, Rarity.COMMON, mage.cards.r.RakdosGuildgate.class, NON_FULL_USE_VARIOUS));
|
||||
cards.add(new SetCardInfo("Rakdos Guildgate", 256, Rarity.COMMON, mage.cards.r.RakdosGuildgate.class, NON_FULL_USE_VARIOUS));
|
||||
cards.add(new SetCardInfo("Rakdos Locket", 237, Rarity.COMMON, mage.cards.r.RakdosLocket.class));
|
||||
cards.add(new SetCardInfo("Rakdos, the Showstopper", 199, Rarity.MYTHIC, mage.cards.r.RakdosTheShowstopper.class));
|
||||
cards.add(new SetCardInfo("Ravager Wurm", 200, Rarity.MYTHIC, mage.cards.r.RavagerWurm.class));
|
||||
cards.add(new SetCardInfo("Rix Maadi Reveler", 109, Rarity.RARE, mage.cards.r.RixMaadiReveler.class));
|
||||
cards.add(new SetCardInfo("Seraph of the Scales", 205, Rarity.MYTHIC, mage.cards.s.SeraphOfTheScales.class));
|
||||
|
|
Loading…
Reference in a new issue