mirror of
https://github.com/magefree/mage.git
synced 2025-12-20 02:30:08 -08:00
simplify constructors for ConditionalActivatedAbility
This commit is contained in:
parent
fd371c8932
commit
e19f7c22b7
67 changed files with 409 additions and 541 deletions
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
package mage.cards.a;
|
||||
|
||||
import mage.MageInt;
|
||||
|
|
@ -12,7 +11,6 @@ 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.predicate.permanent.DefendingPlayerControlsSourceAttackingPredicate;
|
||||
import mage.target.TargetPermanent;
|
||||
|
|
@ -42,7 +40,9 @@ public final class AncientHellkite extends CardImpl {
|
|||
this.addAbility(FlyingAbility.getInstance());
|
||||
|
||||
// {R}: Ancient Hellkite deals 1 damage to target creature defending player controls. Activate this ability only if Ancient Hellkite is attacking.
|
||||
Ability ability = new ConditionalActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1), new ManaCostsImpl<>("{R}"), SourceAttackingCondition.instance);
|
||||
Ability ability = new ConditionalActivatedAbility(
|
||||
new DamageTargetEffect(1), new ManaCostsImpl<>("{R}"), SourceAttackingCondition.instance
|
||||
);
|
||||
ability.addTarget(new TargetPermanent(filter));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -12,7 +12,6 @@ import mage.abilities.mana.ColorlessManaAbility;
|
|||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Zone;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
|
|
@ -31,10 +30,9 @@ public final class ArchOfOrazca extends CardImpl {
|
|||
this.addAbility(new ColorlessManaAbility());
|
||||
|
||||
// {5}, {T}: Draw a card. Activate this ability only if you have the city's blessing.
|
||||
Ability ability = new ConditionalActivatedAbility(Zone.BATTLEFIELD,
|
||||
new DrawCardSourceControllerEffect(1),
|
||||
new GenericManaCost(5),
|
||||
CitysBlessingCondition.instance);
|
||||
Ability ability = new ConditionalActivatedAbility(
|
||||
new DrawCardSourceControllerEffect(1), new GenericManaCost(5), CitysBlessingCondition.instance
|
||||
);
|
||||
ability.addCost(new TapSourceCost());
|
||||
ability.addHint(CitysBlessingHint.instance);
|
||||
this.addAbility(ability);
|
||||
|
|
|
|||
|
|
@ -1,7 +1,5 @@
|
|||
|
||||
package mage.cards.a;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.condition.common.IsStepCondition;
|
||||
import mage.abilities.costs.common.SacrificeSourceCost;
|
||||
|
|
@ -11,18 +9,17 @@ import mage.abilities.keyword.ShadowAbility;
|
|||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.PhaseStep;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.Zone;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author fireshoes
|
||||
*/
|
||||
public final class AugurIlVec extends CardImpl {
|
||||
|
||||
public AugurIlVec(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.HUMAN);
|
||||
this.subtype.add(SubType.CLERIC);
|
||||
this.power = new MageInt(1);
|
||||
|
|
@ -32,10 +29,9 @@ public final class AugurIlVec extends CardImpl {
|
|||
this.addAbility(ShadowAbility.getInstance());
|
||||
|
||||
// Sacrifice Augur il-Vec: You gain 4 life. Activate this ability only during your upkeep.
|
||||
this.addAbility(new ConditionalActivatedAbility(Zone.BATTLEFIELD,
|
||||
new GainLifeEffect(4),
|
||||
new SacrificeSourceCost(),
|
||||
new IsStepCondition(PhaseStep.UPKEEP)));
|
||||
this.addAbility(new ConditionalActivatedAbility(
|
||||
new GainLifeEffect(4), new SacrificeSourceCost(), IsStepCondition.getMyUpkeep()
|
||||
));
|
||||
}
|
||||
|
||||
private AugurIlVec(final AugurIlVec card) {
|
||||
|
|
|
|||
|
|
@ -1,7 +1,5 @@
|
|||
|
||||
package mage.cards.a;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
|
|
@ -14,19 +12,18 @@ import mage.abilities.effects.common.discard.DiscardTargetEffect;
|
|||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.PhaseStep;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.Zone;
|
||||
import mage.target.TargetPlayer;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author fireshoes
|
||||
*/
|
||||
public final class AugurOfSkulls extends CardImpl {
|
||||
|
||||
public AugurOfSkulls(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}");
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{B}");
|
||||
this.subtype.add(SubType.SKELETON);
|
||||
this.subtype.add(SubType.WIZARD);
|
||||
this.power = new MageInt(1);
|
||||
|
|
@ -34,11 +31,10 @@ public final class AugurOfSkulls extends CardImpl {
|
|||
|
||||
// {1}{B}: Regenerate Augur of Skulls.
|
||||
this.addAbility(new SimpleActivatedAbility(new RegenerateSourceEffect(), new ManaCostsImpl<>("{1}{B}")));
|
||||
|
||||
// Sacrifice Augur of Skulls: Target player discards two cards. Activate this ability only during your upkeep.
|
||||
Ability ability = new ConditionalActivatedAbility(Zone.BATTLEFIELD,
|
||||
new DiscardTargetEffect(2),
|
||||
new SacrificeSourceCost(),
|
||||
new IsStepCondition(PhaseStep.UPKEEP)
|
||||
Ability ability = new ConditionalActivatedAbility(
|
||||
new DiscardTargetEffect(2), new SacrificeSourceCost(), IsStepCondition.getMyUpkeep()
|
||||
);
|
||||
ability.addTarget(new TargetPlayer());
|
||||
this.addAbility(ability);
|
||||
|
|
|
|||
|
|
@ -1,7 +1,5 @@
|
|||
|
||||
package mage.cards.a;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.condition.common.IsStepCondition;
|
||||
|
|
@ -12,19 +10,18 @@ import mage.abilities.keyword.FlyingAbility;
|
|||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.PhaseStep;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.Zone;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author fireshoes
|
||||
*/
|
||||
public final class AvenAugur extends CardImpl {
|
||||
|
||||
public AvenAugur(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.BIRD);
|
||||
this.subtype.add(SubType.WIZARD);
|
||||
this.power = new MageInt(2);
|
||||
|
|
@ -34,10 +31,9 @@ public final class AvenAugur extends CardImpl {
|
|||
this.addAbility(FlyingAbility.getInstance());
|
||||
|
||||
// Sacrifice Aven Augur: Return up to two target creatures to their owners' hands. Activate this ability only during your upkeep.
|
||||
Ability ability = new ConditionalActivatedAbility(Zone.BATTLEFIELD,
|
||||
new ReturnToHandTargetEffect(),
|
||||
new SacrificeSourceCost(),
|
||||
new IsStepCondition(PhaseStep.UPKEEP));
|
||||
Ability ability = new ConditionalActivatedAbility(
|
||||
new ReturnToHandTargetEffect(), new SacrificeSourceCost(), IsStepCondition.getMyUpkeep()
|
||||
);
|
||||
ability.addTarget(new TargetCreaturePermanent(0, 2));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -18,7 +18,6 @@ import mage.cards.CardSetInfo;
|
|||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.SuperType;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.target.common.TargetNonlandPermanent;
|
||||
|
||||
|
|
@ -48,10 +47,7 @@ public final class AyliEternalPilgrim extends CardImpl {
|
|||
|
||||
// {1}{W}{B}, Sacrifice another creature: Exile target nonland permanent. Activate only if you have at least 10 life more than your starting life total.
|
||||
ability = new ConditionalActivatedAbility(
|
||||
Zone.BATTLEFIELD,
|
||||
new ExileTargetEffect(),
|
||||
new ManaCostsImpl<>("{1}{W}{B}"),
|
||||
MoreThanStartingLifeTotalCondition.TEN
|
||||
new ExileTargetEffect(), new ManaCostsImpl<>("{1}{W}{B}"), MoreThanStartingLifeTotalCondition.TEN
|
||||
);
|
||||
ability.addCost(new SacrificeTargetCost(StaticFilters.FILTER_CONTROLLED_ANOTHER_CREATURE));
|
||||
ability.addTarget(new TargetNonlandPermanent().withChooseHint("to exile"));
|
||||
|
|
|
|||
|
|
@ -11,7 +11,10 @@ import mage.abilities.effects.OneShotEffect;
|
|||
import mage.abilities.effects.common.RemoveFromCombatTargetEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.*;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.PhaseStep;
|
||||
import mage.constants.SubType;
|
||||
import mage.filter.common.FilterAttackingCreature;
|
||||
import mage.filter.common.FilterBlockingCreature;
|
||||
import mage.filter.predicate.permanent.PermanentReferenceInCollectionPredicate;
|
||||
|
|
@ -38,7 +41,7 @@ public final class BalduvianWarlord extends CardImpl {
|
|||
this.toughness = new MageInt(2);
|
||||
|
||||
// {T}: Remove target blocking creature from combat. Creatures it was blocking that hadn't become blocked by another creature this combat become unblocked, then it blocks an attacking creature of your choice. Activate this ability only during the declare blockers step.
|
||||
Ability ability = new ConditionalActivatedAbility(Zone.BATTLEFIELD, new BalduvianWarlordUnblockEffect(), new TapSourceCost(), new IsStepCondition(PhaseStep.DECLARE_BLOCKERS, false));
|
||||
Ability ability = new ConditionalActivatedAbility(new BalduvianWarlordUnblockEffect(), new TapSourceCost(), new IsStepCondition(PhaseStep.DECLARE_BLOCKERS, false));
|
||||
ability.addTarget(new TargetPermanent(new FilterBlockingCreature()));
|
||||
this.addAbility(ability, new BlockedByOnlyOneCreatureThisCombatWatcher());
|
||||
}
|
||||
|
|
|
|||
|
|
@ -11,7 +11,10 @@ import mage.abilities.effects.OneShotEffect;
|
|||
import mage.abilities.effects.common.CreateTokenEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.*;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.TargetController;
|
||||
import mage.constants.WatcherScope;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
|
|
@ -54,8 +57,7 @@ public final class BoxingRing extends CardImpl {
|
|||
|
||||
// {T}: Create a Treasure token. Activate only if you control a creature that fought this turn.
|
||||
this.addAbility(new ConditionalActivatedAbility(
|
||||
Zone.BATTLEFIELD, new CreateTokenEffect(new TreasureToken()),
|
||||
new TapSourceCost(), BoxingRingCondition.instance
|
||||
new CreateTokenEffect(new TreasureToken()), new TapSourceCost(), BoxingRingCondition.instance
|
||||
), new BoxingRingWatcher());
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,8 +1,5 @@
|
|||
|
||||
package mage.cards.b;
|
||||
|
||||
import java.util.Set;
|
||||
import java.util.UUID;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||
import mage.abilities.condition.IntCompareCondition;
|
||||
|
|
@ -18,15 +15,16 @@ import mage.cards.CardSetInfo;
|
|||
import mage.constants.CardType;
|
||||
import mage.constants.ComparisonType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.Zone;
|
||||
import mage.game.Game;
|
||||
import mage.players.Player;
|
||||
import mage.target.Target;
|
||||
import mage.target.TargetPlayer;
|
||||
import mage.target.common.TargetOpponent;
|
||||
|
||||
import java.util.Set;
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author spjspj
|
||||
*/
|
||||
public final class BuzzingWhackADoodle extends CardImpl {
|
||||
|
|
@ -38,16 +36,22 @@ public final class BuzzingWhackADoodle extends CardImpl {
|
|||
this.addAbility(new EntersBattlefieldTriggeredAbility(new BuzzingWhackADoodleEffect(), false));
|
||||
|
||||
// *Whack - T: Target player loses 2 life.
|
||||
Ability ability = new ConditionalActivatedAbility(Zone.BATTLEFIELD, new LoseLifeTargetEffect(2), new TapSourceCost(), new WhackCondition());
|
||||
Ability ability = new ConditionalActivatedAbility(
|
||||
new LoseLifeTargetEffect(2), new TapSourceCost(), new WhackCondition()
|
||||
);
|
||||
ability.addTarget(new TargetPlayer());
|
||||
this.addAbility(ability);
|
||||
|
||||
// *Doodle - T: You gain 3 life.
|
||||
Ability ability2 = new ConditionalActivatedAbility(Zone.BATTLEFIELD, new GainLifeEffect(3), new TapSourceCost(), new DoodleCondition());
|
||||
Ability ability2 = new ConditionalActivatedAbility(
|
||||
new GainLifeEffect(3), new TapSourceCost(), new DoodleCondition()
|
||||
);
|
||||
this.addAbility(ability2);
|
||||
|
||||
// *Buzz - 2, T: Draw a card.
|
||||
Ability ability3 = new ConditionalActivatedAbility(Zone.BATTLEFIELD, new DrawCardSourceControllerEffect(1), new ManaCostsImpl<>("{2}"), new BuzzCondition());
|
||||
Ability ability3 = new ConditionalActivatedAbility(
|
||||
new DrawCardSourceControllerEffect(1), new ManaCostsImpl<>("{2}"), new BuzzCondition()
|
||||
);
|
||||
ability3.addCost(new TapSourceCost());
|
||||
this.addAbility(ability3);
|
||||
}
|
||||
|
|
@ -144,7 +148,7 @@ class WhackCondition extends IntCompareCondition {
|
|||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "if both players picked 'Whack'";
|
||||
return "both players picked 'Whack'";
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -165,7 +169,7 @@ class DoodleCondition extends IntCompareCondition {
|
|||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "if both players picked 'Doodle'";
|
||||
return "both players picked 'Doodle'";
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -186,6 +190,6 @@ class BuzzCondition extends IntCompareCondition {
|
|||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "if both players picked differently";
|
||||
return "both players picked differently";
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,20 +1,19 @@
|
|||
package mage.cards.c;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.condition.common.SourceBlockedCondition;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.decorator.ConditionalActivatedAbility;
|
||||
import mage.abilities.effects.common.continuous.BoostSourceEffect;
|
||||
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 java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class CinderCrawler extends CardImpl {
|
||||
|
|
@ -28,10 +27,8 @@ public final class CinderCrawler extends CardImpl {
|
|||
|
||||
// {R}: Cinder Crawler gets +1/+0 until end of turn. Activate this ability only if Cinder Crawler is blocked.
|
||||
this.addAbility(new ConditionalActivatedAbility(
|
||||
Zone.BATTLEFIELD,
|
||||
new BoostSourceEffect(1, 0, Duration.EndOfTurn),
|
||||
new ManaCostsImpl<>("{R}"),
|
||||
SourceBlockedCondition.instance
|
||||
new ManaCostsImpl<>("{R}"), SourceBlockedCondition.instance
|
||||
));
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -15,7 +15,9 @@ import mage.abilities.effects.common.counter.RemoveCounterSourceEffect;
|
|||
import mage.abilities.keyword.FlyingAbility;
|
||||
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.counters.CounterType;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
|
|
@ -52,8 +54,7 @@ public final class ClockworkAvian extends CardImpl {
|
|||
|
||||
// {X}, {tap}: Put up to X +1/+0 counters on Clockwork Avian. This ability can't cause the total number of +1/+0 counters on Clockwork Avian to be greater than four. Activate this ability only during your upkeep.
|
||||
Ability ability = new ConditionalActivatedAbility(
|
||||
Zone.BATTLEFIELD, new ClockworkAvianEffect(),
|
||||
new ManaCostsImpl<>("{X}"), new IsStepCondition(PhaseStep.UPKEEP)
|
||||
new ClockworkAvianEffect(), new ManaCostsImpl<>("{X}"), IsStepCondition.getMyUpkeep()
|
||||
);
|
||||
ability.addCost(new TapSourceCost());
|
||||
this.addAbility(ability);
|
||||
|
|
|
|||
|
|
@ -15,7 +15,9 @@ import mage.abilities.effects.common.counter.AddCountersSourceEffect;
|
|||
import mage.abilities.effects.common.counter.RemoveCounterSourceEffect;
|
||||
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.counters.CounterType;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
|
|
@ -49,8 +51,7 @@ public final class ClockworkBeast extends CardImpl {
|
|||
|
||||
// {X}, {tap}: Put up to X +1/+0 counters on Clockwork Beast. This ability can't cause the total number of +1/+0 counters on Clockwork Beast to be greater than seven. Activate this ability only during your upkeep.
|
||||
Ability ability = new ConditionalActivatedAbility(
|
||||
Zone.BATTLEFIELD, new ClockworkBeastEffect(),
|
||||
new ManaCostsImpl<>("{X}"), new IsStepCondition(PhaseStep.UPKEEP)
|
||||
new ClockworkBeastEffect(), new ManaCostsImpl<>("{X}"), IsStepCondition.getMyUpkeep()
|
||||
);
|
||||
ability.addCost(new TapSourceCost());
|
||||
this.addAbility(ability);
|
||||
|
|
|
|||
|
|
@ -16,7 +16,10 @@ import mage.abilities.effects.common.counter.AddCountersSourceEffect;
|
|||
import mage.abilities.effects.common.counter.RemoveCounterSourceEffect;
|
||||
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.SubType;
|
||||
import mage.counters.CounterType;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.game.Game;
|
||||
|
|
@ -57,8 +60,7 @@ public final class ClockworkSteed extends CardImpl {
|
|||
|
||||
// {X}, {tap}: Put up to X +1/+0 counters on Clockwork Steed. This ability can't cause the total number of +1/+0 counters on Clockwork Steed to be greater than four. Activate this ability only during your upkeep.
|
||||
Ability ability = new ConditionalActivatedAbility(
|
||||
Zone.BATTLEFIELD, new ClockworkSteedEffect(),
|
||||
new ManaCostsImpl<>("{X}"), new IsStepCondition(PhaseStep.UPKEEP)
|
||||
new ClockworkSteedEffect(), new ManaCostsImpl<>("{X}"), IsStepCondition.getMyUpkeep()
|
||||
);
|
||||
ability.addCost(new TapSourceCost());
|
||||
this.addAbility(ability);
|
||||
|
|
|
|||
|
|
@ -16,7 +16,10 @@ import mage.abilities.effects.common.counter.AddCountersSourceEffect;
|
|||
import mage.abilities.effects.common.counter.RemoveCounterSourceEffect;
|
||||
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.SubType;
|
||||
import mage.counters.CounterType;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.game.Game;
|
||||
|
|
@ -61,8 +64,7 @@ public final class ClockworkSwarm extends CardImpl {
|
|||
|
||||
// {X}, {tap}: Put up to X +1/+0 counters on Clockwork Swarm. This ability can't cause the total number of +1/+0 counters on Clockwork Swarm to be greater than four. Activate this ability only during your upkeep.
|
||||
Ability ability = new ConditionalActivatedAbility(
|
||||
Zone.BATTLEFIELD, new ClockworkSwarmEffect(),
|
||||
new ManaCostsImpl<>("{X}"), new IsStepCondition(PhaseStep.UPKEEP)
|
||||
new ClockworkSwarmEffect(), new ManaCostsImpl<>("{X}"), IsStepCondition.getMyUpkeep()
|
||||
);
|
||||
ability.addCost(new TapSourceCost());
|
||||
this.addAbility(ability);
|
||||
|
|
|
|||
|
|
@ -1,25 +1,24 @@
|
|||
package mage.cards.c;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.dynamicvalue.common.CardTypesInGraveyardCount;
|
||||
import mage.abilities.triggers.BeginningOfUpkeepTriggeredAbility;
|
||||
import mage.abilities.condition.common.DeliriumCondition;
|
||||
import mage.abilities.costs.common.SacrificeSourceCost;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.decorator.ConditionalActivatedAbility;
|
||||
import mage.abilities.dynamicvalue.common.CardTypesInGraveyardCount;
|
||||
import mage.abilities.effects.common.MillCardsControllerEffect;
|
||||
import mage.abilities.effects.common.ReturnFromGraveyardToHandTargetEffect;
|
||||
import mage.abilities.triggers.BeginningOfUpkeepTriggeredAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.AbilityWord;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.target.common.TargetCardInYourGraveyard;
|
||||
import mage.target.targetpointer.EachTargetPointer;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author fireshoes
|
||||
*/
|
||||
|
|
@ -34,16 +33,13 @@ public final class CropSigil extends CardImpl {
|
|||
// <i>Delirium</i> — {2}{G}, Sacrifice Crop Sigil: Return up to one target creature card and up to one target land card from your graveyard to your hand.
|
||||
// Activate this ability only if there are four or more card types among cards in your graveyard.
|
||||
Ability ability = new ConditionalActivatedAbility(
|
||||
Zone.BATTLEFIELD,
|
||||
new ReturnFromGraveyardToHandTargetEffect().setTargetPointer(new EachTargetPointer()),
|
||||
new ManaCostsImpl<>("{2}{G}"),
|
||||
DeliriumCondition.instance);
|
||||
new ManaCostsImpl<>("{2}{G}"), DeliriumCondition.instance
|
||||
);
|
||||
ability.addCost(new SacrificeSourceCost());
|
||||
ability.addTarget(new TargetCardInYourGraveyard(0, 1, StaticFilters.FILTER_CARD_CREATURE));
|
||||
ability.addTarget(new TargetCardInYourGraveyard(0, 1, StaticFilters.FILTER_CARD_LAND));
|
||||
ability.setAbilityWord(AbilityWord.DELIRIUM);
|
||||
ability.addHint(CardTypesInGraveyardCount.YOU.getHint());
|
||||
this.addAbility(ability);
|
||||
this.addAbility(ability.setAbilityWord(AbilityWord.DELIRIUM).addHint(CardTypesInGraveyardCount.YOU.getHint()));
|
||||
}
|
||||
|
||||
private CropSigil(final CropSigil card) {
|
||||
|
|
|
|||
|
|
@ -1,8 +1,7 @@
|
|||
|
||||
package mage.cards.d;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.condition.Condition;
|
||||
import mage.abilities.condition.common.IsStepCondition;
|
||||
import mage.abilities.costs.common.TapSourceCost;
|
||||
import mage.abilities.decorator.ConditionalActivatedAbility;
|
||||
|
|
@ -11,35 +10,37 @@ import mage.abilities.mana.ColorlessManaAbility;
|
|||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.PhaseStep;
|
||||
import mage.constants.Zone;
|
||||
import mage.constants.SubType;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.permanent.AttackingPredicate;
|
||||
import mage.target.Target;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LevelX2
|
||||
*/
|
||||
public final class Desert extends CardImpl {
|
||||
|
||||
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("attacking creature");
|
||||
|
||||
static {
|
||||
filter.add(AttackingPredicate.instance);
|
||||
}
|
||||
|
||||
private static final Condition condition = new IsStepCondition(PhaseStep.END_COMBAT, false);
|
||||
|
||||
public Desert(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.LAND},"");
|
||||
super(ownerId, setInfo, new CardType[]{CardType.LAND}, "");
|
||||
this.subtype.add(SubType.DESERT);
|
||||
|
||||
// {tap}: Add {C}.
|
||||
this.addAbility(new ColorlessManaAbility());
|
||||
|
||||
// {tap}: Desert deals 1 damage to target attacking creature. Activate this ability only during the end of combat step.
|
||||
Ability ability = new ConditionalActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1), new TapSourceCost(), new IsStepCondition(PhaseStep.END_COMBAT, false));
|
||||
Target target = new TargetCreaturePermanent(filter);
|
||||
ability.addTarget(target);
|
||||
Ability ability = new ConditionalActivatedAbility(new DamageTargetEffect(1), new TapSourceCost(), condition);
|
||||
ability.addTarget(new TargetCreaturePermanent(filter));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -16,7 +16,6 @@ import mage.abilities.mana.ColorlessManaAbility;
|
|||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Zone;
|
||||
import mage.counters.CounterType;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
|
|
@ -27,7 +26,6 @@ import java.util.List;
|
|||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author notgreat
|
||||
*/
|
||||
public final class DiamondCity extends CardImpl {
|
||||
|
|
@ -46,11 +44,12 @@ public final class DiamondCity extends CardImpl {
|
|||
this.addAbility(new ColorlessManaAbility());
|
||||
|
||||
// {T}: Move a shield counter from Diamond City onto target creature. Activate only if two or more creatures entered the battlefield under your control this turn.
|
||||
Ability ability = new ConditionalActivatedAbility(Zone.BATTLEFIELD, new MoveCountersFromSourceToTargetEffect(CounterType.SHIELD),
|
||||
new TapSourceCost(), DiamondCityCondition.instance);
|
||||
Ability ability = new ConditionalActivatedAbility(
|
||||
new MoveCountersFromSourceToTargetEffect(CounterType.SHIELD),
|
||||
new TapSourceCost(), DiamondCityCondition.instance
|
||||
);
|
||||
ability.addTarget(new TargetCreaturePermanent());
|
||||
ability.addHint(DiamondCityCreaturesThatEnteredThisTurnCount.getHint());
|
||||
this.addAbility(ability, new PermanentsEnteredBattlefieldWatcher());
|
||||
this.addAbility(ability.addHint(DiamondCityCreaturesThatEnteredThisTurnCount.getHint()), new PermanentsEnteredBattlefieldWatcher());
|
||||
}
|
||||
|
||||
private DiamondCity(final DiamondCity card) {
|
||||
|
|
|
|||
|
|
@ -1,7 +1,5 @@
|
|||
|
||||
package mage.cards.d;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.condition.common.IsStepCondition;
|
||||
|
|
@ -13,30 +11,29 @@ import mage.cards.CardImpl;
|
|||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.PhaseStep;
|
||||
import mage.constants.Zone;
|
||||
import mage.counters.CounterType;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.filter.common.FilterControlledArtifactPermanent;
|
||||
import mage.target.common.TargetControlledPermanent;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LoneFox
|
||||
*/
|
||||
public final class DwarvenWeaponsmith extends CardImpl {
|
||||
|
||||
public DwarvenWeaponsmith(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R}");
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{R}");
|
||||
this.subtype.add(SubType.DWARF);
|
||||
this.subtype.add(SubType.ARTIFICER);
|
||||
this.power = new MageInt(1);
|
||||
this.toughness = new MageInt(1);
|
||||
|
||||
// {tap}, Sacrifice an artifact: Put a +1/+1 counter on target creature. Activate this ability only during your upkeep.
|
||||
Ability ability = new ConditionalActivatedAbility(Zone.BATTLEFIELD, new AddCountersTargetEffect(CounterType.P1P1.createInstance()),
|
||||
new TapSourceCost(), new IsStepCondition(PhaseStep.UPKEEP));
|
||||
Ability ability = new ConditionalActivatedAbility(
|
||||
new AddCountersTargetEffect(CounterType.P1P1.createInstance()),
|
||||
new TapSourceCost(), IsStepCondition.getMyUpkeep()
|
||||
);
|
||||
ability.addCost(new SacrificeTargetCost(StaticFilters.FILTER_PERMANENT_ARTIFACT));
|
||||
ability.addTarget(new TargetCreaturePermanent());
|
||||
this.addAbility(ability);
|
||||
|
|
|
|||
|
|
@ -1,8 +1,5 @@
|
|||
|
||||
package mage.cards.e;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.condition.common.HellbentCondition;
|
||||
|
|
@ -17,14 +14,14 @@ import mage.cards.CardImpl;
|
|||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SuperType;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.common.FilterPermanentCard;
|
||||
import mage.filter.predicate.Predicates;
|
||||
import mage.filter.predicate.mageobject.NamePredicate;
|
||||
import mage.filter.predicate.card.ExpansionSetPredicate;
|
||||
import mage.filter.predicate.mageobject.NamePredicate;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Ketsuban
|
||||
*/
|
||||
public final class EverythingamajigB extends CardImpl {
|
||||
|
|
@ -40,11 +37,13 @@ public final class EverythingamajigB extends CardImpl {
|
|||
}
|
||||
|
||||
public EverythingamajigB(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{5}");
|
||||
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{5}");
|
||||
|
||||
// Fool's Tome
|
||||
// 2, T: Draw a card. Activate this ability only if you have no cards in hand.
|
||||
Ability ability1 = new ConditionalActivatedAbility(Zone.BATTLEFIELD, new DrawCardSourceControllerEffect(1), new GenericManaCost(2), HellbentCondition.instance);
|
||||
Ability ability1 = new ConditionalActivatedAbility(
|
||||
new DrawCardSourceControllerEffect(1), new GenericManaCost(2), HellbentCondition.instance
|
||||
);
|
||||
ability1.addCost(new TapSourceCost());
|
||||
this.addAbility(ability1);
|
||||
|
||||
|
|
|
|||
|
|
@ -1,30 +1,29 @@
|
|||
|
||||
package mage.cards.f;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.condition.common.HellbentCondition;
|
||||
import mage.abilities.costs.common.TapSourceCost;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.costs.mana.GenericManaCost;
|
||||
import mage.abilities.decorator.ConditionalActivatedAbility;
|
||||
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Zone;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LoneFox
|
||||
*/
|
||||
public final class FoolsTome extends CardImpl {
|
||||
|
||||
public FoolsTome(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{4}");
|
||||
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{4}");
|
||||
|
||||
// {2}, {tap}: Draw a card. Activate this ability only if you have no cards in hand.
|
||||
Ability ability = new ConditionalActivatedAbility(Zone.BATTLEFIELD, new DrawCardSourceControllerEffect(1),
|
||||
new ManaCostsImpl<>("{2}"), HellbentCondition.instance);
|
||||
Ability ability = new ConditionalActivatedAbility(
|
||||
new DrawCardSourceControllerEffect(1), new GenericManaCost(2), HellbentCondition.instance
|
||||
);
|
||||
ability.addCost(new TapSourceCost());
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
package mage.cards.f;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.condition.common.SourceEnteredThisTurnCondition;
|
||||
|
|
@ -8,25 +7,21 @@ import mage.abilities.costs.common.SacrificeTargetCost;
|
|||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.decorator.ConditionalActivatedAbility;
|
||||
import mage.abilities.effects.common.counter.AddCountersSourceEffect;
|
||||
import mage.constants.SubType;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Zone;
|
||||
import mage.constants.SubType;
|
||||
import mage.counters.CounterType;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class FungusElemental extends CardImpl {
|
||||
|
||||
private static final FilterControlledPermanent filter = new FilterControlledPermanent("Forest");
|
||||
|
||||
static {
|
||||
filter.add(SubType.FOREST.getPredicate());
|
||||
}
|
||||
private static final FilterControlledPermanent filter = new FilterControlledPermanent(SubType.FOREST, "Forest");
|
||||
|
||||
public FungusElemental(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{G}");
|
||||
|
|
@ -38,10 +33,8 @@ public final class FungusElemental extends CardImpl {
|
|||
|
||||
// {G}, Sacrifice a Forest: Put a +2/+2 counter on Fungus Elemental. Activate this ability only if Fungus Elemental entered the battlefield this turn.
|
||||
Ability ability = new ConditionalActivatedAbility(
|
||||
Zone.BATTLEFIELD,
|
||||
new AddCountersSourceEffect(CounterType.P2P2.createInstance()),
|
||||
new ManaCostsImpl<>("{G}"),
|
||||
SourceEnteredThisTurnCondition.DID
|
||||
new ManaCostsImpl<>("{G}"), SourceEnteredThisTurnCondition.DID
|
||||
);
|
||||
ability.addCost(new SacrificeTargetCost(filter));
|
||||
this.addAbility(ability);
|
||||
|
|
|
|||
|
|
@ -1,14 +1,13 @@
|
|||
package mage.cards.g;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.DiesCreatureTriggeredAbility;
|
||||
import mage.abilities.condition.Condition;
|
||||
import mage.abilities.condition.common.CardsInControllerGraveyardCondition;
|
||||
import mage.abilities.costs.common.SacrificeSourceCost;
|
||||
import mage.abilities.costs.common.TapSourceCost;
|
||||
import mage.abilities.costs.mana.GenericManaCost;
|
||||
import mage.abilities.decorator.ConditionalActivatedAbility;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.DrawDiscardControllerEffect;
|
||||
import mage.abilities.effects.common.GainLifeEffect;
|
||||
|
|
@ -17,38 +16,40 @@ import mage.cards.CardImpl;
|
|||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.TargetController;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.FilterCard;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.mageobject.NamePredicate;
|
||||
import mage.filter.predicate.permanent.TokenPredicate;
|
||||
import mage.game.Game;
|
||||
import mage.players.Player;
|
||||
import mage.target.common.TargetCardInHand;
|
||||
import mage.target.common.TargetCardInLibrary;
|
||||
import mage.target.common.TargetCardInYourGraveyard;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author LevelX2
|
||||
*/
|
||||
public final class GateToTheAfterlife extends CardImpl {
|
||||
|
||||
private static final Condition condition = new CardsInControllerGraveyardCondition(6, StaticFilters.FILTER_CARD_CREATURES);
|
||||
|
||||
public GateToTheAfterlife(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{3}");
|
||||
|
||||
// Whenever a nontoken creature you control dies, you gain 1 life. Then you may draw a card. If you do, discard a card.
|
||||
Ability ability = new DiesCreatureTriggeredAbility(new GainLifeEffect(1), false, StaticFilters.FILTER_CONTROLLED_CREATURE_NON_TOKEN, false);
|
||||
Effect effect = new DrawDiscardControllerEffect(1, 1, true);
|
||||
effect.setText("Then you may draw a card. If you do, discard a card");
|
||||
ability.addEffect(effect);
|
||||
Ability ability = new DiesCreatureTriggeredAbility(
|
||||
new GainLifeEffect(1), false,
|
||||
StaticFilters.FILTER_CONTROLLED_CREATURE_NON_TOKEN, false
|
||||
);
|
||||
ability.addEffect(new DrawDiscardControllerEffect(1, 1, true)
|
||||
.setText("Then you may draw a card. If you do, discard a card"));
|
||||
this.addAbility(ability);
|
||||
|
||||
// {2}, {T}, Sacrifice Gate to the Afterlife: Search your graveyard, hand, and/or library for a card named God-Pharaoh's Gift and put it onto the battlefield. If you seearch your library this way, shuffle it. Activate this ability only if there are six or more creature cards in your graveyard.
|
||||
ability = new ConditionalActivatedAbility(
|
||||
Zone.BATTLEFIELD, new GateToTheAfterlifeEffect(), new GenericManaCost(2),
|
||||
new CardsInControllerGraveyardCondition(6, StaticFilters.FILTER_CARD_CREATURES)
|
||||
new GateToTheAfterlifeEffect(), new GenericManaCost(2), condition
|
||||
);
|
||||
ability.addCost(new TapSourceCost());
|
||||
ability.addCost(new SacrificeSourceCost());
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
|
||||
package mage.cards.g;
|
||||
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.condition.Condition;
|
||||
import mage.abilities.condition.common.IsStepCondition;
|
||||
import mage.abilities.costs.common.TapSourceCost;
|
||||
import mage.abilities.decorator.ConditionalActivatedAbility;
|
||||
|
|
@ -22,11 +22,12 @@ import java.util.Set;
|
|||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author L_J
|
||||
*/
|
||||
public final class GeneralJarkeld extends CardImpl {
|
||||
|
||||
private static final Condition condition = new IsStepCondition(PhaseStep.DECLARE_BLOCKERS, false);
|
||||
|
||||
public GeneralJarkeld(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{W}");
|
||||
this.supertype.add(SuperType.LEGENDARY);
|
||||
|
|
@ -36,7 +37,9 @@ public final class GeneralJarkeld extends CardImpl {
|
|||
this.toughness = new MageInt(2);
|
||||
|
||||
// {T}: Switch the blocking creatures of two target attacking creatures. Activate this ability only during the declare blockers step.
|
||||
Ability ability = new ConditionalActivatedAbility(Zone.BATTLEFIELD, new GeneralJarkeldSwitchBlockersEffect(), new TapSourceCost(), new IsStepCondition(PhaseStep.DECLARE_BLOCKERS, false));
|
||||
Ability ability = new ConditionalActivatedAbility(
|
||||
new GeneralJarkeldSwitchBlockersEffect(), new TapSourceCost(), condition
|
||||
);
|
||||
ability.addTarget(new TargetAttackingCreature(2));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -42,8 +42,7 @@ public final class GlintHornBuccaneer extends CardImpl {
|
|||
|
||||
// {1}{R}, Discard a card: Draw a card. Activate this ability only if Glint-Horn Buccaneer is attacking.
|
||||
Ability ability = new ConditionalActivatedAbility(
|
||||
Zone.BATTLEFIELD, new DrawCardSourceControllerEffect(1),
|
||||
new ManaCostsImpl<>("{1}{R}"), SourceAttackingCondition.instance
|
||||
new DrawCardSourceControllerEffect(1), new ManaCostsImpl<>("{1}{R}"), SourceAttackingCondition.instance
|
||||
);
|
||||
ability.addCost(new DiscardCardCost());
|
||||
this.addAbility(ability);
|
||||
|
|
|
|||
|
|
@ -12,7 +12,6 @@ import mage.cards.CardSetInfo;
|
|||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.predicate.mageobject.AbilityPredicate;
|
||||
|
|
@ -41,9 +40,10 @@ public final class GoblinBirdGrabber extends CardImpl {
|
|||
this.toughness = new MageInt(1);
|
||||
|
||||
// {R}: Goblin Bird-Grabber gains flying until end of turn. Activate this ability only if you control a creature with flying.
|
||||
this.addAbility(new ConditionalActivatedAbility(Zone.BATTLEFIELD, new GainAbilitySourceEffect(
|
||||
FlyingAbility.getInstance(), Duration.EndOfTurn
|
||||
), new ManaCostsImpl<>("{R}"), condition));
|
||||
this.addAbility(new ConditionalActivatedAbility(
|
||||
new GainAbilitySourceEffect(FlyingAbility.getInstance(), Duration.EndOfTurn),
|
||||
new ManaCostsImpl<>("{R}"), condition
|
||||
));
|
||||
}
|
||||
|
||||
private GoblinBirdGrabber(final GoblinBirdGrabber card) {
|
||||
|
|
|
|||
|
|
@ -13,7 +13,10 @@ import mage.abilities.hint.Hint;
|
|||
import mage.abilities.keyword.HasteAbility;
|
||||
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;
|
||||
|
|
@ -29,7 +32,7 @@ import java.util.UUID;
|
|||
public final class GoroGoroDiscipleOfRyusei extends CardImpl {
|
||||
|
||||
private static final FilterPermanent filter
|
||||
= new FilterControlledCreaturePermanent("if you control an attacking modified creature");
|
||||
= new FilterControlledCreaturePermanent("you control an attacking modified creature");
|
||||
|
||||
static {
|
||||
filter.add(AttackingPredicate.instance);
|
||||
|
|
@ -37,9 +40,7 @@ public final class GoroGoroDiscipleOfRyusei extends CardImpl {
|
|||
}
|
||||
|
||||
private static final Condition condition = new PermanentsOnTheBattlefieldCondition(filter);
|
||||
private static final Hint hint = new ConditionHint(
|
||||
condition, "You control and attacking modified creature"
|
||||
);
|
||||
private static final Hint hint = new ConditionHint(condition);
|
||||
|
||||
public GoroGoroDiscipleOfRyusei(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{R}");
|
||||
|
|
@ -58,7 +59,7 @@ public final class GoroGoroDiscipleOfRyusei extends CardImpl {
|
|||
|
||||
// {3}{R}{R}: Create a 5/5 red Dragon Spirit creature token with flying. Activate only if you control an attacking modified creature.
|
||||
this.addAbility(new ConditionalActivatedAbility(
|
||||
Zone.BATTLEFIELD, new CreateTokenEffect(new DragonSpiritToken()),
|
||||
new CreateTokenEffect(new DragonSpiritToken()),
|
||||
new ManaCostsImpl<>("{3}{R}{R}"), condition
|
||||
).addHint(hint));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -54,10 +54,7 @@ public final class HakimLoreweaver extends CardImpl {
|
|||
|
||||
// {U}{U}: Return target Aura card from your graveyard to the battlefield attached to Hakim, Loreweaver. Activate this ability only during your upkeep and only if Hakim isn't enchanted.
|
||||
Ability ability = new ConditionalActivatedAbility(
|
||||
Zone.BATTLEFIELD,
|
||||
new HakimLoreweaverEffect(),
|
||||
new ManaCostsImpl<>("{U}{U}"),
|
||||
HakimLoreweaverCondition.instance
|
||||
new HakimLoreweaverEffect(), new ManaCostsImpl<>("{U}{U}"), HakimLoreweaverCondition.instance
|
||||
);
|
||||
ability.addTarget(new TargetCardInYourGraveyard(filter));
|
||||
this.addAbility(ability);
|
||||
|
|
|
|||
|
|
@ -13,7 +13,6 @@ import mage.cards.CardImpl;
|
|||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.TimingRule;
|
||||
import mage.constants.Zone;
|
||||
import mage.counters.CounterType;
|
||||
import mage.game.Game;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
|
@ -40,7 +39,7 @@ public final class HallOfOracles extends CardImpl {
|
|||
|
||||
// {T}: Put a +1/+1 counter on target creature. Activate only as a sorcery and only if you've cast an instant or sorcery spell this turn.
|
||||
ability = new ConditionalActivatedAbility(
|
||||
Zone.BATTLEFIELD, new AddCountersTargetEffect(CounterType.P1P1.createInstance()),
|
||||
new AddCountersTargetEffect(CounterType.P1P1.createInstance()),
|
||||
new TapSourceCost(), HallOfOraclesCondition.instance
|
||||
).setTiming(TimingRule.SORCERY);
|
||||
ability.addTarget(new TargetCreaturePermanent());
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
package mage.cards.h;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.DelayedTriggeredAbility;
|
||||
import mage.abilities.condition.Condition;
|
||||
import mage.abilities.condition.common.IsPhaseCondition;
|
||||
import mage.abilities.costs.common.TapSourceCost;
|
||||
import mage.abilities.decorator.ConditionalActivatedAbility;
|
||||
|
|
@ -11,18 +11,19 @@ import mage.abilities.effects.common.CreateDelayedTriggeredAbilityEffect;
|
|||
import mage.abilities.effects.common.SacrificeSourceEffect;
|
||||
import mage.abilities.effects.common.continuous.BoostTargetEffect;
|
||||
import mage.abilities.effects.common.continuous.GainAbilityTargetEffect;
|
||||
import mage.constants.*;
|
||||
import mage.abilities.keyword.FirstStrikeAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.*;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.game.events.ZoneChangeEvent;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author noahg
|
||||
*/
|
||||
public final class HeartWolf extends CardImpl {
|
||||
|
|
@ -33,6 +34,8 @@ public final class HeartWolf extends CardImpl {
|
|||
filter.add(SubType.DWARF.getPredicate());
|
||||
}
|
||||
|
||||
private static final Condition condition = new IsPhaseCondition(TurnPhase.COMBAT);
|
||||
|
||||
public HeartWolf(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{R}");
|
||||
|
||||
|
|
@ -44,8 +47,11 @@ public final class HeartWolf extends CardImpl {
|
|||
this.addAbility(FirstStrikeAbility.getInstance());
|
||||
|
||||
// {tap}: Target Dwarf creature gets +2/+0 and gains first strike until end of turn. When that creature leaves the battlefield this turn, sacrifice Heart Wolf. Activate this ability only during combat.
|
||||
Ability ability = new ConditionalActivatedAbility(Zone.BATTLEFIELD, new BoostTargetEffect(2, 0, Duration.EndOfTurn)
|
||||
.setText("Target Dwarf creature gets +2/+0"), new TapSourceCost(), new IsPhaseCondition(TurnPhase.COMBAT));
|
||||
Ability ability = new ConditionalActivatedAbility(
|
||||
new BoostTargetEffect(2, 0, Duration.EndOfTurn)
|
||||
.setText("Target Dwarf creature gets +2/+0"),
|
||||
new TapSourceCost(), condition
|
||||
);
|
||||
ability.addEffect(new GainAbilityTargetEffect(FirstStrikeAbility.getInstance(),
|
||||
Duration.EndOfTurn).setText("and gains first strike until end of turn"));
|
||||
ability.addTarget(new TargetCreaturePermanent(filter));
|
||||
|
|
|
|||
|
|
@ -1,7 +1,5 @@
|
|||
|
||||
package mage.cards.h;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.condition.common.IsStepCondition;
|
||||
|
|
@ -12,14 +10,13 @@ import mage.abilities.effects.common.ReturnFromGraveyardToBattlefieldTargetEffec
|
|||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.PhaseStep;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.target.common.TargetCardInYourGraveyard;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author fireshoes
|
||||
*/
|
||||
public final class HellsCaretaker extends CardImpl {
|
||||
|
|
@ -31,10 +28,10 @@ public final class HellsCaretaker extends CardImpl {
|
|||
this.toughness = new MageInt(1);
|
||||
|
||||
// {tap}, Sacrifice a creature: Return target creature card from your graveyard to the battlefield. Activate this ability only during your upkeep.
|
||||
Ability ability = new ConditionalActivatedAbility(Zone.BATTLEFIELD,
|
||||
Ability ability = new ConditionalActivatedAbility(
|
||||
new ReturnFromGraveyardToBattlefieldTargetEffect(),
|
||||
new TapSourceCost(),
|
||||
new IsStepCondition(PhaseStep.UPKEEP));
|
||||
new TapSourceCost(), IsStepCondition.getMyUpkeep()
|
||||
);
|
||||
ability.addCost(new SacrificeTargetCost(StaticFilters.FILTER_PERMANENT_CREATURE));
|
||||
ability.addTarget(new TargetCardInYourGraveyard(StaticFilters.FILTER_CARD_CREATURE_YOUR_GRAVEYARD));
|
||||
this.addAbility(ability);
|
||||
|
|
|
|||
|
|
@ -1,55 +1,52 @@
|
|||
|
||||
package mage.cards.i;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.triggers.BeginningOfUpkeepTriggeredAbility;
|
||||
import mage.abilities.common.EntersBattlefieldAbility;
|
||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||
import mage.abilities.condition.common.IsStepCondition;
|
||||
import mage.abilities.costs.common.SacrificeSourceCost;
|
||||
import mage.abilities.decorator.ConditionalActivatedAbility;
|
||||
import mage.abilities.dynamicvalue.common.CountersSourceCount;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.common.DamageControllerEffect;
|
||||
import mage.abilities.effects.common.GainLifeEffect;
|
||||
import mage.abilities.effects.common.counter.AddCountersSourceEffect;
|
||||
import mage.abilities.triggers.BeginningOfUpkeepTriggeredAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.PhaseStep;
|
||||
import mage.constants.Zone;
|
||||
import mage.counters.CounterType;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author fireshoes
|
||||
*/
|
||||
public final class IcatianMoneychanger extends CardImpl {
|
||||
|
||||
public IcatianMoneychanger(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{W}");
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{W}");
|
||||
this.subtype.add(SubType.HUMAN);
|
||||
this.power = new MageInt(0);
|
||||
this.toughness = new MageInt(2);
|
||||
|
||||
// Icatian Moneychanger enters the battlefield with three credit counters on it.
|
||||
Effect effect = new AddCountersSourceEffect(CounterType.CREDIT.createInstance(3));
|
||||
effect.setText("with three credit counters on it");
|
||||
this.addAbility(new EntersBattlefieldAbility(effect));
|
||||
this.addAbility(new EntersBattlefieldAbility(
|
||||
new AddCountersSourceEffect(CounterType.CREDIT.createInstance(3))
|
||||
.setText("with three credit counters on it")
|
||||
));
|
||||
|
||||
// When Icatian Moneychanger enters the battlefield, it deals 3 damage to you.
|
||||
effect = new DamageControllerEffect(3);
|
||||
effect.setText("it deals 3 damage to you");
|
||||
this.addAbility(new EntersBattlefieldTriggeredAbility(effect, false));
|
||||
this.addAbility(new EntersBattlefieldTriggeredAbility(new DamageControllerEffect(3, "it")));
|
||||
|
||||
// At the beginning of your upkeep, put a credit counter on Icatian Moneychanger.
|
||||
this.addAbility(new BeginningOfUpkeepTriggeredAbility(new AddCountersSourceEffect(CounterType.CREDIT.createInstance())));
|
||||
|
||||
// Sacrifice Icatian Moneychanger: You gain 1 life for each credit counter on Icatian Moneychanger. Activate this ability only during your upkeep.
|
||||
this.addAbility(new ConditionalActivatedAbility(Zone.BATTLEFIELD,
|
||||
new GainLifeEffect(new CountersSourceCount(CounterType.CREDIT)), new SacrificeSourceCost(), new IsStepCondition(PhaseStep.UPKEEP)));
|
||||
this.addAbility(new ConditionalActivatedAbility(
|
||||
new GainLifeEffect(new CountersSourceCount(CounterType.CREDIT)),
|
||||
new SacrificeSourceCost(), IsStepCondition.getMyUpkeep()
|
||||
));
|
||||
}
|
||||
|
||||
private IcatianMoneychanger(final IcatianMoneychanger card) {
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ public final class IceCauldron extends CardImpl {
|
|||
|
||||
// {X}, {T}: Put a charge counter on Ice Cauldron and exile a nonland card from your hand. You may cast that card for as long as it remains exiled. Note the type and amount of mana spent to pay this activation cost. Activate this ability only if there are no charge counters on Ice Cauldron.
|
||||
Ability ability = new ConditionalActivatedAbility(
|
||||
Zone.BATTLEFIELD, new IceCauldronExileEffect(), new ManaCostsImpl<>("{X}"), condition
|
||||
new IceCauldronExileEffect(), new ManaCostsImpl<>("{X}"), condition
|
||||
);
|
||||
ability.addEffect(new AddCountersSourceEffect(CounterType.CHARGE.createInstance(), true));
|
||||
ability.addEffect(new IceCauldronNoteManaEffect());
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
package mage.cards.i;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.condition.Condition;
|
||||
import mage.abilities.costs.common.TapSourceCost;
|
||||
|
|
@ -19,8 +18,9 @@ import mage.filter.StaticFilters;
|
|||
import mage.game.Game;
|
||||
import mage.players.Player;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class IsolatedWatchtower extends CardImpl {
|
||||
|
|
@ -33,10 +33,7 @@ public final class IsolatedWatchtower extends CardImpl {
|
|||
|
||||
// {2}, {T}: Scry 1, then you may reveal the top card of your library. If a basic land card is revealed this way, put it onto the battlefield tapped. Activate this ability only if an opponent controls at least two more lands than you.
|
||||
Ability ability = new ConditionalActivatedAbility(
|
||||
Zone.BATTLEFIELD,
|
||||
new IsolatedWatchtowerEffect(),
|
||||
new GenericManaCost(2),
|
||||
new IsolatedWatchtowerCondition()
|
||||
new IsolatedWatchtowerEffect(), new GenericManaCost(2), IsolatedWatchtowerCondition.instance
|
||||
);
|
||||
ability.addCost(new TapSourceCost());
|
||||
this.addAbility(ability);
|
||||
|
|
@ -94,7 +91,8 @@ class IsolatedWatchtowerEffect extends OneShotEffect {
|
|||
}
|
||||
}
|
||||
|
||||
class IsolatedWatchtowerCondition implements Condition {
|
||||
enum IsolatedWatchtowerCondition implements Condition {
|
||||
instance;
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
|
|
|
|||
|
|
@ -11,7 +11,6 @@ import mage.cards.CardImpl;
|
|||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.FilterOpponent;
|
||||
import mage.filter.predicate.ObjectSourcePlayer;
|
||||
import mage.filter.predicate.ObjectSourcePlayerPredicate;
|
||||
|
|
@ -38,8 +37,9 @@ public class KeeperOfTheMind extends CardImpl {
|
|||
|
||||
// {U}, {tap}: Choose target opponent who had at least two more cards in hand than you did as you activated this ability. Draw a card.
|
||||
Ability ability = new ConditionalActivatedAbility(
|
||||
Zone.BATTLEFIELD, new DrawCardSourceControllerEffect(1)
|
||||
.setText("choose target opponent who has at least two more cards in hand than you do as you activate this ability. Draw a card"),
|
||||
new DrawCardSourceControllerEffect(1)
|
||||
.setText("choose target opponent who has at least two more cards " +
|
||||
"in hand than you do as you activate this ability. Draw a card"),
|
||||
new ManaCostsImpl<>("{U}"), KeeperOfTheMindCondition.instance
|
||||
).hideCondition();
|
||||
ability.addCost(new TapSourceCost());
|
||||
|
|
|
|||
|
|
@ -12,7 +12,6 @@ import mage.cards.CardImpl;
|
|||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.AbilityWord;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Zone;
|
||||
import mage.target.common.TargetAnyTarget;
|
||||
|
||||
import java.util.UUID;
|
||||
|
|
@ -27,12 +26,13 @@ public final class KeldonMegaliths extends CardImpl {
|
|||
|
||||
// Keldon Megaliths enters the battlefield tapped.
|
||||
this.addAbility(new EntersBattlefieldTappedAbility());
|
||||
|
||||
// {tap}: Add {R}.
|
||||
this.addAbility(new RedManaAbility());
|
||||
|
||||
// Hellbent - {1}{R}, {tap}: Keldon Megaliths deals 1 damage to any target. Activate this ability only if you have no cards in hand.
|
||||
Ability ability = new ConditionalActivatedAbility(
|
||||
Zone.BATTLEFIELD, new DamageTargetEffect(1),
|
||||
new ManaCostsImpl<>("{1}{R}"), HellbentCondition.instance
|
||||
new DamageTargetEffect(1), new ManaCostsImpl<>("{1}{R}"), HellbentCondition.instance
|
||||
);
|
||||
ability.setAbilityWord(AbilityWord.HELLBENT);
|
||||
ability.addCost(new TapSourceCost());
|
||||
|
|
|
|||
|
|
@ -1,7 +1,5 @@
|
|||
|
||||
package mage.cards.k;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.condition.common.MoreCardsInHandThanOpponentsCondition;
|
||||
|
|
@ -11,19 +9,19 @@ import mage.abilities.effects.common.PreventDamageToTargetEffect;
|
|||
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.target.common.TargetCreaturePermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LevelX2
|
||||
*/
|
||||
public final class KitsuneBonesetter extends CardImpl {
|
||||
|
||||
public KitsuneBonesetter(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{W}");
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{W}");
|
||||
this.subtype.add(SubType.FOX);
|
||||
this.subtype.add(SubType.CLERIC);
|
||||
this.power = new MageInt(0);
|
||||
|
|
@ -32,9 +30,7 @@ public final class KitsuneBonesetter extends CardImpl {
|
|||
|
||||
// {tap}: Prevent the next 3 damage that would be dealt to target creature this turn. Activate this ability only if you have more cards in hand than each opponent.
|
||||
Ability ability = new ConditionalActivatedAbility(
|
||||
Zone.BATTLEFIELD,
|
||||
new PreventDamageToTargetEffect(Duration.EndOfTurn, 3),
|
||||
new TapSourceCost(),
|
||||
new PreventDamageToTargetEffect(Duration.EndOfTurn, 3), new TapSourceCost(),
|
||||
MoreCardsInHandThanOpponentsCondition.instance
|
||||
);
|
||||
ability.addTarget(new TargetCreaturePermanent());
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@ package mage.cards.k;
|
|||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.DelayedTriggeredAbility;
|
||||
import mage.abilities.condition.Condition;
|
||||
import mage.abilities.condition.common.IsPhaseCondition;
|
||||
import mage.abilities.costs.common.TapSourceCost;
|
||||
import mage.abilities.decorator.ConditionalActivatedAbility;
|
||||
|
|
@ -24,6 +25,8 @@ import java.util.UUID;
|
|||
*/
|
||||
public final class KjeldoranEliteGuard extends CardImpl {
|
||||
|
||||
private static final Condition condition = new IsPhaseCondition(TurnPhase.COMBAT, false);
|
||||
|
||||
public KjeldoranEliteGuard(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{W}");
|
||||
this.subtype.add(SubType.HUMAN);
|
||||
|
|
@ -35,12 +38,9 @@ public final class KjeldoranEliteGuard extends CardImpl {
|
|||
// When that creature leaves the battlefield this turn, sacrifice Kjeldoran Elite Guard.
|
||||
// Activate only during combat.
|
||||
Ability ability = new ConditionalActivatedAbility(
|
||||
Zone.BATTLEFIELD,
|
||||
new KjeldoranEliteGuardEffect(),
|
||||
new TapSourceCost(),
|
||||
new IsPhaseCondition(TurnPhase.COMBAT, false));
|
||||
new KjeldoranEliteGuardEffect(), new TapSourceCost(), condition
|
||||
);
|
||||
ability.addTarget(new TargetCreaturePermanent());
|
||||
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
package mage.cards.k;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.condition.CompoundCondition;
|
||||
import mage.abilities.condition.Condition;
|
||||
import mage.abilities.condition.common.AttackedThisStepCondition;
|
||||
import mage.abilities.condition.common.IsStepCondition;
|
||||
import mage.abilities.costs.common.TapSourceCost;
|
||||
|
|
@ -12,18 +12,24 @@ import mage.abilities.effects.common.DamageTargetEffect;
|
|||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.PhaseStep;
|
||||
import mage.constants.Zone;
|
||||
import mage.constants.SubType;
|
||||
import mage.target.common.TargetAttackingCreature;
|
||||
import mage.watchers.common.PlayerAttackedStepWatcher;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author L_J
|
||||
*/
|
||||
public final class KongmingsContraptions extends CardImpl {
|
||||
|
||||
private static final Condition condition = new CompoundCondition(
|
||||
"during the declare attackers step and only if you've been attacked this step",
|
||||
new IsStepCondition(PhaseStep.DECLARE_ATTACKERS, false),
|
||||
AttackedThisStepCondition.instance
|
||||
);
|
||||
|
||||
public KongmingsContraptions(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{W}");
|
||||
this.subtype.add(SubType.HUMAN);
|
||||
|
|
@ -32,10 +38,7 @@ public final class KongmingsContraptions extends CardImpl {
|
|||
this.toughness = new MageInt(4);
|
||||
|
||||
// {T}: Kongming's Contraptions deals 2 damage to target attacking creature. Activate this ability only during the declare attackers step and only if you've been attacked this step.
|
||||
Ability ability = new ConditionalActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(2), new TapSourceCost(),
|
||||
new CompoundCondition("during the declare attackers step and only if you've been attacked this step",
|
||||
new IsStepCondition(PhaseStep.DECLARE_ATTACKERS, false), AttackedThisStepCondition.instance)
|
||||
);
|
||||
Ability ability = new ConditionalActivatedAbility(new DamageTargetEffect(2), new TapSourceCost(), condition);
|
||||
ability.addTarget(new TargetAttackingCreature());
|
||||
this.addAbility(ability, new PlayerAttackedStepWatcher());
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,9 +1,7 @@
|
|||
package mage.cards.l;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.triggers.BeginningOfCombatTriggeredAbility;
|
||||
import mage.abilities.common.delayed.AtTheBeginOfNextEndStepDelayedTriggeredAbility;
|
||||
import mage.abilities.condition.Condition;
|
||||
import mage.abilities.costs.common.TapSourceCost;
|
||||
|
|
@ -11,9 +9,13 @@ import mage.abilities.decorator.ConditionalActivatedAbility;
|
|||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.SacrificeTargetEffect;
|
||||
import mage.abilities.effects.common.search.SearchLibraryPutInHandEffect;
|
||||
import mage.constants.*;
|
||||
import mage.abilities.triggers.BeginningOfCombatTriggeredAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.SuperType;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.game.permanent.token.Elemental21TrampleHasteToken;
|
||||
|
|
@ -22,8 +24,9 @@ import mage.target.common.TargetCardInLibrary;
|
|||
import mage.target.targetpointer.FixedTarget;
|
||||
import mage.watchers.common.CreaturesDiedWatcher;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author weirddan455
|
||||
*/
|
||||
public final class LagomosHandOfHatred extends CardImpl {
|
||||
|
|
@ -42,10 +45,8 @@ public final class LagomosHandOfHatred extends CardImpl {
|
|||
|
||||
// {T}: Search your library for a card, put it into your hand, then shuffle. Activate only if five or more creatures died this turn.
|
||||
this.addAbility(new ConditionalActivatedAbility(
|
||||
Zone.BATTLEFIELD,
|
||||
new SearchLibraryPutInHandEffect(new TargetCardInLibrary(), false),
|
||||
new TapSourceCost(),
|
||||
LagomosHandOfHatredCondition.instance
|
||||
new TapSourceCost(), LagomosHandOfHatredCondition.instance
|
||||
));
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@ package mage.cards.l;
|
|||
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.condition.Condition;
|
||||
import mage.abilities.condition.common.IsStepCondition;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.decorator.ConditionalActivatedAbility;
|
||||
|
|
@ -34,6 +35,8 @@ public final class LesserWerewolf extends CardImpl {
|
|||
filter.add(BlockingOrBlockedBySourcePredicate.EITHER);
|
||||
}
|
||||
|
||||
private static final Condition condition = new IsStepCondition(PhaseStep.DECLARE_BLOCKERS, false);
|
||||
|
||||
public LesserWerewolf(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{B}");
|
||||
this.subtype.add(SubType.WEREWOLF);
|
||||
|
|
@ -42,8 +45,7 @@ public final class LesserWerewolf extends CardImpl {
|
|||
|
||||
// {B}: If Lesser Werewolf’s power is 1 or more, it gets -1/-0 until end of turn and put a -0/-1 counter on target creature blocking or blocked by Lesser Werewolf. Activate this ability only during the declare blockers step.
|
||||
Ability ability = new ConditionalActivatedAbility(
|
||||
Zone.BATTLEFIELD, new LesserWerewolfEffect(), new ManaCostsImpl<>("{B}"),
|
||||
new IsStepCondition(PhaseStep.DECLARE_BLOCKERS, false)
|
||||
new LesserWerewolfEffect(), new ManaCostsImpl<>("{B}"), condition
|
||||
);
|
||||
ability.addTarget(new TargetPermanent(filter));
|
||||
this.addAbility(ability);
|
||||
|
|
|
|||
|
|
@ -1,25 +1,18 @@
|
|||
|
||||
package mage.cards.l;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.condition.common.IsStepCondition;
|
||||
import mage.abilities.costs.Cost;
|
||||
import mage.abilities.costs.common.SacrificeTargetCost;
|
||||
import mage.abilities.decorator.ConditionalActivatedAbility;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.dynamicvalue.common.SacrificeCostCreaturesToughness;
|
||||
import mage.abilities.effects.common.GainLifeEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.PhaseStep;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.game.Game;
|
||||
import mage.players.Player;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class LifeChisel extends CardImpl {
|
||||
|
|
@ -28,13 +21,12 @@ public final class LifeChisel extends CardImpl {
|
|||
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{4}");
|
||||
|
||||
// Sacrifice a creature: You gain life equal to the sacrificed creature's toughness. Activate this ability only during your upkeep.
|
||||
Ability ability = new ConditionalActivatedAbility(
|
||||
Zone.BATTLEFIELD,
|
||||
new LifeChiselEffect(),
|
||||
this.addAbility(new ConditionalActivatedAbility(
|
||||
new GainLifeEffect(SacrificeCostCreaturesToughness.instance)
|
||||
.setText("you gain life equal to the sacrificed creature's toughness"),
|
||||
new SacrificeTargetCost(StaticFilters.FILTER_PERMANENT_CREATURE),
|
||||
new IsStepCondition(PhaseStep.UPKEEP)
|
||||
);
|
||||
this.addAbility(ability);
|
||||
IsStepCondition.getMyUpkeep()
|
||||
));
|
||||
}
|
||||
|
||||
private LifeChisel(final LifeChisel card) {
|
||||
|
|
@ -46,37 +38,3 @@ public final class LifeChisel extends CardImpl {
|
|||
return new LifeChisel(this);
|
||||
}
|
||||
}
|
||||
|
||||
class LifeChiselEffect extends OneShotEffect {
|
||||
|
||||
LifeChiselEffect() {
|
||||
super(Outcome.GainLife);
|
||||
this.staticText = "You gain life equal to the sacrificed creature's toughness";
|
||||
}
|
||||
|
||||
private LifeChiselEffect(final LifeChiselEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public LifeChiselEffect copy() {
|
||||
return new LifeChiselEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player controller = game.getPlayer(source.getControllerId());
|
||||
if (controller != null) {
|
||||
for (Cost cost : source.getCosts()) {
|
||||
if (cost instanceof SacrificeTargetCost) {
|
||||
int amount = ((SacrificeTargetCost) cost).getPermanents().get(0).getToughness().getValue();
|
||||
if (amount > 0) {
|
||||
controller.gainLife(amount, game, source);
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,33 +1,29 @@
|
|||
|
||||
package mage.cards.l;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.condition.common.IsStepCondition;
|
||||
import mage.abilities.costs.common.SacrificeSourceCost;
|
||||
import mage.abilities.decorator.ConditionalActivatedAbility;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.common.continuous.BoostTargetEffect;
|
||||
import mage.abilities.effects.common.continuous.GainAbilityTargetEffect;
|
||||
import mage.abilities.keyword.TrampleAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.PhaseStep;
|
||||
import mage.constants.Zone;
|
||||
import mage.constants.SubType;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author North
|
||||
*/
|
||||
public final class LlanowarAugur extends CardImpl {
|
||||
|
||||
public LlanowarAugur(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.SHAMAN);
|
||||
|
||||
|
|
@ -36,15 +32,14 @@ public final class LlanowarAugur extends CardImpl {
|
|||
|
||||
// Sacrifice Llanowar Augur: Target creature gets +3/+3 and gains trample until end of turn.
|
||||
// Activate this ability only during your upkeep.
|
||||
Effect effect = new BoostTargetEffect(3, 3, Duration.EndOfTurn);
|
||||
effect.setText("Target creature gets +3/+3");
|
||||
Ability ability = new ConditionalActivatedAbility(Zone.BATTLEFIELD,
|
||||
effect,
|
||||
new SacrificeSourceCost(),
|
||||
new IsStepCondition(PhaseStep.UPKEEP)
|
||||
Ability ability = new ConditionalActivatedAbility(
|
||||
new BoostTargetEffect(3, 3).setText("Target creature gets +3/+3"),
|
||||
new SacrificeSourceCost(), IsStepCondition.getMyUpkeep()
|
||||
);
|
||||
effect = new GainAbilityTargetEffect(TrampleAbility.getInstance(), Duration.EndOfTurn, "and gains trample until end of turn");
|
||||
ability.addEffect(effect);
|
||||
ability.addEffect(new GainAbilityTargetEffect(
|
||||
TrampleAbility.getInstance(), Duration.EndOfTurn,
|
||||
"and gains trample until end of turn"
|
||||
));
|
||||
ability.addTarget(new TargetCreaturePermanent());
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,10 +1,9 @@
|
|||
|
||||
package mage.cards.m;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.ObjectColor;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.EntersBattlefieldTappedAbility;
|
||||
import mage.abilities.condition.Condition;
|
||||
import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition;
|
||||
import mage.abilities.costs.common.TapSourceCost;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
|
|
@ -14,26 +13,28 @@ import mage.abilities.mana.RedManaAbility;
|
|||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.ComparisonType;
|
||||
import mage.constants.Zone;
|
||||
import mage.constants.SubType;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.filter.predicate.mageobject.ColorPredicate;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author jeffwadsworth
|
||||
*/
|
||||
public final class MadblindMountain extends CardImpl {
|
||||
|
||||
private static final FilterControlledPermanent filter = new FilterControlledPermanent("if you control two or more red permanents");
|
||||
private static final FilterControlledPermanent filter = new FilterControlledPermanent("you control two or more red permanents");
|
||||
|
||||
static {
|
||||
filter.add(new ColorPredicate(ObjectColor.RED));
|
||||
}
|
||||
|
||||
private static final Condition condition = new PermanentsOnTheBattlefieldCondition(filter, ComparisonType.MORE_THAN, 1);
|
||||
|
||||
public MadblindMountain(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.LAND},"");
|
||||
super(ownerId, setInfo, new CardType[]{CardType.LAND}, "");
|
||||
this.subtype.add(SubType.MOUNTAIN);
|
||||
|
||||
// <i>({tap}: Add {R}.)</i>
|
||||
|
|
@ -43,13 +44,11 @@ public final class MadblindMountain extends CardImpl {
|
|||
this.addAbility(new EntersBattlefieldTappedAbility());
|
||||
|
||||
// {R}, {tap}: Shuffle your library. Activate this ability only if you control two or more red permanents.
|
||||
Ability ability = new ConditionalActivatedAbility(Zone.BATTLEFIELD,
|
||||
new ShuffleLibrarySourceEffect(),
|
||||
new ManaCostsImpl<>("{R}"),
|
||||
new PermanentsOnTheBattlefieldCondition(filter, ComparisonType.MORE_THAN, 1));
|
||||
Ability ability = new ConditionalActivatedAbility(
|
||||
new ShuffleLibrarySourceEffect(), new ManaCostsImpl<>("{R}"), condition
|
||||
);
|
||||
ability.addCost(new TapSourceCost());
|
||||
this.addAbility(ability);
|
||||
|
||||
}
|
||||
|
||||
private MadblindMountain(final MadblindMountain card) {
|
||||
|
|
|
|||
|
|
@ -1,7 +1,5 @@
|
|||
|
||||
package mage.cards.m;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.condition.common.IsStepCondition;
|
||||
|
|
@ -13,12 +11,11 @@ import mage.cards.CardImpl;
|
|||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.PhaseStep;
|
||||
import mage.constants.Zone;
|
||||
import mage.target.common.TargetOpponent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author fireshoes
|
||||
*/
|
||||
public final class MagusOfTheMirror extends CardImpl {
|
||||
|
|
@ -32,10 +29,8 @@ public final class MagusOfTheMirror extends CardImpl {
|
|||
|
||||
// {tap}, Sacrifice Magus of the Mirror: Exchange life totals with target opponent. Activate this ability only during your upkeep.
|
||||
Ability ability = new ConditionalActivatedAbility(
|
||||
Zone.BATTLEFIELD,
|
||||
new ExchangeLifeControllerTargetEffect(),
|
||||
new TapSourceCost(),
|
||||
new IsStepCondition(PhaseStep.UPKEEP)
|
||||
new TapSourceCost(), IsStepCondition.getMyUpkeep()
|
||||
);
|
||||
ability.addCost(new SacrificeSourceCost());
|
||||
ability.addTarget(new TargetOpponent());
|
||||
|
|
|
|||
|
|
@ -1,7 +1,5 @@
|
|||
|
||||
package mage.cards.m;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.condition.common.IsStepCondition;
|
||||
import mage.abilities.costs.common.SacrificeSourceCost;
|
||||
|
|
@ -11,12 +9,11 @@ import mage.abilities.effects.common.ExchangeLifeControllerTargetEffect;
|
|||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.PhaseStep;
|
||||
import mage.constants.Zone;
|
||||
import mage.target.common.TargetOpponent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Styxo
|
||||
*/
|
||||
public final class MirrorUniverse extends CardImpl {
|
||||
|
|
@ -26,10 +23,8 @@ public final class MirrorUniverse extends CardImpl {
|
|||
|
||||
// {tap}, Sacrifice Mirror Universe: Exchange life totals with target opponent. Activate this ability only during your upkeep.
|
||||
Ability ability = new ConditionalActivatedAbility(
|
||||
Zone.BATTLEFIELD,
|
||||
new ExchangeLifeControllerTargetEffect(),
|
||||
new TapSourceCost(),
|
||||
new IsStepCondition(PhaseStep.UPKEEP)
|
||||
new TapSourceCost(), IsStepCondition.getMyUpkeep()
|
||||
);
|
||||
ability.addCost(new SacrificeSourceCost());
|
||||
ability.addTarget(new TargetOpponent());
|
||||
|
|
|
|||
|
|
@ -1,10 +1,9 @@
|
|||
|
||||
package mage.cards.m;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.ObjectColor;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.EntersBattlefieldTappedAbility;
|
||||
import mage.abilities.condition.Condition;
|
||||
import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition;
|
||||
import mage.abilities.costs.common.TapSourceCost;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
|
|
@ -14,15 +13,15 @@ import mage.abilities.mana.BlueManaAbility;
|
|||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.ComparisonType;
|
||||
import mage.constants.Zone;
|
||||
import mage.constants.SubType;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.filter.predicate.mageobject.ColorPredicate;
|
||||
import mage.target.TargetPlayer;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author jeffwadsworth
|
||||
*/
|
||||
public final class MoonringIsland extends CardImpl {
|
||||
|
|
@ -33,8 +32,10 @@ public final class MoonringIsland extends CardImpl {
|
|||
filter.add(new ColorPredicate(ObjectColor.BLUE));
|
||||
}
|
||||
|
||||
private static final Condition condition = new PermanentsOnTheBattlefieldCondition(filter, ComparisonType.MORE_THAN, 1);
|
||||
|
||||
public MoonringIsland(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.LAND},"");
|
||||
super(ownerId, setInfo, new CardType[]{CardType.LAND}, "");
|
||||
this.subtype.add(SubType.ISLAND);
|
||||
|
||||
// <i>({tap}: Add {U}.)</i>
|
||||
|
|
@ -44,14 +45,12 @@ public final class MoonringIsland extends CardImpl {
|
|||
this.addAbility(new EntersBattlefieldTappedAbility());
|
||||
|
||||
// {U}, {tap}: Look at the top card of target player's library. Activate this ability only if you control two or more blue permanents.
|
||||
Ability ability = new ConditionalActivatedAbility(Zone.BATTLEFIELD,
|
||||
new LookLibraryTopCardTargetPlayerEffect(),
|
||||
new ManaCostsImpl<>("{U}"),
|
||||
new PermanentsOnTheBattlefieldCondition(filter, ComparisonType.MORE_THAN, 1));
|
||||
Ability ability = new ConditionalActivatedAbility(
|
||||
new LookLibraryTopCardTargetPlayerEffect(), new ManaCostsImpl<>("{U}"), condition
|
||||
);
|
||||
ability.addCost(new TapSourceCost());
|
||||
ability.addTarget(new TargetPlayer());
|
||||
this.addAbility(ability);
|
||||
|
||||
}
|
||||
|
||||
private MoonringIsland(final MoonringIsland card) {
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
|
||||
package mage.cards.n;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.AttacksAllTriggeredAbility;
|
||||
import mage.abilities.condition.Condition;
|
||||
import mage.abilities.condition.common.IsPhaseCondition;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.decorator.ConditionalActivatedAbility;
|
||||
|
|
@ -18,24 +18,20 @@ import mage.abilities.keyword.LifelinkAbility;
|
|||
import mage.abilities.keyword.TrampleAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.SetTargetPointer;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.SuperType;
|
||||
import mage.constants.TurnPhase;
|
||||
import mage.constants.Zone;
|
||||
import mage.constants.*;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.game.permanent.token.WarriorToken;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class NajeelaTheBladeBlossom extends CardImpl {
|
||||
|
||||
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent(SubType.WARRIOR, "Warrior");
|
||||
private static final Condition condition = new IsPhaseCondition(TurnPhase.COMBAT);
|
||||
|
||||
public NajeelaTheBladeBlossom(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{R}");
|
||||
|
|
@ -55,24 +51,19 @@ public final class NajeelaTheBladeBlossom extends CardImpl {
|
|||
|
||||
// {W}{U}{B}{R}{G}: Untap all attacking creatures. They gain trample, lifelink, and haste until end of turn. After this phase, there is an additional combat phase. Activate this ability only during combat.
|
||||
Ability ability = new ConditionalActivatedAbility(
|
||||
Zone.BATTLEFIELD,
|
||||
new UntapAllEffect(StaticFilters.FILTER_ATTACKING_CREATURES),
|
||||
new ManaCostsImpl<>("{W}{U}{B}{R}{G}"),
|
||||
new IsPhaseCondition(TurnPhase.COMBAT)
|
||||
new ManaCostsImpl<>("{W}{U}{B}{R}{G}"), condition
|
||||
);
|
||||
ability.addEffect(new GainAbilityAllEffect(
|
||||
TrampleAbility.getInstance(),
|
||||
Duration.EndOfTurn,
|
||||
TrampleAbility.getInstance(), Duration.EndOfTurn,
|
||||
StaticFilters.FILTER_ATTACKING_CREATURES
|
||||
).setText("They gain trample"));
|
||||
ability.addEffect(new GainAbilityAllEffect(
|
||||
LifelinkAbility.getInstance(),
|
||||
Duration.EndOfTurn,
|
||||
LifelinkAbility.getInstance(), Duration.EndOfTurn,
|
||||
StaticFilters.FILTER_ATTACKING_CREATURES
|
||||
).setText(", lifelink"));
|
||||
ability.addEffect(new GainAbilityAllEffect(
|
||||
HasteAbility.getInstance(),
|
||||
Duration.EndOfTurn,
|
||||
HasteAbility.getInstance(), Duration.EndOfTurn,
|
||||
StaticFilters.FILTER_ATTACKING_CREATURES
|
||||
).setText(", and haste until end of turn"));
|
||||
ability.addEffect(new AdditionalCombatPhaseEffect());
|
||||
|
|
|
|||
|
|
@ -15,7 +15,6 @@ import mage.cards.CardImpl;
|
|||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.AbilityWord;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Zone;
|
||||
import mage.target.common.TargetOpponent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
|
@ -40,14 +39,11 @@ public final class NihilisticGlee extends CardImpl {
|
|||
|
||||
// Hellbent - {1}, Pay 2 life: Draw a card. Activate this ability only if you have no cards in hand.
|
||||
ability = new ConditionalActivatedAbility(
|
||||
Zone.BATTLEFIELD,
|
||||
new DrawCardSourceControllerEffect(1),
|
||||
new GenericManaCost(1),
|
||||
HellbentCondition.instance
|
||||
new GenericManaCost(1), HellbentCondition.instance
|
||||
);
|
||||
ability.addCost(new PayLifeCost(2));
|
||||
ability.setAbilityWord(AbilityWord.HELLBENT);
|
||||
this.addAbility(ability);
|
||||
this.addAbility(ability.setAbilityWord(AbilityWord.HELLBENT));
|
||||
}
|
||||
|
||||
private NihilisticGlee(final NihilisticGlee card) {
|
||||
|
|
|
|||
|
|
@ -13,7 +13,6 @@ import mage.abilities.mana.ColorlessManaAbility;
|
|||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Zone;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
|
|
@ -32,14 +31,12 @@ public final class OrazcaRelic extends CardImpl {
|
|||
this.addAbility(new ColorlessManaAbility());
|
||||
|
||||
// {T}, Sacrifice Orazca Relic: You gain 3 life and draw a card. Activate this ability only if you have the city's blessing.
|
||||
Ability ability = new ConditionalActivatedAbility(Zone.BATTLEFIELD,
|
||||
new GainLifeEffect(3),
|
||||
new TapSourceCost(),
|
||||
CitysBlessingCondition.instance);
|
||||
Ability ability = new ConditionalActivatedAbility(
|
||||
new GainLifeEffect(3), new TapSourceCost(), CitysBlessingCondition.instance
|
||||
);
|
||||
ability.addCost(new SacrificeSourceCost());
|
||||
ability.addEffect(new DrawCardSourceControllerEffect(1).concatBy("and"));
|
||||
ability.addHint(CitysBlessingHint.instance);
|
||||
this.addAbility(ability);
|
||||
this.addAbility(ability.addHint(CitysBlessingHint.instance));
|
||||
}
|
||||
|
||||
private OrazcaRelic(final OrazcaRelic card) {
|
||||
|
|
|
|||
|
|
@ -1,7 +1,5 @@
|
|||
|
||||
package mage.cards.r;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.condition.common.HellbentCondition;
|
||||
|
|
@ -14,13 +12,12 @@ import mage.cards.CardSetInfo;
|
|||
import mage.constants.AbilityWord;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.filter.predicate.Predicates;
|
||||
import mage.target.common.TargetControlledPermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author djbrez
|
||||
*/
|
||||
public final class Ragamuffyn extends CardImpl {
|
||||
|
|
@ -32,17 +29,18 @@ public final class Ragamuffyn extends CardImpl {
|
|||
}
|
||||
|
||||
public Ragamuffyn(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);
|
||||
this.subtype.add(SubType.CLERIC);
|
||||
this.power = new MageInt(2);
|
||||
this.toughness = new MageInt(2);
|
||||
|
||||
// Hellbent - {tap}, Sacrifice a creature or land: Draw a card. Activate this ability only if you have no cards in hand.
|
||||
Ability ability = new ConditionalActivatedAbility(Zone.BATTLEFIELD,new DrawCardSourceControllerEffect(1),new TapSourceCost(), HellbentCondition.instance);
|
||||
ability.setAbilityWord(AbilityWord.HELLBENT);
|
||||
Ability ability = new ConditionalActivatedAbility(
|
||||
new DrawCardSourceControllerEffect(1), new TapSourceCost(), HellbentCondition.instance
|
||||
);
|
||||
ability.addCost(new SacrificeTargetCost(filter));
|
||||
this.addAbility(ability);
|
||||
this.addAbility(ability.setAbilityWord(AbilityWord.HELLBENT));
|
||||
}
|
||||
|
||||
private Ragamuffyn(final Ragamuffyn card) {
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
package mage.cards.r;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.EntersBattlefieldAbility;
|
||||
|
|
@ -10,16 +9,16 @@ import mage.abilities.decorator.ConditionalActivatedAbility;
|
|||
import mage.abilities.effects.common.DamageTargetEffect;
|
||||
import mage.abilities.effects.common.counter.AddCountersSourceEffect;
|
||||
import mage.abilities.keyword.SpaceflightAbility;
|
||||
import mage.constants.SubType;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Zone;
|
||||
import mage.constants.SubType;
|
||||
import mage.counters.CounterType;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author NinthWorld
|
||||
*/
|
||||
public final class ResistanceBomber extends CardImpl {
|
||||
|
|
@ -37,14 +36,15 @@ public final class ResistanceBomber extends CardImpl {
|
|||
|
||||
// Resistance Bomber enters the battlefield with a charge counter on it.
|
||||
this.addAbility(new EntersBattlefieldAbility(
|
||||
new AddCountersSourceEffect(CounterType.CHARGE.createInstance())
|
||||
.setText("with a charge counter on it")));
|
||||
new AddCountersSourceEffect(CounterType.CHARGE.createInstance()), "with a charge counter on it"
|
||||
));
|
||||
|
||||
// Remove a charge counter from Resistance Bomber: Resistance Bomber deals 5 damage to target creature. Activate this ability only if Resistance Bomber is attacking.
|
||||
Ability ability = new ConditionalActivatedAbility(Zone.BATTLEFIELD,
|
||||
Ability ability = new ConditionalActivatedAbility(
|
||||
new DamageTargetEffect(5),
|
||||
new RemoveCountersSourceCost(CounterType.CHARGE.createInstance()),
|
||||
SourceAttackingCondition.instance);
|
||||
SourceAttackingCondition.instance
|
||||
);
|
||||
ability.addTarget(new TargetCreaturePermanent());
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -11,7 +11,6 @@ import mage.abilities.effects.common.DestroySourceEffect;
|
|||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Zone;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.target.common.TargetAnyTarget;
|
||||
|
|
@ -28,8 +27,8 @@ public final class RocketLauncher extends CardImpl {
|
|||
|
||||
// {2}: Rocket Launcher deals 1 damage to any target. Destroy Rocket Launcher at the beginning of the next end step. Activate this ability only if you've controlled Rocket Launcher continuously since the beginning of your most recent turn.
|
||||
Ability ability = new ConditionalActivatedAbility(
|
||||
Zone.BATTLEFIELD, new DamageTargetEffect(1),
|
||||
new GenericManaCost(2), RocketLauncherCondition.instance);
|
||||
new DamageTargetEffect(1), new GenericManaCost(2), RocketLauncherCondition.instance
|
||||
);
|
||||
ability.addTarget(new TargetAnyTarget());
|
||||
ability.addEffect(new CreateDelayedTriggeredAbilityEffect(
|
||||
new AtTheBeginOfNextEndStepDelayedTriggeredAbility(new DestroySourceEffect())
|
||||
|
|
|
|||
|
|
@ -1,34 +1,29 @@
|
|||
package mage.cards.s;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.condition.Condition;
|
||||
import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition;
|
||||
import mage.abilities.costs.common.TapSourceCost;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.decorator.ConditionalActivatedAbility;
|
||||
import mage.abilities.effects.common.GainLifeEffect;
|
||||
import mage.constants.SubType;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.TargetController;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.constants.SubType;
|
||||
import mage.filter.common.FilterControlledPlaneswalkerPermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class SacredWhiteDeer extends CardImpl {
|
||||
|
||||
private static final FilterPermanent filter = new FilterPermanent("you control a Yanggu planeswalker");
|
||||
|
||||
static {
|
||||
filter.add(TargetController.YOU.getControllerPredicate());
|
||||
filter.add(CardType.PLANESWALKER.getPredicate());
|
||||
filter.add(SubType.YANGGU.getPredicate());
|
||||
}
|
||||
private static final Condition condition = new PermanentsOnTheBattlefieldCondition(
|
||||
new FilterControlledPlaneswalkerPermanent(SubType.YANGGU, "you control a Yanggu planeswalker")
|
||||
);
|
||||
|
||||
public SacredWhiteDeer(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{G}");
|
||||
|
|
@ -39,10 +34,7 @@ public final class SacredWhiteDeer extends CardImpl {
|
|||
|
||||
// {3}{G}, {T}: You gain 4 life. Activate this ability only if you control a Yanggu planeswalker.
|
||||
Ability ability = new ConditionalActivatedAbility(
|
||||
Zone.BATTLEFIELD,
|
||||
new GainLifeEffect(4),
|
||||
new ManaCostsImpl<>("{3}{G}"),
|
||||
new PermanentsOnTheBattlefieldCondition(filter)
|
||||
new GainLifeEffect(4), new ManaCostsImpl<>("{3}{G}"), condition
|
||||
);
|
||||
ability.addCost(new TapSourceCost());
|
||||
this.addAbility(ability);
|
||||
|
|
|
|||
|
|
@ -1,10 +1,9 @@
|
|||
|
||||
package mage.cards.s;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.ObjectColor;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.EntersBattlefieldTappedAbility;
|
||||
import mage.abilities.condition.Condition;
|
||||
import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition;
|
||||
import mage.abilities.costs.common.TapSourceCost;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
|
|
@ -14,14 +13,14 @@ import mage.abilities.mana.GreenManaAbility;
|
|||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.ComparisonType;
|
||||
import mage.constants.Zone;
|
||||
import mage.constants.SubType;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.filter.predicate.mageobject.ColorPredicate;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author jeffwadsworth
|
||||
*/
|
||||
public final class SapseepForest extends CardImpl {
|
||||
|
|
@ -32,8 +31,10 @@ public final class SapseepForest extends CardImpl {
|
|||
filter.add(new ColorPredicate(ObjectColor.GREEN));
|
||||
}
|
||||
|
||||
private static final Condition condition = new PermanentsOnTheBattlefieldCondition(filter, ComparisonType.MORE_THAN, 1);
|
||||
|
||||
public SapseepForest(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.LAND},"");
|
||||
super(ownerId, setInfo, new CardType[]{CardType.LAND}, "");
|
||||
this.subtype.add(SubType.FOREST);
|
||||
|
||||
// <i>({tap}: Add {G}.)</i>
|
||||
|
|
@ -43,13 +44,9 @@ public final class SapseepForest extends CardImpl {
|
|||
this.addAbility(new EntersBattlefieldTappedAbility());
|
||||
|
||||
// {G}, {tap}: You gain 1 life. Activate this ability only if you control two or more green permanents.
|
||||
Ability ability = new ConditionalActivatedAbility(Zone.BATTLEFIELD,
|
||||
new GainLifeEffect(1),
|
||||
new ManaCostsImpl<>("{G}"),
|
||||
new PermanentsOnTheBattlefieldCondition(filter, ComparisonType.MORE_THAN, 1));
|
||||
Ability ability = new ConditionalActivatedAbility(new GainLifeEffect(1), new ManaCostsImpl<>("{G}"), condition);
|
||||
ability.addCost(new TapSourceCost());
|
||||
this.addAbility(ability);
|
||||
|
||||
}
|
||||
|
||||
private SapseepForest(final SapseepForest card) {
|
||||
|
|
|
|||
|
|
@ -1,7 +1,5 @@
|
|||
|
||||
package mage.cards.s;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.condition.common.IsStepCondition;
|
||||
import mage.abilities.costs.common.SacrificeSourceCost;
|
||||
|
|
@ -11,13 +9,12 @@ import mage.abilities.effects.common.DestroyAllEffect;
|
|||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.PhaseStep;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.predicate.Predicates;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Plopman
|
||||
*/
|
||||
public final class Scourglass extends CardImpl {
|
||||
|
|
@ -25,15 +22,17 @@ public final class Scourglass extends CardImpl {
|
|||
private static final FilterPermanent filter = new FilterPermanent("permanents except for artifacts and lands");
|
||||
|
||||
static {
|
||||
filter.add(Predicates.not(Predicates.or(CardType.ARTIFACT.getPredicate(), CardType.LAND.getPredicate())));
|
||||
filter.add(Predicates.not(CardType.ARTIFACT.getPredicate()));
|
||||
filter.add(Predicates.not(CardType.LAND.getPredicate()));
|
||||
}
|
||||
|
||||
public Scourglass(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.ARTIFACT},"{3}{W}{W}");
|
||||
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{3}{W}{W}");
|
||||
|
||||
// {T}, Sacrifice Scourglass: Destroy all permanents except for artifacts and lands. Activate this ability only during your upkeep.
|
||||
Ability ability = new ConditionalActivatedAbility(Zone.BATTLEFIELD,
|
||||
new DestroyAllEffect(filter), new TapSourceCost(), new IsStepCondition(PhaseStep.UPKEEP));
|
||||
Ability ability = new ConditionalActivatedAbility(
|
||||
new DestroyAllEffect(filter), new TapSourceCost(), IsStepCondition.getMyUpkeep()
|
||||
);
|
||||
ability.addCost(new SacrificeSourceCost());
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,7 +1,5 @@
|
|||
|
||||
package mage.cards.s;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.condition.common.HellbentCondition;
|
||||
import mage.abilities.costs.common.TapSourceCost;
|
||||
|
|
@ -12,23 +10,24 @@ import mage.abilities.mana.ColorlessManaAbility;
|
|||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Zone;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author fireshoes
|
||||
*/
|
||||
public final class SeaGateWreckage extends CardImpl {
|
||||
|
||||
public SeaGateWreckage(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.LAND},"");
|
||||
super(ownerId, setInfo, new CardType[]{CardType.LAND}, "");
|
||||
|
||||
// {T}: Add {C}.
|
||||
this.addAbility(new ColorlessManaAbility());
|
||||
|
||||
// {2}{C}, {T}: Draw a card. Activate this ability only if you have no cards in hand.
|
||||
Ability ability = new ConditionalActivatedAbility(Zone.BATTLEFIELD, new DrawCardSourceControllerEffect(1),
|
||||
new ManaCostsImpl<>("{2}{C}"), HellbentCondition.instance);
|
||||
Ability ability = new ConditionalActivatedAbility(
|
||||
new DrawCardSourceControllerEffect(1), new ManaCostsImpl<>("{2}{C}"), HellbentCondition.instance
|
||||
);
|
||||
ability.addCost(new TapSourceCost());
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -12,7 +12,6 @@ import mage.cards.CardSetInfo;
|
|||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.WatcherScope;
|
||||
import mage.constants.Zone;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.game.permanent.Permanent;
|
||||
|
|
@ -23,7 +22,6 @@ import java.util.Set;
|
|||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author noahg
|
||||
*/
|
||||
public final class SeaTroll extends CardImpl {
|
||||
|
|
@ -36,7 +34,9 @@ public final class SeaTroll extends CardImpl {
|
|||
this.toughness = new MageInt(1);
|
||||
|
||||
// {U}: Regenerate Sea Troll. Activate this ability only if Sea Troll blocked or was blocked by a blue creature this turn.
|
||||
Ability ability = new ConditionalActivatedAbility(Zone.BATTLEFIELD, new RegenerateSourceEffect(), new ManaCostsImpl<>("{U}"), new SeaTrollCondition());
|
||||
Ability ability = new ConditionalActivatedAbility(
|
||||
new RegenerateSourceEffect(), new ManaCostsImpl<>("{U}"), SeaTrollCondition.instance
|
||||
);
|
||||
ability.addWatcher(new SeaTrollWatcher());
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
|
@ -56,7 +56,7 @@ class SeaTrollWatcher extends Watcher {
|
|||
private final Set<MageObjectReference> blockedOrBlockedByBlueThisTurnCreatures;
|
||||
|
||||
public SeaTrollWatcher() {
|
||||
super( WatcherScope.GAME);
|
||||
super(WatcherScope.GAME);
|
||||
blockedOrBlockedByBlueThisTurnCreatures = new HashSet<>();
|
||||
}
|
||||
|
||||
|
|
@ -65,10 +65,10 @@ class SeaTrollWatcher extends Watcher {
|
|||
if (event.getType() == GameEvent.EventType.BLOCKER_DECLARED) {
|
||||
MageObjectReference blocker = new MageObjectReference(event.getSourceId(), game);
|
||||
MageObjectReference attacker = new MageObjectReference(event.getTargetId(), game);
|
||||
if (blocker.getPermanentOrLKIBattlefield(game).getColor(game).isBlue()){
|
||||
if (blocker.getPermanentOrLKIBattlefield(game).getColor(game).isBlue()) {
|
||||
blockedOrBlockedByBlueThisTurnCreatures.add(attacker);
|
||||
}
|
||||
if (attacker.getPermanentOrLKIBattlefield(game).getColor(game).isBlue()){
|
||||
if (attacker.getPermanentOrLKIBattlefield(game).getColor(game).isBlue()) {
|
||||
blockedOrBlockedByBlueThisTurnCreatures.add(blocker);
|
||||
}
|
||||
}
|
||||
|
|
@ -80,17 +80,18 @@ class SeaTrollWatcher extends Watcher {
|
|||
blockedOrBlockedByBlueThisTurnCreatures.clear();
|
||||
}
|
||||
|
||||
public boolean blockedOrBlockedByBlueCreatureThisTurn(MageObjectReference creature){
|
||||
public boolean blockedOrBlockedByBlueCreatureThisTurn(MageObjectReference creature) {
|
||||
return blockedOrBlockedByBlueThisTurnCreatures.contains(creature);
|
||||
}
|
||||
}
|
||||
|
||||
class SeaTrollCondition implements Condition {
|
||||
enum SeaTrollCondition implements Condition {
|
||||
instance;
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Permanent sourcePermanent = game.getPermanentOrLKIBattlefield(source.getSourceId());
|
||||
if (sourcePermanent != null){
|
||||
if (sourcePermanent != null) {
|
||||
SeaTrollWatcher watcher = game.getState().getWatcher(SeaTrollWatcher.class);
|
||||
if (watcher != null) {
|
||||
return watcher.blockedOrBlockedByBlueCreatureThisTurn(new MageObjectReference(sourcePermanent, game));
|
||||
|
|
|
|||
|
|
@ -1,27 +1,28 @@
|
|||
package mage.cards.s;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.DiesCreatureTriggeredAbility;
|
||||
import mage.abilities.condition.Condition;
|
||||
import mage.abilities.condition.common.CardsInControllerGraveyardCondition;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.decorator.ConditionalActivatedAbility;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.common.GainLifeEffect;
|
||||
import mage.abilities.effects.common.LoseLifeOpponentsEffect;
|
||||
import mage.abilities.effects.keyword.ScryEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.StaticFilters;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LevelX2
|
||||
*/
|
||||
public final class ShadowsOfThePast extends CardImpl {
|
||||
|
||||
private static final Condition condition = new CardsInControllerGraveyardCondition(4, StaticFilters.FILTER_CARD_CREATURES);
|
||||
|
||||
public ShadowsOfThePast(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{1}{B}");
|
||||
|
||||
|
|
@ -29,11 +30,10 @@ public final class ShadowsOfThePast extends CardImpl {
|
|||
this.addAbility(new DiesCreatureTriggeredAbility(new ScryEffect(1), false));
|
||||
|
||||
// {4}{B}: Each opponent loses 2 life and you gain 2 life. Activate this ability only if there are four or more creature cards in your graveyard.
|
||||
Ability ability = new ConditionalActivatedAbility(Zone.BATTLEFIELD,
|
||||
new LoseLifeOpponentsEffect(2), new ManaCostsImpl<>("{4}{B}"), new CardsInControllerGraveyardCondition(4, StaticFilters.FILTER_CARD_CREATURES));
|
||||
Effect effect = new GainLifeEffect(2);
|
||||
effect.setText("and you gain 2 life");
|
||||
ability.addEffect(effect);
|
||||
Ability ability = new ConditionalActivatedAbility(
|
||||
new LoseLifeOpponentsEffect(2), new ManaCostsImpl<>("{4}{B}"), condition
|
||||
);
|
||||
ability.addEffect(new GainLifeEffect(2).concatBy("and"));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,5 @@
|
|||
package mage.cards.s;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
|
|
@ -10,14 +8,15 @@ import mage.abilities.costs.common.TapSourceCost;
|
|||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.decorator.ConditionalActivatedAbility;
|
||||
import mage.abilities.effects.common.TapTargetEffect;
|
||||
import mage.constants.AbilityWord;
|
||||
import mage.constants.SubType;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.AbilityWord;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Zone;
|
||||
import mage.constants.SubType;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
|
|
@ -39,8 +38,7 @@ public final class SinewDancer extends CardImpl {
|
|||
|
||||
// Corrupted -- {W}, {T}: Tap target creature. Activate only if an opponent has three or more poison counters.
|
||||
ability = new ConditionalActivatedAbility(
|
||||
Zone.BATTLEFIELD, new TapTargetEffect(),
|
||||
new ManaCostsImpl<>("{W}"), CorruptedCondition.instance
|
||||
new TapTargetEffect(), new ManaCostsImpl<>("{W}"), CorruptedCondition.instance
|
||||
);
|
||||
ability.addCost(new TapSourceCost());
|
||||
ability.addTarget(new TargetCreaturePermanent());
|
||||
|
|
|
|||
|
|
@ -1,9 +1,6 @@
|
|||
|
||||
package mage.cards.s;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.condition.common.HateCondition;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.decorator.ConditionalActivatedAbility;
|
||||
|
|
@ -13,29 +10,25 @@ import mage.cards.CardSetInfo;
|
|||
import mage.constants.AbilityWord;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.Zone;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Styxo
|
||||
*/
|
||||
public final class SithThoughtseeker extends CardImpl {
|
||||
|
||||
public SithThoughtseeker(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}");
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{B}");
|
||||
this.subtype.add(SubType.HUMAN);
|
||||
this.subtype.add(SubType.SITH);
|
||||
this.power = new MageInt(2);
|
||||
this.toughness = new MageInt(1);
|
||||
|
||||
// <i>Hate</i> — {2}{U}: Draw a card. Activate this ability only if an opponent lost life from source other than combat damage this turn.
|
||||
Ability ability = new ConditionalActivatedAbility(
|
||||
Zone.BATTLEFIELD,
|
||||
new DrawCardSourceControllerEffect(1),
|
||||
new ManaCostsImpl<>("{2}{U}"),
|
||||
HateCondition.instance);
|
||||
ability.setAbilityWord(AbilityWord.HATE);
|
||||
this.addAbility(ability);
|
||||
this.addAbility(new ConditionalActivatedAbility(
|
||||
new DrawCardSourceControllerEffect(1), new ManaCostsImpl<>("{2}{U}"), HateCondition.instance
|
||||
).setAbilityWord(AbilityWord.HATE));
|
||||
}
|
||||
|
||||
private SithThoughtseeker(final SithThoughtseeker card) {
|
||||
|
|
|
|||
|
|
@ -1,7 +1,5 @@
|
|||
|
||||
package mage.cards.s;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.condition.common.MorbidCondition;
|
||||
|
|
@ -15,14 +13,14 @@ import mage.cards.CardSetInfo;
|
|||
import mage.constants.AbilityWord;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.predicate.permanent.TappedPredicate;
|
||||
import mage.game.permanent.token.DemonToken;
|
||||
import mage.target.common.TargetControlledCreaturePermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author North
|
||||
*/
|
||||
public final class SkirsdagHighPriest extends CardImpl {
|
||||
|
|
@ -34,7 +32,7 @@ public final class SkirsdagHighPriest extends CardImpl {
|
|||
}
|
||||
|
||||
public SkirsdagHighPriest(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}");
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{B}");
|
||||
this.subtype.add(SubType.HUMAN);
|
||||
this.subtype.add(SubType.CLERIC);
|
||||
|
||||
|
|
@ -42,11 +40,11 @@ public final class SkirsdagHighPriest extends CardImpl {
|
|||
this.toughness = new MageInt(2);
|
||||
|
||||
// <i>Morbid</i> — {tap}, Tap two untapped creatures you control: Create a 5/5 black Demon creature token with flying. Activate this ability only if a creature died this turn.
|
||||
Ability ability = new ConditionalActivatedAbility(Zone.BATTLEFIELD, new CreateTokenEffect(new DemonToken()),
|
||||
new TapSourceCost(), MorbidCondition.instance);
|
||||
Ability ability = new ConditionalActivatedAbility(
|
||||
new CreateTokenEffect(new DemonToken()), new TapSourceCost(), MorbidCondition.instance
|
||||
);
|
||||
ability.addCost(new TapTargetCost(new TargetControlledCreaturePermanent(2, 2, filter, false)));
|
||||
ability.setAbilityWord(AbilityWord.MORBID);
|
||||
this.addAbility(ability.addHint(MorbidHint.instance));
|
||||
this.addAbility(ability.setAbilityWord(AbilityWord.MORBID).addHint(MorbidHint.instance));
|
||||
}
|
||||
|
||||
private SkirsdagHighPriest(final SkirsdagHighPriest card) {
|
||||
|
|
|
|||
|
|
@ -8,7 +8,10 @@ import mage.abilities.dynamicvalue.common.CardTypesInGraveyardCount;
|
|||
import mage.abilities.effects.common.continuous.BoostSourceEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.*;
|
||||
import mage.constants.AbilityWord;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.SubType;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
|
|
@ -27,7 +30,6 @@ public final class StallionOfAshmouth extends CardImpl {
|
|||
// <i>Delirium</i> — {1}{B}: Stallion of Ashmouth gets +1/+1 until end of turn. Activate this ability only if there are
|
||||
// four or more card types among cards in your graveyard.
|
||||
this.addAbility(new ConditionalActivatedAbility(
|
||||
Zone.BATTLEFIELD,
|
||||
new BoostSourceEffect(1, 1, Duration.EndOfTurn),
|
||||
new ManaCostsImpl<>("{1}{B}"), DeliriumCondition.instance
|
||||
).setAbilityWord(AbilityWord.DELIRIUM).addHint(CardTypesInGraveyardCount.YOU.getHint()));
|
||||
|
|
|
|||
|
|
@ -44,8 +44,7 @@ public final class SungoldSentinel extends CardImpl {
|
|||
|
||||
// Coven — {1}{W}: Choose a color. Sungold Sentinel gains hexproof from that color until end of turn and can't be blocked by creatures of that color this turn. Activate only if you control three or more creatures with different powers.
|
||||
this.addAbility(new ConditionalActivatedAbility(
|
||||
Zone.BATTLEFIELD, new SungoldSentinelEffect(),
|
||||
new ManaCostsImpl<>("{1}{W}"), CovenCondition.instance
|
||||
new SungoldSentinelEffect(), new ManaCostsImpl<>("{1}{W}"), CovenCondition.instance
|
||||
).addHint(CovenHint.instance).setAbilityWord(AbilityWord.COVEN));
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -43,14 +43,14 @@ public final class TheSeedcore extends CardImpl {
|
|||
|
||||
// {T}: Add {C}.
|
||||
this.addAbility(new ColorlessManaAbility());
|
||||
|
||||
// {T}: Add one mana of any color. Spend this mana only to cast Phyrexian creature spells.
|
||||
this.addAbility(new ConditionalAnyColorManaAbility(new TapSourceCost(), 1, new TheSeedcoreManaBuilder(), true));
|
||||
|
||||
// Corrupted -- {T}: Target 1/1 creature gets +2/+1 until end of turn. Activate only if an opponent has three or more poison counters.
|
||||
Ability ability = new ConditionalActivatedAbility(
|
||||
Zone.BATTLEFIELD,
|
||||
new BoostTargetEffect(2, 1, Duration.EndOfTurn),
|
||||
new TapSourceCost(),
|
||||
CorruptedCondition.instance
|
||||
new TapSourceCost(), CorruptedCondition.instance
|
||||
).setAbilityWord(AbilityWord.CORRUPTED).addHint(CorruptedCondition.getHint());
|
||||
ability.addTarget(new TargetCreaturePermanent(filter));
|
||||
this.addAbility(ability);
|
||||
|
|
@ -103,4 +103,3 @@ class TheSeedcoreManaCondition extends CreatureCastManaCondition {
|
|||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -14,7 +14,6 @@ import mage.cards.CardImpl;
|
|||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.Zone;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
|
|
@ -36,15 +35,12 @@ public final class TimestreamNavigator extends CardImpl {
|
|||
this.addAbility(new AscendAbility());
|
||||
|
||||
// {2}{U}{U}, {T}, Put Timestream Navigator on the bottom of its owner's library: Take an extra turn after this one. Activate this ability only if you have the city's blessing.
|
||||
Ability ability = new ConditionalActivatedAbility(Zone.BATTLEFIELD,
|
||||
new AddExtraTurnControllerEffect(),
|
||||
new ManaCostsImpl<>("{2}{U}{U}"),
|
||||
CitysBlessingCondition.instance);
|
||||
Ability ability = new ConditionalActivatedAbility(
|
||||
new AddExtraTurnControllerEffect(), new ManaCostsImpl<>("{2}{U}{U}"), CitysBlessingCondition.instance
|
||||
);
|
||||
ability.addCost(new TapSourceCost());
|
||||
ability.addCost(new PutSourceOnBottomOwnerLibraryCost());
|
||||
ability.addHint(CitysBlessingHint.instance);
|
||||
this.addAbility(ability);
|
||||
|
||||
this.addAbility(ability.addHint(CitysBlessingHint.instance));
|
||||
}
|
||||
|
||||
private TimestreamNavigator(final TimestreamNavigator card) {
|
||||
|
|
|
|||
|
|
@ -14,7 +14,6 @@ import mage.cards.CardSetInfo;
|
|||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.TurnPhase;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.Predicates;
|
||||
import mage.filter.predicate.permanent.AttackingPredicate;
|
||||
|
|
@ -50,9 +49,7 @@ public final class TrapRunner extends CardImpl {
|
|||
this.toughness = new MageInt(3);
|
||||
|
||||
// {T}: Target unblocked attacking creature becomes blocked. Activate this ability only during combat after blockers are declared.
|
||||
Ability ability = new ConditionalActivatedAbility(
|
||||
Zone.BATTLEFIELD, new BecomeBlockedTargetEffect(), new TapSourceCost(), condition
|
||||
);
|
||||
Ability ability = new ConditionalActivatedAbility(new BecomeBlockedTargetEffect(), new TapSourceCost(), condition);
|
||||
ability.addTarget(new TargetCreaturePermanent(filter));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -10,7 +10,6 @@ import mage.cards.CardImpl;
|
|||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.Zone;
|
||||
import mage.game.permanent.token.TreasureToken;
|
||||
|
||||
import java.util.UUID;
|
||||
|
|
@ -30,8 +29,7 @@ public final class UndercityScrounger extends CardImpl {
|
|||
|
||||
// {T}: Create a Treasure token. Activate only if a creature died this turn.
|
||||
this.addAbility(new ConditionalActivatedAbility(
|
||||
Zone.BATTLEFIELD, new CreateTokenEffect(new TreasureToken()),
|
||||
new TapSourceCost(), MorbidCondition.instance
|
||||
new CreateTokenEffect(new TreasureToken()), new TapSourceCost(), MorbidCondition.instance
|
||||
).addHint(MorbidHint.instance));
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue