forked from External/mage
remove filter constructors from TargetControlledCreaturePermanent
This commit is contained in:
parent
96b39c1210
commit
b19d8fea76
163 changed files with 1398 additions and 1863 deletions
|
|
@ -15,7 +15,7 @@ import mage.cards.CardImpl;
|
|||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.*;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.target.common.TargetControlledCreaturePermanent;
|
||||
import mage.target.TargetPermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
|
|
@ -60,7 +60,7 @@ public final class AcesBaseballBat extends CardImpl {
|
|||
// Equip legendary creature (1)
|
||||
this.addAbility(new EquipAbility(
|
||||
Outcome.AddAbility, new GenericManaCost(1),
|
||||
new TargetControlledCreaturePermanent(filterLegendary), false
|
||||
new TargetPermanent(filterLegendary), false
|
||||
));
|
||||
|
||||
// Equip {3}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
package mage.cards.a;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
|
|
@ -10,12 +9,12 @@ import mage.cards.CardImpl;
|
|||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.target.common.TargetControlledCreaturePermanent;
|
||||
import mage.target.TargetPermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author fireshoes
|
||||
*/
|
||||
public final class AegisAutomaton extends CardImpl {
|
||||
|
|
@ -29,7 +28,7 @@ public final class AegisAutomaton extends CardImpl {
|
|||
|
||||
// {4}{W}: Return another target creature you control to its owner's hand.
|
||||
Ability ability = new SimpleActivatedAbility(new ReturnToHandTargetEffect(), new ManaCostsImpl<>("{4}{W}"));
|
||||
ability.addTarget(new TargetControlledCreaturePermanent(StaticFilters.FILTER_ANOTHER_TARGET_CREATURE_YOU_CONTROL));
|
||||
ability.addTarget(new TargetPermanent(StaticFilters.FILTER_ANOTHER_TARGET_CREATURE_YOU_CONTROL));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,22 +1,22 @@
|
|||
package mage.cards.a;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.triggers.BeginningOfCombatTriggeredAbility;
|
||||
import mage.abilities.effects.common.continuous.BoostTargetEffect;
|
||||
import mage.abilities.effects.common.continuous.GainAbilityTargetEffect;
|
||||
import mage.abilities.keyword.IndestructibleAbility;
|
||||
import mage.constants.SubType;
|
||||
import mage.abilities.triggers.BeginningOfCombatTriggeredAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.SubType;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.target.common.TargetControlledCreaturePermanent;
|
||||
import mage.target.TargetPermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class AethershieldArtificer extends CardImpl {
|
||||
|
|
@ -45,7 +45,7 @@ public final class AethershieldArtificer extends CardImpl {
|
|||
IndestructibleAbility.getInstance(),
|
||||
Duration.EndOfTurn
|
||||
).setText("and gains indestructible until end of turn"));
|
||||
ability.addTarget(new TargetControlledCreaturePermanent(filter));
|
||||
ability.addTarget(new TargetPermanent(filter));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
|
||||
package mage.cards.a;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
|
|
@ -17,24 +16,17 @@ import mage.cards.CardSetInfo;
|
|||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.permanent.TappedPredicate;
|
||||
import mage.target.common.TargetControlledCreaturePermanent;
|
||||
import mage.target.common.TargetControlledPermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author jeffwadsworth
|
||||
*
|
||||
*/
|
||||
public final class AltarGolem extends CardImpl {
|
||||
|
||||
private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("untapped creatures you control");
|
||||
|
||||
static {
|
||||
filter.add(TappedPredicate.UNTAPPED);
|
||||
}
|
||||
|
||||
public AltarGolem(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{7}");
|
||||
this.subtype.add(SubType.GOLEM);
|
||||
|
|
@ -53,7 +45,7 @@ public final class AltarGolem extends CardImpl {
|
|||
this.addAbility(new SimpleStaticAbility(new DontUntapInControllersUntapStepSourceEffect()));
|
||||
|
||||
// Tap five untapped creatures you control: Untap Altar Golem.
|
||||
this.addAbility(new SimpleActivatedAbility(new UntapSourceEffect(), new TapTargetCost(new TargetControlledCreaturePermanent(5, 5, filter, true))));
|
||||
this.addAbility(new SimpleActivatedAbility(new UntapSourceEffect(), new TapTargetCost(new TargetControlledPermanent(5, StaticFilters.FILTER_CONTROLLED_UNTAPPED_CREATURES))));
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ import mage.game.events.ZoneChangeEvent;
|
|||
import mage.game.permanent.Permanent;
|
||||
import mage.game.permanent.PermanentToken;
|
||||
import mage.players.Player;
|
||||
import mage.target.common.TargetControlledCreaturePermanent;
|
||||
import mage.target.TargetPermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
|
|
@ -48,7 +48,7 @@ public final class AnafenzaTheForemost extends CardImpl {
|
|||
|
||||
// Whenever Anafenza, the Foremost attacks, put a +1/+1 counter on another target tapped creature you control.
|
||||
Ability ability = new AttacksTriggeredAbility(new AddCountersTargetEffect(CounterType.P1P1.createInstance()), false);
|
||||
ability.addTarget(new TargetControlledCreaturePermanent(filter));
|
||||
ability.addTarget(new TargetPermanent(filter));
|
||||
this.addAbility(ability);
|
||||
|
||||
// If a nontoken creature an opponent owns would die or a creature card not on the battlefield would be put into an opponent's graveyard, exile that card instead.
|
||||
|
|
|
|||
|
|
@ -9,9 +9,9 @@ import mage.cards.CardImpl;
|
|||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.game.Game;
|
||||
import mage.players.Player;
|
||||
import mage.target.TargetPermanent;
|
||||
import mage.target.common.TargetControlledCreaturePermanent;
|
||||
import mage.target.targetpointer.FixedTargets;
|
||||
|
||||
|
|
@ -61,12 +61,8 @@ class AnotherRoundEffect extends OneShotEffect {
|
|||
}
|
||||
|
||||
int xValue = GetXValue.instance.calculate(game, source, this);
|
||||
TargetControlledCreaturePermanent target =
|
||||
new TargetControlledCreaturePermanent(
|
||||
0, Integer.MAX_VALUE,
|
||||
StaticFilters.FILTER_CONTROLLED_CREATURE, true
|
||||
);
|
||||
|
||||
TargetPermanent target = new TargetControlledCreaturePermanent(0, Integer.MAX_VALUE);
|
||||
target.withNotTarget(true);
|
||||
for (int i = 0; i <= xValue; ++i) {
|
||||
target.clearChosen();
|
||||
controller.chooseTarget(Outcome.Benefit, target, source, game);
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
|
||||
package mage.cards.a;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.EntersBattlefieldOrAttacksSourceTriggeredAbility;
|
||||
|
|
@ -14,10 +13,11 @@ import mage.constants.Duration;
|
|||
import mage.constants.SubType;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.predicate.mageobject.AnotherPredicate;
|
||||
import mage.target.common.TargetControlledCreaturePermanent;
|
||||
import mage.target.TargetPermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author fireshoes
|
||||
*/
|
||||
public final class ArashinForemost extends CardImpl {
|
||||
|
|
@ -41,7 +41,7 @@ public final class ArashinForemost extends CardImpl {
|
|||
|
||||
// Whenever Arashin Foremost enters the battlefield or attacks, another target Warrior creature you control gains double strike until end of turn.
|
||||
Ability ability = new EntersBattlefieldOrAttacksSourceTriggeredAbility(new GainAbilityTargetEffect(DoubleStrikeAbility.getInstance(), Duration.EndOfTurn));
|
||||
ability.addTarget(new TargetControlledCreaturePermanent(filter));
|
||||
ability.addTarget(new TargetPermanent(filter));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -12,7 +12,6 @@ import mage.cards.CardSetInfo;
|
|||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.counters.CounterType;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.target.common.TargetControlledCreaturePermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
|
@ -30,9 +29,9 @@ public final class ArcticMerfolk extends CardImpl {
|
|||
this.toughness = new MageInt(1);
|
||||
|
||||
// Kicker—Return a creature you control to its owner's hand. (You may return a creature you control to its owner's hand in addition to any other costs as you cast this spell.)
|
||||
this.addAbility(new KickerAbility(new ReturnToHandChosenControlledPermanentCost(
|
||||
new TargetControlledCreaturePermanent(1, 1, StaticFilters.FILTER_CONTROLLED_CREATURE, true)
|
||||
)));
|
||||
this.addAbility(new KickerAbility(
|
||||
new ReturnToHandChosenControlledPermanentCost(new TargetControlledCreaturePermanent())
|
||||
));
|
||||
|
||||
// If Arctic Merfolk was kicked, it enters with a +1/+1 counter on it.
|
||||
this.addAbility(new EntersBattlefieldAbility(
|
||||
|
|
|
|||
|
|
@ -14,12 +14,10 @@ import mage.constants.Duration;
|
|||
import mage.constants.SubType;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.target.TargetPermanent;
|
||||
import mage.target.common.TargetControlledCreaturePermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author ciaccona007
|
||||
*/
|
||||
public final class AshrootAnimist extends CardImpl {
|
||||
|
|
@ -40,9 +38,9 @@ public final class AshrootAnimist extends CardImpl {
|
|||
new GainAbilityTargetEffect(TrampleAbility.getInstance(), Duration.EndOfTurn).setText("another target creature you control gains trample"),
|
||||
false
|
||||
);
|
||||
ability.addEffect( new BoostTargetEffect(SourcePermanentPowerValue.NOT_NEGATIVE, SourcePermanentPowerValue.NOT_NEGATIVE, Duration.EndOfTurn)
|
||||
ability.addEffect(new BoostTargetEffect(SourcePermanentPowerValue.NOT_NEGATIVE, SourcePermanentPowerValue.NOT_NEGATIVE, Duration.EndOfTurn)
|
||||
.setText("and gets +X/+X until end of turn, where X is this creature's power"));
|
||||
ability.addTarget(new TargetControlledCreaturePermanent(StaticFilters.FILTER_ANOTHER_TARGET_CREATURE_YOU_CONTROL));
|
||||
ability.addTarget(new TargetPermanent(StaticFilters.FILTER_ANOTHER_TARGET_CREATURE_YOU_CONTROL));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,8 +1,5 @@
|
|||
|
||||
|
||||
package mage.cards.a;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.costs.common.TapTargetCost;
|
||||
|
|
@ -15,35 +12,29 @@ import mage.cards.CardSetInfo;
|
|||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.predicate.permanent.TappedPredicate;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.target.TargetPermanent;
|
||||
import mage.target.common.TargetControlledCreaturePermanent;
|
||||
import mage.target.common.TargetControlledPermanent;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author Loki
|
||||
*/
|
||||
public final class AuraOfDominion extends CardImpl {
|
||||
|
||||
private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("untapped creature you control");
|
||||
|
||||
static {
|
||||
filter.add(TappedPredicate.UNTAPPED);
|
||||
}
|
||||
|
||||
|
||||
public AuraOfDominion(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{U}{U}");
|
||||
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{U}{U}");
|
||||
this.subtype.add(SubType.AURA);
|
||||
|
||||
TargetPermanent auraTarget = new TargetCreaturePermanent();
|
||||
this.getSpellAbility().addTarget(auraTarget);
|
||||
this.getSpellAbility().addEffect(new AttachEffect(Outcome.Untap));
|
||||
this.addAbility(new EnchantAbility(auraTarget));
|
||||
|
||||
Ability ability = new SimpleActivatedAbility(new UntapAttachedEffect(), new GenericManaCost(1));
|
||||
ability.addCost(new TapTargetCost(new TargetControlledCreaturePermanent(1, 1, filter, false)));
|
||||
ability.addCost(new TapTargetCost(new TargetControlledPermanent(StaticFilters.FILTER_CONTROLLED_UNTAPPED_CREATURE)));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,5 @@
|
|||
|
||||
package mage.cards.b;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.ObjectColor;
|
||||
import mage.abilities.costs.common.TapTargetCost;
|
||||
import mage.abilities.effects.common.CreateTokenEffect;
|
||||
|
|
@ -9,15 +7,15 @@ import mage.abilities.keyword.FlashbackAbility;
|
|||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.TimingRule;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.predicate.mageobject.ColorPredicate;
|
||||
import mage.filter.predicate.permanent.TappedPredicate;
|
||||
import mage.game.permanent.token.BirdToken;
|
||||
import mage.target.common.TargetControlledCreaturePermanent;
|
||||
import mage.target.common.TargetControlledPermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LevelX2
|
||||
*/
|
||||
public final class BattleScreech extends CardImpl {
|
||||
|
|
@ -30,14 +28,13 @@ public final class BattleScreech extends CardImpl {
|
|||
}
|
||||
|
||||
public BattleScreech(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{2}{W}{W}");
|
||||
|
||||
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{2}{W}{W}");
|
||||
|
||||
// Create two 1/1 white Bird creature tokens with flying.
|
||||
this.getSpellAbility().addEffect(new CreateTokenEffect(new BirdToken(), 2));
|
||||
|
||||
// Flashback-Tap three untapped white creatures you control.
|
||||
this.addAbility(new FlashbackAbility(this, new TapTargetCost(new TargetControlledCreaturePermanent(3,3, filter, true))));
|
||||
this.addAbility(new FlashbackAbility(this, new TapTargetCost(new TargetControlledPermanent(3, filter))));
|
||||
}
|
||||
|
||||
private BattleScreech(final BattleScreech card) {
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
package mage.cards.b;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.MageObject;
|
||||
import mage.abilities.Ability;
|
||||
|
|
@ -8,27 +7,28 @@ import mage.abilities.dynamicvalue.common.ControllerGainedLifeCount;
|
|||
import mage.abilities.dynamicvalue.common.ControllerLostLifeCount;
|
||||
import mage.abilities.effects.common.ReturnFromGraveyardToBattlefieldTargetEffect;
|
||||
import mage.abilities.effects.common.counter.AddCountersTargetEffect;
|
||||
import mage.abilities.triggers.BeginningOfEndStepTriggeredAbility;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.SuperType;
|
||||
import mage.abilities.keyword.FlyingAbility;
|
||||
import mage.abilities.keyword.LifelinkAbility;
|
||||
import mage.abilities.triggers.BeginningOfEndStepTriggeredAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.SuperType;
|
||||
import mage.counters.CounterType;
|
||||
import mage.filter.FilterCard;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.filter.predicate.ObjectSourcePlayer;
|
||||
import mage.filter.predicate.ObjectSourcePlayerPredicate;
|
||||
import mage.game.Game;
|
||||
import mage.target.TargetPermanent;
|
||||
import mage.target.common.TargetCardInGraveyard;
|
||||
import mage.target.common.TargetControlledCreaturePermanent;
|
||||
import mage.target.targetpointer.SecondTargetPointer;
|
||||
import mage.watchers.common.PlayerGainedLifeWatcher;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Grath
|
||||
*/
|
||||
public final class BetorAncestorsVoice extends CardImpl {
|
||||
|
|
@ -64,7 +64,7 @@ public final class BetorAncestorsVoice extends CardImpl {
|
|||
.setText("put a number of +1/+1 counters on up to one other target creature you " +
|
||||
"control equal to the amount of life you gained this turn.")
|
||||
);
|
||||
ability.addTarget(new TargetControlledCreaturePermanent(0, 1, StaticFilters.FILTER_ANOTHER_TARGET_CREATURE_YOU_CONTROL, false));
|
||||
ability.addTarget(new TargetPermanent(0, 1, StaticFilters.FILTER_ANOTHER_TARGET_CREATURE_YOU_CONTROL));
|
||||
ability.addEffect(new ReturnFromGraveyardToBattlefieldTargetEffect().setTargetPointer(new SecondTargetPointer())
|
||||
.setText("Return up to one target creature card with mana value less than or equal to the amount of " +
|
||||
"life you lost this turn from your graveyard to the battlefield."));
|
||||
|
|
|
|||
|
|
@ -1,8 +1,5 @@
|
|||
package mage.cards.b;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.Mana;
|
||||
import mage.abilities.Ability;
|
||||
|
|
@ -15,19 +12,27 @@ import mage.cards.CardImpl;
|
|||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.filter.predicate.permanent.TappedPredicate;
|
||||
import mage.game.Game;
|
||||
import mage.target.common.TargetControlledCreaturePermanent;
|
||||
import mage.target.common.TargetControlledPermanent;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LevelX2
|
||||
*/
|
||||
public final class BirchloreRangers extends CardImpl {
|
||||
|
||||
private static final FilterControlledPermanent filter = new FilterControlledPermanent(SubType.ELF, "untapped Elves you control");
|
||||
|
||||
static {
|
||||
filter.add(TappedPredicate.UNTAPPED);
|
||||
}
|
||||
|
||||
public BirchloreRangers(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{G}");
|
||||
this.subtype.add(SubType.ELF, SubType.DRUID, SubType.RANGER);
|
||||
|
|
@ -36,13 +41,10 @@ public final class BirchloreRangers extends CardImpl {
|
|||
this.toughness = new MageInt(1);
|
||||
|
||||
// Tap two untapped Elves you control: Add one mana of any color.
|
||||
FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("untapped Elves you control");
|
||||
filter.add(TappedPredicate.UNTAPPED);
|
||||
filter.add(SubType.ELF.getPredicate());
|
||||
this.addAbility(new SimpleManaAbility(
|
||||
Zone.BATTLEFIELD,
|
||||
new BirchloreRangersManaEffect(filter),
|
||||
new TapTargetCost(new TargetControlledCreaturePermanent(2, 2, filter, false))));
|
||||
new TapTargetCost(new TargetControlledPermanent(2, filter))
|
||||
));
|
||||
|
||||
// Morph {G}
|
||||
this.addAbility(new MorphAbility(this, new ManaCostsImpl<>("{G}")));
|
||||
|
|
|
|||
|
|
@ -1,7 +1,5 @@
|
|||
|
||||
package mage.cards.b;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
|
|
@ -14,19 +12,20 @@ import mage.cards.CardSetInfo;
|
|||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.filter.predicate.mageobject.AnotherPredicate;
|
||||
import mage.filter.predicate.permanent.TappedPredicate;
|
||||
import mage.target.common.TargetControlledCreaturePermanent;
|
||||
import mage.target.common.TargetControlledPermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Quercitron
|
||||
*/
|
||||
public final class BlackOakOfOdunos extends CardImpl {
|
||||
|
||||
private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("another untapped creature you control");
|
||||
private static final FilterControlledPermanent filter = new FilterControlledCreaturePermanent("another untapped creature you control");
|
||||
|
||||
static {
|
||||
filter.add(AnotherPredicate.instance);
|
||||
|
|
@ -34,7 +33,7 @@ public final class BlackOakOfOdunos extends CardImpl {
|
|||
}
|
||||
|
||||
public BlackOakOfOdunos(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{B}");
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{B}");
|
||||
this.subtype.add(SubType.ZOMBIE, SubType.TREEFOLK);
|
||||
|
||||
this.power = new MageInt(0);
|
||||
|
|
@ -42,9 +41,12 @@ public final class BlackOakOfOdunos extends CardImpl {
|
|||
|
||||
// Defender
|
||||
this.addAbility(DefenderAbility.getInstance());
|
||||
|
||||
// {B}, Tap another untapped creature you control: Black Oak of Odunos gets +1/+1 until end of turn.
|
||||
Ability ability = new SimpleActivatedAbility(new BoostSourceEffect(1, 1, Duration.EndOfTurn), new ManaCostsImpl<>("{B}"));
|
||||
ability.addCost(new TapTargetCost(new TargetControlledCreaturePermanent(1, 1, filter, true)));
|
||||
Ability ability = new SimpleActivatedAbility(
|
||||
new BoostSourceEffect(1, 1, Duration.EndOfTurn), new ManaCostsImpl<>("{B}")
|
||||
);
|
||||
ability.addCost(new TapTargetCost(new TargetControlledPermanent(filter)));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -9,12 +9,15 @@ import mage.abilities.hint.ValueHint;
|
|||
import mage.abilities.keyword.EquipAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.*;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.SuperType;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.target.TargetPermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.target.common.TargetControlledCreaturePermanent;
|
||||
|
||||
/**
|
||||
* @author Rystan
|
||||
|
|
@ -39,7 +42,7 @@ public final class BlackbladeReforged extends CardImpl {
|
|||
this.addAbility(new SimpleStaticAbility(new BoostEquippedEffect(count, count)).addHint(new ValueHint("Lands you control", count)));
|
||||
|
||||
// Equip legendary creature (3)
|
||||
this.addAbility(new EquipAbility(Outcome.AddAbility, new GenericManaCost(3), new TargetControlledCreaturePermanent(filter), false));
|
||||
this.addAbility(new EquipAbility(Outcome.AddAbility, new GenericManaCost(3), new TargetPermanent(filter), false));
|
||||
|
||||
// Equip {7}
|
||||
this.addAbility(new EquipAbility(Outcome.AddAbility, new GenericManaCost(7), false));
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
package mage.cards.b;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||
|
|
@ -11,16 +10,17 @@ import mage.cards.CardSetInfo;
|
|||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.target.common.TargetControlledCreaturePermanent;
|
||||
import mage.target.TargetPermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LevelX2
|
||||
*/
|
||||
public final class BreachingHippocamp extends CardImpl {
|
||||
|
||||
public BreachingHippocamp(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{U}");
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{U}");
|
||||
this.subtype.add(SubType.HORSE, SubType.FISH);
|
||||
|
||||
this.power = new MageInt(3);
|
||||
|
|
@ -28,9 +28,10 @@ public final class BreachingHippocamp extends CardImpl {
|
|||
|
||||
// Flash
|
||||
this.addAbility(FlashAbility.getInstance());
|
||||
|
||||
// When Breaching Hippocamp enters the battlefield, untap another target creature you control.
|
||||
Ability ability = new EntersBattlefieldTriggeredAbility(new UntapTargetEffect(), false);
|
||||
ability.addTarget(new TargetControlledCreaturePermanent(1,1, StaticFilters.FILTER_ANOTHER_TARGET_CREATURE_YOU_CONTROL, false));
|
||||
ability.addTarget(new TargetPermanent(StaticFilters.FILTER_ANOTHER_TARGET_CREATURE_YOU_CONTROL));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
|
||||
package mage.cards.b;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.TriggeredAbilityImpl;
|
||||
import mage.abilities.effects.Effect;
|
||||
|
|
@ -23,6 +22,8 @@ import mage.target.Target;
|
|||
import mage.target.TargetPermanent;
|
||||
import mage.target.common.TargetControlledCreaturePermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author duncant
|
||||
*/
|
||||
|
|
@ -119,7 +120,7 @@ class BreathOfFuryEffect extends OneShotEffect {
|
|||
Player controller = game.getPlayer(source.getControllerId());
|
||||
FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("creature you control that could be enchanted by " + enchantment.getName());
|
||||
filter.add(new CanBeEnchantedByPredicate(enchantment));
|
||||
Target target = new TargetControlledCreaturePermanent(filter);
|
||||
Target target = new TargetPermanent(filter);
|
||||
target.withNotTarget(true);
|
||||
// It's important to check that the creature was successfully sacrificed here. Effects that prevent sacrifice will also prevent Breath of Fury's effect from working.
|
||||
// Commanders going to the command zone and Rest in Peace style replacement effects don't make Permanent.sacrifice return false.
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ import mage.cards.CardImpl;
|
|||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.*;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.target.common.TargetControlledCreaturePermanent;
|
||||
import mage.target.TargetPermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
|
|
@ -23,6 +23,7 @@ public final class BrotherhoodRegalia extends CardImpl {
|
|||
|
||||
private static final FilterControlledCreaturePermanent filter
|
||||
= new FilterControlledCreaturePermanent("legendary creature");
|
||||
|
||||
static {
|
||||
filter.add(SuperType.LEGENDARY.getPredicate());
|
||||
}
|
||||
|
|
@ -44,7 +45,7 @@ public final class BrotherhoodRegalia extends CardImpl {
|
|||
this.addAbility(ability);
|
||||
|
||||
// Equip legendary creature {1}
|
||||
this.addAbility(new EquipAbility(Outcome.AddAbility, new GenericManaCost(1), new TargetControlledCreaturePermanent(filter), false));
|
||||
this.addAbility(new EquipAbility(Outcome.AddAbility, new GenericManaCost(1), new TargetPermanent(filter), false));
|
||||
|
||||
// Equip {3}
|
||||
this.addAbility(new EquipAbility(Outcome.AddAbility, new GenericManaCost(3), true));
|
||||
|
|
|
|||
|
|
@ -1,11 +1,8 @@
|
|||
|
||||
package mage.cards.b;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.EntersBattlefieldOrAttacksSourceTriggeredAbility;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.common.continuous.GainAbilityTargetEffect;
|
||||
import mage.abilities.keyword.DoubleStrikeAbility;
|
||||
import mage.abilities.keyword.LifelinkAbility;
|
||||
|
|
@ -16,11 +13,11 @@ import mage.constants.CardType;
|
|||
import mage.constants.Duration;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.SuperType;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.target.common.TargetControlledCreaturePermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author spjspj
|
||||
*/
|
||||
public final class BruseTarlBoorishHerder extends CardImpl {
|
||||
|
|
@ -34,14 +31,13 @@ public final class BruseTarlBoorishHerder extends CardImpl {
|
|||
this.toughness = new MageInt(3);
|
||||
|
||||
// Whenever Bruse Tarl, Boorish Herder enters the battlefield or attacks, target creature you control gains double strike and lifelink until end of turn.
|
||||
Effect effect = new GainAbilityTargetEffect(DoubleStrikeAbility.getInstance(), Duration.EndOfTurn);
|
||||
effect.setText("target creature you control gains double strike");
|
||||
Ability ability = new EntersBattlefieldOrAttacksSourceTriggeredAbility(effect);
|
||||
effect = new GainAbilityTargetEffect(LifelinkAbility.getInstance(), Duration.EndOfTurn);
|
||||
effect.setText("and lifelink until end of turn");
|
||||
ability.addEffect(effect);
|
||||
ability.addTarget(new TargetControlledCreaturePermanent(new FilterControlledCreaturePermanent("target creature you control")));
|
||||
|
||||
Ability ability = new EntersBattlefieldOrAttacksSourceTriggeredAbility(new GainAbilityTargetEffect(
|
||||
DoubleStrikeAbility.getInstance(), Duration.EndOfTurn
|
||||
).setText("target creature you control gains double strike"));
|
||||
ability.addEffect(new GainAbilityTargetEffect(
|
||||
LifelinkAbility.getInstance(), Duration.EndOfTurn
|
||||
).setText("and lifelink until end of turn"));
|
||||
ability.addTarget(new TargetControlledCreaturePermanent());
|
||||
this.addAbility(ability);
|
||||
|
||||
// Partner
|
||||
|
|
|
|||
|
|
@ -1,12 +1,5 @@
|
|||
package mage.cards.c;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import java.util.UUID;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.CastOnlyDuringPhaseStepSourceAbility;
|
||||
import mage.abilities.condition.common.MyTurnCondition;
|
||||
|
|
@ -17,9 +10,9 @@ import mage.constants.CardType;
|
|||
import mage.constants.Duration;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.PhaseStep;
|
||||
import mage.filter.predicate.Predicates;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.Predicates;
|
||||
import mage.filter.predicate.permanent.PermanentReferenceInCollectionPredicate;
|
||||
import mage.game.Game;
|
||||
import mage.game.combat.CombatGroup;
|
||||
|
|
@ -28,11 +21,12 @@ import mage.game.events.GameEvent;
|
|||
import mage.game.permanent.Permanent;
|
||||
import mage.players.Player;
|
||||
import mage.target.Target;
|
||||
import mage.target.common.TargetControlledCreaturePermanent;
|
||||
import mage.target.TargetPermanent;
|
||||
import mage.util.RandomUtil;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author L_J
|
||||
*/
|
||||
public final class Camouflage extends CardImpl {
|
||||
|
|
@ -121,7 +115,7 @@ class CamouflageEffect extends ContinuousRuleModifyingEffectImpl {
|
|||
filter.add(Predicates.not(new PermanentReferenceInCollectionPredicate(spentBlockers, game)));
|
||||
}
|
||||
if (defender.chooseUse(Outcome.Neutral, "Make a new blocker pile? If not, all remaining piles stay empty. (remaining piles: " + (attackerCount - masterList.size()) + ')', source, game)) {
|
||||
Target target = new TargetControlledCreaturePermanent(0, Integer.MAX_VALUE, filter, true);
|
||||
Target target = new TargetPermanent(0, Integer.MAX_VALUE, filter, true);
|
||||
if (target.canChoose(defenderId, source, game)) {
|
||||
if (defender.chooseTarget(Outcome.Neutral, target, source, game)) {
|
||||
for (UUID creatureId : target.getTargets()) {
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
package mage.cards.c;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.AttacksOrBlocksTriggeredAbility;
|
||||
|
|
@ -9,20 +8,21 @@ import mage.abilities.keyword.VigilanceAbility;
|
|||
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.SuperType;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.target.common.TargetControlledCreaturePermanent;
|
||||
import mage.target.TargetPermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Styxo
|
||||
*/
|
||||
public final class Chewbacca extends CardImpl {
|
||||
|
||||
public Chewbacca(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}{G}{W}");
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{R}{G}{W}");
|
||||
this.supertype.add(SuperType.LEGENDARY);
|
||||
this.subtype.add(SubType.WOOKIEE);
|
||||
this.subtype.add(SubType.WARRIOR);
|
||||
|
|
@ -34,7 +34,7 @@ public final class Chewbacca extends CardImpl {
|
|||
|
||||
// Whenever Chewbacca attacks or blocks, another target creature you control gets +3/+3 until end of turn.
|
||||
Ability ability = new AttacksOrBlocksTriggeredAbility(new BoostTargetEffect(3, 3, Duration.EndOfTurn), false);
|
||||
ability.addTarget(new TargetControlledCreaturePermanent(StaticFilters.FILTER_ANOTHER_TARGET_CREATURE_YOU_CONTROL));
|
||||
ability.addTarget(new TargetPermanent(StaticFilters.FILTER_ANOTHER_TARGET_CREATURE_YOU_CONTROL));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,5 @@
|
|||
|
||||
package mage.cards.c;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.ObjectColor;
|
||||
import mage.abilities.Ability;
|
||||
|
|
@ -19,13 +17,14 @@ import mage.constants.TargetController;
|
|||
import mage.counters.CounterType;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.mageobject.ColorPredicate;
|
||||
import mage.filter.predicate.mageobject.AnotherPredicate;
|
||||
import mage.filter.predicate.mageobject.ColorPredicate;
|
||||
import mage.game.permanent.token.EwokToken;
|
||||
import mage.target.common.TargetControlledCreaturePermanent;
|
||||
import mage.target.TargetPermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Styxo
|
||||
*/
|
||||
public final class ChiefChirpa extends CardImpl {
|
||||
|
|
@ -42,7 +41,7 @@ public final class ChiefChirpa extends CardImpl {
|
|||
}
|
||||
|
||||
public ChiefChirpa(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{R}{G}{W}");
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{R}{G}{W}");
|
||||
this.supertype.add(SuperType.LEGENDARY);
|
||||
this.subtype.add(SubType.EWOK);
|
||||
this.subtype.add(SubType.WARRIOR);
|
||||
|
|
@ -54,7 +53,7 @@ public final class ChiefChirpa extends CardImpl {
|
|||
|
||||
// Whenever a green creature you control dies, you may put a +1/+1 counter on another target Ewok creature you control.
|
||||
Ability ability = new DiesCreatureTriggeredAbility(new AddCountersTargetEffect(CounterType.P1P1.createInstance()), true, diedFilter);
|
||||
ability.addTarget(new TargetControlledCreaturePermanent(ewokFilter));
|
||||
ability.addTarget(new TargetPermanent(ewokFilter));
|
||||
this.addAbility(ability);
|
||||
|
||||
// When Chief Chirpa become monstrous, create three 1/1 green Ewok creature tokens.
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
package mage.cards.c;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.Mana;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
|
|
@ -12,13 +11,13 @@ import mage.abilities.mana.DynamicManaAbility;
|
|||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Zone;
|
||||
import mage.counters.CounterType;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.target.common.TargetControlledCreaturePermanent;
|
||||
import mage.target.common.TargetControlledPermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Luna Skyrise
|
||||
*/
|
||||
public final class CityOfShadows extends CardImpl {
|
||||
|
|
@ -28,7 +27,7 @@ public final class CityOfShadows extends CardImpl {
|
|||
|
||||
// {T}, Exile a creature you control: Put a storage counter on City of Shadows.
|
||||
Ability ability = new SimpleActivatedAbility(new AddCountersSourceEffect(CounterType.STORAGE.createInstance()), new TapSourceCost());
|
||||
ability.addCost(new ExileTargetCost(new TargetControlledCreaturePermanent(StaticFilters.FILTER_CONTROLLED_A_CREATURE)));
|
||||
ability.addCost(new ExileTargetCost(new TargetControlledPermanent(StaticFilters.FILTER_CONTROLLED_A_CREATURE)));
|
||||
this.addAbility(ability);
|
||||
|
||||
// {T}: Add {C} for each storage counter on City of Shadows.
|
||||
|
|
|
|||
|
|
@ -1,24 +1,24 @@
|
|||
package mage.cards.c;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.DealsCombatDamageToAPlayerTriggeredAbility;
|
||||
import mage.abilities.effects.common.counter.AddCountersTargetEffect;
|
||||
import mage.constants.SubType;
|
||||
import mage.abilities.keyword.NinjutsuAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.counters.CounterType;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.predicate.Predicate;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.target.common.TargetControlledCreaturePermanent;
|
||||
import mage.target.TargetPermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author weirddan455
|
||||
*/
|
||||
public final class CoilingStalker extends CardImpl {
|
||||
|
|
@ -43,7 +43,7 @@ public final class CoilingStalker extends CardImpl {
|
|||
|
||||
// Whenever Coiling Stalker deals combat damage to a player, put a +1/+1 counter on target creature you control that doesn't have a +1/+1 counter on it.
|
||||
Ability ability = new DealsCombatDamageToAPlayerTriggeredAbility(new AddCountersTargetEffect(CounterType.P1P1.createInstance()), false);
|
||||
ability.addTarget(new TargetControlledCreaturePermanent(filter));
|
||||
ability.addTarget(new TargetPermanent(filter));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -21,7 +21,6 @@ import mage.game.Game;
|
|||
import mage.game.permanent.Permanent;
|
||||
import mage.players.Player;
|
||||
import mage.target.TargetPlayer;
|
||||
import mage.target.common.TargetControlledCreaturePermanent;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
import mage.target.common.TargetEnchantmentPermanent;
|
||||
|
||||
|
|
@ -43,7 +42,7 @@ public final class CollectiveEffort extends CardImpl {
|
|||
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{1}{W}{W}");
|
||||
|
||||
// Escalate — Tap an untapped creature you control.
|
||||
this.addAbility(new EscalateAbility(new TapTargetCost(new TargetControlledCreaturePermanent(StaticFilters.FILTER_CONTROLLED_UNTAPPED_CREATURE))));
|
||||
this.addAbility(new EscalateAbility(new TapTargetCost(StaticFilters.FILTER_CONTROLLED_UNTAPPED_CREATURE)));
|
||||
|
||||
// Choose one or more —
|
||||
this.getSpellAbility().getModes().setMinModes(1);
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
|
||||
package mage.cards.c;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.ObjectColor;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.EntersBattlefieldAbility;
|
||||
|
|
@ -17,18 +16,16 @@ import mage.cards.CardImpl;
|
|||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.Zone;
|
||||
import mage.counters.CounterType;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.filter.predicate.mageobject.ColorPredicate;
|
||||
import mage.filter.predicate.permanent.TappedPredicate;
|
||||
import mage.target.common.TargetControlledCreaturePermanent;
|
||||
import mage.target.common.TargetControlledPermanent;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author fireshoes
|
||||
*/
|
||||
public final class CoralReef extends CardImpl {
|
||||
|
|
@ -43,7 +40,7 @@ public final class CoralReef extends CardImpl {
|
|||
}
|
||||
|
||||
public CoralReef(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{U}{U}");
|
||||
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{U}{U}");
|
||||
|
||||
// Coral Reef enters the battlefield with four polyp counters on it.
|
||||
Effect effect = new AddCountersSourceEffect(CounterType.POLYP.createInstance(4));
|
||||
|
|
@ -58,7 +55,7 @@ public final class CoralReef extends CardImpl {
|
|||
|
||||
// {U}, Tap an untapped blue creature you control, Remove a polyp counter from Coral Reef: Put a +0/+1 counter on target creature.
|
||||
Ability ability = new SimpleActivatedAbility(new AddCountersTargetEffect(CounterType.P0P1.createInstance()), new ManaCostsImpl<>("{U}"));
|
||||
ability.addCost(new TapTargetCost(new TargetControlledCreaturePermanent(untappedBlueCreatureFilter)));
|
||||
ability.addCost(new TapTargetCost(untappedBlueCreatureFilter));
|
||||
ability.addCost(new RemoveCountersSourceCost(CounterType.POLYP.createInstance()));
|
||||
ability.addTarget(new TargetCreaturePermanent());
|
||||
this.addAbility(ability);
|
||||
|
|
|
|||
|
|
@ -1,7 +1,5 @@
|
|||
|
||||
package mage.cards.c;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.ObjectColor;
|
||||
import mage.abilities.Ability;
|
||||
|
|
@ -17,23 +15,23 @@ import mage.cards.CardImpl;
|
|||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.filter.predicate.mageobject.ColorPredicate;
|
||||
import mage.filter.predicate.permanent.TappedPredicate;
|
||||
import mage.target.common.TargetControlledCreaturePermanent;
|
||||
import mage.target.common.TargetAnyTarget;
|
||||
import mage.target.common.TargetControlledPermanent;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author jeffwadsworth
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author jeffwadsworth
|
||||
*/
|
||||
public final class Crackleburr extends CardImpl {
|
||||
|
||||
private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("untapped red creatures you control");
|
||||
private static final FilterControlledCreaturePermanent filter2 = new FilterControlledCreaturePermanent("tapped blue creature you control");
|
||||
private static final FilterControlledPermanent filter = new FilterControlledCreaturePermanent("untapped red creatures you control");
|
||||
private static final FilterControlledPermanent filter2 = new FilterControlledCreaturePermanent("tapped blue creature you control");
|
||||
|
||||
static {
|
||||
filter.add(new ColorPredicate(ObjectColor.RED));
|
||||
|
|
@ -44,7 +42,7 @@ public final class Crackleburr extends CardImpl {
|
|||
}
|
||||
|
||||
public Crackleburr(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{U/R}{U/R}");
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{U/R}{U/R}");
|
||||
this.subtype.add(SubType.ELEMENTAL);
|
||||
|
||||
this.power = new MageInt(2);
|
||||
|
|
@ -53,17 +51,16 @@ public final class Crackleburr extends CardImpl {
|
|||
// {UR}{UR}, {tap}, Tap two untapped red creatures you control: Crackleburr deals 3 damage to any target.
|
||||
Ability ability = new SimpleActivatedAbility(new DamageTargetEffect(3), new ManaCostsImpl<>("{U/R}{U/R}"));
|
||||
ability.addCost(new TapSourceCost());
|
||||
ability.addCost(new TapTargetCost(new TargetControlledCreaturePermanent(2, 2, filter, true)));
|
||||
ability.addCost(new TapTargetCost(new TargetControlledPermanent(2, filter)));
|
||||
ability.addTarget(new TargetAnyTarget());
|
||||
this.addAbility(ability);
|
||||
|
||||
// {UR}{UR}, {untap}, Untap two tapped blue creatures you control: Return target creature to its owner's hand.
|
||||
Ability ability2 = new SimpleActivatedAbility(new ReturnToHandTargetEffect(), new ManaCostsImpl<>("{U/R}{U/R}"));
|
||||
ability2.addCost(new UntapSourceCost());
|
||||
ability2.addCost(new UntapTargetCost(new TargetControlledCreaturePermanent(2, 2, filter2, true)));
|
||||
ability2.addCost(new UntapTargetCost(new TargetControlledPermanent(2, filter2)));
|
||||
ability2.addTarget(new TargetCreaturePermanent());
|
||||
this.addAbility(ability2);
|
||||
|
||||
}
|
||||
|
||||
private Crackleburr(final Crackleburr card) {
|
||||
|
|
|
|||
|
|
@ -15,14 +15,13 @@ import mage.game.Game;
|
|||
import mage.game.permanent.Permanent;
|
||||
import mage.players.Player;
|
||||
import mage.target.Target;
|
||||
import mage.target.common.TargetControlledCreaturePermanent;
|
||||
import mage.target.TargetPermanent;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LevelX2
|
||||
*/
|
||||
public final class CracklingDoom extends CardImpl {
|
||||
|
|
@ -49,9 +48,11 @@ public final class CracklingDoom extends CardImpl {
|
|||
class CracklingDoomEffect extends OneShotEffect {
|
||||
|
||||
static FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("creature with the greatest power among creatures you control");
|
||||
|
||||
static {
|
||||
filter.add(GreatestPowerControlledPredicate.instance);
|
||||
}
|
||||
|
||||
public CracklingDoomEffect() {
|
||||
super(Outcome.Sacrifice);
|
||||
this.staticText = "Each opponent sacrifices a creature with the greatest power among creatures that player controls";
|
||||
|
|
@ -75,7 +76,7 @@ class CracklingDoomEffect extends OneShotEffect {
|
|||
if (controller.hasOpponent(playerId, game)) {
|
||||
Player opponent = game.getPlayer(playerId);
|
||||
if (opponent != null) {
|
||||
Target target = new TargetControlledCreaturePermanent(filter);
|
||||
Target target = new TargetPermanent(filter);
|
||||
target.withNotTarget(true);
|
||||
if (opponent.choose(outcome, target, source, game)) {
|
||||
Permanent permanent = game.getPermanent(target.getFirstTarget());
|
||||
|
|
|
|||
|
|
@ -1,7 +1,5 @@
|
|||
|
||||
package mage.cards.c;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.AttacksTriggeredAbility;
|
||||
|
|
@ -11,25 +9,28 @@ import mage.abilities.effects.common.combat.MustBeBlockedByTargetSourceEffect;
|
|||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.SetTargetPointer;
|
||||
import mage.constants.SubType;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.predicate.permanent.TappedPredicate;
|
||||
import mage.game.Game;
|
||||
import mage.players.Player;
|
||||
import mage.target.Target;
|
||||
import mage.target.common.TargetControlledCreaturePermanent;
|
||||
import mage.target.TargetPermanent;
|
||||
import mage.target.targetpointer.FixedTarget;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author emerald000
|
||||
*/
|
||||
public final class CrashingBoars extends CardImpl {
|
||||
|
||||
public CrashingBoars(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}{G}");
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{G}{G}");
|
||||
this.subtype.add(SubType.BOAR);
|
||||
this.power = new MageInt(4);
|
||||
this.toughness = new MageInt(4);
|
||||
|
|
@ -50,7 +51,8 @@ public final class CrashingBoars extends CardImpl {
|
|||
|
||||
class CrashingBoarsEffect extends OneShotEffect {
|
||||
|
||||
private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("untapped creature you control");
|
||||
private static final FilterPermanent filter = new FilterControlledCreaturePermanent("untapped creature you control");
|
||||
|
||||
static {
|
||||
filter.add(TappedPredicate.UNTAPPED);
|
||||
}
|
||||
|
|
@ -72,15 +74,18 @@ class CrashingBoarsEffect extends OneShotEffect {
|
|||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player defendingPlayer = game.getPlayer(this.getTargetPointer().getFirst(game, source));
|
||||
if (defendingPlayer != null) {
|
||||
Target target = new TargetControlledCreaturePermanent(1, 1, filter, true);
|
||||
if (target.choose(Outcome.Neutral, defendingPlayer.getId(), source.getSourceId(), source, game)) {
|
||||
if (defendingPlayer == null || !game.getBattlefield().contains(
|
||||
StaticFilters.FILTER_CONTROLLED_UNTAPPED_CREATURE,
|
||||
defendingPlayer.getId(), source, game, 1
|
||||
)) {
|
||||
return false;
|
||||
}
|
||||
Target target = new TargetPermanent(StaticFilters.FILTER_CONTROLLED_UNTAPPED_CREATURE);
|
||||
target.withNotTarget(true);
|
||||
defendingPlayer.choose(Outcome.Neutral, target, source, game);
|
||||
RequirementEffect effect = new MustBeBlockedByTargetSourceEffect();
|
||||
effect.setTargetPointer(new FixedTarget(target.getFirstTarget(), game));
|
||||
game.addEffect(effect, source);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,7 +1,5 @@
|
|||
|
||||
package mage.cards.c;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.cards.CardImpl;
|
||||
|
|
@ -9,30 +7,29 @@ import mage.cards.CardSetInfo;
|
|||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.SubType;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.players.Player;
|
||||
import mage.target.Target;
|
||||
import mage.target.common.TargetControlledCreaturePermanent;
|
||||
import mage.target.TargetPermanent;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LevelX2
|
||||
*/
|
||||
public final class CrushUnderfoot extends CardImpl {
|
||||
|
||||
public CrushUnderfoot(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.KINDRED,CardType.INSTANT},"{1}{R}");
|
||||
super(ownerId, setInfo, new CardType[]{CardType.KINDRED, CardType.INSTANT}, "{1}{R}");
|
||||
this.subtype.add(SubType.GIANT);
|
||||
|
||||
|
||||
// Choose a Giant creature you control. It deals damage equal to its power to target creature.
|
||||
this.getSpellAbility().addEffect(new CrushUnderfootEffect());
|
||||
this.getSpellAbility().addTarget(new TargetCreaturePermanent(new FilterCreaturePermanent("creature damage is dealt to")));
|
||||
|
||||
this.getSpellAbility().addTarget(new TargetCreaturePermanent().withChooseHint("to deal damage to"));
|
||||
}
|
||||
|
||||
private CrushUnderfoot(final CrushUnderfoot card) {
|
||||
|
|
@ -47,10 +44,7 @@ public final class CrushUnderfoot extends CardImpl {
|
|||
|
||||
class CrushUnderfootEffect extends OneShotEffect {
|
||||
|
||||
private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("Giant creature you control");
|
||||
static {
|
||||
filter.add(SubType.GIANT.getPredicate());
|
||||
}
|
||||
private static final FilterPermanent filter = new FilterControlledCreaturePermanent(SubType.GIANT, "Giant creature you control");
|
||||
|
||||
public CrushUnderfootEffect() {
|
||||
super(Outcome.Damage);
|
||||
|
|
@ -69,22 +63,24 @@ class CrushUnderfootEffect extends OneShotEffect {
|
|||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player controller = game.getPlayer(source.getControllerId());
|
||||
if (controller != null) {
|
||||
// Choose a Giant creature you control (not targeted, happens during effect resolving )
|
||||
Target target = new TargetControlledCreaturePermanent(1,1, filter,false);
|
||||
if (target.canChoose(controller.getId(), source, game)
|
||||
&& controller.chooseTarget(outcome, target, source, game)) {
|
||||
Permanent giant = game.getPermanent(target.getFirstTarget());
|
||||
if (giant != null) {
|
||||
game.informPlayers("Crush Underfoot: Chosen Giant is " + giant.getName());
|
||||
Permanent targetCreature = game.getPermanent(this.getTargetPointer().getFirst(game, source));
|
||||
if (targetCreature != null) {
|
||||
targetCreature.damage(giant.getPower().getValue(), source.getSourceId(), source, game, false, true);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (controller == null) {
|
||||
return false;
|
||||
}
|
||||
// Choose a Giant creature you control (not targeted, happens during effect resolving )
|
||||
Target target = new TargetPermanent(filter);
|
||||
target.withNotTarget(true);
|
||||
if (!target.canChoose(controller.getId(), source, game)
|
||||
|| !controller.chooseTarget(outcome, target, source, game)) {
|
||||
return false;
|
||||
}
|
||||
Permanent giant = game.getPermanent(target.getFirstTarget());
|
||||
if (giant == null) {
|
||||
return false;
|
||||
}
|
||||
game.informPlayers("Crush Underfoot: Chosen Giant is " + giant.getName());
|
||||
Permanent targetCreature = game.getPermanent(this.getTargetPointer().getFirst(game, source));
|
||||
return targetCreature != null && targetCreature.damage(
|
||||
giant.getPower().getValue(), source.getSourceId(), source, game, false, true
|
||||
) > 0;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,7 +1,5 @@
|
|||
|
||||
package mage.cards.c;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.cards.CardImpl;
|
||||
|
|
@ -13,10 +11,12 @@ import mage.filter.StaticFilters;
|
|||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.players.Player;
|
||||
import mage.target.TargetPermanent;
|
||||
import mage.target.common.TargetControlledCreaturePermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author maxlebedev
|
||||
*/
|
||||
public final class Curfew extends CardImpl {
|
||||
|
|
@ -51,18 +51,19 @@ class CurfewEffect extends OneShotEffect {
|
|||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
game.informPlayers("Each player returns a creature they control to its owner's hand");
|
||||
for (UUID playerId : game.getState().getPlayersInRange(source.getControllerId(), game)) {
|
||||
Player player = game.getPlayer(playerId);
|
||||
if (player != null && game.getBattlefield().countAll(StaticFilters.FILTER_PERMANENT_CREATURE, playerId, game) > 0) {
|
||||
TargetControlledCreaturePermanent target = new TargetControlledCreaturePermanent(1, 1, StaticFilters.FILTER_CONTROLLED_CREATURE, true);
|
||||
if (player == null || game.getBattlefield().countAll(StaticFilters.FILTER_PERMANENT_CREATURE, playerId, game) <= 0) {
|
||||
continue;
|
||||
}
|
||||
TargetPermanent target = new TargetControlledCreaturePermanent();
|
||||
target.withNotTarget(true);
|
||||
player.choose(Outcome.ReturnToHand, target, source, game);
|
||||
Permanent permanent = game.getPermanent(target.getFirstTarget());
|
||||
if (permanent != null) {
|
||||
player.moveCards(permanent, Zone.HAND, source, game);
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
package mage.cards.d;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.BecomesTargetSourceTriggeredAbility;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
|
|
@ -9,20 +9,19 @@ import mage.abilities.costs.mana.ManaCostsImpl;
|
|||
import mage.abilities.effects.common.SacrificeSourceEffect;
|
||||
import mage.abilities.effects.common.combat.CantBeBlockedByCreaturesSourceEffect;
|
||||
import mage.abilities.effects.common.combat.CantBeBlockedTargetEffect;
|
||||
import mage.constants.SubType;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Zone;
|
||||
import mage.constants.SubType;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.Predicates;
|
||||
import mage.target.common.TargetControlledCreaturePermanent;
|
||||
import mage.MageInt;
|
||||
import mage.target.TargetPermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class DepartedDeckhand extends CardImpl {
|
||||
|
|
@ -63,7 +62,7 @@ public final class DepartedDeckhand extends CardImpl {
|
|||
).setText("Another target creature you control can't be blocked this turn except by Spirits"),
|
||||
new ManaCostsImpl<>("{3}{U}")
|
||||
);
|
||||
ability.addTarget(new TargetControlledCreaturePermanent(StaticFilters.FILTER_CONTROLLED_ANOTHER_CREATURE));
|
||||
ability.addTarget(new TargetPermanent(StaticFilters.FILTER_CONTROLLED_ANOTHER_CREATURE));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,25 +1,23 @@
|
|||
|
||||
package mage.cards.d;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.MageObject;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||
import mage.abilities.costs.common.SacrificeTargetCost;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.SubType;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.players.Player;
|
||||
import mage.target.Target;
|
||||
import mage.target.common.TargetControlledCreaturePermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author jeffwadsworth
|
||||
*/
|
||||
public final class DiscipleOfBolas extends CardImpl {
|
||||
|
|
@ -65,21 +63,24 @@ class DiscipleOfBolasEffect extends OneShotEffect {
|
|||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player controller = game.getPlayer(source.getControllerId());
|
||||
if (controller != null) {
|
||||
Target target = new TargetControlledCreaturePermanent(1, 1, StaticFilters.FILTER_CONTROLLED_ANOTHER_CREATURE, true);
|
||||
target.setRequired(true);
|
||||
if (target.canChoose(source.getControllerId(), source, game)) {
|
||||
controller.chooseTarget(outcome, target, source, game);
|
||||
Permanent sacrificed = game.getPermanent(target.getFirstTarget());
|
||||
if (sacrificed != null) {
|
||||
sacrificed.sacrifice(source, game);
|
||||
int power = sacrificed.getPower().getValue();
|
||||
if (controller == null) {
|
||||
return false;
|
||||
}
|
||||
SacrificeTargetCost cost = new SacrificeTargetCost(StaticFilters.FILTER_ANOTHER_CREATURE);
|
||||
if (!cost.canPay(source, source, source.getControllerId(), game)
|
||||
|| !cost.pay(source, game, source, source.getControllerId(), true)) {
|
||||
return false;
|
||||
}
|
||||
int power = cost
|
||||
.getPermanents()
|
||||
.stream()
|
||||
.map(MageObject::getPower)
|
||||
.mapToInt(MageInt::getValue)
|
||||
.sum();
|
||||
if (power > 0) {
|
||||
controller.gainLife(power, game, source);
|
||||
controller.drawCards(power, source, game);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,7 +4,6 @@ import mage.abilities.effects.common.ExileThenReturnTargetEffect;
|
|||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.target.common.TargetControlledCreaturePermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
|
@ -18,8 +17,8 @@ public final class Displace extends CardImpl {
|
|||
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{2}{U}");
|
||||
|
||||
// Exile up to two target creatures you control, then return those cards to the battlefield under their owner's control.
|
||||
this.getSpellAbility().addTarget(new TargetControlledCreaturePermanent(0, 2, StaticFilters.FILTER_CONTROLLED_CREATURES, false));
|
||||
this.getSpellAbility().addEffect(new ExileThenReturnTargetEffect(false, true));
|
||||
this.getSpellAbility().addTarget(new TargetControlledCreaturePermanent(0, 2));
|
||||
}
|
||||
|
||||
private Displace(final Displace card) {
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ import mage.constants.SubType;
|
|||
import mage.filter.StaticFilters;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.mageobject.AnotherPredicate;
|
||||
import mage.target.common.TargetControlledCreaturePermanent;
|
||||
import mage.target.TargetPermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
|
|
@ -45,7 +45,7 @@ public final class DistinguishedConjurer extends CardImpl {
|
|||
// {4}{W}, {T}: Exile another target creature you control, then return it to the battlefield under its owner’s control.
|
||||
Ability ability = new SimpleActivatedAbility(new ExileThenReturnTargetEffect(false, false), new ManaCostsImpl<>("{4}{W}"));
|
||||
ability.addCost(new TapSourceCost());
|
||||
ability.addTarget(new TargetControlledCreaturePermanent(StaticFilters.FILTER_ANOTHER_TARGET_CREATURE_YOU_CONTROL));
|
||||
ability.addTarget(new TargetPermanent(StaticFilters.FILTER_ANOTHER_TARGET_CREATURE_YOU_CONTROL));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,5 @@
|
|||
|
||||
package mage.cards.d;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.costs.common.TapTargetCost;
|
||||
|
|
@ -9,30 +7,28 @@ import mage.abilities.effects.common.TapTargetEffect;
|
|||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.predicate.permanent.TappedPredicate;
|
||||
import mage.target.common.TargetControlledCreaturePermanent;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.target.common.TargetControlledPermanent;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author Loki
|
||||
*/
|
||||
public final class DiversionaryTactics extends CardImpl {
|
||||
|
||||
private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("untapped creatures you control");
|
||||
|
||||
static {
|
||||
filter.add(TappedPredicate.UNTAPPED);
|
||||
}
|
||||
|
||||
public DiversionaryTactics(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{3}{W}");
|
||||
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{3}{W}");
|
||||
|
||||
Ability ability = new SimpleActivatedAbility(new TapTargetEffect(), new TapTargetCost(new TargetControlledCreaturePermanent(2, 2, filter, false)));
|
||||
Ability ability = new SimpleActivatedAbility(
|
||||
new TapTargetEffect(),
|
||||
new TapTargetCost(
|
||||
new TargetControlledPermanent(2, StaticFilters.FILTER_CONTROLLED_UNTAPPED_CREATURES)
|
||||
)
|
||||
);
|
||||
ability.addTarget(new TargetCreaturePermanent());
|
||||
this.addAbility(ability);
|
||||
|
||||
}
|
||||
|
||||
private DiversionaryTactics(final DiversionaryTactics card) {
|
||||
|
|
|
|||
|
|
@ -7,14 +7,12 @@ import mage.abilities.keyword.KickerAbility;
|
|||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.target.common.TargetControlledCreaturePermanent;
|
||||
import mage.target.targetadjustment.ConditionalTargetAdjuster;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author ciaccona007
|
||||
*/
|
||||
public final class DivineResilience extends CardImpl {
|
||||
|
|
@ -22,7 +20,6 @@ public final class DivineResilience extends CardImpl {
|
|||
public DivineResilience(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{W}");
|
||||
|
||||
|
||||
// Kicker {2}{W}
|
||||
this.addAbility(new KickerAbility("{2}{W}"));
|
||||
|
||||
|
|
@ -34,7 +31,7 @@ public final class DivineResilience extends CardImpl {
|
|||
this.getSpellAbility().setTargetAdjuster(new ConditionalTargetAdjuster(
|
||||
KickedCondition.ONCE,
|
||||
new TargetControlledCreaturePermanent(),
|
||||
new TargetControlledCreaturePermanent(0, Integer.MAX_VALUE, StaticFilters.FILTER_CONTROLLED_CREATURES, false)
|
||||
new TargetControlledCreaturePermanent(0, Integer.MAX_VALUE)
|
||||
));
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -2,14 +2,17 @@ package mage.cards.d;
|
|||
|
||||
import mage.ObjectColor;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.triggers.BeginningOfUpkeepTriggeredAbility;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.costs.Cost;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.DontUntapInControllersUntapStepAllEffect;
|
||||
import mage.abilities.triggers.BeginningOfUpkeepTriggeredAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.*;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.TargetController;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.predicate.Predicates;
|
||||
|
|
@ -19,7 +22,7 @@ import mage.game.Game;
|
|||
import mage.game.permanent.Permanent;
|
||||
import mage.players.Player;
|
||||
import mage.target.Target;
|
||||
import mage.target.common.TargetControlledCreaturePermanent;
|
||||
import mage.target.TargetPermanent;
|
||||
import mage.util.ManaUtil;
|
||||
|
||||
import java.util.UUID;
|
||||
|
|
@ -74,13 +77,15 @@ class DreamTidesEffect extends OneShotEffect {
|
|||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
|
||||
Player player = game.getPlayer(getTargetPointer().getFirst(game, source));
|
||||
Permanent sourcePermanent = game.getPermanent(source.getSourceId());
|
||||
if (player != null && sourcePermanent != null) {
|
||||
if (player == null || sourcePermanent == null) {
|
||||
return false;
|
||||
}
|
||||
int countBattlefield = game.getBattlefield().getAllActivePermanents(filter, game.getActivePlayerId(), game).size();
|
||||
while (player.canRespond() && countBattlefield > 0 && player.chooseUse(Outcome.AIDontUseIt, "Pay {2} and untap a tapped nongreen creature under your control?", source, game)) {
|
||||
Target tappedCreatureTarget = new TargetControlledCreaturePermanent(1, 1, filter, true);
|
||||
Target tappedCreatureTarget = new TargetPermanent(filter);
|
||||
tappedCreatureTarget.withNotTarget(true);
|
||||
if (player.choose(Outcome.Detriment, tappedCreatureTarget, source, game)) {
|
||||
Cost cost = ManaUtil.createManaCost(2, false);
|
||||
Permanent tappedCreature = game.getPermanent(tappedCreatureTarget.getFirstTarget());
|
||||
|
|
@ -93,6 +98,4 @@ class DreamTidesEffect extends OneShotEffect {
|
|||
}
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -15,16 +15,14 @@ import mage.cards.CardSetInfo;
|
|||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.mageobject.AnotherPredicate;
|
||||
import mage.target.common.TargetControlledCreaturePermanent;
|
||||
import mage.target.TargetPermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author ciaccona007
|
||||
*/
|
||||
public final class DropkickBomber extends CardImpl {
|
||||
|
|
@ -67,7 +65,7 @@ public final class DropkickBomber extends CardImpl {
|
|||
Duration.EndOfTurn
|
||||
).setText("and \"When this creature deals combat damage, sacrifice it.\"")
|
||||
);
|
||||
ability.addTarget(new TargetControlledCreaturePermanent(filter2));
|
||||
ability.addTarget(new TargetPermanent(filter2));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,5 @@
|
|||
package mage.cards.d;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.ActivateAsSorceryActivatedAbility;
|
||||
import mage.abilities.common.EntersBattlefieldTappedAbility;
|
||||
|
|
@ -17,10 +15,10 @@ import mage.constants.CardType;
|
|||
import mage.constants.SuperType;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.predicate.permanent.TappedPredicate;
|
||||
import mage.target.common.TargetControlledCreaturePermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author weirddan455
|
||||
*/
|
||||
public final class DungeonDescent extends CardImpl {
|
||||
|
|
@ -45,7 +43,7 @@ public final class DungeonDescent extends CardImpl {
|
|||
// {4}, {T}, Tap an untapped legendary creature you control: Venture into the dungeon. Activate only as a sorcery.
|
||||
Ability ability = new ActivateAsSorceryActivatedAbility(new VentureIntoTheDungeonEffect(), new GenericManaCost(4));
|
||||
ability.addCost(new TapSourceCost());
|
||||
ability.addCost(new TapTargetCost(new TargetControlledCreaturePermanent(filter)));
|
||||
ability.addCost(new TapTargetCost(filter));
|
||||
ability.addHint(CurrentDungeonHint.instance);
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ import mage.counters.CounterType;
|
|||
import mage.filter.StaticFilters;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.target.common.TargetControlledCreaturePermanent;
|
||||
import mage.target.TargetPermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
|
|
@ -41,7 +41,7 @@ public final class EagleOfDeliverance extends CardImpl {
|
|||
TriggeredAbility trigger = new EntersBattlefieldTriggeredAbility(
|
||||
new AddCountersTargetEffect(CounterType.INDESTRUCTIBLE.createInstance())
|
||||
);
|
||||
trigger.addTarget(new TargetControlledCreaturePermanent(StaticFilters.FILTER_ANOTHER_TARGET_CREATURE_YOU_CONTROL));
|
||||
trigger.addTarget(new TargetPermanent(StaticFilters.FILTER_ANOTHER_TARGET_CREATURE_YOU_CONTROL));
|
||||
trigger.addEffect(new EagleOfDeliveranceEffect());
|
||||
this.addAbility(trigger);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,7 +1,5 @@
|
|||
|
||||
package mage.cards.e;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.costs.common.TapTargetCost;
|
||||
|
|
@ -10,24 +8,22 @@ import mage.cards.CardImpl;
|
|||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SuperType;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.filter.predicate.permanent.TappedPredicate;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.filter.common.FilterLandPermanent;
|
||||
import mage.target.TargetPermanent;
|
||||
import mage.target.common.TargetControlledCreaturePermanent;
|
||||
import mage.target.common.TargetControlledPermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author Loki
|
||||
*/
|
||||
public final class Earthcraft extends CardImpl {
|
||||
|
||||
private static final FilterControlledCreaturePermanent filterCreature = new FilterControlledCreaturePermanent("untapped creature you control");
|
||||
private static final FilterControlledPermanent filterLand = new FilterControlledPermanent("basic land");
|
||||
private static final FilterPermanent filterLand = new FilterLandPermanent("basic land");
|
||||
|
||||
static {
|
||||
filterCreature.add(TappedPredicate.UNTAPPED);
|
||||
filterLand.add(CardType.LAND.getPredicate());
|
||||
filterLand.add(SuperType.BASIC.getPredicate());
|
||||
}
|
||||
|
||||
|
|
@ -35,7 +31,10 @@ public final class Earthcraft extends CardImpl {
|
|||
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{1}{G}");
|
||||
|
||||
// Tap an untapped creature you control: Untap target basic land.
|
||||
Ability ability = new SimpleActivatedAbility(new UntapTargetEffect(), new TapTargetCost(new TargetControlledCreaturePermanent(1, 1, filterCreature, true)));
|
||||
Ability ability = new SimpleActivatedAbility(
|
||||
new UntapTargetEffect(),
|
||||
new TapTargetCost(new TargetControlledPermanent(StaticFilters.FILTER_CONTROLLED_UNTAPPED_CREATURE))
|
||||
);
|
||||
ability.addTarget(new TargetPermanent(filterLand));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,7 +4,6 @@ import mage.abilities.effects.common.ExileReturnBattlefieldNextEndStepTargetEffe
|
|||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.target.common.TargetControlledCreaturePermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
|
@ -15,12 +14,12 @@ import java.util.UUID;
|
|||
public final class EerieInterlude extends CardImpl {
|
||||
|
||||
public EerieInterlude(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[] {CardType.INSTANT}, "{2}{W}");
|
||||
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{2}{W}");
|
||||
|
||||
// Exile any number of target creatures you control. Return those cards to the
|
||||
// battlefield under their owner's control at the beginning of the next end step.
|
||||
this.getSpellAbility().addEffect(new ExileReturnBattlefieldNextEndStepTargetEffect());
|
||||
this.getSpellAbility().addTarget(new TargetControlledCreaturePermanent(0, Integer.MAX_VALUE, StaticFilters.FILTER_CONTROLLED_CREATURES, false));
|
||||
this.getSpellAbility().addTarget(new TargetControlledCreaturePermanent(0, Integer.MAX_VALUE));
|
||||
}
|
||||
|
||||
private EerieInterlude(final EerieInterlude card) {
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ import mage.constants.CardType;
|
|||
import mage.constants.Duration;
|
||||
import mage.constants.SubType;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.target.common.TargetControlledCreaturePermanent;
|
||||
import mage.target.TargetPermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
|
|
@ -37,7 +37,7 @@ public final class EfreetWeaponmaster extends CardImpl {
|
|||
Ability ability = new EntersBattlefieldOrTurnedFaceUpTriggeredAbility(
|
||||
new BoostTargetEffect(3, 0, Duration.EndOfTurn)
|
||||
);
|
||||
ability.addTarget(new TargetControlledCreaturePermanent(StaticFilters.FILTER_ANOTHER_TARGET_CREATURE_YOU_CONTROL));
|
||||
ability.addTarget(new TargetPermanent(StaticFilters.FILTER_ANOTHER_TARGET_CREATURE_YOU_CONTROL));
|
||||
this.addAbility(ability);
|
||||
|
||||
// Morph {2}{U}{R}{W}
|
||||
|
|
|
|||
|
|
@ -1,40 +1,38 @@
|
|||
|
||||
package mage.cards.e;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.costs.common.TapSourceCost;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.common.PreventDamageByTargetEffect;
|
||||
import mage.abilities.effects.common.PreventDamageToTargetEffect;
|
||||
import mage.abilities.effects.common.UntapTargetEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Zone;
|
||||
import mage.constants.SubType;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.predicate.permanent.AttackingPredicate;
|
||||
import mage.target.common.TargetControlledCreaturePermanent;
|
||||
import mage.target.TargetPermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LoneFox
|
||||
*/
|
||||
public final class ElvishScout extends CardImpl {
|
||||
|
||||
private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("attacking creature you control");
|
||||
private static final FilterPermanent filter = new FilterControlledCreaturePermanent("attacking creature you control");
|
||||
|
||||
static {
|
||||
filter.add(AttackingPredicate.instance);
|
||||
}
|
||||
|
||||
public ElvishScout(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{G}");
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{G}");
|
||||
this.subtype.add(SubType.ELF);
|
||||
this.subtype.add(SubType.SCOUT);
|
||||
this.power = new MageInt(1);
|
||||
|
|
@ -43,13 +41,12 @@ public final class ElvishScout extends CardImpl {
|
|||
// {G}, {tap}: Untap target attacking creature you control. Prevent all combat damage that would be dealt to and dealt by it this turn.
|
||||
Ability ability = new SimpleActivatedAbility(new UntapTargetEffect(), new ManaCostsImpl<>("{G}"));
|
||||
ability.addCost(new TapSourceCost());
|
||||
Effect effect = new PreventDamageByTargetEffect(Duration.EndOfTurn, true);
|
||||
effect.setText("Prevent all combat damage that would be dealt to");
|
||||
ability.addEffect(effect);
|
||||
effect = new PreventDamageToTargetEffect(Duration.EndOfTurn, Integer.MAX_VALUE, true);
|
||||
effect.setText("and dealt by it this turn");
|
||||
ability.addEffect(effect);
|
||||
ability.addTarget(new TargetControlledCreaturePermanent(filter));
|
||||
ability.addEffect(new PreventDamageByTargetEffect(Duration.EndOfTurn, true)
|
||||
.setText("Prevent all combat damage that would be dealt to"));
|
||||
ability.addEffect(new PreventDamageToTargetEffect(
|
||||
Duration.EndOfTurn, Integer.MAX_VALUE, true
|
||||
).setText("and dealt by it this turn"));
|
||||
ability.addTarget(new TargetPermanent(filter));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
package mage.cards.e;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.Mana;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
|
|
@ -13,10 +12,11 @@ import mage.filter.predicate.permanent.TappedPredicate;
|
|||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.players.Player;
|
||||
import mage.target.common.TargetControlledCreaturePermanent;
|
||||
import mage.target.TargetPermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author spjspj
|
||||
*/
|
||||
public final class EnergyTap extends CardImpl {
|
||||
|
|
@ -31,7 +31,7 @@ public final class EnergyTap extends CardImpl {
|
|||
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{U}");
|
||||
|
||||
// Tap target untapped creature you control. If you do, add an amount of {C} equal to that creature's converted mana cost.
|
||||
this.getSpellAbility().addTarget(new TargetControlledCreaturePermanent(filter));
|
||||
this.getSpellAbility().addTarget(new TargetPermanent(filter));
|
||||
this.getSpellAbility().addEffect(new EnergyTapEffect());
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,13 +1,8 @@
|
|||
package mage.cards.e;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
import mage.ObjectColor;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.costs.Cost;
|
||||
import mage.abilities.costs.common.ReturnToHandChosenControlledPermanentCost;
|
||||
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
|
||||
import mage.abilities.effects.common.ReturnToHandChosenControlledPermanentEffect;
|
||||
import mage.abilities.effects.common.ReturnToHandTargetEffect;
|
||||
import mage.abilities.keyword.FreerunningAbility;
|
||||
import mage.cards.CardImpl;
|
||||
|
|
@ -16,16 +11,17 @@ import mage.constants.CardType;
|
|||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.filter.predicate.mageobject.ColorPredicate;
|
||||
import mage.target.common.TargetControlledCreaturePermanent;
|
||||
import mage.target.common.TargetControlledPermanent;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author grimreap124
|
||||
*/
|
||||
public final class EscapeDetection extends CardImpl {
|
||||
|
||||
private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("blue creature you control");
|
||||
private static final FilterControlledPermanent filter = new FilterControlledCreaturePermanent("blue creature you control");
|
||||
|
||||
static {
|
||||
filter.add(new ColorPredicate(ObjectColor.BLUE));
|
||||
|
|
@ -34,15 +30,13 @@ public final class EscapeDetection extends CardImpl {
|
|||
public EscapeDetection(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{1}{U}{U}");
|
||||
|
||||
|
||||
// Freerunning--Return a blue creature you control to its owner's hand.
|
||||
Cost cost = new ReturnToHandChosenControlledPermanentCost(
|
||||
new TargetControlledCreaturePermanent(1, 1, filter, true));
|
||||
this.addAbility(new FreerunningAbility(cost));
|
||||
this.addAbility(new FreerunningAbility(new ReturnToHandChosenControlledPermanentCost(new TargetControlledPermanent(filter))));
|
||||
|
||||
// Return target creature to its owner's hand.
|
||||
this.getSpellAbility().addEffect(new ReturnToHandTargetEffect());
|
||||
this.getSpellAbility().addTarget(new TargetCreaturePermanent());
|
||||
|
||||
// Draw a card.
|
||||
this.getSpellAbility().addEffect(new DrawCardSourceControllerEffect(1).concatBy("<br>"));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,7 +1,5 @@
|
|||
package mage.cards.e;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.costs.mana.GenericManaCost;
|
||||
|
|
@ -11,18 +9,17 @@ import mage.abilities.effects.common.continuous.GainAbilityAttachedEffect;
|
|||
import mage.abilities.effects.common.cost.SpellCostReductionSourceEffect;
|
||||
import mage.abilities.keyword.EquipAbility;
|
||||
import mage.abilities.keyword.VigilanceAbility;
|
||||
import mage.constants.*;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.constants.*;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.filter.predicate.mageobject.HistoricPredicate;
|
||||
import mage.target.common.TargetControlledCreaturePermanent;
|
||||
import mage.target.TargetPermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author grimreap124
|
||||
*/
|
||||
public final class ExcaliburSwordOfEden extends CardImpl {
|
||||
|
|
@ -57,7 +54,7 @@ public final class ExcaliburSwordOfEden extends CardImpl {
|
|||
this.addAbility(ability);
|
||||
|
||||
// Equip legendary creature {2}
|
||||
this.addAbility(new EquipAbility(Outcome.AddAbility, new GenericManaCost(2), new TargetControlledCreaturePermanent(filterLegendary), false));
|
||||
this.addAbility(new EquipAbility(Outcome.AddAbility, new GenericManaCost(2), new TargetPermanent(filterLegendary), false));
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,52 +1,34 @@
|
|||
|
||||
package mage.cards.f;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.DamageWithPowerFromOneToAnotherTargetEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.other.AnotherTargetPredicate;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.target.TargetPermanent;
|
||||
import mage.target.common.TargetControlledCreaturePermanent;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* As Fall of the Hammer tries to resolve, if only one of the targets is legal,
|
||||
* Fall of the Hammer will still resolve but will have no effect: If the first
|
||||
* target creature is illegal, it can't deal damage to anything. If the second
|
||||
* target creature is illegal, it can't be dealt damage.
|
||||
*
|
||||
* <p>
|
||||
* The amount of damage dealt is based on the first target creature's power as Fall of the Hammer resolves.
|
||||
|
||||
|
||||
*
|
||||
* @author LevelX2
|
||||
*/
|
||||
public final class FallOfTheHammer extends CardImpl {
|
||||
|
||||
public FallOfTheHammer(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{1}{R}");
|
||||
|
||||
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{1}{R}");
|
||||
|
||||
// Target creature you control deals damage equal to its power to another target creature.
|
||||
this.getSpellAbility().addEffect(new FallOfTheHammerDamageEffect());
|
||||
TargetControlledCreaturePermanent target =
|
||||
new TargetControlledCreaturePermanent(new FilterControlledCreaturePermanent("Target creature: deals damage"));
|
||||
target.setTargetTag(1);
|
||||
this.getSpellAbility().addTarget(target);
|
||||
|
||||
FilterCreaturePermanent filter = new FilterCreaturePermanent("Another creature: damage dealt to");
|
||||
filter.add(new AnotherTargetPredicate(2));
|
||||
TargetCreaturePermanent target2 = new TargetCreaturePermanent(filter);
|
||||
target2.setTargetTag(2);
|
||||
this.getSpellAbility().addTarget(target2);
|
||||
this.getSpellAbility().addEffect(new DamageWithPowerFromOneToAnotherTargetEffect());
|
||||
this.getSpellAbility().addTarget(new TargetControlledCreaturePermanent().withChooseHint("to deal damage").setTargetTag(1));
|
||||
this.getSpellAbility().addTarget(new TargetPermanent(StaticFilters.FILTER_ANOTHER_CREATURE_TARGET_2).withChooseHint("to receive damage").setTargetTag(2));
|
||||
}
|
||||
|
||||
private FallOfTheHammer(final FallOfTheHammer card) {
|
||||
|
|
@ -58,34 +40,3 @@ public final class FallOfTheHammer extends CardImpl {
|
|||
return new FallOfTheHammer(this);
|
||||
}
|
||||
}
|
||||
|
||||
class FallOfTheHammerDamageEffect extends OneShotEffect {
|
||||
|
||||
FallOfTheHammerDamageEffect() {
|
||||
super(Outcome.Damage);
|
||||
this.staticText = "Target creature you control deals damage equal to its power to another target creature";
|
||||
}
|
||||
|
||||
private FallOfTheHammerDamageEffect(final FallOfTheHammerDamageEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public FallOfTheHammerDamageEffect copy() {
|
||||
return new FallOfTheHammerDamageEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Permanent ownCreature = game.getPermanent(source.getFirstTarget());
|
||||
if (ownCreature != null) {
|
||||
int damage = ownCreature.getPower().getValue();
|
||||
Permanent targetCreature = game.getPermanent(source.getTargets().get(1).getFirstTarget());
|
||||
if (targetCreature != null) {
|
||||
targetCreature.damage(damage, ownCreature.getId(), source, game, false, true);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,28 +1,26 @@
|
|||
|
||||
package mage.cards.f;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.costs.common.ReturnToHandChosenControlledPermanentCost;
|
||||
import mage.abilities.effects.common.CounterTargetEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.target.TargetSpell;
|
||||
import mage.target.common.TargetControlledCreaturePermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Loki
|
||||
*/
|
||||
public final class FamiliarsRuse extends CardImpl {
|
||||
|
||||
public FamiliarsRuse(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{U}{U}");
|
||||
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{U}{U}");
|
||||
|
||||
// As an additional cost to cast Familiar's Ruse, return a creature you control to its owner's hand.
|
||||
this.getSpellAbility().addCost(new ReturnToHandChosenControlledPermanentCost(
|
||||
new TargetControlledCreaturePermanent(1, 1, new FilterControlledCreaturePermanent("creature"), true)));
|
||||
this.getSpellAbility().addCost(new ReturnToHandChosenControlledPermanentCost(new TargetControlledCreaturePermanent()));
|
||||
|
||||
// Counter target spell.
|
||||
this.getSpellAbility().addEffect(new CounterTargetEffect());
|
||||
this.getSpellAbility().addTarget(new TargetSpell());
|
||||
|
|
|
|||
|
|
@ -1,21 +1,21 @@
|
|||
package mage.cards.f;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.triggers.BeginningOfCombatTriggeredAbility;
|
||||
import mage.abilities.effects.common.continuous.GainAbilityTargetEffect;
|
||||
import mage.abilities.keyword.MeleeAbility;
|
||||
import mage.abilities.triggers.BeginningOfCombatTriggeredAbility;
|
||||
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 mage.target.common.TargetControlledCreaturePermanent;
|
||||
import mage.target.TargetPermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Styxo
|
||||
*/
|
||||
public final class FangOfThePack extends CardImpl {
|
||||
|
|
@ -32,7 +32,7 @@ public final class FangOfThePack extends CardImpl {
|
|||
|
||||
// At the beginning of combat on your turn, another target creature you control gains melee until end of turn.
|
||||
Ability ability = new BeginningOfCombatTriggeredAbility(new GainAbilityTargetEffect(new MeleeAbility(), Duration.EndOfTurn));
|
||||
ability.addTarget(new TargetControlledCreaturePermanent(StaticFilters.FILTER_ANOTHER_TARGET_CREATURE_YOU_CONTROL));
|
||||
ability.addTarget(new TargetPermanent(StaticFilters.FILTER_ANOTHER_TARGET_CREATURE_YOU_CONTROL));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
package mage.cards.f;
|
||||
|
||||
import mage.MageInt;
|
||||
|
|
@ -11,10 +10,7 @@ import mage.cards.CardSetInfo;
|
|||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.predicate.permanent.TappedPredicate;
|
||||
import mage.target.common.TargetControlledCreaturePermanent;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
|
@ -24,12 +20,6 @@ import java.util.UUID;
|
|||
*/
|
||||
public final class FieldSurgeon extends CardImpl {
|
||||
|
||||
private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("an untapped creature you control");
|
||||
|
||||
static {
|
||||
filter.add(TappedPredicate.UNTAPPED);
|
||||
}
|
||||
|
||||
public FieldSurgeon(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{W}");
|
||||
this.subtype.add(SubType.HUMAN);
|
||||
|
|
@ -38,8 +28,10 @@ public final class FieldSurgeon extends CardImpl {
|
|||
this.toughness = new MageInt(1);
|
||||
|
||||
// Tap an untapped creature you control: Prevent the next 1 damage that would be dealt to target creature this turn.
|
||||
Ability ability = new SimpleActivatedAbility(new PreventDamageToTargetEffect(Duration.EndOfTurn, 1),
|
||||
new TapTargetCost(new TargetControlledCreaturePermanent(filter)));
|
||||
Ability ability = new SimpleActivatedAbility(
|
||||
new PreventDamageToTargetEffect(Duration.EndOfTurn, 1),
|
||||
new TapTargetCost(StaticFilters.FILTER_CONTROLLED_UNTAPPED_CREATURE)
|
||||
);
|
||||
ability.addTarget(new TargetCreaturePermanent());
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -15,12 +15,11 @@ import mage.cards.CardSetInfo;
|
|||
import mage.choices.ChoiceColor;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.players.Player;
|
||||
import mage.target.common.TargetControlledCreaturePermanent;
|
||||
import mage.target.common.TargetControlledPermanent;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
|
@ -35,9 +34,10 @@ public final class FoodChain extends CardImpl {
|
|||
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{G}");
|
||||
|
||||
// Exile a creature you control: Add X mana of any one color, where X is the exiled creature's converted mana cost plus one. Spend this mana only to cast creature spells.
|
||||
Ability ability = new SimpleManaAbility(Zone.BATTLEFIELD, new FoodChainManaEffect(),
|
||||
new ExileTargetCost(new TargetControlledCreaturePermanent(StaticFilters.FILTER_CONTROLLED_A_CREATURE)));
|
||||
this.addAbility(ability);
|
||||
this.addAbility(new SimpleManaAbility(
|
||||
new FoodChainManaEffect(),
|
||||
new ExileTargetCost(new TargetControlledPermanent(StaticFilters.FILTER_CONTROLLED_A_CREATURE))
|
||||
));
|
||||
}
|
||||
|
||||
private FoodChain(final FoodChain card) {
|
||||
|
|
|
|||
|
|
@ -7,13 +7,14 @@ import mage.cards.CardSetInfo;
|
|||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.SuperType;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.predicate.other.AnotherTargetPredicate;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.target.TargetPermanent;
|
||||
import mage.target.common.TargetControlledCreaturePermanent;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
|
@ -25,7 +26,7 @@ import java.util.UUID;
|
|||
*/
|
||||
public final class FriendlyRivalry extends CardImpl {
|
||||
|
||||
private static final FilterControlledCreaturePermanent filter2 = new FilterControlledCreaturePermanent("other target legendary creature you control");
|
||||
private static final FilterPermanent filter2 = new FilterControlledCreaturePermanent("other target legendary creature you control");
|
||||
|
||||
static {
|
||||
filter2.add(new AnotherTargetPredicate(2));
|
||||
|
|
@ -37,15 +38,9 @@ public final class FriendlyRivalry extends CardImpl {
|
|||
|
||||
// Target creature you control and up to one other target legendary creature you control each deal damage equal to their power to target creature you don't control.
|
||||
this.getSpellAbility().addEffect(new FriendlyRivalryEffect());
|
||||
|
||||
TargetControlledCreaturePermanent target1 = new TargetControlledCreaturePermanent();
|
||||
this.getSpellAbility().addTarget(target1.setTargetTag(1).withChooseHint("to deal damage"));
|
||||
|
||||
TargetControlledCreaturePermanent target2 = new TargetControlledCreaturePermanent(0, 1, filter2, false);
|
||||
this.getSpellAbility().addTarget(target2.setTargetTag(2).withChooseHint("to deal damage"));
|
||||
|
||||
TargetCreaturePermanent target3 = new TargetCreaturePermanent(StaticFilters.FILTER_CREATURE_YOU_DONT_CONTROL);
|
||||
this.getSpellAbility().addTarget(target3.setTargetTag(3).withChooseHint("to take damage"));
|
||||
this.getSpellAbility().addTarget(new TargetControlledCreaturePermanent().setTargetTag(1).withChooseHint("to deal damage"));
|
||||
this.getSpellAbility().addTarget(new TargetPermanent(0, 1, filter2).setTargetTag(2).withChooseHint("to deal damage"));
|
||||
this.getSpellAbility().addTarget(new TargetPermanent(StaticFilters.FILTER_CREATURE_YOU_DONT_CONTROL).setTargetTag(3).withChooseHint("to take damage"));
|
||||
}
|
||||
|
||||
private FriendlyRivalry(final FriendlyRivalry card) {
|
||||
|
|
|
|||
|
|
@ -1,11 +1,5 @@
|
|||
|
||||
package mage.cards.g;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.CreateTokenEffect;
|
||||
import mage.abilities.effects.common.DamageAllEffect;
|
||||
import mage.abilities.effects.common.PhaseOutTargetEffect;
|
||||
import mage.abilities.effects.common.replacement.DealtDamageToCreatureBySourceDies;
|
||||
|
|
@ -13,40 +7,34 @@ import mage.cards.CardSetInfo;
|
|||
import mage.cards.SplitCard;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.SpellAbilityType;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.token.CentaurToken;
|
||||
import mage.players.Player;
|
||||
import mage.target.common.TargetControlledCreaturePermanent;
|
||||
import mage.watchers.common.DamagedByWatcher;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author dragonfyre23
|
||||
*/
|
||||
public final class GallifreyFallsNoMore extends SplitCard {
|
||||
|
||||
private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("target creatures you control");
|
||||
|
||||
public GallifreyFallsNoMore(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{4}{R}{R}", "{2}{W}", SpellAbilityType.SPLIT_FUSED);
|
||||
|
||||
// Gallifrey Falls
|
||||
// Gallifrey Falls deals 4 damage to each creature.
|
||||
getLeftHalfCard().getSpellAbility().addEffect(new DamageAllEffect(4, new FilterCreaturePermanent()));
|
||||
this.getLeftHalfCard().getSpellAbility().addEffect(new DamageAllEffect(4, new FilterCreaturePermanent()));
|
||||
|
||||
//If a creature dealt damage this way would die this turn, exile it instead.
|
||||
getLeftHalfCard().getSpellAbility().addEffect(new DealtDamageToCreatureBySourceDies(getLeftHalfCard(), Duration.EndOfTurn));
|
||||
getLeftHalfCard().getSpellAbility().addWatcher(new DamagedByWatcher(false));
|
||||
this.getLeftHalfCard().getSpellAbility().addEffect(new DealtDamageToCreatureBySourceDies(this.getLeftHalfCard(), Duration.EndOfTurn));
|
||||
this.getLeftHalfCard().getSpellAbility().addWatcher(new DamagedByWatcher(false));
|
||||
|
||||
// No More
|
||||
// Any number of target creatures you control phase out.
|
||||
getRightHalfCard().getSpellAbility().addEffect(new PhaseOutTargetEffect());
|
||||
getRightHalfCard().getSpellAbility().addTarget(new TargetControlledCreaturePermanent(0, Integer.MAX_VALUE, filter, false));
|
||||
|
||||
this.getRightHalfCard().getSpellAbility().addEffect(new PhaseOutTargetEffect());
|
||||
this.getRightHalfCard().getSpellAbility().addTarget(new TargetControlledCreaturePermanent(0, Integer.MAX_VALUE));
|
||||
}
|
||||
|
||||
private GallifreyFallsNoMore(final GallifreyFallsNoMore card) {
|
||||
|
|
|
|||
|
|
@ -1,12 +1,8 @@
|
|||
|
||||
package mage.cards.g;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.AttachableToRestrictedAbility;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.costs.mana.GenericManaCost;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.common.continuous.BoostEquippedEffect;
|
||||
import mage.abilities.effects.common.continuous.GainAbilityAttachedEffect;
|
||||
import mage.abilities.keyword.EquipAbility;
|
||||
|
|
@ -15,22 +11,21 @@ import mage.cards.CardImpl;
|
|||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.AttachmentType;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.ComparisonType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.constants.SubType;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.mageobject.ToughnessPredicate;
|
||||
import mage.target.Target;
|
||||
import mage.target.common.TargetControlledCreaturePermanent;
|
||||
import mage.target.TargetPermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LevelX2
|
||||
*/
|
||||
public final class GateSmasher extends CardImpl {
|
||||
|
||||
private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("creature with toughness 4 or greater");
|
||||
private static final FilterPermanent filter = new FilterCreaturePermanent("creature with toughness 4 or greater");
|
||||
|
||||
static {
|
||||
filter.add(new ToughnessPredicate(ComparisonType.MORE_THAN, 3));
|
||||
|
|
@ -40,22 +35,18 @@ public final class GateSmasher extends CardImpl {
|
|||
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{3}");
|
||||
this.subtype.add(SubType.EQUIPMENT);
|
||||
|
||||
Target target = new TargetControlledCreaturePermanent(1, 1, filter, false);
|
||||
// Gate Smasher can be attached only to a creature with toughness 4 or greater.
|
||||
this.addAbility(new AttachableToRestrictedAbility(target));
|
||||
this.addAbility(new AttachableToRestrictedAbility(new TargetPermanent(filter)));
|
||||
|
||||
// Equipped creature gets +3/+0 and has trample.
|
||||
Effect effect = new BoostEquippedEffect(3, 0);
|
||||
effect.setText("Equipped creature gets +3/+0");
|
||||
Ability ability = new SimpleStaticAbility(effect);
|
||||
effect = new GainAbilityAttachedEffect(TrampleAbility.getInstance(), AttachmentType.EQUIPMENT);
|
||||
effect.setText("and has trample");
|
||||
ability.addEffect(effect);
|
||||
Ability ability = new SimpleStaticAbility(new BoostEquippedEffect(3, 0));
|
||||
ability.addEffect(new GainAbilityAttachedEffect(
|
||||
TrampleAbility.getInstance(), AttachmentType.EQUIPMENT
|
||||
).setText("and has trample"));
|
||||
this.addAbility(ability);
|
||||
|
||||
// Equip {3}
|
||||
this.addAbility(new EquipAbility(Outcome.AddAbility, new GenericManaCost(3), target, false));
|
||||
|
||||
this.addAbility(new EquipAbility(3, false));
|
||||
}
|
||||
|
||||
private GateSmasher(final GateSmasher card) {
|
||||
|
|
|
|||
|
|
@ -1,7 +1,5 @@
|
|||
|
||||
package mage.cards.g;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.ObjectColor;
|
||||
import mage.abilities.costs.common.TapTargetCost;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
|
|
@ -10,20 +8,21 @@ import mage.abilities.keyword.FlashbackAbility;
|
|||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.TimingRule;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.filter.predicate.mageobject.ColorPredicate;
|
||||
import mage.filter.predicate.permanent.TappedPredicate;
|
||||
import mage.target.common.TargetControlledCreaturePermanent;
|
||||
import mage.target.common.TargetControlledPermanent;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author fireshoes
|
||||
*/
|
||||
public final class GazeOfJustice extends CardImpl {
|
||||
|
||||
private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("untapped white creatures you control");
|
||||
private static final FilterControlledPermanent filter = new FilterControlledCreaturePermanent("untapped white creatures you control");
|
||||
|
||||
static {
|
||||
filter.add(new ColorPredicate(ObjectColor.WHITE));
|
||||
|
|
@ -31,10 +30,10 @@ public final class GazeOfJustice extends CardImpl {
|
|||
}
|
||||
|
||||
public GazeOfJustice(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{W}");
|
||||
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{W}");
|
||||
|
||||
// As an additional cost to cast Gaze of Justice, tap three untapped white creatures you control.
|
||||
this.getSpellAbility().addCost(new TapTargetCost(new TargetControlledCreaturePermanent(3, 3, filter, true)));
|
||||
this.getSpellAbility().addCost(new TapTargetCost(new TargetControlledPermanent(3, filter)));
|
||||
|
||||
// Exile target creature.
|
||||
this.getSpellAbility().addEffect(new ExileTargetEffect());
|
||||
|
|
|
|||
|
|
@ -7,33 +7,25 @@ import mage.abilities.effects.common.TapTargetEffect;
|
|||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.predicate.permanent.TappedPredicate;
|
||||
import mage.target.TargetPermanent;
|
||||
import mage.target.common.TargetControlledCreaturePermanent;
|
||||
import mage.target.common.TargetControlledPermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Loki
|
||||
*/
|
||||
public final class GlareOfSubdual extends CardImpl {
|
||||
|
||||
private static final FilterControlledCreaturePermanent filterCost = new FilterControlledCreaturePermanent("untapped creature you control");
|
||||
|
||||
static {
|
||||
filterCost.add(TappedPredicate.UNTAPPED);
|
||||
}
|
||||
|
||||
public GlareOfSubdual(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{2}{G}{W}");
|
||||
|
||||
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{G}{W}");
|
||||
|
||||
// Tap an untapped creature you control: Tap target artifact or creature.
|
||||
Ability ability = new SimpleActivatedAbility(new TapTargetEffect(), new TapTargetCost(new TargetControlledCreaturePermanent(1, 1, filterCost, true)));
|
||||
Ability ability = new SimpleActivatedAbility(
|
||||
new TapTargetEffect(),
|
||||
new TapTargetCost(new TargetControlledPermanent(StaticFilters.FILTER_CONTROLLED_UNTAPPED_CREATURE))
|
||||
);
|
||||
ability.addTarget(new TargetPermanent(StaticFilters.FILTER_PERMANENT_ARTIFACT_OR_CREATURE));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,26 +1,26 @@
|
|||
|
||||
package mage.cards.g;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.effects.common.DestroyTargetAtBeginningOfNextEndStepEffect;
|
||||
import mage.abilities.effects.common.PreventDamageToTargetEffect;
|
||||
import mage.abilities.effects.common.continuous.BoostTargetEffect;
|
||||
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.FilterPermanent;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.predicate.permanent.BlockingPredicate;
|
||||
import mage.target.common.TargetControlledCreaturePermanent;
|
||||
import mage.target.TargetPermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author L_J
|
||||
*/
|
||||
public final class GlyphOfDestruction extends CardImpl {
|
||||
|
||||
private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("blocking Wall you control");
|
||||
private static final FilterPermanent filter = new FilterControlledCreaturePermanent("blocking Wall you control");
|
||||
|
||||
static {
|
||||
filter.add(SubType.WALL.getPredicate());
|
||||
|
|
@ -28,13 +28,13 @@ public final class GlyphOfDestruction extends CardImpl {
|
|||
}
|
||||
|
||||
public GlyphOfDestruction(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{R}");
|
||||
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{R}");
|
||||
|
||||
// Target blocking Wall you control gets +10/+0 until end of combat. Prevent all damage that would be dealt to it this turn. Destroy it at the beginning of the next end step.
|
||||
this.getSpellAbility().addEffect(new BoostTargetEffect(10, 0, Duration.EndOfCombat));
|
||||
this.getSpellAbility().addEffect(new PreventDamageToTargetEffect(Duration.EndOfTurn, Integer.MAX_VALUE).setText("Prevent all damage that would be dealt to it this turn"));
|
||||
this.getSpellAbility().addEffect(new DestroyTargetAtBeginningOfNextEndStepEffect().setText("Destroy it at the beginning of the next end step"));
|
||||
this.getSpellAbility().addTarget(new TargetControlledCreaturePermanent(filter));
|
||||
this.getSpellAbility().addTarget(new TargetPermanent(filter));
|
||||
}
|
||||
|
||||
private GlyphOfDestruction(final GlyphOfDestruction card) {
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
package mage.cards.g;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.DelayedTriggeredAbility;
|
||||
|
|
@ -8,26 +7,23 @@ import mage.abilities.common.SimpleActivatedAbility;
|
|||
import mage.abilities.costs.mana.GenericManaCost;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.CreateDelayedTriggeredAbilityEffect;
|
||||
import mage.abilities.effects.common.FightTargetSourceEffect;
|
||||
import mage.abilities.keyword.DefenderAbility;
|
||||
import mage.abilities.keyword.TransformAbility;
|
||||
import mage.cards.Card;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.Zone;
|
||||
import mage.constants.*;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.game.events.ZoneChangeEvent;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.players.Player;
|
||||
import mage.target.common.TargetControlledCreaturePermanent;
|
||||
import mage.target.TargetPermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LevelX2
|
||||
*/
|
||||
public final class GoldenGuardian extends CardImpl {
|
||||
|
|
@ -46,11 +42,10 @@ public final class GoldenGuardian extends CardImpl {
|
|||
|
||||
// {2}: Golden Guardian fights another target creature you control. When Golden Guardian dies this turn, return it to the battlefield transformed under your control.
|
||||
this.addAbility(new TransformAbility());
|
||||
Ability ability = new SimpleActivatedAbility(new GoldenGuardianEffect(), new GenericManaCost(2));
|
||||
ability.addTarget(new TargetControlledCreaturePermanent(StaticFilters.FILTER_ANOTHER_TARGET_CREATURE_YOU_CONTROL));
|
||||
Ability ability = new SimpleActivatedAbility(new FightTargetSourceEffect(), new GenericManaCost(2));
|
||||
ability.addTarget(new TargetPermanent(StaticFilters.FILTER_ANOTHER_TARGET_CREATURE_YOU_CONTROL));
|
||||
ability.addEffect(new CreateDelayedTriggeredAbilityEffect(new GoldenGuardianDelayedTriggeredAbility(), false));
|
||||
this.addAbility(ability);
|
||||
|
||||
}
|
||||
|
||||
private GoldenGuardian(final GoldenGuardian card) {
|
||||
|
|
@ -63,36 +58,6 @@ public final class GoldenGuardian extends CardImpl {
|
|||
}
|
||||
}
|
||||
|
||||
class GoldenGuardianEffect extends OneShotEffect {
|
||||
|
||||
GoldenGuardianEffect() {
|
||||
super(Outcome.Damage);
|
||||
this.staticText = "{this} fights another target creature you control";
|
||||
}
|
||||
|
||||
private GoldenGuardianEffect(final GoldenGuardianEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public GoldenGuardianEffect copy() {
|
||||
return new GoldenGuardianEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Permanent creature1 = game.getPermanent(source.getSourceId());
|
||||
Permanent creature2 = game.getPermanent(source.getFirstTarget());
|
||||
// 20110930 - 701.10
|
||||
if (creature1 != null && creature2 != null) {
|
||||
if (creature1.isCreature(game) && creature2.isCreature(game)) {
|
||||
return creature1.fight(creature2, source, game);
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
class GoldenGuardianDelayedTriggeredAbility extends DelayedTriggeredAbility {
|
||||
|
||||
public GoldenGuardianDelayedTriggeredAbility() {
|
||||
|
|
|
|||
|
|
@ -17,13 +17,13 @@ import mage.constants.*;
|
|||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.mageobject.ColorPredicate;
|
||||
import mage.filter.predicate.permanent.TappedPredicate;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.target.TargetPermanent;
|
||||
import mage.target.common.TargetControlledCreaturePermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
|
|
@ -33,7 +33,7 @@ import java.util.UUID;
|
|||
public final class GrandArchitect extends CardImpl {
|
||||
|
||||
private static final FilterCreaturePermanent boostFilter = new FilterCreaturePermanent("blue creatures");
|
||||
private static final FilterControlledCreaturePermanent tapFilter = new FilterControlledCreaturePermanent("untapped blue creature you control");
|
||||
private static final FilterControlledPermanent tapFilter = new FilterControlledCreaturePermanent("untapped blue creature you control");
|
||||
|
||||
static {
|
||||
boostFilter.add(new ColorPredicate(ObjectColor.BLUE));
|
||||
|
|
@ -108,9 +108,8 @@ class GrandArchitectManaAbility extends ActivatedManaAbilityImpl {
|
|||
|
||||
private final FilterPermanent filter;
|
||||
|
||||
GrandArchitectManaAbility(FilterControlledCreaturePermanent filter) {
|
||||
super(Zone.BATTLEFIELD, new BasicManaEffect(new GrandArchitectConditionalMana()),
|
||||
new TapTargetCost(new TargetControlledCreaturePermanent(1, 1, filter, true)));
|
||||
GrandArchitectManaAbility(FilterControlledPermanent filter) {
|
||||
super(Zone.BATTLEFIELD, new BasicManaEffect(new GrandArchitectConditionalMana()), new TapTargetCost(filter));
|
||||
this.netMana.add(new GrandArchitectConditionalMana());
|
||||
this.filter = filter;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,7 +1,5 @@
|
|||
|
||||
package mage.cards.g;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
|
|
@ -11,21 +9,20 @@ import mage.cards.CardImpl;
|
|||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.common.FilterCreatureCard;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.filter.predicate.permanent.TappedPredicate;
|
||||
import mage.target.common.TargetCardInGraveyard;
|
||||
import mage.target.common.TargetControlledCreaturePermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author escplan9 (Derek Monturo - dmontur1 at gmail dot com)
|
||||
*/
|
||||
public final class GravespawnSovereign extends CardImpl {
|
||||
|
||||
private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("untapped Zombies you control");
|
||||
private static final FilterControlledPermanent filter = new FilterControlledCreaturePermanent("untapped Zombies you control");
|
||||
|
||||
static {
|
||||
filter.add(SubType.ZOMBIE.getPredicate());
|
||||
|
|
@ -39,10 +36,11 @@ public final class GravespawnSovereign extends CardImpl {
|
|||
this.toughness = new MageInt(3);
|
||||
|
||||
// Tap five untapped Zombies you control: Put target creature card from a graveyard onto the battlefield under your control.
|
||||
Ability ability = new SimpleActivatedAbility(new ReturnFromGraveyardToBattlefieldTargetEffect(), new TapTargetCost(new TargetControlledCreaturePermanent(5, 5, filter, true)));
|
||||
Ability ability = new SimpleActivatedAbility(
|
||||
new ReturnFromGraveyardToBattlefieldTargetEffect(), new TapTargetCost(5, filter)
|
||||
);
|
||||
ability.addTarget(new TargetCardInGraveyard(StaticFilters.FILTER_CARD_CREATURE_A_GRAVEYARD));
|
||||
this.addAbility(ability);
|
||||
|
||||
}
|
||||
|
||||
private GravespawnSovereign(final GravespawnSovereign card) {
|
||||
|
|
|
|||
|
|
@ -13,10 +13,8 @@ import mage.cards.CardImpl;
|
|||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.predicate.permanent.TappedPredicate;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.game.permanent.token.GreenAndWhiteElementalToken;
|
||||
import mage.target.common.TargetControlledCreaturePermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
|
|
@ -25,12 +23,6 @@ import java.util.UUID;
|
|||
*/
|
||||
public final class GroveOfTheGuardian extends CardImpl {
|
||||
|
||||
private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("untapped creatures you control");
|
||||
|
||||
static {
|
||||
filter.add(TappedPredicate.UNTAPPED);
|
||||
}
|
||||
|
||||
public GroveOfTheGuardian(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.LAND}, "");
|
||||
|
||||
|
|
@ -40,7 +32,7 @@ public final class GroveOfTheGuardian extends CardImpl {
|
|||
// {3}{G}{W}, {T}, Tap two untapped creatures you control, Sacrifice Grove of the Guardian: Create an 8/8 green and white Elemental creature token with vigilance.
|
||||
Ability ability = new SimpleActivatedAbility(new CreateTokenEffect(new GreenAndWhiteElementalToken(), 1), new ManaCostsImpl<>("{3}{G}{W}"));
|
||||
ability.addCost(new TapSourceCost());
|
||||
ability.addCost(new TapTargetCost(new TargetControlledCreaturePermanent(2, 2, filter, false)));
|
||||
ability.addCost(new TapTargetCost(2, StaticFilters.FILTER_CONTROLLED_UNTAPPED_CREATURES));
|
||||
ability.addCost(new SacrificeSourceCost());
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,27 +1,28 @@
|
|||
package mage.cards.g;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||
import mage.abilities.effects.common.PhaseOutTargetEffect;
|
||||
import mage.constants.SubType;
|
||||
import mage.abilities.keyword.FlashAbility;
|
||||
import mage.abilities.keyword.VigilanceAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.predicate.mageobject.AnotherPredicate;
|
||||
import mage.target.common.TargetControlledCreaturePermanent;
|
||||
import mage.target.TargetPermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author weirddan455
|
||||
*/
|
||||
public final class GuardianOfFaith extends CardImpl {
|
||||
|
||||
private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("other target creatures you control");
|
||||
|
||||
static {
|
||||
filter.add(AnotherPredicate.instance);
|
||||
}
|
||||
|
|
@ -42,7 +43,7 @@ public final class GuardianOfFaith extends CardImpl {
|
|||
|
||||
// When Guardian of Faith enters the battlefield, any number of other target creatures you control phase out.
|
||||
Ability ability = new EntersBattlefieldTriggeredAbility(new PhaseOutTargetEffect());
|
||||
ability.addTarget(new TargetControlledCreaturePermanent(0, Integer.MAX_VALUE, filter, false));
|
||||
ability.addTarget(new TargetPermanent(0, Integer.MAX_VALUE, filter));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
package mage.cards.g;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.TurnedFaceUpSourceTriggeredAbility;
|
||||
|
|
@ -13,16 +12,17 @@ import mage.constants.CardType;
|
|||
import mage.constants.SubType;
|
||||
import mage.counters.CounterType;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.target.common.TargetControlledCreaturePermanent;
|
||||
import mage.target.TargetPermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LevelX2
|
||||
*/
|
||||
public final class GuardianShieldBearer extends CardImpl {
|
||||
|
||||
public GuardianShieldBearer(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{G}");
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{G}");
|
||||
this.subtype.add(SubType.HUMAN);
|
||||
this.subtype.add(SubType.SOLDIER);
|
||||
this.power = new MageInt(2);
|
||||
|
|
@ -33,9 +33,8 @@ public final class GuardianShieldBearer extends CardImpl {
|
|||
|
||||
// When Guardian Shield-Bearer is turned face up, put a +1/+1 counter on another target creature you control.
|
||||
Ability ability = new TurnedFaceUpSourceTriggeredAbility(new AddCountersTargetEffect(CounterType.P1P1.createInstance()), false);
|
||||
ability.addTarget(new TargetControlledCreaturePermanent(StaticFilters.FILTER_ANOTHER_TARGET_CREATURE_YOU_CONTROL));
|
||||
ability.addTarget(new TargetPermanent(StaticFilters.FILTER_ANOTHER_TARGET_CREATURE_YOU_CONTROL));
|
||||
this.addAbility(ability);
|
||||
|
||||
}
|
||||
|
||||
private GuardianShieldBearer(final GuardianShieldBearer card) {
|
||||
|
|
|
|||
|
|
@ -1,39 +1,38 @@
|
|||
package mage.cards.h;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.costs.common.TapTargetCost;
|
||||
import mage.abilities.effects.common.MillCardsTargetEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.filter.predicate.permanent.TappedPredicate;
|
||||
import mage.target.TargetPlayer;
|
||||
import mage.target.common.TargetControlledCreaturePermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LevelX
|
||||
*/
|
||||
public final class HairStrungKoto extends CardImpl {
|
||||
|
||||
private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("untapped creature you control");
|
||||
private static final FilterControlledPermanent filter = new FilterControlledCreaturePermanent("untapped creature you control");
|
||||
|
||||
static {
|
||||
filter.add(TappedPredicate.UNTAPPED);
|
||||
}
|
||||
|
||||
public HairStrungKoto (UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{6}");
|
||||
public HairStrungKoto(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{6}");
|
||||
|
||||
/* Tap an untapped creature you control: Target player puts the top
|
||||
* card of their library into their graveyard.
|
||||
*/
|
||||
// Tap an untapped creature you control: Target player puts the top card of their library into their graveyard.
|
||||
SimpleActivatedAbility ability = new SimpleActivatedAbility(
|
||||
new MillCardsTargetEffect(1),
|
||||
new TapTargetCost(new TargetControlledCreaturePermanent(1, 1, filter, false)));
|
||||
new TapTargetCost(StaticFilters.FILTER_CONTROLLED_UNTAPPED_CREATURE)
|
||||
);
|
||||
ability.addTarget(new TargetPlayer());
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,28 +1,28 @@
|
|||
package mage.cards.h;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.AttacksTriggeredAbility;
|
||||
import mage.abilities.triggers.BeginningOfCombatTriggeredAbility;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.keyword.ExploreSourceEffect;
|
||||
import mage.abilities.triggers.BeginningOfCombatTriggeredAbility;
|
||||
import mage.cards.Card;
|
||||
import mage.constants.*;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.*;
|
||||
import mage.filter.FilterCard;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.players.Player;
|
||||
import mage.target.TargetPermanent;
|
||||
import mage.target.common.TargetCardInHand;
|
||||
import mage.target.common.TargetControlledCreaturePermanent;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Grath
|
||||
*/
|
||||
public final class HakbalOfTheSurgingSoul extends CardImpl {
|
||||
|
|
@ -55,24 +55,24 @@ public final class HakbalOfTheSurgingSoul extends CardImpl {
|
|||
|
||||
class HakbalOfTheSurgingSoulExploreEffect extends OneShotEffect {
|
||||
|
||||
HakbalOfTheSurgingSoulExploreEffect( ) {
|
||||
private static final FilterPermanent filter = new FilterControlledCreaturePermanent(SubType.MERFOLK);
|
||||
|
||||
HakbalOfTheSurgingSoulExploreEffect() {
|
||||
super(Outcome.Benefit);
|
||||
staticText = "each Merfolk creature you control explores";
|
||||
}
|
||||
|
||||
HakbalOfTheSurgingSoulExploreEffect(HakbalOfTheSurgingSoulExploreEffect effect ) {
|
||||
HakbalOfTheSurgingSoulExploreEffect(HakbalOfTheSurgingSoulExploreEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent(SubType.MERFOLK);
|
||||
|
||||
List<Permanent> creatures = game.getBattlefield().getActivePermanents(filter, source.getControllerId(), source, game);
|
||||
|
||||
Player player = game.getPlayer(source.getControllerId());
|
||||
if (player != null && player.chooseUse(Outcome.AIDontUseIt, "Choose order for Merfolk to explore? (Note: You will need to set \"Auto-choose targets for player:\" to \"Off\" in Preferences.)", source, game)) {
|
||||
TargetPermanent target = new TargetControlledCreaturePermanent(creatures.size(), creatures.size(), filter, true);
|
||||
TargetPermanent target = new TargetPermanent(creatures.size(), creatures.size(), filter, true);
|
||||
target.withChooseHint("the order in which to explore (first selected will explore first)");
|
||||
player.choose(outcome, target, source, game);
|
||||
for (UUID targetId : target.getTargets()) {
|
||||
|
|
|
|||
|
|
@ -1,26 +1,27 @@
|
|||
package mage.cards.h;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.*;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.TriggeredAbilityImpl;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.effects.common.continuous.GainAbilitySourceEffect;
|
||||
import mage.abilities.effects.common.counter.AddCountersTargetEffect;
|
||||
import mage.abilities.keyword.FirstStrikeAbility;
|
||||
import mage.abilities.keyword.PartnerWithAbility;
|
||||
import mage.constants.*;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.*;
|
||||
import mage.counters.CounterType;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.target.common.TargetControlledCreaturePermanent;
|
||||
import mage.target.TargetPermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author NinthWorld
|
||||
*/
|
||||
public final class HanSoloScrumrat extends CardImpl {
|
||||
|
|
@ -38,11 +39,13 @@ public final class HanSoloScrumrat extends CardImpl {
|
|||
this.addAbility(new PartnerWithAbility("Chewbacca, the Beast"));
|
||||
|
||||
// R: Han Solo, Scrumrat gains first strike until end of turn.
|
||||
this.addAbility(new SimpleActivatedAbility(new GainAbilitySourceEffect(FirstStrikeAbility.getInstance(), Duration.EndOfTurn), new ManaCostsImpl<>("{R}")));
|
||||
this.addAbility(new SimpleActivatedAbility(new GainAbilitySourceEffect(
|
||||
FirstStrikeAbility.getInstance(), Duration.EndOfTurn
|
||||
), new ManaCostsImpl<>("{R}")));
|
||||
|
||||
// Whenever Han Solo, Scrumrat deals damage during your turn, put a +1/+1 counter on another target creature you control.
|
||||
Ability ability = new HanSoloScrumratTriggeredAbility();
|
||||
ability.addTarget(new TargetControlledCreaturePermanent(StaticFilters.FILTER_ANOTHER_TARGET_CREATURE_YOU_CONTROL));
|
||||
ability.addTarget(new TargetPermanent(StaticFilters.FILTER_ANOTHER_TARGET_CREATURE_YOU_CONTROL));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,5 @@
|
|||
|
||||
package mage.cards.h;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.ObjectColor;
|
||||
import mage.abilities.Ability;
|
||||
|
|
@ -13,20 +11,20 @@ import mage.cards.CardImpl;
|
|||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.filter.predicate.mageobject.ColorPredicate;
|
||||
import mage.filter.predicate.permanent.TappedPredicate;
|
||||
import mage.target.common.TargetControlledCreaturePermanent;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author fireshoes
|
||||
*/
|
||||
public final class HandOfJustice extends CardImpl {
|
||||
|
||||
private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("untapped white creatures you control");
|
||||
private static final FilterControlledPermanent filter = new FilterControlledCreaturePermanent("untapped white creatures you control");
|
||||
|
||||
static {
|
||||
filter.add(new ColorPredicate(ObjectColor.WHITE));
|
||||
|
|
@ -34,14 +32,14 @@ public final class HandOfJustice extends CardImpl {
|
|||
}
|
||||
|
||||
public HandOfJustice(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{W}");
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{5}{W}");
|
||||
this.subtype.add(SubType.AVATAR);
|
||||
this.power = new MageInt(2);
|
||||
this.toughness = new MageInt(6);
|
||||
|
||||
// {tap}, Tap three untapped white creatures you control: Destroy target creature.
|
||||
Ability ability = new SimpleActivatedAbility(new DestroyTargetEffect(), new TapSourceCost());
|
||||
ability.addCost(new TapTargetCost(new TargetControlledCreaturePermanent(3, 3, filter, true)));
|
||||
ability.addCost(new TapTargetCost(3, filter));
|
||||
ability.addTarget(new TargetCreaturePermanent());
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,27 +1,23 @@
|
|||
package mage.cards.h;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.TriggeredAbilityImpl;
|
||||
import mage.abilities.effects.common.ReturnToHandTargetEffect;
|
||||
import mage.abilities.common.AttacksTriggeredAbility;
|
||||
import mage.abilities.effects.common.ReturnToHandChosenControlledPermanentEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.target.common.TargetControlledCreaturePermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author noxx
|
||||
*/
|
||||
public final class HavengulSkaab extends CardImpl {
|
||||
|
||||
public HavengulSkaab(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{5}{U}");
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{5}{U}");
|
||||
this.subtype.add(SubType.ZOMBIE);
|
||||
this.subtype.add(SubType.HORROR);
|
||||
|
||||
|
|
@ -29,7 +25,7 @@ public final class HavengulSkaab extends CardImpl {
|
|||
this.toughness = new MageInt(5);
|
||||
|
||||
// Whenever Havengul Skaab attacks, return another creature you control to its owner's hand.
|
||||
this.addAbility(new HavengulSkaabAbility());
|
||||
this.addAbility(new AttacksTriggeredAbility(new ReturnToHandChosenControlledPermanentEffect(StaticFilters.FILTER_ANOTHER_CREATURE_YOU_CONTROL)));
|
||||
}
|
||||
|
||||
private HavengulSkaab(final HavengulSkaab card) {
|
||||
|
|
@ -41,39 +37,3 @@ public final class HavengulSkaab extends CardImpl {
|
|||
return new HavengulSkaab(this);
|
||||
}
|
||||
}
|
||||
|
||||
class HavengulSkaabAbility extends TriggeredAbilityImpl {
|
||||
|
||||
public HavengulSkaabAbility() {
|
||||
super(Zone.BATTLEFIELD, new ReturnToHandTargetEffect());
|
||||
}
|
||||
|
||||
private HavengulSkaabAbility(final HavengulSkaabAbility ability) {
|
||||
super(ability);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkEventType(GameEvent event, Game game) {
|
||||
return event.getType() == GameEvent.EventType.ATTACKER_DECLARED;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkTrigger(GameEvent event, Game game) {
|
||||
if (event.getSourceId().equals(this.getSourceId())) {
|
||||
TargetControlledCreaturePermanent target = new TargetControlledCreaturePermanent(1, 1, StaticFilters.FILTER_ANOTHER_CREATURE_YOU_CONTROL, true);
|
||||
this.addTarget(target);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getRule() {
|
||||
return "Whenever {this} attacks, return another creature you control to its owner's hand.";
|
||||
}
|
||||
|
||||
@Override
|
||||
public HavengulSkaabAbility copy() {
|
||||
return new HavengulSkaabAbility(this);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
package mage.cards.h;
|
||||
|
||||
import mage.MageInt;
|
||||
|
|
@ -10,25 +9,27 @@ import mage.abilities.costs.mana.ManaCostsImpl;
|
|||
import mage.abilities.effects.RedirectionEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.*;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.SuperType;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.predicate.mageobject.ColorPredicate;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.target.TargetPermanent;
|
||||
import mage.target.common.TargetControlledCreaturePermanent;
|
||||
import mage.util.CardUtil;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author TheElk801 & L_J
|
||||
*/
|
||||
public final class HazduhrTheAbbot extends CardImpl {
|
||||
|
||||
private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("white creature you control");
|
||||
private static final FilterPermanent filter = new FilterControlledCreaturePermanent("white creature you control");
|
||||
|
||||
static {
|
||||
filter.add(new ColorPredicate(ObjectColor.WHITE));
|
||||
|
|
@ -45,7 +46,7 @@ public final class HazduhrTheAbbot extends CardImpl {
|
|||
// {X}, {T}: The next X damage that would be dealt this turn to target white creature you control is dealt to Hazduhr the Abbot instead.
|
||||
Ability ability = new SimpleActivatedAbility(new HazduhrTheAbbotRedirectDamageEffect(Duration.EndOfTurn), new ManaCostsImpl<>("{X}"));
|
||||
ability.addCost(new TapSourceCost());
|
||||
ability.addTarget(new TargetControlledCreaturePermanent(filter));
|
||||
ability.addTarget(new TargetPermanent(filter));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
|
|
@ -61,8 +62,6 @@ public final class HazduhrTheAbbot extends CardImpl {
|
|||
|
||||
class HazduhrTheAbbotRedirectDamageEffect extends RedirectionEffect {
|
||||
|
||||
private static FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent();
|
||||
|
||||
public HazduhrTheAbbotRedirectDamageEffect(Duration duration) {
|
||||
super(duration, 0, UsageType.ACCORDING_DURATION);
|
||||
this.staticText = "The next X damage that would be dealt this turn to target white creature you control is dealt to {this} instead";
|
||||
|
|
@ -85,19 +84,15 @@ class HazduhrTheAbbotRedirectDamageEffect extends RedirectionEffect {
|
|||
|
||||
@Override
|
||||
public boolean applies(GameEvent event, Ability source, Game game) {
|
||||
Permanent permanent = game.getPermanent(source.getSourceId());
|
||||
if (permanent != null) {
|
||||
if (filter.match(permanent, permanent.getControllerId(), source, game)) {
|
||||
if (event.getTargetId().equals(getTargetPointer().getFirst(game, source))) {
|
||||
if (event.getTargetId() != null) {
|
||||
Permanent permanent = source.getSourcePermanentIfItStillExists(game);
|
||||
if (permanent == null
|
||||
|| !event.getTargetId().equals(getTargetPointer().getFirst(game, source))
|
||||
|| event.getTargetId() == null) {
|
||||
return false;
|
||||
}
|
||||
TargetPermanent target = new TargetPermanent();
|
||||
target.add(source.getSourceId(), game);
|
||||
redirectTarget = target;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,9 +1,11 @@
|
|||
package mage.cards.h;
|
||||
|
||||
import mage.MageInt;
|
||||
import mage.MageObject;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||
import mage.abilities.common.delayed.ReflexiveTriggeredAbility;
|
||||
import mage.abilities.costs.common.SacrificeTargetCost;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.DamageTargetEffect;
|
||||
|
|
@ -15,11 +17,7 @@ import mage.constants.Outcome;
|
|||
import mage.constants.SubType;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.players.Player;
|
||||
import mage.target.Target;
|
||||
import mage.target.common.TargetAnyTarget;
|
||||
import mage.target.common.TargetControlledCreaturePermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
|
|
@ -36,7 +34,7 @@ public final class HeartPiercerManticore extends CardImpl {
|
|||
this.toughness = new MageInt(3);
|
||||
|
||||
// When Heart-Piercer Manticore enters the battlefield, you may sacrifice another creature. When you do, Heart-Piercer Manticore deals damage equal to that creature's power to any target.
|
||||
this.addAbility(new EntersBattlefieldTriggeredAbility(new HeartPiercerManticoreSacrificeEffect(), true));
|
||||
this.addAbility(new EntersBattlefieldTriggeredAbility(new HeartPiercerManticoreEffect()));
|
||||
|
||||
// Embalm {5}{R}
|
||||
this.addAbility(new EmbalmAbility(new ManaCostsImpl<>("{5}{R}"), this));
|
||||
|
|
@ -52,21 +50,21 @@ public final class HeartPiercerManticore extends CardImpl {
|
|||
}
|
||||
}
|
||||
|
||||
class HeartPiercerManticoreSacrificeEffect extends OneShotEffect {
|
||||
class HeartPiercerManticoreEffect extends OneShotEffect {
|
||||
|
||||
HeartPiercerManticoreSacrificeEffect() {
|
||||
HeartPiercerManticoreEffect() {
|
||||
super(Outcome.Damage);
|
||||
this.staticText = "sacrifice another creature. When you do, "
|
||||
this.staticText = "you may sacrifice another creature. When you do, "
|
||||
+ "{this} deals damage equal to that creature's power to any target";
|
||||
}
|
||||
|
||||
private HeartPiercerManticoreSacrificeEffect(final HeartPiercerManticoreSacrificeEffect effect) {
|
||||
private HeartPiercerManticoreEffect(final HeartPiercerManticoreEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public HeartPiercerManticoreSacrificeEffect copy() {
|
||||
return new HeartPiercerManticoreSacrificeEffect(this);
|
||||
public HeartPiercerManticoreEffect copy() {
|
||||
return new HeartPiercerManticoreEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
@ -75,26 +73,22 @@ class HeartPiercerManticoreSacrificeEffect extends OneShotEffect {
|
|||
if (controller == null) {
|
||||
return false;
|
||||
}
|
||||
Target target = new TargetControlledCreaturePermanent(
|
||||
1, 1, StaticFilters.FILTER_CONTROLLED_ANOTHER_CREATURE, true
|
||||
);
|
||||
if (!controller.choose(outcome, target, source, game)) {
|
||||
return false;
|
||||
}
|
||||
Permanent toSacrifice = game.getPermanent(target.getFirstTarget());
|
||||
if (toSacrifice == null) {
|
||||
return false;
|
||||
}
|
||||
int power = toSacrifice.getPower().getValue();
|
||||
if (!toSacrifice.sacrifice(source, game)) {
|
||||
SacrificeTargetCost cost = new SacrificeTargetCost(StaticFilters.FILTER_CONTROLLED_ANOTHER_CREATURE);
|
||||
if (!cost.canPay(source, source, source.getControllerId(), game)
|
||||
|| !controller.chooseUse(outcome, "Sacrifice another creature?", source, game)
|
||||
|| !cost.pay(source, game, source, source.getControllerId(), false)) {
|
||||
return false;
|
||||
}
|
||||
int power = cost
|
||||
.getPermanents()
|
||||
.stream()
|
||||
.map(MageObject::getPower)
|
||||
.mapToInt(MageInt::getValue)
|
||||
.sum();
|
||||
ReflexiveTriggeredAbility trigger = new ReflexiveTriggeredAbility(
|
||||
new DamageTargetEffect(power), false,
|
||||
"{this} deals damage equal to that creature's power to any target."
|
||||
);
|
||||
trigger.addTarget(new TargetAnyTarget());
|
||||
game.fireReflexiveTriggeredAbility(trigger, source);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,24 +1,24 @@
|
|||
package mage.cards.h;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.costs.common.RemoveCounterCost;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.effects.common.DestroyTargetEffect;
|
||||
import mage.constants.SubType;
|
||||
import mage.abilities.keyword.TrainingAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.counters.CounterType;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.target.TargetPermanent;
|
||||
import mage.target.common.TargetControlledCreaturePermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author weirddan455
|
||||
*/
|
||||
public final class HopefulInitiate extends CardImpl {
|
||||
|
|
@ -37,8 +37,7 @@ public final class HopefulInitiate extends CardImpl {
|
|||
// {2}{W}, Remove two +1/+1 counters from among creatures you control: Destroy target artifact or enchantment.
|
||||
Ability ability = new SimpleActivatedAbility(new DestroyTargetEffect(), new ManaCostsImpl<>("{2}{W}"));
|
||||
ability.addCost(new RemoveCounterCost(
|
||||
new TargetControlledCreaturePermanent(1, 2, StaticFilters.FILTER_CONTROLLED_CREATURES, true),
|
||||
CounterType.P1P1, 2
|
||||
new TargetControlledCreaturePermanent(1, 2), CounterType.P1P1, 2
|
||||
).setText("Remove two +1/+1 counters from among creatures you control"));
|
||||
ability.addTarget(new TargetPermanent(StaticFilters.FILTER_PERMANENT_ARTIFACT_OR_ENCHANTMENT));
|
||||
this.addAbility(ability);
|
||||
|
|
|
|||
|
|
@ -2,7 +2,6 @@ package mage.cards.h;
|
|||
|
||||
import mage.ObjectColor;
|
||||
import mage.abilities.costs.common.TapTargetCost;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.common.continuous.BoostTargetEffect;
|
||||
import mage.abilities.effects.common.continuous.GainAbilityTargetEffect;
|
||||
import mage.abilities.keyword.FirstStrikeAbility;
|
||||
|
|
@ -13,40 +12,40 @@ import mage.constants.CardType;
|
|||
import mage.constants.Duration;
|
||||
import mage.constants.SubType;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.filter.predicate.mageobject.ColorPredicate;
|
||||
import mage.filter.predicate.permanent.TappedPredicate;
|
||||
import mage.target.common.TargetControlledCreaturePermanent;
|
||||
import mage.target.common.TargetControlledPermanent;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LevelX2
|
||||
*/
|
||||
public final class HundredTalonStrike extends CardImpl {
|
||||
|
||||
private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("untapped white creature you control");
|
||||
private static final FilterControlledPermanent filter = new FilterControlledCreaturePermanent("untapped white creature you control");
|
||||
|
||||
static {
|
||||
filter.add(TappedPredicate.UNTAPPED);
|
||||
filter.add(new ColorPredicate(ObjectColor.WHITE));
|
||||
}
|
||||
|
||||
public HundredTalonStrike(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{W}");
|
||||
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{W}");
|
||||
this.subtype.add(SubType.ARCANE);
|
||||
|
||||
|
||||
// Target creature gets +1/+0 and gains first strike until end of turn.
|
||||
Effect effect = new BoostTargetEffect(1,0, Duration.EndOfTurn);
|
||||
effect.setText("Target creature gets +1/+0");
|
||||
this.getSpellAbility().addEffect(effect);
|
||||
effect = new GainAbilityTargetEffect(FirstStrikeAbility.getInstance(), Duration.EndOfTurn);
|
||||
effect.setText("and gains first strike until end of turn");
|
||||
this.getSpellAbility().addEffect(effect);
|
||||
this.getSpellAbility().addEffect(new BoostTargetEffect(1, 0).setText("Target creature gets +1/+0"));
|
||||
this.getSpellAbility().addEffect(new GainAbilityTargetEffect(
|
||||
FirstStrikeAbility.getInstance(), Duration.EndOfTurn
|
||||
).setText("and gains first strike until end of turn"));
|
||||
this.getSpellAbility().addTarget(new TargetCreaturePermanent().withChooseHint("+1/+0 and first strike"));
|
||||
|
||||
// Splice onto Arcane-Tap an untapped white creature you control.
|
||||
this.addAbility(new SpliceAbility(SpliceAbility.ARCANE, new TapTargetCost(new TargetControlledCreaturePermanent(1,1,filter,false))));
|
||||
this.addAbility(new SpliceAbility(SpliceAbility.ARCANE, new TapTargetCost(new TargetControlledPermanent(filter))));
|
||||
}
|
||||
|
||||
private HundredTalonStrike(final HundredTalonStrike card) {
|
||||
|
|
|
|||
|
|
@ -1,35 +1,30 @@
|
|||
|
||||
package mage.cards.h;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.ObjectColor;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.common.FightTargetsEffect;
|
||||
import mage.abilities.effects.common.continuous.BoostTargetEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.TargetController;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.filter.common.FilterOpponentsCreaturePermanent;
|
||||
import mage.filter.predicate.mageobject.ColorPredicate;
|
||||
import mage.target.Target;
|
||||
import mage.target.common.TargetControlledCreaturePermanent;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
import mage.target.TargetPermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LevelX2
|
||||
*/
|
||||
public final class HuntTheHunter extends CardImpl {
|
||||
|
||||
private static final FilterControlledCreaturePermanent filterControlledGreen = new FilterControlledCreaturePermanent("green creature you control");
|
||||
private static final FilterCreaturePermanent filterOpponentGreen = new FilterCreaturePermanent("green creature an opponent controls");
|
||||
private static final FilterControlledPermanent filterControlledGreen = new FilterControlledCreaturePermanent("green creature you control");
|
||||
private static final FilterPermanent filterOpponentGreen = new FilterOpponentsCreaturePermanent("green creature an opponent controls");
|
||||
|
||||
static {
|
||||
filterControlledGreen.add(new ColorPredicate(ObjectColor.GREEN));
|
||||
filterOpponentGreen.add(TargetController.OPPONENT.getControllerPredicate());
|
||||
filterOpponentGreen.add(new ColorPredicate(ObjectColor.GREEN));
|
||||
}
|
||||
|
||||
|
|
@ -37,15 +32,10 @@ public final class HuntTheHunter extends CardImpl {
|
|||
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{G}");
|
||||
|
||||
// Target green creature you control gets +2/+2 until end of turn. It fights target green creature an opponent controls.
|
||||
Effect effect = new BoostTargetEffect(2, 2, Duration.EndOfTurn);
|
||||
this.getSpellAbility().addEffect(effect);
|
||||
this.getSpellAbility().addTarget(new TargetControlledCreaturePermanent(1, 1, filterControlledGreen, false));
|
||||
|
||||
effect = new FightTargetsEffect();
|
||||
effect.setText("It fights target green creature an opponent controls");
|
||||
this.getSpellAbility().addEffect(effect);
|
||||
Target target = new TargetCreaturePermanent(filterOpponentGreen);
|
||||
this.getSpellAbility().addTarget(target);
|
||||
this.getSpellAbility().addEffect(new BoostTargetEffect(2, 2));
|
||||
this.getSpellAbility().addTarget(new TargetPermanent(filterControlledGreen));
|
||||
this.getSpellAbility().addEffect(new FightTargetsEffect().setText("It fights target green creature an opponent controls"));
|
||||
this.getSpellAbility().addTarget(new TargetPermanent(filterOpponentGreen));
|
||||
}
|
||||
|
||||
private HuntTheHunter(final HuntTheHunter card) {
|
||||
|
|
|
|||
|
|
@ -5,7 +5,6 @@ import mage.abilities.effects.common.ExileThenReturnTargetEffect;
|
|||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.target.common.TargetControlledCreaturePermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
|
@ -20,8 +19,7 @@ public final class IllusionistsStratagem extends CardImpl {
|
|||
|
||||
// Exile up to two target creatures you control, then return those cards to the battlefield under their owner's control.
|
||||
this.getSpellAbility().addEffect(new ExileThenReturnTargetEffect(false, true));
|
||||
this.getSpellAbility().addTarget(new TargetControlledCreaturePermanent(0, 2,
|
||||
StaticFilters.FILTER_CONTROLLED_CREATURES, false));
|
||||
this.getSpellAbility().addTarget(new TargetControlledCreaturePermanent(0, 2));
|
||||
|
||||
// Draw a card.
|
||||
this.getSpellAbility().addEffect(new DrawCardSourceControllerEffect(1).concatBy("<br>"));
|
||||
|
|
|
|||
|
|
@ -1,9 +1,7 @@
|
|||
package mage.cards.i;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.common.continuous.BoostTargetEffect;
|
||||
import mage.abilities.effects.common.continuous.GainAbilityTargetEffect;
|
||||
import mage.abilities.keyword.FlyingAbility;
|
||||
|
|
@ -13,10 +11,11 @@ import mage.constants.CardType;
|
|||
import mage.constants.Duration;
|
||||
import mage.constants.SubType;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.target.common.TargetControlledCreaturePermanent;
|
||||
import mage.target.TargetPermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class ImperialAerosaur extends CardImpl {
|
||||
|
|
@ -32,13 +31,13 @@ public final class ImperialAerosaur extends CardImpl {
|
|||
this.addAbility(FlyingAbility.getInstance());
|
||||
|
||||
// When Imperial Aerosaur enters the battlefield, another target creature you control gets +1/+1 and gains flying until end of turn.
|
||||
Effect effect = new BoostTargetEffect(1, 1, Duration.EndOfTurn);
|
||||
effect.setText("another target creature you control gets +1/+1");
|
||||
EntersBattlefieldTriggeredAbility ability = new EntersBattlefieldTriggeredAbility(effect);
|
||||
effect = new GainAbilityTargetEffect(FlyingAbility.getInstance(), Duration.EndOfTurn);
|
||||
effect.setText("and gains flying until end of turn");
|
||||
ability.addEffect(effect);
|
||||
ability.addTarget(new TargetControlledCreaturePermanent(StaticFilters.FILTER_ANOTHER_CREATURE_YOU_CONTROL));
|
||||
EntersBattlefieldTriggeredAbility ability = new EntersBattlefieldTriggeredAbility(
|
||||
new BoostTargetEffect(1, 1).setText("another target creature you control gets +1/+1")
|
||||
);
|
||||
ability.addEffect(new GainAbilityTargetEffect(
|
||||
FlyingAbility.getInstance(), Duration.EndOfTurn
|
||||
).setText("and gains flying until end of turn"));
|
||||
ability.addTarget(new TargetPermanent(StaticFilters.FILTER_ANOTHER_CREATURE_YOU_CONTROL));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,32 +1,23 @@
|
|||
package mage.cards.j;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.costs.common.TapTargetCost;
|
||||
import mage.abilities.mana.AnyColorManaAbility;
|
||||
import mage.constants.SubType;
|
||||
import mage.abilities.keyword.ReachAbility;
|
||||
import mage.abilities.mana.AnyColorManaAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.predicate.permanent.TappedPredicate;
|
||||
import mage.target.common.TargetControlledCreaturePermanent;
|
||||
import mage.constants.SubType;
|
||||
import mage.filter.StaticFilters;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author weirddan455
|
||||
*/
|
||||
public final class JasperaSentinel extends CardImpl {
|
||||
|
||||
private static final FilterControlledCreaturePermanent filter
|
||||
= new FilterControlledCreaturePermanent("an untapped creature you control");
|
||||
|
||||
static {
|
||||
filter.add(TappedPredicate.UNTAPPED);
|
||||
}
|
||||
|
||||
public JasperaSentinel(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{G}");
|
||||
|
||||
|
|
@ -40,7 +31,7 @@ public final class JasperaSentinel extends CardImpl {
|
|||
|
||||
// {T}, Tap an untapped creature you control: Add one mana of any color.
|
||||
Ability ability = new AnyColorManaAbility();
|
||||
ability.addCost(new TapTargetCost(new TargetControlledCreaturePermanent(filter)));
|
||||
ability.addCost(new TapTargetCost(StaticFilters.FILTER_CONTROLLED_UNTAPPED_CREATURE));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ import mage.cards.CardSetInfo;
|
|||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.target.common.TargetControlledCreaturePermanent;
|
||||
import mage.target.TargetPermanent;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
import mage.target.targetpointer.EachTargetPointer;
|
||||
|
||||
|
|
@ -35,7 +35,7 @@ public final class JediSentinel extends CardImpl {
|
|||
// When Jedi Sentinel enters the battlefield, return another target creature you control and target creature you don't control to their owners' hands.
|
||||
Effect effect = new ReturnToHandTargetEffect().setTargetPointer(new EachTargetPointer());
|
||||
Ability ability = new EntersBattlefieldTriggeredAbility(effect);
|
||||
ability.addTarget(new TargetControlledCreaturePermanent(StaticFilters.FILTER_ANOTHER_TARGET_CREATURE_YOU_CONTROL));
|
||||
ability.addTarget(new TargetPermanent(StaticFilters.FILTER_ANOTHER_TARGET_CREATURE_YOU_CONTROL));
|
||||
ability.addTarget(new TargetCreaturePermanent(StaticFilters.FILTER_CREATURE_YOU_DONT_CONTROL));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
package mage.cards.j;
|
||||
|
||||
import mage.MageInt;
|
||||
import mage.abilities.TriggeredAbility;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SacrificePermanentTriggeredAbility;
|
||||
import mage.abilities.effects.common.counter.AddCountersTargetEffect;
|
||||
import mage.abilities.keyword.FirstStrikeAbility;
|
||||
|
|
@ -16,7 +16,7 @@ import mage.counters.CounterType;
|
|||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.filter.predicate.Predicates;
|
||||
import mage.target.common.TargetControlledCreaturePermanent;
|
||||
import mage.target.TargetPermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
|
|
@ -53,12 +53,11 @@ public final class JennyFlint extends CardImpl {
|
|||
this.addAbility(new TrainingAbility());
|
||||
|
||||
// Whenever you sacrifice a Clue or Food, put a +1/+1 counter on another target creature you control.
|
||||
TriggeredAbility trigger = new SacrificePermanentTriggeredAbility(
|
||||
new AddCountersTargetEffect(CounterType.P1P1.createInstance()),
|
||||
filter
|
||||
Ability ability = new SacrificePermanentTriggeredAbility(
|
||||
new AddCountersTargetEffect(CounterType.P1P1.createInstance()), filter
|
||||
);
|
||||
trigger.addTarget(new TargetControlledCreaturePermanent(StaticFilters.FILTER_ANOTHER_TARGET_CREATURE_YOU_CONTROL));
|
||||
this.addAbility(trigger);
|
||||
ability.addTarget(new TargetPermanent(StaticFilters.FILTER_ANOTHER_TARGET_CREATURE_YOU_CONTROL));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
private JennyFlint(final JennyFlint card) {
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
package mage.cards.j;
|
||||
|
||||
import mage.MageInt;
|
||||
|
|
@ -12,31 +11,30 @@ import mage.cards.CardSetInfo;
|
|||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.target.Target;
|
||||
import mage.target.common.TargetControlledCreaturePermanent;
|
||||
import mage.target.TargetPermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author fireshoes
|
||||
*/
|
||||
public final class JeskaiBarricade extends CardImpl {
|
||||
|
||||
public JeskaiBarricade(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{W}");
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{W}");
|
||||
this.subtype.add(SubType.WALL);
|
||||
this.power = new MageInt(0);
|
||||
this.toughness = new MageInt(4);
|
||||
|
||||
// Flash
|
||||
this.addAbility(FlashAbility.getInstance());
|
||||
|
||||
// Defender
|
||||
this.addAbility(DefenderAbility.getInstance());
|
||||
|
||||
// When Jeskai Barricade enters the battlefield, you may return another target creature you control to its owner's hand.
|
||||
Ability ability = new EntersBattlefieldTriggeredAbility(new ReturnToHandTargetEffect(), true);
|
||||
Target target = new TargetControlledCreaturePermanent(StaticFilters.FILTER_ANOTHER_TARGET_CREATURE_YOU_CONTROL);
|
||||
ability.addTarget(target);
|
||||
ability.addTarget(new TargetPermanent(StaticFilters.FILTER_ANOTHER_TARGET_CREATURE_YOU_CONTROL));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,37 +1,34 @@
|
|||
|
||||
package mage.cards.k;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.common.delayed.AtTheBeginOfNextEndStepDelayedTriggeredAbility;
|
||||
import mage.abilities.costs.common.TapSourceCost;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.CreateTokenCopyTargetEffect;
|
||||
import mage.abilities.effects.common.SacrificeTargetEffect;
|
||||
import mage.abilities.keyword.HasteAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.SuperType;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.predicate.Predicates;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.target.common.TargetControlledCreaturePermanent;
|
||||
import mage.target.TargetPermanent;
|
||||
import mage.target.targetpointer.FixedTarget;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author jonubuu
|
||||
*/
|
||||
public final class KikiJikiMirrorBreaker extends CardImpl {
|
||||
|
||||
private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("nonlegendary creature you control");
|
||||
private static final FilterPermanent filter = new FilterControlledCreaturePermanent("nonlegendary creature you control");
|
||||
|
||||
static {
|
||||
filter.add(Predicates.not(SuperType.LEGENDARY.getPredicate()));
|
||||
|
|
@ -48,11 +45,11 @@ public final class KikiJikiMirrorBreaker extends CardImpl {
|
|||
|
||||
// Haste
|
||||
this.addAbility(HasteAbility.getInstance());
|
||||
|
||||
// {T}: Create a token that's a copy of target nonlegendary creature you control, except it has haste. Sacrifice it at the beginning of the next end step.
|
||||
Ability ability = new SimpleActivatedAbility(new KikiJikiMirrorBreakerEffect(), new TapSourceCost());
|
||||
ability.addTarget(new TargetControlledCreaturePermanent(1, 1, filter, false));
|
||||
ability.addTarget(new TargetPermanent(filter));
|
||||
this.addAbility(ability);
|
||||
|
||||
}
|
||||
|
||||
private KikiJikiMirrorBreaker(final KikiJikiMirrorBreaker card) {
|
||||
|
|
|
|||
|
|
@ -1,29 +1,31 @@
|
|||
package mage.cards.k;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.AttachableToRestrictedAbility;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.costs.mana.GenericManaCost;
|
||||
import mage.abilities.effects.common.continuous.BoostAllEffect;
|
||||
import mage.abilities.keyword.EquipAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.*;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.SuperType;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.target.Target;
|
||||
import mage.target.common.TargetControlledCreaturePermanent;
|
||||
import mage.target.TargetPermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LevelX
|
||||
*/
|
||||
public final class KondasBanner extends CardImpl {
|
||||
|
||||
private static final FilterControlledCreaturePermanent legendaryFilter = new FilterControlledCreaturePermanent("legendary creature");
|
||||
private static final FilterPermanent legendaryFilter = new FilterCreaturePermanent("legendary creature");
|
||||
|
||||
static {
|
||||
legendaryFilter.add(SuperType.LEGENDARY.getPredicate());
|
||||
|
|
@ -34,9 +36,8 @@ public final class KondasBanner extends CardImpl {
|
|||
this.supertype.add(SuperType.LEGENDARY);
|
||||
this.subtype.add(SubType.EQUIPMENT);
|
||||
|
||||
Target target = new TargetControlledCreaturePermanent(1, 1, legendaryFilter, false);
|
||||
// Konda's Banner can be attached only to a legendary creature.
|
||||
this.addAbility(new AttachableToRestrictedAbility(target));
|
||||
this.addAbility(new AttachableToRestrictedAbility(new TargetPermanent(legendaryFilter)));
|
||||
|
||||
// Creatures that share a color with equipped creature get +1/+1.
|
||||
this.addAbility(new SimpleStaticAbility(new KondasBannerColorBoostEffect()));
|
||||
|
|
@ -45,8 +46,7 @@ public final class KondasBanner extends CardImpl {
|
|||
this.addAbility(new SimpleStaticAbility(new KondasBannerTypeBoostEffect()));
|
||||
|
||||
// Equip {2}
|
||||
this.addAbility(new EquipAbility(Outcome.AddAbility, new GenericManaCost(2), target, false));
|
||||
|
||||
this.addAbility(new EquipAbility(2, false));
|
||||
}
|
||||
|
||||
private KondasBanner(final KondasBanner card) {
|
||||
|
|
|
|||
|
|
@ -1,51 +1,38 @@
|
|||
|
||||
package mage.cards.k;
|
||||
|
||||
import mage.abilities.triggers.BeginningOfUpkeepTriggeredAbility;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.costs.common.TapTargetCost;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.costs.mana.GenericManaCost;
|
||||
import mage.abilities.effects.common.SacrificeSourceUnlessPaysEffect;
|
||||
import mage.abilities.effects.common.combat.CantAttackYouUnlessPayAllEffect;
|
||||
import mage.abilities.triggers.BeginningOfUpkeepTriggeredAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.*;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.predicate.permanent.TappedPredicate;
|
||||
import mage.target.common.TargetControlledCreaturePermanent;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.SuperType;
|
||||
import mage.filter.StaticFilters;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author fireshoes
|
||||
*/
|
||||
public final class KoskunFalls extends CardImpl {
|
||||
|
||||
private static final FilterControlledCreaturePermanent filterCreature = new FilterControlledCreaturePermanent("untapped creature you control");
|
||||
|
||||
static {
|
||||
filterCreature.add(TappedPredicate.UNTAPPED);
|
||||
}
|
||||
|
||||
public KoskunFalls(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{B}{B}");
|
||||
this.supertype.add(SuperType.WORLD);
|
||||
|
||||
// At the beginning of your upkeep, sacrifice Koskun Falls unless you tap an untapped creature you control.
|
||||
Effect effect = new SacrificeSourceUnlessPaysEffect(new TapTargetCost(new TargetControlledCreaturePermanent(1, 1, filterCreature, true)));
|
||||
effect.setText("sacrifice Koskun Falls unless you tap an untapped creature you control");
|
||||
this.addAbility(new BeginningOfUpkeepTriggeredAbility(effect));
|
||||
this.addAbility(new BeginningOfUpkeepTriggeredAbility(
|
||||
new SacrificeSourceUnlessPaysEffect(new TapTargetCost(StaticFilters.FILTER_CONTROLLED_UNTAPPED_CREATURE))
|
||||
));
|
||||
|
||||
// Creatures can't attack you unless their controller pays {2} for each creature they control that's attacking you.
|
||||
this.addAbility(new SimpleStaticAbility(
|
||||
Zone.BATTLEFIELD,
|
||||
new CantAttackYouUnlessPayAllEffect(
|
||||
Duration.WhileOnBattlefield,
|
||||
new ManaCostsImpl<>("{2}")
|
||||
)
|
||||
));
|
||||
this.addAbility(new SimpleStaticAbility(new CantAttackYouUnlessPayAllEffect(
|
||||
Duration.WhileOnBattlefield, new GenericManaCost(2)
|
||||
)));
|
||||
}
|
||||
|
||||
private KoskunFalls(final KoskunFalls card) {
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
package mage.cards.k;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.costs.common.TapTargetCost;
|
||||
|
|
@ -8,31 +7,22 @@ import mage.abilities.effects.common.DamageTargetEffect;
|
|||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.predicate.permanent.TappedPredicate;
|
||||
import mage.target.common.TargetControlledCreaturePermanent;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.target.common.TargetPlayerOrPlaneswalker;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author ingmargoudt
|
||||
*/
|
||||
public final class KyrenNegotiations extends CardImpl {
|
||||
|
||||
private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("untapped creature you control");
|
||||
|
||||
static {
|
||||
filter.add(TappedPredicate.UNTAPPED);
|
||||
}
|
||||
|
||||
public KyrenNegotiations(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{R}{R}");
|
||||
|
||||
// Tap an untapped creature you control: Kyren Negotiations deals 1 damage to target player.
|
||||
Ability ability = new SimpleActivatedAbility(
|
||||
new DamageTargetEffect(1),
|
||||
new TapTargetCost(new TargetControlledCreaturePermanent(1, 1, filter, false))
|
||||
new DamageTargetEffect(1), new TapTargetCost(StaticFilters.FILTER_CONTROLLED_UNTAPPED_CREATURE)
|
||||
);
|
||||
ability.addTarget(new TargetPlayerOrPlaneswalker());
|
||||
this.addAbility(ability);
|
||||
|
|
|
|||
|
|
@ -19,13 +19,12 @@ import mage.filter.StaticFilters;
|
|||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.players.Player;
|
||||
import mage.target.common.TargetControlledCreaturePermanent;
|
||||
import mage.target.TargetPermanent;
|
||||
import mage.util.CardUtil;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author notgreat
|
||||
*/
|
||||
public final class LilysplashMentor extends CardImpl {
|
||||
|
|
@ -43,7 +42,7 @@ public final class LilysplashMentor extends CardImpl {
|
|||
|
||||
// {1}{G}{U}: Exile another target creature you control, then return it to the battlefield under its owner's control with a +1/+1 counter on it. Activate only as a sorcery.
|
||||
Ability ability = new ActivateAsSorceryActivatedAbility(new LilysplashMentorEffect(), new ManaCostsImpl<>("{1}{G}{U}"));
|
||||
ability.addTarget(new TargetControlledCreaturePermanent(StaticFilters.FILTER_ANOTHER_TARGET_CREATURE_YOU_CONTROL));
|
||||
ability.addTarget(new TargetPermanent(StaticFilters.FILTER_ANOTHER_TARGET_CREATURE_YOU_CONTROL));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
|
|
@ -56,6 +55,7 @@ public final class LilysplashMentor extends CardImpl {
|
|||
return new LilysplashMentor(this);
|
||||
}
|
||||
}
|
||||
|
||||
//Copied from Planar Incision
|
||||
class LilysplashMentorEffect extends OneShotEffect {
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,5 @@
|
|||
|
||||
package mage.cards.l;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.costs.common.TapTargetCost;
|
||||
|
|
@ -9,33 +7,29 @@ import mage.abilities.effects.common.continuous.BoostSourceEffect;
|
|||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.predicate.permanent.TappedPredicate;
|
||||
import mage.target.common.TargetControlledCreaturePermanent;
|
||||
import mage.constants.SubType;
|
||||
import mage.filter.StaticFilters;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Plopman
|
||||
*/
|
||||
public final class LlanowarBehemoth extends CardImpl {
|
||||
|
||||
private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("untapped creature you control");
|
||||
static {
|
||||
filter.add(TappedPredicate.UNTAPPED);
|
||||
}
|
||||
|
||||
public LlanowarBehemoth(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}{G}");
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{G}{G}");
|
||||
this.subtype.add(SubType.ELEMENTAL);
|
||||
|
||||
this.power = new MageInt(4);
|
||||
this.toughness = new MageInt(4);
|
||||
|
||||
// Tap an untapped creature you control: Llanowar Behemoth gets +1/+1 until end of turn.
|
||||
this.addAbility(new SimpleActivatedAbility(new BoostSourceEffect(1, 1, Duration.EndOfTurn), new TapTargetCost(new TargetControlledCreaturePermanent(1, 1, filter, false))));
|
||||
this.addAbility(new SimpleActivatedAbility(
|
||||
new BoostSourceEffect(1, 1, Duration.EndOfTurn),
|
||||
new TapTargetCost(StaticFilters.FILTER_CONTROLLED_UNTAPPED_CREATURE)
|
||||
));
|
||||
}
|
||||
|
||||
private LlanowarBehemoth(final LlanowarBehemoth card) {
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
|
||||
package mage.cards.l;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.costs.common.TapTargetCost;
|
||||
|
|
@ -10,24 +9,17 @@ import mage.cards.CardImpl;
|
|||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.predicate.permanent.TappedPredicate;
|
||||
import mage.target.common.TargetControlledCreaturePermanent;
|
||||
import mage.filter.StaticFilters;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LevelX2
|
||||
*/
|
||||
public final class LoamDryad extends CardImpl {
|
||||
|
||||
private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("untapped creature you control");
|
||||
|
||||
static {
|
||||
filter.add(TappedPredicate.UNTAPPED);
|
||||
}
|
||||
|
||||
public LoamDryad(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{G}");
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{G}");
|
||||
this.subtype.add(SubType.DRYAD);
|
||||
this.subtype.add(SubType.HORROR);
|
||||
this.power = new MageInt(1);
|
||||
|
|
@ -35,7 +27,7 @@ public final class LoamDryad extends CardImpl {
|
|||
|
||||
// {T}, Tap an untapped creature you control: Add one mana of any color.
|
||||
Ability ability = new AnyColorManaAbility();
|
||||
ability.addCost(new TapTargetCost(new TargetControlledCreaturePermanent(1, 1, filter, false)));
|
||||
ability.addCost(new TapTargetCost(StaticFilters.FILTER_CONTROLLED_UNTAPPED_CREATURES));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ import mage.filter.common.FilterCreaturePermanent;
|
|||
import mage.filter.predicate.permanent.DefendingPlayerControlsAttachedAttackingPredicate;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.target.common.TargetControlledCreaturePermanent;
|
||||
import mage.target.TargetPermanent;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
|
@ -43,7 +43,7 @@ public final class LothlorienBlade extends CardImpl {
|
|||
this.addAbility(ability);
|
||||
|
||||
// Equip Elf {2}
|
||||
this.addAbility(new EquipAbility(Outcome.AddAbility, new GenericManaCost(2), new TargetControlledCreaturePermanent(filterElf), false));
|
||||
this.addAbility(new EquipAbility(Outcome.AddAbility, new GenericManaCost(2), new TargetPermanent(filterElf), false));
|
||||
|
||||
// Equip {5}
|
||||
this.addAbility(new EquipAbility(5, false));
|
||||
|
|
|
|||
|
|
@ -1,16 +1,19 @@
|
|||
|
||||
package mage.cards.m;
|
||||
|
||||
import mage.ObjectColor;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.triggers.BeginningOfUpkeepTriggeredAbility;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.costs.Cost;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.DontUntapInControllersUntapStepAllEffect;
|
||||
import mage.abilities.triggers.BeginningOfUpkeepTriggeredAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.*;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.TargetController;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.mageobject.ColorPredicate;
|
||||
|
|
@ -19,7 +22,7 @@ import mage.game.Game;
|
|||
import mage.game.permanent.Permanent;
|
||||
import mage.players.Player;
|
||||
import mage.target.Target;
|
||||
import mage.target.common.TargetControlledCreaturePermanent;
|
||||
import mage.target.common.TargetControlledPermanent;
|
||||
import mage.util.ManaUtil;
|
||||
|
||||
import java.util.UUID;
|
||||
|
|
@ -29,7 +32,7 @@ import java.util.UUID;
|
|||
*/
|
||||
public final class MagneticMountain extends CardImpl {
|
||||
|
||||
static final FilterCreaturePermanent filter = new FilterCreaturePermanent("blue creatures");
|
||||
static final FilterPermanent filter = new FilterCreaturePermanent("blue creatures");
|
||||
|
||||
static {
|
||||
filter.add(new ColorPredicate(ObjectColor.BLUE));
|
||||
|
|
@ -80,13 +83,14 @@ class MagneticMountainEffect extends OneShotEffect {
|
|||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
|
||||
Player player = game.getPlayer(getTargetPointer().getFirst(game, source));
|
||||
Permanent sourcePermanent = game.getPermanent(source.getSourceId());
|
||||
if (player != null && sourcePermanent != null) {
|
||||
Player player = game.getPlayer(game.getActivePlayerId());
|
||||
if (player == null) {
|
||||
return false;
|
||||
}
|
||||
int countBattlefield = game.getBattlefield().getAllActivePermanents(filter2, game.getActivePlayerId(), game).size();
|
||||
while (player.canRespond() && countBattlefield > 0 && player.chooseUse(Outcome.Benefit, "Pay {4} and untap a tapped blue creature under your control?", source, game)) {
|
||||
Target tappedCreatureTarget = new TargetControlledCreaturePermanent(1, 1, filter2, true);
|
||||
Target tappedCreatureTarget = new TargetControlledPermanent(filter2);
|
||||
tappedCreatureTarget.withNotTarget(true);
|
||||
if (player.choose(Outcome.Untap, tappedCreatureTarget, source, game)) {
|
||||
Cost cost = ManaUtil.createManaCost(4, false);
|
||||
Permanent tappedCreature = game.getPermanent(tappedCreatureTarget.getFirstTarget());
|
||||
|
|
@ -102,6 +106,4 @@ class MagneticMountainEffect extends OneShotEffect {
|
|||
}
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ import mage.filter.predicate.permanent.TappedPredicate;
|
|||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.target.common.TargetControlledCreaturePermanent;
|
||||
import mage.target.common.TargetControlledPermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
|
|
@ -108,7 +108,7 @@ class MossbridgeTrollCost extends CostImpl {
|
|||
}
|
||||
|
||||
public MossbridgeTrollCost() {
|
||||
this.addTarget(new TargetControlledCreaturePermanent(0, Integer.MAX_VALUE, filter, true));
|
||||
this.addTarget(new TargetControlledPermanent(0, Integer.MAX_VALUE, filter, true));
|
||||
this.text = "tap any number of untapped creatures you control other than {this} with total power 10 or greater";
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,15 +1,18 @@
|
|||
package mage.cards.m;
|
||||
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.triggers.BeginningOfUpkeepTriggeredAbility;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.costs.Cost;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.DontUntapInControllersUntapStepAllEffect;
|
||||
import mage.abilities.keyword.FlyingAbility;
|
||||
import mage.abilities.triggers.BeginningOfUpkeepTriggeredAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.*;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.TargetController;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.Predicates;
|
||||
|
|
@ -19,7 +22,7 @@ import mage.game.Game;
|
|||
import mage.game.permanent.Permanent;
|
||||
import mage.players.Player;
|
||||
import mage.target.Target;
|
||||
import mage.target.common.TargetControlledCreaturePermanent;
|
||||
import mage.target.common.TargetControlledPermanent;
|
||||
import mage.util.ManaUtil;
|
||||
|
||||
import java.util.UUID;
|
||||
|
|
@ -86,7 +89,8 @@ class MudslideEffect extends OneShotEffect {
|
|||
if (player != null && sourcePermanent != null) {
|
||||
int countBattlefield = game.getBattlefield().getAllActivePermanents(filter, game.getActivePlayerId(), game).size();
|
||||
while (player.canRespond() && countBattlefield > 0 && player.chooseUse(Outcome.Benefit, "Pay {2} and untap a tapped creature without flying under your control?", source, game)) {
|
||||
Target tappedCreatureTarget = new TargetControlledCreaturePermanent(1, 1, filter, true);
|
||||
Target tappedCreatureTarget = new TargetControlledPermanent(filter);
|
||||
tappedCreatureTarget.withNotTarget(true);
|
||||
if (player.choose(Outcome.Untap, tappedCreatureTarget, source, game)) {
|
||||
Cost cost = ManaUtil.createManaCost(2, false);
|
||||
Permanent tappedCreature = game.getPermanent(tappedCreatureTarget.getFirstTarget());
|
||||
|
|
|
|||
|
|
@ -1,15 +1,13 @@
|
|||
|
||||
|
||||
package mage.cards.m;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.effects.common.FightTargetsEffect;
|
||||
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.TargetCreaturePermanent;
|
||||
import mage.target.TargetPermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author LevelX2
|
||||
|
|
@ -17,12 +15,12 @@ import mage.target.common.TargetCreaturePermanent;
|
|||
public final class MutantsPrey extends CardImpl {
|
||||
|
||||
public MutantsPrey(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{G}");
|
||||
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{G}");
|
||||
|
||||
// Target creature you control with a +1/+1 counter on it fights target creature an opponent controls.
|
||||
this.getSpellAbility().addEffect(new FightTargetsEffect());
|
||||
this.getSpellAbility().addTarget(new TargetControlledCreaturePermanent(StaticFilters.FILTER_CONTROLLED_CREATURE_P1P1));
|
||||
this.getSpellAbility().addTarget(new TargetCreaturePermanent(StaticFilters.FILTER_OPPONENTS_PERMANENT_CREATURE));
|
||||
this.getSpellAbility().addTarget(new TargetPermanent(StaticFilters.FILTER_CONTROLLED_CREATURE_P1P1));
|
||||
this.getSpellAbility().addTarget(new TargetPermanent(StaticFilters.FILTER_OPPONENTS_PERMANENT_CREATURE));
|
||||
}
|
||||
|
||||
private MutantsPrey(final MutantsPrey card) {
|
||||
|
|
|
|||
|
|
@ -13,6 +13,7 @@ import mage.cards.CardSetInfo;
|
|||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.target.TargetPermanent;
|
||||
import mage.target.common.TargetControlledCreaturePermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
|
@ -37,7 +38,7 @@ public final class N1Starfighter extends CardImpl {
|
|||
doIfCostPaid.addEffect(new ReturnToBattlefieldUnderOwnerControlTargetEffect(false, false).concatBy(", then"));
|
||||
|
||||
Ability ability = new DealsCombatDamageToAPlayerTriggeredAbility(doIfCostPaid, false);
|
||||
ability.addTarget(new TargetControlledCreaturePermanent(StaticFilters.FILTER_ANOTHER_TARGET_CREATURE_YOU_CONTROL));
|
||||
ability.addTarget(new TargetPermanent(StaticFilters.FILTER_ANOTHER_TARGET_CREATURE_YOU_CONTROL));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -10,9 +10,8 @@ import mage.cards.CardImpl;
|
|||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.target.common.TargetControlledCreaturePermanent;
|
||||
import mage.target.TargetPermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
|
|
@ -32,7 +31,7 @@ public final class NephaliaSmuggler extends CardImpl {
|
|||
// {3}{U}, {tap}: Exile another target creature you control, then return that card to the battlefield under your control.
|
||||
Ability ability = new SimpleActivatedAbility(new ExileThenReturnTargetEffect(true, true), new ManaCostsImpl<>("{3}{U}"));
|
||||
ability.addCost(new TapSourceCost());
|
||||
ability.addTarget(new TargetControlledCreaturePermanent(StaticFilters.FILTER_ANOTHER_TARGET_CREATURE_YOU_CONTROL));
|
||||
ability.addTarget(new TargetPermanent(StaticFilters.FILTER_ANOTHER_TARGET_CREATURE_YOU_CONTROL));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,9 +1,7 @@
|
|||
package mage.cards.n;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
import mage.abilities.Ability;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.common.delayed.AtTheBeginOfNextEndStepDelayedTriggeredAbility;
|
||||
|
|
@ -14,9 +12,9 @@ import mage.abilities.effects.OneShotEffect;
|
|||
import mage.abilities.effects.common.CreateTokenEffect;
|
||||
import mage.abilities.effects.common.ReturnToBattlefieldUnderOwnerControlTargetEffect;
|
||||
import mage.cards.Card;
|
||||
import mage.constants.*;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.*;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.predicate.Predicates;
|
||||
|
|
@ -25,17 +23,18 @@ import mage.game.Game;
|
|||
import mage.game.permanent.Permanent;
|
||||
import mage.game.permanent.token.ShardToken;
|
||||
import mage.players.Player;
|
||||
import mage.target.common.TargetControlledCreaturePermanent;
|
||||
import mage.target.TargetPermanent;
|
||||
import mage.target.targetpointer.FixedTarget;
|
||||
import mage.util.functions.EmptyCopyApplier;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Grath
|
||||
*/
|
||||
public final class NikoLightOfHope extends CardImpl {
|
||||
|
||||
private static final FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("nonlegendary creature you control");
|
||||
private static final FilterPermanent filter = new FilterControlledCreaturePermanent("nonlegendary creature you control");
|
||||
|
||||
static {
|
||||
filter.add(Predicates.not(SuperType.LEGENDARY.getPredicate()));
|
||||
|
|
@ -56,7 +55,7 @@ public final class NikoLightOfHope extends CardImpl {
|
|||
// {2}, {T}: Exile target nonlegendary creature you control. Shards you control become copies of it until the beginning of the next end step. Return it to the battlefield under its owner's control at the beginning of the next end step.
|
||||
Ability ability = new SimpleActivatedAbility(new NikoLightOfHopeEffect(), new GenericManaCost(2));
|
||||
ability.addCost(new TapSourceCost());
|
||||
ability.addTarget(new TargetControlledCreaturePermanent(1, 1, filter, false));
|
||||
ability.addTarget(new TargetPermanent(filter));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
|
|
@ -90,26 +89,27 @@ class NikoLightOfHopeEffect extends OneShotEffect {
|
|||
public boolean apply(Game game, Ability source) {
|
||||
Player controller = game.getPlayer(source.getControllerId());
|
||||
Permanent permanent = game.getPermanent(source.getFirstTarget());
|
||||
if (permanent != null && controller != null) {
|
||||
if (permanent.moveToExile(source.getSourceId(), "Niko, Light of Hope", source, game)) {
|
||||
if (permanent == null || controller == null
|
||||
|| !permanent.moveToExile(source.getSourceId(), "Niko, Light of Hope", source, game)) {
|
||||
return false;
|
||||
}
|
||||
FilterPermanent filter = new FilterPermanent("shards");
|
||||
filter.add(SubType.SHARD.getPredicate());
|
||||
for (Permanent copyTo : game.getBattlefield().getAllActivePermanents(filter, controller.getId(), game)) {
|
||||
game.copyPermanent(Duration.UntilNextEndStep, permanent, copyTo.getId(), source, new EmptyCopyApplier());
|
||||
}
|
||||
ExileZone exile = game.getExile().getExileZone(source.getSourceId());
|
||||
if (exile != null && !exile.isEmpty()) {
|
||||
if (exile == null || exile.isEmpty()) {
|
||||
return true;
|
||||
}
|
||||
Card card = game.getCard(permanent.getId());
|
||||
if (card != null) {
|
||||
if (card == null) {
|
||||
return true;
|
||||
}
|
||||
Effect effect = new ReturnToBattlefieldUnderOwnerControlTargetEffect(false, false);
|
||||
effect.setTargetPointer(new FixedTarget(card.getId()));
|
||||
game.addDelayedTriggeredAbility(new AtTheBeginOfNextEndStepDelayedTriggeredAbility(effect), source);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -14,7 +14,6 @@ import mage.constants.*;
|
|||
import mage.counters.CounterType;
|
||||
import mage.filter.FilterPlayer;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.predicate.other.PlayerIdPredicate;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
|
|
@ -25,7 +24,7 @@ import mage.target.common.TargetControlledCreaturePermanent;
|
|||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
import java.util.Optional;
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
|
|
@ -40,7 +39,8 @@ public final class NobleHeritage extends CardImpl {
|
|||
this.subtype.add(SubType.BACKGROUND);
|
||||
|
||||
// Commander creatures you own have “When this creature enters the battlefield and at the beginning of your upkeep, each player may put two +1/+1 counters on a creature they control. For each opponent who does, you gain protection from that player until your next turn.” (You can’t be targeted, dealt damage, or enchanted by anything controlled by that player.)
|
||||
this.addAbility(new SimpleStaticAbility(new GainAbilityAllEffect(new NobleHeritageTriggeredAbility(), Duration.WhileOnBattlefield,
|
||||
this.addAbility(new SimpleStaticAbility(new GainAbilityAllEffect(
|
||||
new NobleHeritageTriggeredAbility(), Duration.WhileOnBattlefield,
|
||||
StaticFilters.FILTER_CREATURES_OWNED_COMMANDER
|
||||
)));
|
||||
}
|
||||
|
|
@ -122,21 +122,27 @@ class NobleHeritageEffect extends OneShotEffect {
|
|||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player controller = game.getPlayer(source.getControllerId());
|
||||
if (controller != null) {
|
||||
if (controller == null) {
|
||||
return false;
|
||||
}
|
||||
List<UUID> players = new ArrayList<>();
|
||||
List<UUID> creatures = new ArrayList<>();
|
||||
for (UUID playerId : game.getState().getPlayersInRange(controller.getId(), game)) {
|
||||
Player player = game.getPlayer(playerId);
|
||||
if (player != null) {
|
||||
if (player.chooseUse(outcome, "Put two +1/+1 counters on a creature you control?", source, game)) {
|
||||
Target target = new TargetControlledCreaturePermanent(new FilterControlledCreaturePermanent("a creature you control (to add two +1/+1 counters on it)"));
|
||||
if (player.choose(outcome, target, source, game)) {
|
||||
creatures.add(target.getFirstTarget());
|
||||
if (player == null || !player.chooseUse(outcome, "Put two +1/+1 counters on a creature you control?", source, game)) {
|
||||
continue;
|
||||
}
|
||||
Target target = new TargetControlledCreaturePermanent(0, 1);
|
||||
target.withNotTarget(true);
|
||||
target.withChooseHint("to add counters to");
|
||||
player.choose(outcome, target, source, game);
|
||||
Optional.ofNullable(target)
|
||||
.map(Target::getFirstTarget)
|
||||
.map(game::getPermanent)
|
||||
.ifPresent(permanent -> {
|
||||
creatures.add(permanent.getId());
|
||||
players.add(player.getId());
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
for (UUID creatureId : creatures) {
|
||||
Permanent creature = game.getPermanent(creatureId);
|
||||
|
|
@ -145,16 +151,15 @@ class NobleHeritageEffect extends OneShotEffect {
|
|||
}
|
||||
}
|
||||
for (UUID playerId : players) {
|
||||
if (!Objects.equals(playerId, source.getControllerId())) {
|
||||
if (source.isControlledBy(playerId)) {
|
||||
continue;
|
||||
}
|
||||
FilterPlayer filter = new FilterPlayer();
|
||||
filter.add(new PlayerIdPredicate(playerId));
|
||||
game.addEffect(new GainAbilityControllerEffect(
|
||||
new ProtectionAbility(filter), Duration.UntilYourNextTurn
|
||||
), source);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
package mage.cards.n;
|
||||
|
||||
import mage.MageInt;
|
||||
|
|
@ -10,28 +9,18 @@ import mage.cards.CardImpl;
|
|||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.predicate.permanent.TappedPredicate;
|
||||
import mage.target.TargetPermanent;
|
||||
import mage.target.common.TargetControlledCreaturePermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Loki
|
||||
*/
|
||||
public final class NullmageShepherd extends CardImpl {
|
||||
|
||||
private static final FilterControlledCreaturePermanent filterCost = new FilterControlledCreaturePermanent("untapped creatures you control");
|
||||
static {
|
||||
filterCost.add(TappedPredicate.UNTAPPED);
|
||||
}
|
||||
|
||||
public NullmageShepherd(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}");
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{G}");
|
||||
this.subtype.add(SubType.ELF);
|
||||
this.subtype.add(SubType.SHAMAN);
|
||||
|
||||
|
|
@ -39,7 +28,7 @@ public final class NullmageShepherd extends CardImpl {
|
|||
this.toughness = new MageInt(4);
|
||||
|
||||
// Tap four untapped creatures you control: Destroy target artifact or enchantment.
|
||||
Ability ability = new SimpleActivatedAbility(new DestroyTargetEffect(), new TapTargetCost(new TargetControlledCreaturePermanent(4, 4, filterCost, true)));
|
||||
Ability ability = new SimpleActivatedAbility(new DestroyTargetEffect(), new TapTargetCost(4, StaticFilters.FILTER_CONTROLLED_UNTAPPED_CREATURES));
|
||||
ability.addTarget(new TargetPermanent(StaticFilters.FILTER_PERMANENT_ARTIFACT_OR_ENCHANTMENT));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,12 +1,8 @@
|
|||
|
||||
package mage.cards.o;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.AttachableToRestrictedAbility;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.costs.mana.GenericManaCost;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.common.continuous.BoostEquippedEffect;
|
||||
import mage.abilities.effects.common.continuous.GainAbilityAttachedEffect;
|
||||
import mage.abilities.keyword.EquipAbility;
|
||||
|
|
@ -15,17 +11,15 @@ import mage.cards.CardImpl;
|
|||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.AttachmentType;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.ComparisonType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.Zone;
|
||||
import mage.constants.SubType;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.predicate.mageobject.PowerPredicate;
|
||||
import mage.target.Target;
|
||||
import mage.target.common.TargetControlledCreaturePermanent;
|
||||
import mage.target.TargetPermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LevelX2
|
||||
*/
|
||||
public final class ONaginata extends CardImpl {
|
||||
|
|
@ -37,24 +31,21 @@ public final class ONaginata extends CardImpl {
|
|||
}
|
||||
|
||||
public ONaginata(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{1}");
|
||||
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{1}");
|
||||
this.subtype.add(SubType.EQUIPMENT);
|
||||
|
||||
Target target = new TargetControlledCreaturePermanent(1, 1, filter, false);
|
||||
// O-Naginata can be attached only to a creature with 3 or more power.
|
||||
this.addAbility(new AttachableToRestrictedAbility(target));
|
||||
this.addAbility(new AttachableToRestrictedAbility(new TargetPermanent(filter)));
|
||||
|
||||
// Equipped creature gets +3/+0 and has trample.
|
||||
Effect effect = new BoostEquippedEffect(3, 0);
|
||||
effect.setText("Equipped creature gets +3/+0");
|
||||
Ability ability = new SimpleStaticAbility(effect);
|
||||
effect = new GainAbilityAttachedEffect(TrampleAbility.getInstance(), AttachmentType.EQUIPMENT);
|
||||
effect.setText("and has trample");
|
||||
ability.addEffect(effect);
|
||||
Ability ability = new SimpleStaticAbility(new BoostEquippedEffect(3, 0));
|
||||
ability.addEffect(new GainAbilityAttachedEffect(
|
||||
TrampleAbility.getInstance(), AttachmentType.EQUIPMENT
|
||||
).setText("and has trample"));
|
||||
this.addAbility(ability);
|
||||
|
||||
// Equip {2}
|
||||
this.addAbility(new EquipAbility(Outcome.AddAbility, new GenericManaCost(2), target));
|
||||
this.addAbility(new EquipAbility(2));
|
||||
}
|
||||
|
||||
private ONaginata(final ONaginata card) {
|
||||
|
|
|
|||
|
|
@ -14,12 +14,11 @@ import mage.game.Game;
|
|||
import mage.game.permanent.Permanent;
|
||||
import mage.players.Player;
|
||||
import mage.target.Target;
|
||||
import mage.target.common.TargetControlledCreaturePermanent;
|
||||
import mage.target.TargetPermanent;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author notgreat
|
||||
*/
|
||||
public final class OlorinsSearingLight extends CardImpl {
|
||||
|
|
@ -41,17 +40,20 @@ public final class OlorinsSearingLight extends CardImpl {
|
|||
return new OlorinsSearingLight(this);
|
||||
}
|
||||
}
|
||||
|
||||
//See Crackling Doom
|
||||
class OlorinsSearingLightEffect extends OneShotEffect {
|
||||
|
||||
static FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent("creature with the greatest power among creatures you control");
|
||||
|
||||
static {
|
||||
filter.add(GreatestPowerControlledPredicate.instance);
|
||||
}
|
||||
|
||||
public OlorinsSearingLightEffect() {
|
||||
super(Outcome.Sacrifice);
|
||||
this.staticText = "Each opponent exiles a creature with the greatest power among creatures that player controls.<br>"
|
||||
+"<i>Spell mastery</i> — If there are two or more instant and/or sorcery cards in your graveyard, {this} deals damage to each opponent equal to the power of the creature they exiled.";
|
||||
+ "<i>Spell mastery</i> — If there are two or more instant and/or sorcery cards in your graveyard, {this} deals damage to each opponent equal to the power of the creature they exiled.";
|
||||
}
|
||||
|
||||
private OlorinsSearingLightEffect(final OlorinsSearingLightEffect effect) {
|
||||
|
|
@ -72,7 +74,7 @@ class OlorinsSearingLightEffect extends OneShotEffect {
|
|||
if (controller.hasOpponent(playerId, game)) {
|
||||
Player opponent = game.getPlayer(playerId);
|
||||
if (opponent != null) {
|
||||
Target target = new TargetControlledCreaturePermanent(filter);
|
||||
Target target = new TargetPermanent(filter);
|
||||
target.withNotTarget(true);
|
||||
if (opponent.choose(outcome, target, source, game)) {
|
||||
Permanent permanentChosen = game.getPermanent(target.getFirstTarget());
|
||||
|
|
@ -91,7 +93,7 @@ class OlorinsSearingLightEffect extends OneShotEffect {
|
|||
opponent.moveCards(permanent, Zone.EXILED, source, game);
|
||||
}
|
||||
}
|
||||
if (SpellMasteryCondition.instance.apply(game, source)){
|
||||
if (SpellMasteryCondition.instance.apply(game, source)) {
|
||||
game.processAction();
|
||||
for (Map.Entry<Player, Integer> entry : damageList) {
|
||||
entry.getKey().damage(entry.getValue(), source, game);
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue