Some code cleanup for using DevoidAbility.

This commit is contained in:
LevelX2 2018-03-18 16:03:52 +01:00
parent bd4b5f6300
commit ffa735366e
18 changed files with 48 additions and 87 deletions

View file

@ -28,7 +28,6 @@
package mage.cards.a;
import java.util.UUID;
import mage.abilities.Ability;
import mage.abilities.effects.Effect;
import mage.abilities.effects.common.CreateTokenEffect;
import mage.abilities.effects.common.DontUntapInControllersNextUntapStepTargetEffect;
@ -50,9 +49,7 @@ public class AdverseConditions extends CardImpl {
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{3}{U}");
// Devoid
Ability ability = new DevoidAbility(this.color);
ability.setRuleAtTheTop(true);
this.addAbility(ability);
this.addAbility(new DevoidAbility(this.color));
// Tap up to two target creatures. Those creatures don't untap during their controller's next untap step.
this.getSpellAbility().addEffect(new TapTargetEffect());

View file

@ -28,7 +28,6 @@
package mage.cards.b;
import java.util.UUID;
import mage.abilities.Ability;
import mage.abilities.Mode;
import mage.abilities.effects.Effect;
import mage.abilities.effects.common.DamageTargetEffect;
@ -58,12 +57,11 @@ public class BrutalExpulsion extends CardImpl {
}
public BrutalExpulsion(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{2}{U}{R}");
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{2}{U}{R}");
// Devoid
Ability ability = new DevoidAbility(this.color);
ability.setRuleAtTheTop(true);
this.addAbility(ability);
this.addAbility(new DevoidAbility(this.color));
// Choose one or both
this.getSpellAbility().getModes().setMinModes(1);
this.getSpellAbility().getModes().setMaxModes(2);

View file

@ -28,7 +28,6 @@
package mage.cards.c;
import java.util.UUID;
import mage.abilities.Ability;
import mage.abilities.effects.Effect;
import mage.abilities.effects.common.CreateTokenEffect;
import mage.abilities.keyword.DevoidAbility;
@ -44,12 +43,11 @@ import mage.game.permanent.token.EldraziScionToken;
public class CallTheScions extends CardImpl {
public CallTheScions(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{2}{G}");
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{2}{G}");
// Devoid
Ability ability = new DevoidAbility(this.color);
ability.setRuleAtTheTop(true);
this.addAbility(ability);
this.addAbility(new DevoidAbility(this.color));
// Create two 1/1 colorless Eldrazi Scion creature tokens. They have "Sacrifice this creature: add {C} to your mana pool."
Effect effect = new CreateTokenEffect(new EldraziScionToken(), 2);
effect.setText("create two 1/1 colorless Eldrazi Scion creature tokens. They have \"Sacrifice this creature: Add {C} to your mana pool.\"");

View file

@ -28,7 +28,6 @@
package mage.cards.c;
import java.util.UUID;
import mage.abilities.Ability;
import mage.abilities.effects.common.ExileTargetEffect;
import mage.abilities.keyword.DevoidAbility;
import mage.cards.CardImpl;
@ -52,12 +51,10 @@ public class CompleteDisregard extends CardImpl {
}
public CompleteDisregard(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{2}{B}");
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{2}{B}");
// Devoid
Ability ability = new DevoidAbility(this.color);
ability.setRuleAtTheTop(true);
this.addAbility(ability);
this.addAbility(new DevoidAbility(this.color));
// Exile target creature with power 3 or less.
this.getSpellAbility().addEffect(new ExileTargetEffect());

View file

@ -28,7 +28,6 @@
package mage.cards.c;
import java.util.UUID;
import mage.abilities.Ability;
import mage.abilities.effects.common.ExileTargetAndSearchGraveyardHandLibraryEffect;
import mage.abilities.keyword.DevoidAbility;
import mage.cards.CardImpl;
@ -43,12 +42,10 @@ import mage.target.common.TargetNonBasicLandPermanent;
public class CrumbleToDust extends CardImpl {
public CrumbleToDust(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{3}{R}");
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{3}{R}");
// Devoid
Ability ability = new DevoidAbility(this.color);
ability.setRuleAtTheTop(true);
this.addAbility(ability);
this.addAbility(new DevoidAbility(this.color));
// Exile target nonbasic land. Search its controller's graveyard, hand, and library for any number of cards with the same name as that land and exile them. Then that player shuffles his or her library.
this.getSpellAbility().addTarget(new TargetNonBasicLandPermanent());

View file

@ -54,12 +54,11 @@ import mage.target.common.TargetOpponent;
public class GraveBirthing extends CardImpl {
public GraveBirthing(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{2}{B}");
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{2}{B}");
// Devoid
Ability ability = new DevoidAbility(this.color);
ability.setRuleAtTheTop(true);
this.addAbility(ability);
this.addAbility(new DevoidAbility(this.color));
// Target opponent exiles a card from his or her graveyard. You create a 1/1 colorless Eldrazi Scion creature token. It has "Sacrifice this creature: Add {C} to your mana pool."
this.getSpellAbility().addEffect(new GraveBirthingEffect());
this.getSpellAbility().addTarget(new TargetOpponent());

View file

@ -28,7 +28,6 @@
package mage.cards.g;
import java.util.UUID;
import mage.abilities.Ability;
import mage.abilities.effects.Effect;
import mage.abilities.effects.common.ExileTargetEffect;
import mage.abilities.keyword.DevoidAbility;
@ -46,12 +45,11 @@ import mage.target.targetpointer.SecondTargetPointer;
public class GripOfDesolation extends CardImpl {
public GripOfDesolation(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{4}{B}{B}");
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{4}{B}{B}");
// Devoid
Ability ability = new DevoidAbility(this.color);
ability.setRuleAtTheTop(true);
this.addAbility(ability);
this.addAbility(new DevoidAbility(this.color));
// Exile target creature and target land.
this.getSpellAbility().addEffect(new ExileTargetEffect());
this.getSpellAbility().addTarget(new TargetCreaturePermanent());

View file

@ -28,7 +28,6 @@
package mage.cards.h;
import java.util.UUID;
import mage.abilities.Ability;
import mage.abilities.effects.common.CounterTargetWithReplacementEffect;
import mage.abilities.keyword.DevoidAbility;
import mage.cards.CardImpl;
@ -53,12 +52,11 @@ public class HorriblyAwry extends CardImpl {
}
public HorriblyAwry(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{1}{U}");
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{1}{U}");
// Devoid (This card has no color.)
this.addAbility(new DevoidAbility(this.color));
// Devoid
Ability ability = new DevoidAbility(this.color);
ability.setRuleAtTheTop(true);
this.addAbility(ability);
// Counter target creature spell with converted mana cost 4 or less. If that spell is countered this way, exile it instead of putting it into its owner's graveyard.
this.getSpellAbility().addEffect(new CounterTargetWithReplacementEffect(Zone.EXILED));
this.getSpellAbility().addTarget(new TargetSpell(filter));

View file

@ -28,7 +28,6 @@
package mage.cards.p;
import java.util.UUID;
import mage.abilities.Ability;
import mage.abilities.costs.common.ExileOpponentsCardFromExileToGraveyardCost;
import mage.abilities.effects.common.DamageTargetEffect;
import mage.abilities.keyword.DevoidAbility;
@ -44,12 +43,10 @@ import mage.target.common.TargetCreaturePermanent;
public class ProcessorAssault extends CardImpl {
public ProcessorAssault(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{1}{R}");
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{1}{R}");
// Devoid
Ability ability = new DevoidAbility(this.color);
ability.setRuleAtTheTop(true);
this.addAbility(ability);
this.addAbility(new DevoidAbility(this.color));
// As an additional cost to cast Processor Assault, put a card an opponent owns from exile into its owner's graveyard.
this.getSpellAbility().addCost(new ExileOpponentsCardFromExileToGraveyardCost(false));

View file

@ -52,12 +52,11 @@ import mage.watchers.common.DamagedByWatcher;
public class SerpentineSpike extends CardImpl {
public SerpentineSpike(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{5}{R}{R}");
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{5}{R}{R}");
// Devoid
Ability ability = new DevoidAbility(this.color);
ability.setRuleAtTheTop(true);
this.addAbility(ability);
this.addAbility(new DevoidAbility(this.color));
// Serpentine Spike deals 2 damage to target creature, 3 damage to another target creature, and 4 damage to a third target creature. If a creature dealt damage this way would die this turn, exile it instead.
this.getSpellAbility().addEffect(new SerpentineSpikeEffect());

View file

@ -29,7 +29,6 @@ package mage.cards.s;
import java.util.UUID;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.AttacksTriggeredAbility;
import mage.abilities.effects.common.LoseLifeDefendingPlayerEffect;
import mage.abilities.keyword.DevoidAbility;
@ -46,16 +45,15 @@ import mage.constants.SubType;
public class SilentSkimmer extends CardImpl {
public SilentSkimmer(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{B}");
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{B}");
this.subtype.add(SubType.ELDRAZI);
this.subtype.add(SubType.DRONE);
this.power = new MageInt(0);
this.toughness = new MageInt(4);
// Devoid
Ability ability = new DevoidAbility(this.color);
ability.setRuleAtTheTop(true);
this.addAbility(ability);
this.addAbility(new DevoidAbility(this.color));
// Flying
this.addAbility(FlyingAbility.getInstance());
// Whenever Silent Skimmer attacks, defending player loses 2 life.

View file

@ -29,7 +29,6 @@ package mage.cards.s;
import java.util.UUID;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.costs.mana.GenericManaCost;
import mage.abilities.effects.common.continuous.BoostSourceEffect;
@ -38,8 +37,8 @@ import mage.abilities.keyword.IngestAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.Duration;
import mage.constants.SubType;
import mage.constants.Zone;
/**
@ -49,16 +48,15 @@ import mage.constants.Zone;
public class SludgeCrawler extends CardImpl {
public SludgeCrawler(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{B}");
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{B}");
this.subtype.add(SubType.ELDRAZI);
this.subtype.add(SubType.DRONE);
this.power = new MageInt(1);
this.toughness = new MageInt(1);
// Devoid
Ability ability = new DevoidAbility(this.color);
ability.setRuleAtTheTop(true);
this.addAbility(ability);
this.addAbility(new DevoidAbility(this.color));
// Ingest
this.addAbility(new IngestAbility());
// {2}: Sludge Crawler gets +1/+1 until end of turn.

View file

@ -53,12 +53,11 @@ import mage.target.TargetSpell;
public class SpellShrivel extends CardImpl {
public SpellShrivel(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{2}{U}");
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{2}{U}");
// Devoid
Ability ability = new DevoidAbility(this.color);
ability.setRuleAtTheTop(true);
this.addAbility(ability);
this.addAbility(new DevoidAbility(this.color));
// Counter target spell unless its controller pays {4}. If that spell is countered this way, exile it instead of putting it into its owner's graveyard.
this.getSpellAbility().addEffect(new SpellShrivelCounterUnlessPaysEffect());
this.getSpellAbility().addTarget(new TargetSpell());

View file

@ -28,7 +28,6 @@
package mage.cards.s;
import java.util.UUID;
import mage.abilities.Ability;
import mage.abilities.effects.Effect;
import mage.abilities.effects.common.continuous.BoostControlledEffect;
import mage.abilities.effects.common.continuous.GainAbilityControlledEffect;
@ -54,12 +53,10 @@ public class SwarmSurge extends CardImpl {
}
public SwarmSurge(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{2}{B}");
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{2}{B}");
// Devoid
Ability ability = new DevoidAbility(this.color);
ability.setRuleAtTheTop(true);
this.addAbility(ability);
this.addAbility(new DevoidAbility(this.color));
// Creatures you control get +2/+0 until end of turn.
this.getSpellAbility().addEffect(new BoostControlledEffect(2, 0, Duration.EndOfTurn));

View file

@ -28,7 +28,6 @@
package mage.cards.t;
import java.util.UUID;
import mage.abilities.Ability;
import mage.abilities.effects.Effect;
import mage.abilities.effects.common.DamageTargetEffect;
import mage.abilities.effects.common.replacement.DealtDamageToCreatureBySourceDies;
@ -47,12 +46,11 @@ import mage.watchers.common.DamagedByWatcher;
public class TouchOfTheVoid extends CardImpl {
public TouchOfTheVoid(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{2}{R}");
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{2}{R}");
// Devoid
Ability ability = new DevoidAbility(this.color);
ability.setRuleAtTheTop(true);
this.addAbility(ability);
this.addAbility(new DevoidAbility(this.color));
// Touch of the Void deals 3 damage to target creature or player. If a creature dealt damage this way would die this turn, exile it instead.
this.getSpellAbility().addEffect(new DamageTargetEffect(3));
this.getSpellAbility().addTarget(new TargetCreatureOrPlayer());

View file

@ -28,7 +28,6 @@
package mage.cards.t;
import java.util.UUID;
import mage.abilities.Ability;
import mage.abilities.effects.Effect;
import mage.abilities.effects.common.ExileCardYouChooseTargetOpponentEffect;
import mage.abilities.keyword.DevoidAbility;
@ -53,12 +52,10 @@ public class TransgressTheMind extends CardImpl {
}
public TransgressTheMind(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{1}{B}");
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{1}{B}");
// Devoid
Ability ability = new DevoidAbility(this.color);
ability.setRuleAtTheTop(true);
this.addAbility(ability);
this.addAbility(new DevoidAbility(this.color));
// Target player reveals his or her hand. You may choose a card from it with converted mana cost 3 or greater and exile that card.
Effect effect = new ExileCardYouChooseTargetOpponentEffect(filter);

View file

@ -28,7 +28,6 @@
package mage.cards.t;
import java.util.UUID;
import mage.abilities.Ability;
import mage.abilities.effects.common.UntapTargetEffect;
import mage.abilities.effects.common.continuous.GainAbilityTargetEffect;
import mage.abilities.effects.common.continuous.GainControlTargetEffect;
@ -47,12 +46,11 @@ import mage.target.common.TargetCreaturePermanent;
public class TurnAgainst extends CardImpl {
public TurnAgainst(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{4}{R}");
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{4}{R}");
// Devoid
Ability ability = new DevoidAbility(this.color);
ability.setRuleAtTheTop(true);
this.addAbility(ability);
this.addAbility(new DevoidAbility(this.color));
// Gain control of target creature until end of turn. Untap that creature. It gains haste until end of turn.
this.getSpellAbility().addTarget(new TargetCreaturePermanent());
this.getSpellAbility().addEffect(new GainControlTargetEffect(Duration.EndOfTurn));

View file

@ -28,7 +28,6 @@
package mage.cards.u;
import java.util.UUID;
import mage.abilities.Ability;
import mage.abilities.effects.Effect;
import mage.abilities.effects.common.ExileTargetIfDiesEffect;
import mage.abilities.effects.common.FightTargetsEffect;
@ -59,9 +58,8 @@ public class UnnaturalAggression extends CardImpl {
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{2}{G}");
// Devoid
Ability ability = new DevoidAbility(this.color);
ability.setRuleAtTheTop(true);
this.addAbility(ability);
this.addAbility(new DevoidAbility(this.color));
// Target creature you control fights target creature an opponent controls.
this.getSpellAbility().addEffect(new FightTargetsEffect());
this.getSpellAbility().addTarget(new TargetControlledCreaturePermanent());