This commit is contained in:
Evan Kranzler 2019-01-04 16:09:31 -05:00
commit 10efcd801c
14 changed files with 59 additions and 67 deletions

View file

@ -1,26 +1,23 @@
package mage.cards.a;
import java.util.UUID;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.SpellCastControllerTriggeredAbility;
import mage.abilities.effects.Effect;
import mage.abilities.effects.common.continuous.BoostControlledEffect;
import mage.constants.*;
import mage.abilities.keyword.FlyingAbility;
import mage.abilities.keyword.HasteAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.*;
import mage.filter.StaticFilters;
import mage.filter.common.FilterControlledCreaturePermanent;
import mage.filter.common.FilterControlledPermanent;
import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.mageobject.SubtypePredicate;
import mage.filter.predicate.permanent.ControllerPredicate;
import java.util.UUID;
/**
*
* @author JRHerlehy
*/
public final class AdelizTheCinderWind extends CardImpl {
@ -34,7 +31,7 @@ public final class AdelizTheCinderWind extends CardImpl {
public AdelizTheCinderWind(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{U}{R}");
this.addSuperType(SuperType.LEGENDARY);
this.subtype.add(SubType.HUMAN, SubType.WIZARD);
this.power = new MageInt(2);
@ -48,7 +45,7 @@ public final class AdelizTheCinderWind extends CardImpl {
// Whenever you cast an instant or sorcery spell, Wizards you control get +1/+1 until end of turn.
Effect effect = new BoostControlledEffect(1, 1, Duration.EndOfTurn, filter);
Ability ability = new SpellCastControllerTriggeredAbility(effect, StaticFilters.FILTER_SPELL_INSTANT_OR_SORCERY, false);
Ability ability = new SpellCastControllerTriggeredAbility(effect, StaticFilters.FILTER_SPELL_AN_INSTANT_OR_SORCERY, false);
this.addAbility(ability);
}

View file

@ -1,7 +1,5 @@
package mage.cards.b;
import java.util.UUID;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.SpellCastControllerTriggeredAbility;
@ -14,22 +12,23 @@ import mage.constants.Duration;
import mage.constants.SubType;
import mage.filter.StaticFilters;
import java.util.UUID;
/**
* @author LevelX2
*/
public final class BlistercoilWeird extends CardImpl {
public BlistercoilWeird(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{U/R}");
this.subtype.add(SubType.WEIRD);
public BlistercoilWeird(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{U/R}");
this.subtype.add(SubType.WEIRD);
this.power = new MageInt(1);
this.toughness = new MageInt(1);
// Whenever you cast an instant or sorcery spell, Blistercoil Weird gets +1/+1 until end of turn. Untap it.
Ability ability = new SpellCastControllerTriggeredAbility(new BoostSourceEffect(1, 1, Duration.EndOfTurn), StaticFilters.FILTER_SPELL_INSTANT_OR_SORCERY, false);
Ability ability = new SpellCastControllerTriggeredAbility(new BoostSourceEffect(1, 1, Duration.EndOfTurn), StaticFilters.FILTER_SPELL_AN_INSTANT_OR_SORCERY, false);
ability.addEffect(new UntapSourceEffect());
this.addAbility(ability);

View file

@ -1,7 +1,5 @@
package mage.cards.e;
import java.util.UUID;
import mage.MageObjectReference;
import mage.abilities.Ability;
import mage.abilities.TriggeredAbilityImpl;
@ -23,8 +21,9 @@ import mage.target.TargetCard;
import mage.target.targetpointer.FixedTarget;
import mage.util.CardUtil;
import java.util.UUID;
/**
*
* @author spjspj
*/
public final class EyeOfTheStorm extends CardImpl {
@ -111,7 +110,7 @@ class EyeOfTheStormEffect1 extends OneShotEffect {
Card card = spell.getCard();
if (spellController == null
|| card == null
|| !StaticFilters.FILTER_SPELL_INSTANT_OR_SORCERY.match(spell, game)) {
|| !StaticFilters.FILTER_SPELL_AN_INSTANT_OR_SORCERY.match(spell, game)) {
return false;
}
if (!noLongerOnStack) {// the spell is still on the stack, so exile it

View file

@ -1,7 +1,5 @@
package mage.cards.f;
import java.util.UUID;
import mage.MageInt;
import mage.abilities.common.SpellCastControllerTriggeredAbility;
import mage.abilities.effects.common.continuous.SwitchPowerToughnessSourceEffect;
@ -9,18 +7,19 @@ import mage.abilities.keyword.FlyingAbility;
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.filter.StaticFilters;
import java.util.UUID;
/**
*
* @author LevelX2
*/
public final class Fluxcharger extends CardImpl {
public Fluxcharger(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}{R}");
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{U}{R}");
this.subtype.add(SubType.WEIRD);
this.power = new MageInt(1);
@ -29,7 +28,7 @@ public final class Fluxcharger extends CardImpl {
// Flying
this.addAbility(FlyingAbility.getInstance());
// Whenever you cast an instant or sorcery spell, you may switch Fluxcharger's power and toughness until end of turn.
this.addAbility(new SpellCastControllerTriggeredAbility(new SwitchPowerToughnessSourceEffect(Duration.EndOfTurn), StaticFilters.FILTER_SPELL_INSTANT_OR_SORCERY, true));
this.addAbility(new SpellCastControllerTriggeredAbility(new SwitchPowerToughnessSourceEffect(Duration.EndOfTurn), StaticFilters.FILTER_SPELL_AN_INSTANT_OR_SORCERY, true));
}

View file

@ -9,15 +9,15 @@ import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.Zone;
import mage.game.Game;
import mage.game.events.GameEvent;
import java.util.UUID;
import mage.filter.StaticFilters;
import mage.game.Game;
import mage.game.events.DamageEvent;
import mage.game.events.GameEvent;
import mage.target.TargetSpell;
import java.util.UUID;
/**
*
* @author bunchOfDevs
*/
public class HiddenRetreat extends CardImpl {
@ -27,7 +27,7 @@ public class HiddenRetreat extends CardImpl {
//Put a card from your hand on top of your library: Prevent all damage that would be dealt by target instant or sorcery spell this turn.
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new HiddenRetreatEffect(), new PutCardFromHandOnTopOfLibraryCost());
ability.addTarget(new TargetSpell(StaticFilters.FILTER_SPELL_AN_INSTANT_OR_SORCERY));
ability.addTarget(new TargetSpell(StaticFilters.FILTER_SPELL_INSTANT_OR_SORCERY));
this.addAbility(ability);
}

View file

@ -1,7 +1,5 @@
package mage.cards.m;
import java.util.UUID;
import mage.MageInt;
import mage.abilities.common.SpellCastControllerTriggeredAbility;
import mage.abilities.effects.common.continuous.BoostSourceEffect;
@ -9,18 +7,19 @@ import mage.abilities.keyword.FlyingAbility;
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.filter.StaticFilters;
import java.util.UUID;
/**
*
* @author fireshoes
*/
public final class MercurialGeists extends CardImpl {
public MercurialGeists(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}{R}");
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{U}{R}");
this.subtype.add(SubType.SPIRIT);
this.power = new MageInt(1);
this.toughness = new MageInt(3);
@ -29,7 +28,7 @@ public final class MercurialGeists extends CardImpl {
this.addAbility(FlyingAbility.getInstance());
// Whenever you cast an instant or sorcery spell, Mercurial Geists gets +3/+0 until end of turn.
this.addAbility(new SpellCastControllerTriggeredAbility(new BoostSourceEffect(3, 0, Duration.EndOfTurn), StaticFilters.FILTER_SPELL_INSTANT_OR_SORCERY, false));
this.addAbility(new SpellCastControllerTriggeredAbility(new BoostSourceEffect(3, 0, Duration.EndOfTurn), StaticFilters.FILTER_SPELL_AN_INSTANT_OR_SORCERY, false));
}
public MercurialGeists(final MercurialGeists card) {

View file

@ -1,18 +1,18 @@
package mage.cards.m;
import java.util.UUID;
import mage.MageInt;
import mage.abilities.common.SpellCastControllerTriggeredAbility;
import mage.abilities.effects.common.CreateTokenEffect;
import mage.constants.SubType;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.filter.StaticFilters;
import mage.game.permanent.token.BirdIllusionToken;
import java.util.UUID;
/**
*
* @author TheElk801
*/
public final class MurmuringMystic extends CardImpl {
@ -28,7 +28,7 @@ public final class MurmuringMystic extends CardImpl {
// Whenever you cast an instant or sorcery spell, create a 1/1 blue Bird Illusion creature token with flying.
this.addAbility(new SpellCastControllerTriggeredAbility(
new CreateTokenEffect(new BirdIllusionToken()),
StaticFilters.FILTER_SPELL_INSTANT_OR_SORCERY, false
StaticFilters.FILTER_SPELL_AN_INSTANT_OR_SORCERY, false
));
}

View file

@ -1,7 +1,5 @@
package mage.cards.n;
import java.util.UUID;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.SpellCastControllerTriggeredAbility;
@ -19,8 +17,9 @@ import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.permanent.ControllerPredicate;
import mage.target.common.TargetCreaturePermanent;
import java.util.UUID;
/**
*
* @author fireshoes
*/
public final class NiblisOfFrost extends CardImpl {
@ -31,7 +30,7 @@ public final class NiblisOfFrost extends CardImpl {
}
public NiblisOfFrost(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}{U}");
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{U}{U}");
this.subtype.add(SubType.SPIRIT);
this.power = new MageInt(3);
this.toughness = new MageInt(3);
@ -43,7 +42,7 @@ public final class NiblisOfFrost extends CardImpl {
this.addAbility(new ProwessAbility());
// Whenever you cast an instant or sorcery spell, tap target creature an opponent controls. That creature doesn't untap during its controller's next untap step.
Ability ability = new SpellCastControllerTriggeredAbility(new TapTargetEffect(), StaticFilters.FILTER_SPELL_INSTANT_OR_SORCERY, false);
Ability ability = new SpellCastControllerTriggeredAbility(new TapTargetEffect(), StaticFilters.FILTER_SPELL_AN_INSTANT_OR_SORCERY, false);
ability.addTarget(new TargetCreaturePermanent(filterCreature));
ability.addEffect(new DontUntapInControllersNextUntapStepTargetEffect("That creature"));
this.addAbility(ability);

View file

@ -1,7 +1,5 @@
package mage.cards.p;
import java.util.UUID;
import mage.MageInt;
import mage.abilities.common.SpellCastControllerTriggeredAbility;
import mage.abilities.effects.keyword.ScryEffect;
@ -12,14 +10,15 @@ import mage.constants.CardType;
import mage.constants.SubType;
import mage.filter.StaticFilters;
import java.util.UUID;
/**
*
* @author LevelX2
*/
public final class PrescientChimera extends CardImpl {
public PrescientChimera(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{U}{U}");
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{U}{U}");
this.subtype.add(SubType.CHIMERA);
this.power = new MageInt(3);
@ -28,7 +27,7 @@ public final class PrescientChimera extends CardImpl {
// Flying
this.addAbility(FlyingAbility.getInstance());
// Whenever you cast an instant or sorcery spell, scry 1.
this.addAbility(new SpellCastControllerTriggeredAbility(new ScryEffect(1), StaticFilters.FILTER_SPELL_INSTANT_OR_SORCERY, false));
this.addAbility(new SpellCastControllerTriggeredAbility(new ScryEffect(1), StaticFilters.FILTER_SPELL_AN_INSTANT_OR_SORCERY, false));
}
public PrescientChimera(final PrescientChimera card) {

View file

@ -1,9 +1,5 @@
package mage.cards.s;
import java.util.ArrayList;
import java.util.List;
import java.util.UUID;
import mage.MageObject;
import mage.MageObjectReference;
import mage.abilities.common.SpellCastAllTriggeredAbility;
@ -20,8 +16,11 @@ import mage.game.events.GameEvent;
import mage.target.common.TargetAnyTarget;
import mage.watchers.Watcher;
import java.util.ArrayList;
import java.util.List;
import java.util.UUID;
/**
*
* @author TheElk801
*/
public final class SentinelTower extends CardImpl {
@ -46,7 +45,7 @@ public final class SentinelTower extends CardImpl {
class SentinelTowerTriggeredAbility extends SpellCastAllTriggeredAbility {
SentinelTowerTriggeredAbility() {
super(new DamageTargetEffect(0), StaticFilters.FILTER_SPELL_INSTANT_OR_SORCERY, false);
super(new DamageTargetEffect(0), StaticFilters.FILTER_SPELL_AN_INSTANT_OR_SORCERY, false);
this.addTarget(new TargetAnyTarget());
}

View file

@ -1,6 +1,5 @@
package mage.cards.y;
import java.util.UUID;
import mage.MageInt;
import mage.abilities.common.SpellCastControllerTriggeredAbility;
import mage.abilities.effects.common.CreateTokenEffect;
@ -11,8 +10,9 @@ import mage.constants.SubType;
import mage.filter.StaticFilters;
import mage.game.permanent.token.YoungPyromancerElementalToken;
import java.util.UUID;
/**
*
* @author jeffwadsworth
*/
public final class YoungPyromancer extends CardImpl {
@ -28,7 +28,7 @@ public final class YoungPyromancer extends CardImpl {
// Whenever you cast an instant or sorcery spell, create a 1/1 red Elemental creature token.
this.addAbility(new SpellCastControllerTriggeredAbility(
new CreateTokenEffect(new YoungPyromancerElementalToken()),
StaticFilters.FILTER_SPELL_INSTANT_OR_SORCERY, false
StaticFilters.FILTER_SPELL_AN_INSTANT_OR_SORCERY, false
));
}

View file

@ -1,15 +1,17 @@
package org.mage.test.cards.single.vis;
import java.util.UUID;
import mage.game.permanent.Permanent;
import org.junit.Ignore;
import org.junit.Test;
import org.mage.test.serverside.base.CardTestPlayerBase;
import static org.hamcrest.core.Is.is;
import static org.junit.Assert.*;
import java.util.UUID;
import static mage.constants.Zone.*;
import static mage.constants.PhaseStep.*;
import static mage.constants.Zone.BATTLEFIELD;
import static mage.constants.Zone.HAND;
import static org.hamcrest.core.Is.is;
import static org.junit.Assert.assertThat;
public class BroodOfCockroachesTest extends CardTestPlayerBase {
@ -19,8 +21,9 @@ public class BroodOfCockroachesTest extends CardTestPlayerBase {
private static final String SHOCK = "Shock";
@Test
@Ignore // TODO: fix "put into your graveyard from the battlefield" texts for some cards
public void should_display_correct_text() {
String expectedText = "When {this} dies, at the beginning of the next end step, you lose 1 life and return Brood of Cockroaches to your hand.";
String expectedText = "When {this} is put into your graveyard from the battlefield, at the beginning of the next end step, you lose 1 life and return {this} to your hand.";
playerA_casts_Brood_of_Cockroaches_at_precombat_main_phase();
@ -29,7 +32,6 @@ public class BroodOfCockroachesTest extends CardTestPlayerBase {
Permanent permanent = getPermanent(BROOD_OF_COCKROACHES, playerA);
assertThat(permanent.getAbilities().get(1).toString(), is(expectedText));
}
@Test

View file

@ -477,7 +477,7 @@ public final class StaticFilters {
FILTER_SPELL_AN_INSTANT_OR_SORCERY.setLockedFilter(true);
}
public static final FilterSpell FILTER_SPELL_INSTANT_OR_SORCERY = new FilterSpell("an instant or sorcery spell");
public static final FilterSpell FILTER_SPELL_INSTANT_OR_SORCERY = new FilterSpell("instant or sorcery spell");
static {
FILTER_SPELL_INSTANT_OR_SORCERY.add(Predicates.or(

View file

@ -17,7 +17,7 @@ public final class WillKenrithEmblem extends Emblem {
this.getAbilities().add(new SpellCastControllerTriggeredAbility(
Zone.COMMAND,
new CopyTargetSpellEffect(true).withSpellName("it"),
StaticFilters.FILTER_SPELL_INSTANT_OR_SORCERY,
StaticFilters.FILTER_SPELL_AN_INSTANT_OR_SORCERY,
false,
true
));