mirror of
https://github.com/magefree/mage.git
synced 2025-12-27 22:12:03 -08:00
Merge branch 'master' into aether-web
This commit is contained in:
commit
d7af252d8b
670 changed files with 4770 additions and 1947 deletions
|
|
@ -5,7 +5,7 @@ import java.util.UUID;
|
|||
import mage.MageInt;
|
||||
import mage.abilities.common.BeginningOfUpkeepTriggeredAbility;
|
||||
import mage.abilities.condition.common.ControlsCreatureGreatestToughnessCondition;
|
||||
import mage.abilities.decorator.ConditionalTriggeredAbility;
|
||||
import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility;
|
||||
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
|
|
@ -27,7 +27,7 @@ public final class AbzanBeastmaster extends CardImpl {
|
|||
this.toughness = new MageInt(1);
|
||||
|
||||
// At the beginning of your upkeep, draw a card if you control the creature with the greatest toughness or tied for the greatest toughness.
|
||||
this.addAbility(new ConditionalTriggeredAbility(
|
||||
this.addAbility(new ConditionalInterveningIfTriggeredAbility(
|
||||
new BeginningOfUpkeepTriggeredAbility(new DrawCardSourceControllerEffect(1), TargetController.YOU, false),
|
||||
ControlsCreatureGreatestToughnessCondition.instance,
|
||||
"At the beginning of your upkeep, draw a card if you control the creature with the greatest toughness or tied for the greatest toughness."
|
||||
|
|
|
|||
50
Mage.Sets/src/mage/cards/a/AetherflameWall.java
Normal file
50
Mage.Sets/src/mage/cards/a/AetherflameWall.java
Normal file
|
|
@ -0,0 +1,50 @@
|
|||
package mage.cards.a;
|
||||
|
||||
import mage.MageInt;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.effects.common.CanBlockAsThoughtItHadShadowEffect;
|
||||
import mage.abilities.effects.common.continuous.BoostSourceEffect;
|
||||
import mage.abilities.keyword.DefenderAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.Zone;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author noahg
|
||||
*/
|
||||
public final class AetherflameWall extends CardImpl {
|
||||
|
||||
public AetherflameWall(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{R}");
|
||||
|
||||
this.subtype.add(SubType.WALL);
|
||||
this.power = new MageInt(0);
|
||||
this.toughness = new MageInt(4);
|
||||
|
||||
// Defender
|
||||
this.addAbility(DefenderAbility.getInstance());
|
||||
|
||||
// Aetherflame Wall can block creatures with shadow as though they didn’t have shadow.
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new CanBlockAsThoughtItHadShadowEffect(Duration.WhileOnBattlefield)));
|
||||
|
||||
// {R}: Aetherflame Wall gets +1/+0 until end of turn.
|
||||
this.addAbility(new SimpleActivatedAbility(new BoostSourceEffect(1, 0, Duration.EndOfTurn), new ManaCostsImpl("{R}")));
|
||||
}
|
||||
|
||||
public AetherflameWall(final AetherflameWall card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public AetherflameWall copy() {
|
||||
return new AetherflameWall(this);
|
||||
}
|
||||
}
|
||||
98
Mage.Sets/src/mage/cards/a/Aetherplasm.java
Normal file
98
Mage.Sets/src/mage/cards/a/Aetherplasm.java
Normal file
|
|
@ -0,0 +1,98 @@
|
|||
package mage.cards.a;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.MageObjectReference;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.BlocksTriggeredAbility;
|
||||
import mage.abilities.costs.common.ReturnToHandFromBattlefieldSourceCost;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.DoIfCostPaid;
|
||||
import mage.abilities.effects.common.PutCardFromHandOntoBattlefieldEffect;
|
||||
import mage.abilities.effects.common.ReturnToHandSourceEffect;
|
||||
import mage.cards.Card;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.SubType;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.game.Game;
|
||||
import mage.game.combat.CombatGroup;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.players.Player;
|
||||
import mage.target.common.TargetCardInHand;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author noahg
|
||||
*/
|
||||
public final class Aetherplasm extends CardImpl {
|
||||
|
||||
public Aetherplasm(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{U}{U}");
|
||||
|
||||
this.subtype.add(SubType.ILLUSION);
|
||||
this.power = new MageInt(1);
|
||||
this.toughness = new MageInt(1);
|
||||
|
||||
// Whenever Aetherplasm blocks a creature, you may return Aetherplasm to its owner's hand. If you do, you may put a creature card from your hand onto the battlefield blocking that creature.
|
||||
this.addAbility(new BlocksTriggeredAbility
|
||||
(new DoIfCostPaid(new AetherplasmEffect(), new ReturnToHandFromBattlefieldSourceCost()), false, true));
|
||||
}
|
||||
|
||||
public Aetherplasm(final Aetherplasm card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Aetherplasm copy() {
|
||||
return new Aetherplasm(this);
|
||||
}
|
||||
}
|
||||
|
||||
class AetherplasmEffect extends OneShotEffect {
|
||||
|
||||
public AetherplasmEffect() {
|
||||
super(Outcome.PutCardInPlay);
|
||||
this.staticText = "you may put a creature card from your hand onto the battlefield blocking that creature";
|
||||
}
|
||||
|
||||
public AetherplasmEffect(AetherplasmEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player player = game.getPlayer(source.getControllerId());
|
||||
Permanent blockedCreature = game.getPermanent(getTargetPointer().getFirst(game, source));
|
||||
if (player == null) {
|
||||
return false;
|
||||
}
|
||||
if (player.chooseUse(Outcome.PutCardInPlay, "Put a creature card from your hand onto the battlefield?", source, game)) {
|
||||
TargetCardInHand target = new TargetCardInHand(StaticFilters.FILTER_CARD_CREATURE_A);
|
||||
if (player.choose(Outcome.PutCardInPlay, target, source.getSourceId(), game)) {
|
||||
Card card = game.getCard(target.getFirstTarget());
|
||||
if (card != null) {
|
||||
if(player.moveCards(card, Zone.BATTLEFIELD, source, game, false, false, false, null)
|
||||
&& game.getCombat() != null && blockedCreature != null){
|
||||
CombatGroup attacker = game.getCombat().findGroup(blockedCreature.getId());
|
||||
Permanent putIntoPlay = game.getPermanent(target.getFirstTarget());
|
||||
if (putIntoPlay != null && putIntoPlay.isCreature() &&attacker != null) {
|
||||
game.getCombat().findGroup(blockedCreature.getId()).addBlocker(putIntoPlay.getId(), source.getControllerId(), game);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public AetherplasmEffect copy() {
|
||||
return new AetherplasmEffect(this);
|
||||
}
|
||||
}
|
||||
|
|
@ -6,7 +6,7 @@ import mage.MageInt;
|
|||
import mage.abilities.TriggeredAbility;
|
||||
import mage.abilities.common.BeginningOfUpkeepTriggeredAbility;
|
||||
import mage.abilities.condition.common.NoSpellsWereCastLastTurnCondition;
|
||||
import mage.abilities.decorator.ConditionalTriggeredAbility;
|
||||
import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility;
|
||||
import mage.abilities.effects.common.TransformSourceEffect;
|
||||
import mage.abilities.keyword.TransformAbility;
|
||||
import mage.cards.CardImpl;
|
||||
|
|
@ -36,7 +36,7 @@ public final class AfflictedDeserter extends CardImpl {
|
|||
// At the beginning of each upkeep, if no spells were cast last turn, transform Afflicted Deserter.
|
||||
this.addAbility(new TransformAbility());
|
||||
TriggeredAbility ability = new BeginningOfUpkeepTriggeredAbility(new TransformSourceEffect(true), TargetController.ANY, false);
|
||||
this.addAbility(new ConditionalTriggeredAbility(ability, NoSpellsWereCastLastTurnCondition.instance, TransformAbility.NO_SPELLS_TRANSFORM_RULE));
|
||||
this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, NoSpellsWereCastLastTurnCondition.instance, TransformAbility.NO_SPELLS_TRANSFORM_RULE));
|
||||
}
|
||||
|
||||
public AfflictedDeserter(final AfflictedDeserter card) {
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ import mage.abilities.Ability;
|
|||
import mage.abilities.TriggeredAbility;
|
||||
import mage.abilities.common.BeginningOfYourEndStepTriggeredAbility;
|
||||
import mage.abilities.condition.common.RevoltCondition;
|
||||
import mage.abilities.decorator.ConditionalTriggeredAbility;
|
||||
import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.cards.*;
|
||||
import mage.constants.CardType;
|
||||
|
|
@ -33,7 +33,7 @@ public final class AidFromTheCowl extends CardImpl {
|
|||
// <i>Revolt</i> — At the beginning of your end step, if a permanent you controlled left the battlefield this turn,
|
||||
// reveal the top card of your library. If it is a permanent card, you may put it onto the battlefield. Otherwise, put it on the bottom of your library.
|
||||
TriggeredAbility ability = new BeginningOfYourEndStepTriggeredAbility(new AidFromTheCowlEffect(), false);
|
||||
this.addAbility(new ConditionalTriggeredAbility(ability, RevoltCondition.instance, ruleText), new RevoltWatcher());
|
||||
this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, RevoltCondition.instance, ruleText), new RevoltWatcher());
|
||||
}
|
||||
|
||||
public AidFromTheCowl(final AidFromTheCowl card) {
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ import mage.MageInt;
|
|||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||
import mage.abilities.condition.common.RevoltCondition;
|
||||
import mage.abilities.decorator.ConditionalTriggeredAbility;
|
||||
import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility;
|
||||
import mage.abilities.effects.common.GainLifeEffect;
|
||||
import mage.abilities.keyword.FlyingAbility;
|
||||
import mage.cards.CardImpl;
|
||||
|
|
@ -34,7 +34,7 @@ public final class AirdropAeronauts extends CardImpl {
|
|||
this.addAbility(FlyingAbility.getInstance());
|
||||
|
||||
// <i>Revolt</i> — When Airdrop Aeronauts enters the battlefield, if a permanent you controlled left the battlefield this turn, you gain 5 life.
|
||||
Ability ability = new ConditionalTriggeredAbility(new EntersBattlefieldTriggeredAbility(
|
||||
Ability ability = new ConditionalInterveningIfTriggeredAbility(new EntersBattlefieldTriggeredAbility(
|
||||
new GainLifeEffect(5), false), RevoltCondition.instance,
|
||||
"<i>Revolt</i> — When {this} enters the battlefield, if a permanent you controlled left"
|
||||
+ " the battlefield this turn, you gain 5 life."
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ import java.util.UUID;
|
|||
import mage.MageInt;
|
||||
import mage.abilities.common.BeginningOfCombatTriggeredAbility;
|
||||
import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition;
|
||||
import mage.abilities.decorator.ConditionalTriggeredAbility;
|
||||
import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility;
|
||||
import mage.abilities.effects.common.counter.AddCountersSourceEffect;
|
||||
import mage.abilities.keyword.TrampleAbility;
|
||||
import mage.cards.CardImpl;
|
||||
|
|
@ -43,7 +43,7 @@ public final class AjanisComrade extends CardImpl {
|
|||
this.addAbility(TrampleAbility.getInstance());
|
||||
|
||||
// At the beginning of combat on your turn, if you control an Ajani planeswalker, put a +1/+1 counter on Ajani's Comrade.
|
||||
this.addAbility(new ConditionalTriggeredAbility(
|
||||
this.addAbility(new ConditionalInterveningIfTriggeredAbility(
|
||||
new BeginningOfCombatTriggeredAbility(new AddCountersSourceEffect(CounterType.P1P1.createInstance()), TargetController.YOU, false),
|
||||
new PermanentsOnTheBattlefieldCondition(filter),
|
||||
"At the beginning of combat on your turn, if you control an Ajani planeswalker, put a +1/+1 counter on {this}."));
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ import mage.abilities.TriggeredAbilityImpl;
|
|||
import mage.abilities.common.DiscardedByOpponentTriggeredAbility;
|
||||
import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition;
|
||||
import mage.abilities.costs.common.SacrificeSourceCost;
|
||||
import mage.abilities.decorator.ConditionalTriggeredAbility;
|
||||
import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility;
|
||||
import mage.abilities.effects.common.CreateTokenEffect;
|
||||
import mage.abilities.effects.common.DoIfCostPaid;
|
||||
import mage.cards.CardImpl;
|
||||
|
|
@ -39,7 +39,7 @@ public final class AjanisLastStand extends CardImpl {
|
|||
this.addAbility(new AjanisLastStandTriggeredAbility());
|
||||
|
||||
// When a spell or ability an opponent controls causes you to discard this card, if you control a Plains, create a 4/4 white Avatar creature token with flying.
|
||||
this.addAbility(new ConditionalTriggeredAbility(
|
||||
this.addAbility(new ConditionalInterveningIfTriggeredAbility(
|
||||
new DiscardedByOpponentTriggeredAbility(new CreateTokenEffect(new AvatarToken2())),
|
||||
new PermanentsOnTheBattlefieldCondition(filter),
|
||||
"When a spell or ability an opponent controls causes you to discard this card, "
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ import mage.abilities.Ability;
|
|||
import mage.abilities.common.BeginningOfUpkeepTriggeredAbility;
|
||||
import mage.abilities.condition.common.MoreCardsInHandThanOpponentsCondition;
|
||||
import mage.abilities.costs.common.SacrificeTargetCost;
|
||||
import mage.abilities.decorator.ConditionalTriggeredAbility;
|
||||
import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility;
|
||||
import mage.abilities.effects.common.DoIfCostPaid;
|
||||
import mage.abilities.effects.common.ReturnSourceFromGraveyardToBattlefieldEffect;
|
||||
import mage.abilities.keyword.HasteAbility;
|
||||
|
|
@ -40,7 +40,7 @@ public final class AkutaBornOfAsh extends CardImpl {
|
|||
// Haste
|
||||
this.addAbility(HasteAbility.getInstance());
|
||||
// At the beginning of your upkeep, if you have more cards in hand than each opponent, you may sacrifice a Swamp. If you do, return Akuta, Born of Ash from your graveyard to the battlefield.
|
||||
Ability ability = new ConditionalTriggeredAbility(
|
||||
Ability ability = new ConditionalInterveningIfTriggeredAbility(
|
||||
new BeginningOfUpkeepTriggeredAbility(Zone.GRAVEYARD,
|
||||
new DoIfCostPaid(new ReturnSourceFromGraveyardToBattlefieldEffect(), new SacrificeTargetCost(new TargetControlledPermanent(filterSwamp))),
|
||||
TargetController.YOU, false),
|
||||
|
|
|
|||
|
|
@ -111,7 +111,7 @@ class AlhammarretsArchiveReplacementEffect extends ReplacementEffectImpl {
|
|||
@Override
|
||||
public boolean applies(GameEvent event, Ability source, Game game) {
|
||||
if (event.getPlayerId().equals(source.getControllerId())) {
|
||||
if (game.getActivePlayerId().equals(event.getPlayerId())
|
||||
if (game.isActivePlayer(event.getPlayerId())
|
||||
&& game.getPhase().getStep().getType() == PhaseStep.DRAW) {
|
||||
CardsDrawnDuringDrawStepWatcher watcher = (CardsDrawnDuringDrawStepWatcher) game.getState().getWatchers().get(CardsDrawnDuringDrawStepWatcher.class.getSimpleName());
|
||||
if (watcher != null && watcher.getAmountCardsDrawn(event.getPlayerId()) > 0) {
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ import mage.abilities.Ability;
|
|||
import mage.abilities.TriggeredAbility;
|
||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||
import mage.abilities.condition.common.KickedCostCondition;
|
||||
import mage.abilities.decorator.ConditionalTriggeredAbility;
|
||||
import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.discard.DiscardTargetEffect;
|
||||
import mage.abilities.keyword.KickerAbility;
|
||||
|
|
@ -51,12 +51,12 @@ public final class AnaBattlemage extends CardImpl {
|
|||
// When Ana Battlemage enters the battlefield, if it was kicked with its {2}{U} kicker, target player discards three cards.
|
||||
TriggeredAbility ability = new EntersBattlefieldTriggeredAbility(new DiscardTargetEffect(3));
|
||||
ability.addTarget(new TargetOpponent());
|
||||
this.addAbility(new ConditionalTriggeredAbility(ability, new KickedCostCondition("{2}{U}"),
|
||||
this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, new KickedCostCondition("{2}{U}"),
|
||||
"When {this} enters the battlefield, if it was kicked with its {2}{U} kicker, target player discards three cards."));
|
||||
// When Ana Battlemage enters the battlefield, if it was kicked with its {1}{B} kicker, tap target untapped creature and that creature deals damage equal to its power to its controller.
|
||||
ability = new EntersBattlefieldTriggeredAbility(new AnaBattlemageKickerEffect());
|
||||
ability.addTarget(new TargetCreaturePermanent(filter));
|
||||
this.addAbility(new ConditionalTriggeredAbility(ability, new KickedCostCondition("{1}{B}"),
|
||||
this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, new KickedCostCondition("{1}{B}"),
|
||||
"When {this} enters the battlefield, if it was kicked with its {1}{B} kicker, tap target untapped creature and that creature deals damage equal to its power to its controller."));
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ package mage.cards.a;
|
|||
import java.util.UUID;
|
||||
import mage.ObjectColor;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SanctuaryTriggeredAbility;
|
||||
import mage.abilities.common.SanctuaryInterveningIfTriggeredAbility;
|
||||
import mage.abilities.effects.ContinuousEffect;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.continuous.BoostTargetEffect;
|
||||
|
|
@ -27,7 +27,7 @@ public final class AnaSanctuary extends CardImpl {
|
|||
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{G}");
|
||||
|
||||
// At the beginning of your upkeep, if you control a blue or black permanent, target creature gets +1/+1 until end of turn. If you control a blue permanent and a black permanent, that creature gets +5/+5 until end of turn instead.
|
||||
Ability ability = new SanctuaryTriggeredAbility(
|
||||
Ability ability = new SanctuaryInterveningIfTriggeredAbility(
|
||||
new BoostEffect(1), new BoostEffect(5), ObjectColor.BLACK, ObjectColor.BLUE,
|
||||
"At the beginning of your upkeep, if you control a blue or black permanent, "
|
||||
+ "target creature gets +1/+1 until end of turn. If you control a blue permanent and a black permanent, that creature gets +5/+5 until end of turn instead."
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ import mage.MageInt;
|
|||
import mage.abilities.Ability;
|
||||
import mage.abilities.TriggeredAbilityImpl;
|
||||
import mage.abilities.condition.common.DeliriumCondition;
|
||||
import mage.abilities.decorator.ConditionalTriggeredAbility;
|
||||
import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.common.ExileTargetEffect;
|
||||
import mage.abilities.keyword.FlyingAbility;
|
||||
|
|
@ -46,7 +46,7 @@ public final class AngelOfDeliverance extends CardImpl {
|
|||
|
||||
// <i>Delirium</i> — Whenever Angel of Deliverance deals damage, if there are four or more card types among cards in your graveyard,
|
||||
// exile target creature an opponent controls.
|
||||
Ability ability = new ConditionalTriggeredAbility(
|
||||
Ability ability = new ConditionalInterveningIfTriggeredAbility(
|
||||
new AngelOfDeliveranceDealsDamageTriggeredAbility(),
|
||||
DeliriumCondition.instance,
|
||||
"<i>Delirium</i> — Whenever {this} deals damage, if there are four or more card types among cards in your graveyard, exile target creature an opponent controls"
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ import java.util.UUID;
|
|||
import mage.MageInt;
|
||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||
import mage.abilities.condition.common.CastFromHandSourceCondition;
|
||||
import mage.abilities.decorator.ConditionalTriggeredAbility;
|
||||
import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility;
|
||||
import mage.abilities.effects.common.ExileAllEffect;
|
||||
import mage.abilities.keyword.FlashAbility;
|
||||
import mage.abilities.keyword.FlyingAbility;
|
||||
|
|
@ -34,7 +34,7 @@ public final class AngelOfTheDireHour extends CardImpl {
|
|||
// Flying
|
||||
this.addAbility(FlyingAbility.getInstance());
|
||||
// When Angel of the Dire Hour enters the battlefield, if you cast it from your hand, exile all attacking creatures.
|
||||
this.addAbility(new ConditionalTriggeredAbility(
|
||||
this.addAbility(new ConditionalInterveningIfTriggeredAbility(
|
||||
new EntersBattlefieldTriggeredAbility(new ExileAllEffect(new FilterAttackingCreature("attacking creatures")), false),
|
||||
CastFromHandSourceCondition.instance,
|
||||
"When {this} enters the battlefield, if you cast it from your hand, exile all attacking creatures."),
|
||||
|
|
|
|||
|
|
@ -65,7 +65,7 @@ class AngelicArbiterCantAttackTargetEffect extends RestrictionEffect {
|
|||
|
||||
@Override
|
||||
public boolean applies(Permanent permanent, Ability source, Game game) {
|
||||
if (game.getActivePlayerId().equals(permanent.getControllerId()) && game.getOpponents(source.getControllerId()).contains(permanent.getControllerId())) {
|
||||
if (game.isActivePlayer(permanent.getControllerId()) && game.getOpponents(source.getControllerId()).contains(permanent.getControllerId())) {
|
||||
CastSpellLastTurnWatcher watcher = (CastSpellLastTurnWatcher) game.getState().getWatchers().get(CastSpellLastTurnWatcher.class.getSimpleName());
|
||||
if (watcher != null && watcher.getAmountOfSpellsPlayerCastOnCurrentTurn(permanent.getControllerId()) > 0) {
|
||||
return true;
|
||||
|
|
@ -113,7 +113,7 @@ class AngelicArbiterEffect2 extends ContinuousRuleModifyingEffectImpl {
|
|||
|
||||
@Override
|
||||
public boolean applies(GameEvent event, Ability source, Game game) {
|
||||
if (game.getActivePlayerId().equals(event.getPlayerId()) && game.getOpponents(source.getControllerId()).contains(event.getPlayerId())) {
|
||||
if (game.isActivePlayer(event.getPlayerId()) && game.getOpponents(source.getControllerId()).contains(event.getPlayerId())) {
|
||||
PlayerAttackedWatcher watcher = (PlayerAttackedWatcher) game.getState().getWatchers().get(PlayerAttackedWatcher.class.getSimpleName());
|
||||
if (watcher != null && watcher.getNumberOfAttackersCurrentTurn(event.getPlayerId()) > 0) {
|
||||
return true;
|
||||
|
|
|
|||
|
|
@ -62,7 +62,7 @@ class AngelicBenedictionTriggeredAbility extends TriggeredAbilityImpl {
|
|||
|
||||
@Override
|
||||
public boolean checkTrigger(GameEvent event, Game game) {
|
||||
if (game.getActivePlayerId().equals(this.controllerId)) {
|
||||
if (game.isActivePlayer(this.controllerId)) {
|
||||
if (game.getCombat().attacksAlone()) {
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
|||
import mage.abilities.common.LeavesBattlefieldTriggeredAbility;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.condition.common.SourceOnBattlefieldCondition;
|
||||
import mage.abilities.decorator.ConditionalTriggeredAbility;
|
||||
import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility;
|
||||
import mage.abilities.effects.ContinuousEffectImpl;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.continuous.BoostEnchantedEffect;
|
||||
|
|
@ -47,7 +47,7 @@ public final class AnimateDead extends CardImpl {
|
|||
// When Animate Dead enters the battlefield, if it's on the battlefield, it loses "enchant creature card in a graveyard"
|
||||
// and gains "enchant creature put onto the battlefield with Animate Dead." Return enchanted creature card to the battlefield
|
||||
// under your control and attach Animate Dead to it. When Animate Dead leaves the battlefield, that creature's controller sacrifices it.
|
||||
Ability ability = new ConditionalTriggeredAbility(
|
||||
Ability ability = new ConditionalInterveningIfTriggeredAbility(
|
||||
new EntersBattlefieldTriggeredAbility(new AnimateDeadReAttachEffect(), false),
|
||||
SourceOnBattlefieldCondition.instance,
|
||||
"When {this} enters the battlefield, if it's on the battlefield, it loses \"enchant creature card in a graveyard\" and gains \"enchant creature put onto the battlefield with {this}.\" Return enchanted creature card to the battlefield under your control and attach {this} to it.");
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ import mage.MageInt;
|
|||
import mage.abilities.TriggeredAbility;
|
||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||
import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition;
|
||||
import mage.abilities.decorator.ConditionalTriggeredAbility;
|
||||
import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility;
|
||||
import mage.abilities.effects.common.GainLifeEffect;
|
||||
import mage.abilities.keyword.FlyingAbility;
|
||||
import mage.cards.CardImpl;
|
||||
|
|
@ -42,7 +42,7 @@ public final class ApothecaryGeist extends CardImpl {
|
|||
|
||||
// When Apothecary Geist enters the battlefield, if you control another Spirit, you gain 3 life.
|
||||
TriggeredAbility triggeredAbility = new EntersBattlefieldTriggeredAbility(new GainLifeEffect(3));
|
||||
this.addAbility(new ConditionalTriggeredAbility(
|
||||
this.addAbility(new ConditionalInterveningIfTriggeredAbility(
|
||||
triggeredAbility,
|
||||
new PermanentsOnTheBattlefieldCondition(filter),
|
||||
"When {this} enters the battlefield, if you control another Spirit, you gain 3 life."));
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ import mage.abilities.common.AttacksCreatureYouControlTriggeredAbility;
|
|||
import mage.abilities.common.BeginningOfCombatTriggeredAbility;
|
||||
import mage.abilities.condition.common.SourceOnBattlefieldOrCommandZoneCondition;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.decorator.ConditionalTriggeredAbility;
|
||||
import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility;
|
||||
import mage.abilities.effects.ContinuousEffect;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.DoIfCostPaid;
|
||||
|
|
@ -56,7 +56,7 @@ public final class ArahboRoarOfTheWorld extends CardImpl {
|
|||
this.toughness = new MageInt(5);
|
||||
|
||||
// Eminence — At the beginning of combat on your turn, if Arahbo, Roar of the World is in the command zone or on the battlefield, another target Cat you control gets +3/+3 until end of turn.
|
||||
Ability ability = new ConditionalTriggeredAbility(
|
||||
Ability ability = new ConditionalInterveningIfTriggeredAbility(
|
||||
new BeginningOfCombatTriggeredAbility(Zone.ALL, new BoostTargetEffect(3, 3, Duration.EndOfTurn), TargetController.YOU, false, false),
|
||||
SourceOnBattlefieldOrCommandZoneCondition.instance,
|
||||
"<i>Eminence</i> — At the beginning of combat on your turn, if Arahbo, Roar of the World is in the command zone or on the battlefield, another target Cat you control gets +3/+3 until end of turn.");
|
||||
|
|
|
|||
|
|
@ -133,7 +133,7 @@ class ArchonOfValorsReachChoice extends ChoiceImpl {
|
|||
return CardType.INSTANT;
|
||||
case "Sorcery":
|
||||
return CardType.SORCERY;
|
||||
case "Planewswalker":
|
||||
case "Planeswalker":
|
||||
return CardType.PLANESWALKER;
|
||||
default:
|
||||
return null;
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ import mage.abilities.common.SimpleActivatedAbility;
|
|||
import mage.abilities.condition.common.FatefulHourCondition;
|
||||
import mage.abilities.costs.common.PayLifeCost;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.decorator.ConditionalTriggeredAbility;
|
||||
import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility;
|
||||
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
|
||||
import mage.abilities.effects.common.TransformSourceEffect;
|
||||
import mage.abilities.keyword.TransformAbility;
|
||||
|
|
@ -40,7 +40,7 @@ public final class ArguelsBloodFast extends CardImpl {
|
|||
|
||||
// At the beginning of your upkeep, if you have 5 or less life, you may transform Arguel's Blood Fast.
|
||||
this.addAbility(new TransformAbility());
|
||||
this.addAbility(new ConditionalTriggeredAbility(
|
||||
this.addAbility(new ConditionalInterveningIfTriggeredAbility(
|
||||
new BeginningOfUpkeepTriggeredAbility(new TransformSourceEffect(true), TargetController.YOU, true),
|
||||
FatefulHourCondition.instance,
|
||||
"At the beginning of your upkeep, if you have 5 or less life, you may transform {this}"
|
||||
|
|
|
|||
|
|
@ -74,7 +74,7 @@ class AbilityActivatedTriggeredAbility extends TriggeredAbilityImpl {
|
|||
@Override
|
||||
public boolean checkTrigger(GameEvent event, Game game) {
|
||||
Permanent aura = game.getPermanent(this.getSourceId());
|
||||
return aura != null && aura.getAttachedTo() != null && aura.getAttachedTo().equals(event.getSourceId());
|
||||
return aura != null && aura.isAttachedTo(event.getSourceId());
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ import mage.abilities.Ability;
|
|||
import mage.abilities.common.AttacksTriggeredAbility;
|
||||
import mage.abilities.common.BecomesBlockedTriggeredAbility;
|
||||
import mage.abilities.condition.common.HateCondition;
|
||||
import mage.abilities.decorator.ConditionalTriggeredAbility;
|
||||
import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility;
|
||||
import mage.abilities.dynamicvalue.common.BlockedCreatureCount;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.common.combat.BlocksIfAbleTargetEffect;
|
||||
|
|
@ -45,7 +45,7 @@ public final class AsajjVentress extends CardImpl {
|
|||
this.addAbility(new BecomesBlockedTriggeredAbility(effect, false));
|
||||
|
||||
// <i>Hate</i> — Whenever Asajj Ventress attacks, if an opponent lost life from a source other than combat damage this turn, target creature blocks this turn if able.
|
||||
Ability ability = new ConditionalTriggeredAbility(
|
||||
Ability ability = new ConditionalInterveningIfTriggeredAbility(
|
||||
new AttacksTriggeredAbility(new BlocksIfAbleTargetEffect(Duration.EndOfTurn), false),
|
||||
HateCondition.instance,
|
||||
"<i>Hate</i> — Whenever Asajj Ventress attacks, if an opponent lost life from a source other than combat damage this turn, target creature blocks this turn if able");
|
||||
|
|
|
|||
|
|
@ -61,8 +61,8 @@ enum AshenGhoulCondition implements Condition {
|
|||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player controller = game.getPlayer(source.getControllerId());
|
||||
if (!game.getStep().getType().equals(PhaseStep.UPKEEP)
|
||||
|| !game.getActivePlayerId().equals(source.getControllerId())) {
|
||||
if (game.getStep().getType() != PhaseStep.UPKEEP
|
||||
|| !game.isActivePlayer(source.getControllerId())) {
|
||||
return false;
|
||||
}
|
||||
if (controller != null) {
|
||||
|
|
|
|||
|
|
@ -95,8 +95,8 @@ public final class AssaultSuit extends CardImpl {
|
|||
public boolean applies(GameEvent event, Ability source, Game game) {
|
||||
if (event.getType() == GameEvent.EventType.SACRIFICE_PERMANENT) {
|
||||
Permanent equipment = game.getPermanent(source.getSourceId());
|
||||
if (equipment != null && equipment.getAttachedTo() != null) {
|
||||
return equipment.getAttachedTo().equals(event.getTargetId());
|
||||
if (equipment != null) {
|
||||
return equipment.isAttachedTo(event.getTargetId());
|
||||
}
|
||||
}
|
||||
return false;
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ import mage.abilities.Ability;
|
|||
import mage.abilities.common.BeginningOfUpkeepTriggeredAbility;
|
||||
import mage.abilities.condition.common.CardsInHandCondition;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.decorator.ConditionalTriggeredAbility;
|
||||
import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
|
||||
import mage.abilities.effects.common.LoseLifeSourceControllerEffect;
|
||||
|
|
@ -33,7 +33,7 @@ public final class AsylumVisitor extends CardImpl {
|
|||
this.toughness = new MageInt(1);
|
||||
|
||||
// At the beginning of each player's upkeep, if that player has no cards in hand, you draw a card and you lose 1 life.
|
||||
Ability ability = new ConditionalTriggeredAbility(new BeginningOfUpkeepTriggeredAbility(new DrawCardSourceControllerEffect(1), TargetController.ANY, false),
|
||||
Ability ability = new ConditionalInterveningIfTriggeredAbility(new BeginningOfUpkeepTriggeredAbility(new DrawCardSourceControllerEffect(1), TargetController.ANY, false),
|
||||
new CardsInHandCondition(ComparisonType.EQUAL_TO, 0, null, TargetController.ACTIVE),
|
||||
"At the beginning of each player's upkeep, if that player has no cards in hand, you draw a card and you lose 1 life.");
|
||||
Effect effect = new LoseLifeSourceControllerEffect(1);
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ import mage.MageInt;
|
|||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.AttacksTriggeredAbility;
|
||||
import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition;
|
||||
import mage.abilities.decorator.ConditionalTriggeredAbility;
|
||||
import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility;
|
||||
import mage.abilities.effects.common.TapTargetEffect;
|
||||
import mage.constants.SubType;
|
||||
import mage.cards.CardImpl;
|
||||
|
|
@ -37,7 +37,7 @@ public final class AuroraChampion extends CardImpl {
|
|||
this.toughness = new MageInt(2);
|
||||
|
||||
// Whenever Aurora Champion attacks, if your team controls another Warrior, tap target creature.
|
||||
Ability ability = new ConditionalTriggeredAbility(
|
||||
Ability ability = new ConditionalInterveningIfTriggeredAbility(
|
||||
new AttacksTriggeredAbility(new TapTargetEffect(), false),
|
||||
new PermanentsOnTheBattlefieldCondition(filter),
|
||||
"Whenever {this} attacks, if your team controls another Warrior, tap target creature."
|
||||
|
|
|
|||
|
|
@ -123,7 +123,7 @@ class AzorTheLawbringerCantCastEffect extends ContinuousRuleModifyingEffectImpl
|
|||
@Override
|
||||
public boolean applies(GameEvent event, Ability source, Game game) {
|
||||
UUID opponentId = getTargetPointer().getFirst(game, source);
|
||||
if (game.getActivePlayerId().equals(opponentId)) {
|
||||
if (game.isActivePlayer(opponentId)) {
|
||||
if (playersNextTurn == 0) {
|
||||
playersNextTurn = game.getTurnNum();
|
||||
}
|
||||
|
|
|
|||
89
Mage.Sets/src/mage/cards/b/BalduvianFallen.java
Normal file
89
Mage.Sets/src/mage/cards/b/BalduvianFallen.java
Normal file
|
|
@ -0,0 +1,89 @@
|
|||
package mage.cards.b;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.TriggeredAbilityImpl;
|
||||
import mage.abilities.dynamicvalue.DynamicValue;
|
||||
import mage.abilities.dynamicvalue.common.StaticValue;
|
||||
import mage.abilities.effects.common.continuous.BoostSourceEffect;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.SubType;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.keyword.CumulativeUpkeepAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Zone;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.game.events.ManaEvent;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author noahg
|
||||
*/
|
||||
public final class BalduvianFallen extends CardImpl {
|
||||
|
||||
public BalduvianFallen(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{B}");
|
||||
|
||||
this.subtype.add(SubType.ZOMBIE);
|
||||
this.power = new MageInt(3);
|
||||
this.toughness = new MageInt(5);
|
||||
|
||||
// Cumulative upkeep {1}
|
||||
this.addAbility(new CumulativeUpkeepAbility(new ManaCostsImpl("{1}")));
|
||||
|
||||
// Whenever Balduvian Fallen's cumulative upkeep is paid, it gets +1/+0 until end of turn for each {B} or {R} spent this way.
|
||||
this.addAbility(new BalduvianFallenAbility());
|
||||
}
|
||||
|
||||
public BalduvianFallen(final BalduvianFallen card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public BalduvianFallen copy() {
|
||||
return new BalduvianFallen(this);
|
||||
}
|
||||
}
|
||||
|
||||
class BalduvianFallenAbility extends TriggeredAbilityImpl {
|
||||
|
||||
public BalduvianFallenAbility() {
|
||||
super(Zone.BATTLEFIELD, null, false);
|
||||
}
|
||||
|
||||
public BalduvianFallenAbility(final BalduvianFallenAbility ability) {
|
||||
super(ability);
|
||||
}
|
||||
|
||||
@Override
|
||||
public BalduvianFallenAbility copy() {
|
||||
return new BalduvianFallenAbility(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkEventType(GameEvent event, Game game) {
|
||||
return event.getType() == GameEvent.EventType.PAID_CUMULATIVE_UPKEEP;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkTrigger(GameEvent event, Game game) {
|
||||
this.getEffects().clear();
|
||||
if(event.getSourceId() != null && event.getSourceId().equals(this.getSourceId()) && event instanceof ManaEvent) {
|
||||
ManaEvent manaEvent = (ManaEvent) event;
|
||||
int total = manaEvent.getMana().getBlack() + manaEvent.getMana().getRed();
|
||||
if (total > 0) {
|
||||
this.getEffects().add(new BoostSourceEffect(total, 0, Duration.EndOfTurn));
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getRule() {
|
||||
return "Whenever {this}'s cumulative upkeep is paid, it gets +1/+0 until end of turn for each {B} or {R} spent this way";
|
||||
}
|
||||
}
|
||||
|
|
@ -7,7 +7,7 @@ import mage.abilities.TriggeredAbility;
|
|||
import mage.abilities.common.AttacksEachCombatStaticAbility;
|
||||
import mage.abilities.common.BeginningOfUpkeepTriggeredAbility;
|
||||
import mage.abilities.condition.common.TwoOrMoreSpellsWereCastLastTurnCondition;
|
||||
import mage.abilities.decorator.ConditionalTriggeredAbility;
|
||||
import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility;
|
||||
import mage.abilities.effects.common.TransformSourceEffect;
|
||||
import mage.abilities.keyword.TransformAbility;
|
||||
import mage.cards.CardImpl;
|
||||
|
|
@ -38,7 +38,7 @@ public final class BaneOfHanweir extends CardImpl {
|
|||
|
||||
// At the beginning of each upkeep, if a player cast two or more spells last turn, transform Bane of Hanweir.
|
||||
TriggeredAbility ability = new BeginningOfUpkeepTriggeredAbility(new TransformSourceEffect(false), TargetController.ANY, false);
|
||||
this.addAbility(new ConditionalTriggeredAbility(ability, TwoOrMoreSpellsWereCastLastTurnCondition.instance, TransformAbility.TWO_OR_MORE_SPELLS_TRANSFORM_RULE));
|
||||
this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, TwoOrMoreSpellsWereCastLastTurnCondition.instance, TransformAbility.TWO_OR_MORE_SPELLS_TRANSFORM_RULE));
|
||||
}
|
||||
|
||||
public BaneOfHanweir(final BaneOfHanweir card) {
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ import mage.abilities.common.BeginningOfUpkeepTriggeredAbility;
|
|||
import mage.abilities.condition.CompoundCondition;
|
||||
import mage.abilities.condition.common.CardsInHandCondition;
|
||||
import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition;
|
||||
import mage.abilities.decorator.ConditionalTriggeredAbility;
|
||||
import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility;
|
||||
import mage.abilities.effects.common.WinGameSourceControllerEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
|
|
@ -31,7 +31,7 @@ public final class BarrenGlory extends CardImpl {
|
|||
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{4}{W}{W}");
|
||||
|
||||
// At the beginning of your upkeep, if you control no permanents other than Barren Glory and have no cards in hand, you win the game.
|
||||
this.addAbility(new ConditionalTriggeredAbility(
|
||||
this.addAbility(new ConditionalInterveningIfTriggeredAbility(
|
||||
new BeginningOfUpkeepTriggeredAbility(new WinGameSourceControllerEffect(), TargetController.YOU, false),
|
||||
new CompoundCondition(
|
||||
new CardsInHandCondition(ComparisonType.EQUAL_TO, 0),
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ import mage.abilities.Ability;
|
|||
import mage.abilities.TriggeredAbility;
|
||||
import mage.abilities.common.BeginningOfUpkeepTriggeredAbility;
|
||||
import mage.abilities.condition.Condition;
|
||||
import mage.abilities.decorator.ConditionalTriggeredAbility;
|
||||
import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility;
|
||||
import mage.abilities.effects.common.WinGameSourceControllerEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
|
|
@ -27,7 +27,7 @@ public final class BattleOfWits extends CardImpl {
|
|||
|
||||
// At the beginning of your upkeep, if you have 200 or more cards in your library, you win the game.
|
||||
TriggeredAbility ability = new BeginningOfUpkeepTriggeredAbility(new WinGameSourceControllerEffect(), TargetController.YOU, false);
|
||||
this.addAbility(new ConditionalTriggeredAbility(ability, new BattleOfWitsCondition(), "At the beginning of your upkeep, if you have 200 or more cards in your library, you win the game."));
|
||||
this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, new BattleOfWitsCondition(), "At the beginning of your upkeep, if you have 200 or more cards in your library, you win the game."));
|
||||
}
|
||||
|
||||
public BattleOfWits(final BattleOfWits card) {
|
||||
|
|
|
|||
|
|
@ -77,7 +77,7 @@ class BattlegraceAngelAbility extends TriggeredAbilityImpl {
|
|||
|
||||
@Override
|
||||
public boolean checkTrigger(GameEvent event, Game game) {
|
||||
if (game.getActivePlayerId().equals(this.controllerId) ) {
|
||||
if (game.isActivePlayer(this.controllerId) ) {
|
||||
if (game.getCombat().attacksAlone()) {
|
||||
for (Effect effect: this.getEffects()) {
|
||||
effect.setTargetPointer(new FixedTarget(game.getCombat().getAttackers().get(0)));
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ import mage.MageInt;
|
|||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||
import mage.abilities.condition.InvertCondition;
|
||||
import mage.abilities.condition.common.RaidCondition;
|
||||
import mage.abilities.decorator.ConditionalTriggeredAbility;
|
||||
import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility;
|
||||
import mage.abilities.effects.common.LoseLifeSourceControllerEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
|
|
@ -29,7 +29,7 @@ public final class BellowingSaddlebrute extends CardImpl {
|
|||
this.toughness = new MageInt(5);
|
||||
|
||||
// Raid - When Bellowing Saddlebrute enters the battlefield, you lose 4 life unless you attacked with a creature this turn
|
||||
this.addAbility(new ConditionalTriggeredAbility(
|
||||
this.addAbility(new ConditionalInterveningIfTriggeredAbility(
|
||||
new EntersBattlefieldTriggeredAbility(new LoseLifeSourceControllerEffect(4)),
|
||||
new InvertCondition(RaidCondition.instance),
|
||||
"<i>Raid</i> — When {this} enters the battlefield, you lose 4 life unless you attacked with a creature this turn"
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ import mage.MageInt;
|
|||
import mage.abilities.TriggeredAbility;
|
||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||
import mage.abilities.condition.common.KickedCondition;
|
||||
import mage.abilities.decorator.ConditionalTriggeredAbility;
|
||||
import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility;
|
||||
import mage.abilities.effects.common.DestroyTargetEffect;
|
||||
import mage.abilities.keyword.KickerAbility;
|
||||
import mage.cards.CardImpl;
|
||||
|
|
@ -33,7 +33,7 @@ public final class BenalishEmissary extends CardImpl {
|
|||
// When Benalish Emissary enters the battlefield, if it was kicked, destroy target land.
|
||||
TriggeredAbility ability = new EntersBattlefieldTriggeredAbility(new DestroyTargetEffect());
|
||||
ability.addTarget(new TargetLandPermanent());
|
||||
this.addAbility(new ConditionalTriggeredAbility(ability, KickedCondition.instance,
|
||||
this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, KickedCondition.instance,
|
||||
"When {this} enters the battlefield, if it was kicked, destroy target land."));
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ import mage.MageInt;
|
|||
import mage.abilities.TriggeredAbility;
|
||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||
import mage.abilities.condition.common.MetalcraftCondition;
|
||||
import mage.abilities.decorator.ConditionalTriggeredAbility;
|
||||
import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility;
|
||||
import mage.abilities.effects.common.continuous.BoostSourceEffect;
|
||||
import mage.abilities.effects.common.continuous.GainAbilitySourceEffect;
|
||||
import mage.abilities.keyword.HasteAbility;
|
||||
|
|
@ -31,9 +31,10 @@ public final class BladeTribeBerserkers extends CardImpl {
|
|||
this.power = new MageInt(3);
|
||||
this.toughness = new MageInt(3);
|
||||
|
||||
//Metalcraft - When Blade-Tribe Berserkers enters the battlefield, if you control three or more artifacts, Blade-Tribe Berserkers gets +3/+3 and gains haste until end of turn.
|
||||
TriggeredAbility ability = new EntersBattlefieldTriggeredAbility(new BoostSourceEffect(3, 3, Duration.EndOfTurn), false);
|
||||
ability.addEffect(new GainAbilitySourceEffect(HasteAbility.getInstance(), Duration.EndOfTurn));
|
||||
this.addAbility(new ConditionalTriggeredAbility(ability, MetalcraftCondition.instance, effectText));
|
||||
this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, MetalcraftCondition.instance, effectText));
|
||||
}
|
||||
|
||||
public BladeTribeBerserkers(final BladeTribeBerserkers card) {
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ import mage.MageInt;
|
|||
import mage.abilities.TriggeredAbility;
|
||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||
import mage.abilities.condition.common.MetalcraftCondition;
|
||||
import mage.abilities.decorator.ConditionalTriggeredAbility;
|
||||
import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility;
|
||||
import mage.abilities.effects.common.GainLifeEffect;
|
||||
import mage.abilities.effects.common.LoseLifeTargetEffect;
|
||||
import mage.cards.CardImpl;
|
||||
|
|
@ -31,12 +31,13 @@ public final class BleakCovenVampires extends CardImpl {
|
|||
this.power = new MageInt(4);
|
||||
this.toughness = new MageInt(3);
|
||||
|
||||
//Metalcraft - When Bleak Coven Vampires enters the battlefield, if you control three or more artifacts, target player loses 4 life and you gain 4 life.
|
||||
TriggeredAbility ability = new EntersBattlefieldTriggeredAbility(new LoseLifeTargetEffect(4), false);
|
||||
ability.addEffect(new GainLifeEffect(4));
|
||||
Target target = new TargetPlayer();
|
||||
ability.addTarget(target);
|
||||
|
||||
this.addAbility(new ConditionalTriggeredAbility(ability, MetalcraftCondition.instance, effectText));
|
||||
this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, MetalcraftCondition.instance, effectText));
|
||||
}
|
||||
|
||||
public BleakCovenVampires(final BleakCovenVampires card) {
|
||||
|
|
|
|||
|
|
@ -72,12 +72,7 @@ class BloodSunEffect extends ContinuousEffectImpl {
|
|||
for (Permanent permanent : game.getState().getBattlefield().getActivePermanents(StaticFilters.FILTER_LANDS, player.getId(), source.getSourceId(), game)) {
|
||||
switch (layer) {
|
||||
case AbilityAddingRemovingEffects_6:
|
||||
for (Iterator<Ability> it = permanent.getAbilities().iterator(); it.hasNext();) {
|
||||
Ability ability = it.next();
|
||||
if (!ability.getAbilityType().equals(AbilityType.MANA)) {
|
||||
it.remove();
|
||||
}
|
||||
}
|
||||
permanent.getAbilities().removeIf(ability -> ability.getAbilityType() != AbilityType.MANA);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ import mage.abilities.common.BeginningOfEndStepTriggeredAbility;
|
|||
import mage.abilities.common.PutCardIntoGraveFromAnywhereAllTriggeredAbility;
|
||||
import mage.abilities.condition.common.OpponentLostLifeCondition;
|
||||
import mage.abilities.condition.common.SourceHasCounterCondition;
|
||||
import mage.abilities.decorator.ConditionalTriggeredAbility;
|
||||
import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility;
|
||||
import mage.abilities.effects.common.GainLifeEffect;
|
||||
import mage.abilities.effects.common.LoseLifeTargetEffect;
|
||||
import mage.abilities.effects.common.counter.AddCountersSourceEffect;
|
||||
|
|
@ -38,7 +38,7 @@ public final class BloodchiefAscension extends CardImpl {
|
|||
true));
|
||||
|
||||
// Whenever a card is put into an opponent's graveyard from anywhere, if Bloodchief Ascension has three or more quest counters on it, you may have that player lose 2 life. If you do, you gain 2 life.
|
||||
Ability ability = new ConditionalTriggeredAbility(
|
||||
Ability ability = new ConditionalInterveningIfTriggeredAbility(
|
||||
new PutCardIntoGraveFromAnywhereAllTriggeredAbility(
|
||||
new LoseLifeTargetEffect(2), true, new FilterCard("a card"), TargetController.OPPONENT, SetTargetPointer.PLAYER),
|
||||
new SourceHasCounterCondition(CounterType.QUEST, 3, Integer.MAX_VALUE),
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ import mage.abilities.TriggeredAbility;
|
|||
import mage.abilities.common.EntersBattlefieldOrAttacksSourceTriggeredAbility;
|
||||
import mage.abilities.condition.common.HellbentCondition;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.decorator.ConditionalTriggeredAbility;
|
||||
import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility;
|
||||
import mage.abilities.effects.common.DamageTargetEffect;
|
||||
import mage.abilities.keyword.MadnessAbility;
|
||||
import mage.cards.CardImpl;
|
||||
|
|
@ -31,7 +31,7 @@ public final class BloodhallPriest extends CardImpl {
|
|||
// Whenever Bloodhall Priest enters the battlefield or attacks, if you have no cards in hand, Bloodhall Priest deals 2 damage to any target.
|
||||
TriggeredAbility triggeredAbility = new EntersBattlefieldOrAttacksSourceTriggeredAbility(new DamageTargetEffect(2));
|
||||
triggeredAbility.addTarget(new TargetAnyTarget());
|
||||
this.addAbility(new ConditionalTriggeredAbility(
|
||||
this.addAbility(new ConditionalInterveningIfTriggeredAbility(
|
||||
triggeredAbility,
|
||||
HellbentCondition.instance,
|
||||
"Whenever {this} enters the battlefield or attacks, if you have no cards in hand, {this} deals 2 damage to any target"
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ import mage.abilities.Ability;
|
|||
import mage.abilities.TriggeredAbility;
|
||||
import mage.abilities.common.DiesCreatureTriggeredAbility;
|
||||
import mage.abilities.condition.Condition;
|
||||
import mage.abilities.decorator.ConditionalTriggeredAbility;
|
||||
import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.cards.CardImpl;
|
||||
|
|
@ -34,12 +34,12 @@ public final class BlowflyInfestation extends CardImpl {
|
|||
public BlowflyInfestation(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{2}{B}");
|
||||
|
||||
|
||||
//Whenever a creature dies, if it had a -1/-1 counter on it, put a -1/-1 counter on target creature.
|
||||
Effect effect = new BlowflyInfestationEffect();
|
||||
TriggeredAbility triggeredAbility = new DiesCreatureTriggeredAbility(effect, false, false, true);
|
||||
triggeredAbility.addTarget(new TargetCreaturePermanent());
|
||||
Condition condition = new BlowflyInfestationCondition();
|
||||
this.addAbility(new ConditionalTriggeredAbility(triggeredAbility, condition, rule));
|
||||
this.addAbility(new ConditionalInterveningIfTriggeredAbility(triggeredAbility, condition, rule));
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -92,7 +92,7 @@ class DiesWhileInGraveyardTriggeredAbility extends TriggeredAbilityImpl {
|
|||
public boolean checkTrigger(GameEvent event, Game game) {
|
||||
ZoneChangeEvent zEvent = (ZoneChangeEvent) event;
|
||||
for (Zone z : Zone.values()) {
|
||||
if (game.getShortLivingLKI(sourceId, z) && !z.equals(Zone.GRAVEYARD)) {
|
||||
if (game.getShortLivingLKI(sourceId, z) && z != Zone.GRAVEYARD) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
97
Mage.Sets/src/mage/cards/b/BoobyTrap.java
Normal file
97
Mage.Sets/src/mage/cards/b/BoobyTrap.java
Normal file
|
|
@ -0,0 +1,97 @@
|
|||
package mage.cards.b;
|
||||
|
||||
import mage.abilities.TriggeredAbilityImpl;
|
||||
import mage.abilities.common.AsEntersBattlefieldAbility;
|
||||
import mage.abilities.costs.common.SacrificeSourceCost;
|
||||
import mage.abilities.effects.common.ChooseACardNameEffect;
|
||||
import mage.abilities.effects.common.ChooseOpponentEffect;
|
||||
import mage.abilities.effects.common.DamageTargetEffect;
|
||||
import mage.abilities.effects.common.DoIfCostPaid;
|
||||
import mage.cards.Card;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.cards.CardsImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.Zone;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.players.Player;
|
||||
import mage.target.targetpointer.FixedTarget;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author noahg
|
||||
*/
|
||||
public final class BoobyTrap extends CardImpl {
|
||||
|
||||
public BoobyTrap(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT}, "{6}");
|
||||
|
||||
// As Booby Trap enters the battlefield, name a card other than a basic land card and choose an opponent.
|
||||
AsEntersBattlefieldAbility etbAbility = new AsEntersBattlefieldAbility(new ChooseACardNameEffect(ChooseACardNameEffect.TypeOfName.NOT_BASIC_LAND_NAME));
|
||||
etbAbility.addEffect(new ChooseOpponentEffect(Outcome.Damage));
|
||||
this.addAbility(etbAbility);
|
||||
|
||||
// The chosen player reveals each card he or she draws.
|
||||
// When the chosen player draws the named card, sacrifice Booby Trap. If you do, Booby Trap deals 10 damage to that player.
|
||||
this.addAbility(new BoobyTrapTriggeredAbility());
|
||||
}
|
||||
|
||||
public BoobyTrap(final BoobyTrap card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public BoobyTrap copy() {
|
||||
return new BoobyTrap(this);
|
||||
}
|
||||
}
|
||||
|
||||
class BoobyTrapTriggeredAbility extends TriggeredAbilityImpl {
|
||||
|
||||
public BoobyTrapTriggeredAbility() {
|
||||
super(Zone.BATTLEFIELD, new DoIfCostPaid(new DamageTargetEffect(10, true, "that player"), new SacrificeSourceCost(), "", false), false);
|
||||
}
|
||||
|
||||
public BoobyTrapTriggeredAbility(BoobyTrapTriggeredAbility ability) {
|
||||
super(ability);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkEventType(GameEvent event, Game game) {
|
||||
return event.getType() == GameEvent.EventType.DREW_CARD;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkTrigger(GameEvent event, Game game) {
|
||||
Player controller = game.getPlayer(getControllerId());
|
||||
if (event.getPlayerId() == null || game.getState() == null || controller == null) {
|
||||
return false;
|
||||
}
|
||||
if (event.getPlayerId().equals(game.getState().getValue(getSourceId().toString() + ChooseOpponentEffect.VALUE_KEY))) {
|
||||
Card drawn = game.getCard(event.getTargetId());
|
||||
if (drawn != null) {
|
||||
controller.revealCards(this, new CardsImpl(drawn), game);
|
||||
if (drawn.getName().equals(game.getState().getValue(getSourceId().toString() + ChooseACardNameEffect.INFO_KEY))) {
|
||||
//Set target
|
||||
this.getEffects().get(0).setTargetPointer(new FixedTarget(event.getPlayerId()));
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public BoobyTrapTriggeredAbility copy() {
|
||||
return new BoobyTrapTriggeredAbility(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getRule() {
|
||||
return "The chosen player reveals each card he or she draws.\n" +
|
||||
"When the chosen player draws the named card, sacrifice {this}. If you do, {this} deals 10 damage to that player.";
|
||||
}
|
||||
}
|
||||
|
|
@ -13,11 +13,10 @@ import mage.abilities.costs.common.PayLifeCost;
|
|||
import mage.abilities.costs.common.TapSourceCost;
|
||||
import mage.abilities.effects.ContinuousRuleModifyingEffectImpl;
|
||||
import mage.abilities.mana.SimpleManaAbility;
|
||||
import mage.cards.Card;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.*;
|
||||
import mage.filter.FilterCard;
|
||||
import mage.filter.common.FilterInstantOrSorceryCard;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.game.stack.Spell;
|
||||
|
|
@ -42,9 +41,9 @@ public final class BoseijuWhoSheltersAll extends CardImpl {
|
|||
SimpleManaAbility ability = new SimpleManaAbility(Zone.BATTLEFIELD, mana, new TapSourceCost());
|
||||
ability.addCost(new PayLifeCost(2));
|
||||
ability.getEffects().get(0).setText("Add {C}. If that mana is spent on an instant or sorcery spell, that spell can't be countered");
|
||||
this.addAbility(ability);
|
||||
this.addAbility(ability, new BoseijuWhoSheltersAllWatcher(ability.getOriginalId()));
|
||||
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new BoseijuWhoSheltersAllCantCounterEffect()), new BoseijuWhoSheltersAllWatcher());
|
||||
this.addAbility(new SimpleStaticAbility(Zone.ALL, new BoseijuWhoSheltersAllCantCounterEffect()));
|
||||
}
|
||||
|
||||
public BoseijuWhoSheltersAll(final BoseijuWhoSheltersAll card) {
|
||||
|
|
@ -59,14 +58,18 @@ public final class BoseijuWhoSheltersAll extends CardImpl {
|
|||
|
||||
class BoseijuWhoSheltersAllWatcher extends Watcher {
|
||||
|
||||
public List<UUID> spells = new ArrayList<>();
|
||||
private List<UUID> spells = new ArrayList<>();
|
||||
private final String originalId;
|
||||
|
||||
public BoseijuWhoSheltersAllWatcher() {
|
||||
super(BoseijuWhoSheltersAllWatcher.class.getSimpleName(), WatcherScope.GAME);
|
||||
public BoseijuWhoSheltersAllWatcher(UUID originalId) {
|
||||
super(BoseijuWhoSheltersAllWatcher.class.getSimpleName(), WatcherScope.CARD);
|
||||
this.originalId = originalId.toString();
|
||||
}
|
||||
|
||||
public BoseijuWhoSheltersAllWatcher(final BoseijuWhoSheltersAllWatcher watcher) {
|
||||
super(watcher);
|
||||
this.spells.addAll(watcher.spells);
|
||||
this.originalId = watcher.originalId;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
@ -77,14 +80,19 @@ class BoseijuWhoSheltersAllWatcher extends Watcher {
|
|||
@Override
|
||||
public void watch(GameEvent event, Game game) {
|
||||
if (event.getType() == GameEvent.EventType.MANA_PAID) {
|
||||
MageObject object = game.getObject(event.getSourceId());
|
||||
// TODO: Replace identification by name by better method that also works if ability is copied from other land with other name
|
||||
if (object != null && object.getName().equals("Boseiju, Who Shelters All") && event.getFlag()) {
|
||||
spells.add(event.getTargetId());
|
||||
if (event.getData() != null && event.getData().equals(originalId)) {
|
||||
Card spell = game.getCard(event.getTargetId());
|
||||
if (spell != null && (spell.isInstant() || spell.isSorcery())) {
|
||||
spells.add(event.getTargetId());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public boolean spellCantBeCountered(UUID spellId) {
|
||||
return spells.contains(spellId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void reset() {
|
||||
super.reset();
|
||||
|
|
@ -94,10 +102,8 @@ class BoseijuWhoSheltersAllWatcher extends Watcher {
|
|||
|
||||
class BoseijuWhoSheltersAllCantCounterEffect extends ContinuousRuleModifyingEffectImpl {
|
||||
|
||||
private static final FilterCard filter = new FilterInstantOrSorceryCard();
|
||||
|
||||
public BoseijuWhoSheltersAllCantCounterEffect() {
|
||||
super(Duration.WhileOnBattlefield, Outcome.Benefit);
|
||||
super(Duration.EndOfGame, Outcome.Benefit);
|
||||
staticText = null;
|
||||
}
|
||||
|
||||
|
|
@ -119,7 +125,7 @@ class BoseijuWhoSheltersAllCantCounterEffect extends ContinuousRuleModifyingEffe
|
|||
public String getInfoMessage(Ability source, GameEvent event, Game game) {
|
||||
MageObject sourceObject = game.getObject(source.getSourceId());
|
||||
if (sourceObject != null) {
|
||||
return "This spell can't be countered (" + sourceObject.getName() + ").";
|
||||
return "This spell can't be countered because mana from " + sourceObject.getName() + " was spent to cast it.";
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
|
@ -131,13 +137,8 @@ class BoseijuWhoSheltersAllCantCounterEffect extends ContinuousRuleModifyingEffe
|
|||
|
||||
@Override
|
||||
public boolean applies(GameEvent event, Ability source, Game game) {
|
||||
BoseijuWhoSheltersAllWatcher watcher = (BoseijuWhoSheltersAllWatcher) game.getState().getWatchers().get(BoseijuWhoSheltersAllWatcher.class.getSimpleName());
|
||||
BoseijuWhoSheltersAllWatcher watcher = (BoseijuWhoSheltersAllWatcher) game.getState().getWatchers().get(BoseijuWhoSheltersAllWatcher.class.getSimpleName(), source.getSourceId());
|
||||
Spell spell = game.getStack().getSpell(event.getTargetId());
|
||||
if (spell != null && watcher.spells.contains(spell.getId())) {
|
||||
if (filter.match(spell.getCard(), game)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
return spell != null && watcher != null && watcher.spellCantBeCountered(spell.getId());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -6,7 +6,7 @@ import mage.MageInt;
|
|||
import mage.abilities.TriggeredAbility;
|
||||
import mage.abilities.common.BeginningOfUpkeepTriggeredAbility;
|
||||
import mage.abilities.condition.common.TwoOrMoreSpellsWereCastLastTurnCondition;
|
||||
import mage.abilities.decorator.ConditionalTriggeredAbility;
|
||||
import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility;
|
||||
import mage.abilities.effects.common.TransformSourceEffect;
|
||||
import mage.abilities.keyword.TransformAbility;
|
||||
import mage.cards.CardImpl;
|
||||
|
|
@ -34,7 +34,7 @@ public final class BrandedHowler extends CardImpl {
|
|||
|
||||
// At the beginning of each upkeep, if a player cast two or more spells last turn, transform Branded Howler.
|
||||
TriggeredAbility ability = new BeginningOfUpkeepTriggeredAbility(new TransformSourceEffect(false), TargetController.ANY, false);
|
||||
this.addAbility(new ConditionalTriggeredAbility(ability, TwoOrMoreSpellsWereCastLastTurnCondition.instance, TransformAbility.TWO_OR_MORE_SPELLS_TRANSFORM_RULE));
|
||||
this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, TwoOrMoreSpellsWereCastLastTurnCondition.instance, TransformAbility.TWO_OR_MORE_SPELLS_TRANSFORM_RULE));
|
||||
}
|
||||
|
||||
public BrandedHowler(final BrandedHowler card) {
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ import mage.ObjectColor;
|
|||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||
import mage.abilities.condition.common.CastFromHandSourceCondition;
|
||||
import mage.abilities.decorator.ConditionalTriggeredAbility;
|
||||
import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility;
|
||||
import mage.abilities.effects.ContinuousEffect;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.DontUntapInControllersNextUntapStepTargetEffect;
|
||||
|
|
@ -40,7 +40,7 @@ public final class BreachingLeviathan extends CardImpl {
|
|||
this.toughness = new MageInt(9);
|
||||
|
||||
// When Breaching Leviathan enters the battlefield, if you cast it from your hand, tap all nonblue creatures. Those creatures don't untap during their controllers' next untap steps.
|
||||
this.addAbility(new ConditionalTriggeredAbility(
|
||||
this.addAbility(new ConditionalInterveningIfTriggeredAbility(
|
||||
new EntersBattlefieldTriggeredAbility(new BreachingLeviathanEffect(), false),
|
||||
CastFromHandSourceCondition.instance,
|
||||
"When {this} enters the battlefield, if you cast it from your hand, tap all nonblue creatures. Those creatures don't untap during their controllers' next untap steps."),
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ import mage.MageInt;
|
|||
import mage.abilities.TriggeredAbility;
|
||||
import mage.abilities.common.BeginningOfUpkeepTriggeredAbility;
|
||||
import mage.abilities.condition.common.NoSpellsWereCastLastTurnCondition;
|
||||
import mage.abilities.decorator.ConditionalTriggeredAbility;
|
||||
import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility;
|
||||
import mage.abilities.effects.common.TransformSourceEffect;
|
||||
import mage.abilities.keyword.TransformAbility;
|
||||
import mage.cards.CardImpl;
|
||||
|
|
@ -34,7 +34,7 @@ public final class BreakneckRider extends CardImpl {
|
|||
// At the beginning of each upkeep, if no spells were cast last turn, transform Breakneck Rider.
|
||||
this.addAbility(new TransformAbility());
|
||||
TriggeredAbility ability = new BeginningOfUpkeepTriggeredAbility(new TransformSourceEffect(true), TargetController.ANY, false);
|
||||
this.addAbility(new ConditionalTriggeredAbility(ability, NoSpellsWereCastLastTurnCondition.instance, TransformAbility.NO_SPELLS_TRANSFORM_RULE));
|
||||
this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, NoSpellsWereCastLastTurnCondition.instance, TransformAbility.NO_SPELLS_TRANSFORM_RULE));
|
||||
}
|
||||
|
||||
public BreakneckRider(final BreakneckRider card) {
|
||||
|
|
|
|||
|
|
@ -80,7 +80,7 @@ class BreathOfFuryAbility extends TriggeredAbilityImpl {
|
|||
Permanent enchantment = game.getPermanent(getSourceId());
|
||||
if (damageEvent.isCombatDamage()
|
||||
&& enchantment != null
|
||||
&& enchantment.getAttachedTo().equals(event.getSourceId())) {
|
||||
&& enchantment.isAttachedTo(event.getSourceId())) {
|
||||
Permanent creature = game.getPermanent(enchantment.getAttachedTo());
|
||||
if (creature != null) {
|
||||
for (Effect effect : getEffects()) {
|
||||
|
|
|
|||
|
|
@ -18,6 +18,8 @@ import mage.constants.SubType;
|
|||
import mage.constants.Zone;
|
||||
import mage.filter.FilterSpell;
|
||||
import static mage.filter.StaticFilters.FILTER_CONTROLLED_CREATURE_SHORT_TEXT;
|
||||
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.filter.predicate.Predicates;
|
||||
import mage.filter.predicate.mageobject.CardTypePredicate;
|
||||
import mage.target.TargetSpell;
|
||||
|
|
@ -30,7 +32,7 @@ import mage.target.common.TargetCreaturePermanent;
|
|||
*/
|
||||
public final class BrineShaman extends CardImpl {
|
||||
|
||||
private static final FilterSpell filter = new FilterSpell("noncreature spell");
|
||||
private static final FilterSpell filter = new FilterSpell("creature spell");
|
||||
|
||||
static {
|
||||
filter.add(Predicates.not(new CardTypePredicate(CardType.CREATURE)));
|
||||
|
|
@ -54,7 +56,7 @@ public final class BrineShaman extends CardImpl {
|
|||
ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new CounterTargetEffect(),
|
||||
new SacrificeTargetCost(new TargetControlledCreaturePermanent(FILTER_CONTROLLED_CREATURE_SHORT_TEXT)));
|
||||
ability.addCost(new ManaCostsImpl("{1}{U}{U}"));
|
||||
ability.addTarget(new TargetSpell(filter));
|
||||
ability.addTarget(new TargetSpell(StaticFilters.FILTER_SPELL_CREATURE));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ import mage.abilities.Ability;
|
|||
import mage.abilities.TriggeredAbility;
|
||||
import mage.abilities.common.BeginningOfUpkeepTriggeredAbility;
|
||||
import mage.abilities.condition.common.CardsInHandCondition;
|
||||
import mage.abilities.decorator.ConditionalTriggeredAbility;
|
||||
import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.SacrificeSourceEffect;
|
||||
import mage.cards.Card;
|
||||
|
|
@ -37,7 +37,7 @@ public final class BrinkOfMadness extends CardImpl {
|
|||
ability.addEffect(new BrinkOfMadnessEffect());
|
||||
ability.addTarget(new TargetOpponent());
|
||||
CardsInHandCondition contition = new CardsInHandCondition(ComparisonType.EQUAL_TO, 0);
|
||||
this.addAbility(new ConditionalTriggeredAbility(ability, contition, "At the beginning of your upkeep, if you have no cards in hand, sacrifice {this} and target opponent discards their hand."));
|
||||
this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, contition, "At the beginning of your upkeep, if you have no cards in hand, sacrifice {this} and target opponent discards their hand."));
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ import mage.abilities.common.SimpleActivatedAbility;
|
|||
import mage.abilities.common.SpellCastControllerTriggeredAbility;
|
||||
import mage.abilities.condition.common.SourceHasCounterCondition;
|
||||
import mage.abilities.costs.common.RemoveCountersSourceCost;
|
||||
import mage.abilities.decorator.ConditionalTriggeredAbility;
|
||||
import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility;
|
||||
import mage.abilities.effects.common.FlipSourceEffect;
|
||||
import mage.abilities.effects.common.continuous.BoostTargetEffect;
|
||||
import mage.abilities.effects.common.counter.AddCountersSourceEffect;
|
||||
|
|
@ -20,7 +20,6 @@ import mage.counters.CounterType;
|
|||
import mage.filter.StaticFilters;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.game.permanent.token.TokenImpl;
|
||||
import mage.game.permanent.token.Token;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
|
@ -44,7 +43,7 @@ public final class BudokaPupil extends CardImpl {
|
|||
this.addAbility(new SpellCastControllerTriggeredAbility(new AddCountersSourceEffect(CounterType.KI.createInstance()), StaticFilters.SPIRIT_OR_ARCANE_CARD, true));
|
||||
|
||||
// At the beginning of the end step, if there are two or more ki counters on Budoka Pupil, you may flip it.
|
||||
this.addAbility(new ConditionalTriggeredAbility(
|
||||
this.addAbility(new ConditionalInterveningIfTriggeredAbility(
|
||||
new OnEventTriggeredAbility(GameEvent.EventType.END_TURN_STEP_PRE, "beginning of the end step", true, new FlipSourceEffect(new IchigaWhoTopplesOaks()), true),
|
||||
new SourceHasCounterCondition(CounterType.KI, 2, Integer.MAX_VALUE),
|
||||
"At the beginning of the end step, if there are two or more ki counters on {this}, you may flip it."));
|
||||
|
|
|
|||
|
|
@ -77,7 +77,7 @@ class BuildersBaneEffect extends OneShotEffect {
|
|||
if (permanent.destroy(source.getSourceId(), game, false)) {
|
||||
game.applyEffects();
|
||||
if (permanent.getZoneChangeCounter(game) + 1 == game.getState().getZoneChangeCounter(permanent.getId())
|
||||
&& !game.getState().getZone(permanent.getId()).equals(Zone.GRAVEYARD)) {
|
||||
&& game.getState().getZone(permanent.getId()) != Zone.GRAVEYARD) {
|
||||
// A replacement effect has moved the card to another zone as grvayard
|
||||
continue;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ import java.util.UUID;
|
|||
import mage.MageInt;
|
||||
import mage.abilities.common.AttacksTriggeredAbility;
|
||||
import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition;
|
||||
import mage.abilities.decorator.ConditionalTriggeredAbility;
|
||||
import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility;
|
||||
import mage.abilities.effects.common.continuous.GainAbilitySourceEffect;
|
||||
import mage.abilities.keyword.FirstStrikeAbility;
|
||||
import mage.constants.SubType;
|
||||
|
|
@ -36,7 +36,7 @@ public final class BullRushBruiser extends CardImpl {
|
|||
this.toughness = new MageInt(3);
|
||||
|
||||
// Whenever Bull-Rush Bruiser attacks, if your team controls another Warrior, Bull-Rush Bruiser gains first strike until end of turn.
|
||||
this.addAbility(new ConditionalTriggeredAbility(
|
||||
this.addAbility(new ConditionalInterveningIfTriggeredAbility(
|
||||
new AttacksTriggeredAbility(new GainAbilitySourceEffect(FirstStrikeAbility.getInstance()), false),
|
||||
new PermanentsOnTheBattlefieldCondition(filter),
|
||||
"Whenever {this} attacks, if your team controls another Warrior, "
|
||||
|
|
|
|||
|
|
@ -18,40 +18,41 @@ import mage.target.common.TargetCreaturePermanent;
|
|||
*
|
||||
* @author ayratn
|
||||
*/
|
||||
public final class BurntheImpure extends CardImpl {
|
||||
public final class BurnTheImpure extends CardImpl {
|
||||
|
||||
public BurntheImpure(UUID ownerId, CardSetInfo setInfo) {
|
||||
public BurnTheImpure(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{1}{R}");
|
||||
|
||||
// Burn the Impure deals 3 damage to target creature. If that creature has infect, Burn the Impure deals 3 damage to that creature’s controller.
|
||||
this.getSpellAbility().addTarget(new TargetCreaturePermanent());
|
||||
this.getSpellAbility().addEffect(new BurntheImpureEffect());
|
||||
this.getSpellAbility().addEffect(new BurnTheImpureEffect());
|
||||
}
|
||||
|
||||
public BurntheImpure(final BurntheImpure card) {
|
||||
public BurnTheImpure(final BurnTheImpure card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public BurntheImpure copy() {
|
||||
return new BurntheImpure(this);
|
||||
public BurnTheImpure copy() {
|
||||
return new BurnTheImpure(this);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
class BurntheImpureEffect extends OneShotEffect {
|
||||
class BurnTheImpureEffect extends OneShotEffect {
|
||||
|
||||
public BurntheImpureEffect() {
|
||||
public BurnTheImpureEffect() {
|
||||
super(Outcome.Damage);
|
||||
staticText = "{this} deals 3 damage to target creature. If that creature has infect, {this} deals 3 damage to that creature's controller.";
|
||||
}
|
||||
|
||||
public BurntheImpureEffect(final BurntheImpureEffect effect) {
|
||||
public BurnTheImpureEffect(final BurnTheImpureEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public BurntheImpureEffect copy() {
|
||||
return new BurntheImpureEffect(this);
|
||||
public BurnTheImpureEffect copy() {
|
||||
return new BurnTheImpureEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
@ -6,7 +6,7 @@ import mage.MageInt;
|
|||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.DiesTriggeredAbility;
|
||||
import mage.abilities.condition.Condition;
|
||||
import mage.abilities.decorator.ConditionalTriggeredAbility;
|
||||
import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility;
|
||||
import mage.abilities.effects.common.DamageTargetEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
|
|
@ -31,7 +31,7 @@ public final class BurningEyeZubera extends CardImpl {
|
|||
this.toughness = new MageInt(3);
|
||||
|
||||
// When Burning-Eye Zubera dies, if 4 or more damage was dealt to it this turn, Burning-Eye Zubera deals 3 damage to any target.
|
||||
Ability ability = new ConditionalTriggeredAbility(new DiesTriggeredAbility(new DamageTargetEffect(3)),new SourceGotFourDamage(),
|
||||
Ability ability = new ConditionalInterveningIfTriggeredAbility(new DiesTriggeredAbility(new DamageTargetEffect(3)),new SourceGotFourDamage(),
|
||||
"When {this} dies, if 4 or more damage was dealt to it this turn, Burning-Eye Zubera deals 3 damage to any target");
|
||||
ability.addTarget(new TargetAnyTarget());
|
||||
this.addAbility(ability);
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ import java.util.UUID;
|
|||
import mage.MageInt;
|
||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||
import mage.abilities.condition.common.KickedCondition;
|
||||
import mage.abilities.decorator.ConditionalTriggeredAbility;
|
||||
import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility;
|
||||
import mage.abilities.dynamicvalue.common.StaticValue;
|
||||
import mage.abilities.effects.common.discard.DiscardEachPlayerEffect;
|
||||
import mage.abilities.keyword.KickerAbility;
|
||||
|
|
@ -32,7 +32,7 @@ public final class CaligoSkinWitch extends CardImpl {
|
|||
this.addAbility(new KickerAbility("{3}{B}"));
|
||||
|
||||
// When Caligo Skin-Witch enters the battlefield, if it was kicked, each opponent discards two cards.
|
||||
this.addAbility(new ConditionalTriggeredAbility(
|
||||
this.addAbility(new ConditionalInterveningIfTriggeredAbility(
|
||||
new EntersBattlefieldTriggeredAbility(new DiscardEachPlayerEffect(
|
||||
new StaticValue(2),
|
||||
false,
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ import mage.abilities.TriggeredAbility;
|
|||
import mage.abilities.common.BeginningOfYourEndStepTriggeredAbility;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.condition.common.RevoltCondition;
|
||||
import mage.abilities.decorator.ConditionalTriggeredAbility;
|
||||
import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility;
|
||||
import mage.abilities.dynamicvalue.common.CountersSourceCount;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.common.continuous.BoostControlledEffect;
|
||||
|
|
@ -34,7 +34,7 @@ public final class CallForUnity extends CardImpl {
|
|||
|
||||
// <i>Revolt</i> — At the beginning of your end step, if a permanent you controlled left the battlefield this turn, put a unity counter on Call for Unity.
|
||||
TriggeredAbility ability = new BeginningOfYourEndStepTriggeredAbility(new AddCountersSourceEffect(CounterType.UNITY.createInstance(), true), false);
|
||||
this.addAbility(new ConditionalTriggeredAbility(ability, RevoltCondition.instance, ruleText), new RevoltWatcher());
|
||||
this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, RevoltCondition.instance, ruleText), new RevoltWatcher());
|
||||
|
||||
// Creatures you control get +1/+1 for each unity counter on Call for Unity.
|
||||
Effect effect = new BoostControlledEffect(new CountersSourceCount(CounterType.UNITY), new CountersSourceCount(CounterType.UNITY), Duration.WhileOnBattlefield,
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ import mage.abilities.TriggeredAbility;
|
|||
import mage.abilities.common.BeginningOfUpkeepTriggeredAbility;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.condition.common.TwoOrMoreSpellsWereCastLastTurnCondition;
|
||||
import mage.abilities.decorator.ConditionalTriggeredAbility;
|
||||
import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.common.AttachEffect;
|
||||
import mage.abilities.effects.common.SacrificeSourceEffect;
|
||||
|
|
@ -47,7 +47,7 @@ public final class CallOfTheFullMoon extends CardImpl {
|
|||
|
||||
// At the beginning of each upkeep, if a player cast two or more spells last turn, sacrifice Call of the Full Moon.
|
||||
TriggeredAbility ability2 = new BeginningOfUpkeepTriggeredAbility(new SacrificeSourceEffect(), TargetController.ANY, false);
|
||||
this.addAbility(new ConditionalTriggeredAbility(ability2, TwoOrMoreSpellsWereCastLastTurnCondition.instance,
|
||||
this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability2, TwoOrMoreSpellsWereCastLastTurnCondition.instance,
|
||||
"At the beginning of each upkeep, if a player cast two or more spells last turn, sacrifice {this}."));
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ import mage.abilities.TriggeredAbility;
|
|||
import mage.abilities.common.BeginningOfUpkeepTriggeredAbility;
|
||||
import mage.abilities.common.OnEventTriggeredAbility;
|
||||
import mage.abilities.condition.common.CreatureCountCondition;
|
||||
import mage.abilities.decorator.ConditionalTriggeredAbility;
|
||||
import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility;
|
||||
import mage.abilities.effects.common.SacrificeEffect;
|
||||
import mage.abilities.effects.common.SacrificeSourceEffect;
|
||||
import mage.cards.CardImpl;
|
||||
|
|
@ -42,7 +42,7 @@ public final class CallToTheGrave extends CardImpl {
|
|||
this.addAbility(ability);
|
||||
// At the beginning of the end step, if no creatures are on the battlefield, sacrifice Call to the Grave.
|
||||
TriggeredAbility triggered = new OnEventTriggeredAbility(GameEvent.EventType.END_TURN_STEP_PRE, "beginning of the end step", true, new SacrificeSourceEffect());
|
||||
this.addAbility(new ConditionalTriggeredAbility(triggered, new CreatureCountCondition(0, TargetController.ANY), ruleText));
|
||||
this.addAbility(new ConditionalInterveningIfTriggeredAbility(triggered, new CreatureCountCondition(0, TargetController.ANY), ruleText));
|
||||
}
|
||||
|
||||
public CallToTheGrave(final CallToTheGrave card) {
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ import mage.abilities.common.SpellCastControllerTriggeredAbility;
|
|||
import mage.abilities.condition.common.SourceHasCounterCondition;
|
||||
import mage.abilities.costs.common.RemoveCountersSourceCost;
|
||||
import mage.abilities.costs.mana.GenericManaCost;
|
||||
import mage.abilities.decorator.ConditionalTriggeredAbility;
|
||||
import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility;
|
||||
import mage.abilities.effects.common.CounterUnlessPaysEffect;
|
||||
import mage.abilities.effects.common.FlipSourceEffect;
|
||||
import mage.abilities.effects.common.counter.AddCountersSourceEffect;
|
||||
|
|
@ -24,7 +24,6 @@ import mage.counters.CounterType;
|
|||
import mage.filter.StaticFilters;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.game.permanent.token.TokenImpl;
|
||||
import mage.game.permanent.token.Token;
|
||||
import mage.target.TargetSpell;
|
||||
|
||||
/**
|
||||
|
|
@ -47,7 +46,7 @@ public final class CallowJushi extends CardImpl {
|
|||
this.addAbility(new SpellCastControllerTriggeredAbility(new AddCountersSourceEffect(CounterType.KI.createInstance()), StaticFilters.SPIRIT_OR_ARCANE_CARD, true));
|
||||
|
||||
// At the beginning of the end step, if there are two or more ki counters on Callow Jushi, you may flip it.
|
||||
this.addAbility(new ConditionalTriggeredAbility(
|
||||
this.addAbility(new ConditionalInterveningIfTriggeredAbility(
|
||||
new OnEventTriggeredAbility(GameEvent.EventType.END_TURN_STEP_PRE, "beginning of the end step", true, new FlipSourceEffect(new JarakuTheInterloper()), true),
|
||||
new SourceHasCounterCondition(CounterType.KI, 2, Integer.MAX_VALUE),
|
||||
"At the beginning of the end step, if there are two or more ki counters on {this}, you may flip it."));
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ package mage.cards.c;
|
|||
import java.util.UUID;
|
||||
import mage.ObjectColor;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SanctuaryTriggeredAbility;
|
||||
import mage.abilities.common.SanctuaryInterveningIfTriggeredAbility;
|
||||
import mage.abilities.effects.common.DrawDiscardControllerEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
|
|
@ -20,7 +20,7 @@ public final class CetaSanctuary extends CardImpl {
|
|||
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{U}");
|
||||
|
||||
// At the beginning of your upkeep, if you control a red or green permanent, draw a card, then discard a card. If you control a red permanent and a green permanent, instead draw two cards, then discard a card.
|
||||
Ability ability = new SanctuaryTriggeredAbility(
|
||||
Ability ability = new SanctuaryInterveningIfTriggeredAbility(
|
||||
new DrawDiscardControllerEffect(1, 1), new DrawDiscardControllerEffect(2, 1), ObjectColor.GREEN, ObjectColor.RED,
|
||||
"At the beginning of your upkeep, if you control a red or green permanent, draw a card, then discard a card. "
|
||||
+ "If you control a red permanent and a green permanent, instead draw two cards, then discard a card."
|
||||
|
|
|
|||
|
|
@ -85,7 +85,7 @@ class ChainsOfMephistophelesReplacementEffect extends ReplacementEffectImpl {
|
|||
|
||||
@Override
|
||||
public boolean applies(GameEvent event, Ability source, Game game) {
|
||||
if (game.getActivePlayerId().equals(event.getPlayerId()) && game.getPhase().getStep().getType() == PhaseStep.DRAW) {
|
||||
if (game.isActivePlayer(event.getPlayerId()) && game.getPhase().getStep().getType() == PhaseStep.DRAW) {
|
||||
CardsDrawnDuringDrawStepWatcher watcher = (CardsDrawnDuringDrawStepWatcher) game.getState().getWatchers().get(CardsDrawnDuringDrawStepWatcher.class.getSimpleName());
|
||||
if (watcher != null && watcher.getAmountCardsDrawn(event.getPlayerId()) > 0) {
|
||||
return true;
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
|
||||
package mage.cards.c;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SpellCastControllerTriggeredAbility;
|
||||
|
|
@ -15,6 +14,8 @@ import mage.constants.CardType;
|
|||
import mage.constants.SubType;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author TheElk801
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ import mage.abilities.TriggeredAbility;
|
|||
import mage.abilities.TriggeredAbilityImpl;
|
||||
import mage.abilities.common.BeginningOfUpkeepTriggeredAbility;
|
||||
import mage.abilities.condition.common.SourceHasCounterCondition;
|
||||
import mage.abilities.decorator.ConditionalTriggeredAbility;
|
||||
import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility;
|
||||
import mage.abilities.effects.common.WinGameSourceControllerEffect;
|
||||
import mage.abilities.effects.common.counter.AddCountersSourceEffect;
|
||||
import mage.cards.CardImpl;
|
||||
|
|
@ -32,7 +32,7 @@ public final class ChanceEncounter extends CardImpl {
|
|||
|
||||
// At the beginning of your upkeep, if Chance Encounter has ten or more luck counters on it, you win the game.
|
||||
TriggeredAbility ability = new BeginningOfUpkeepTriggeredAbility(Zone.BATTLEFIELD, new WinGameSourceControllerEffect(), TargetController.YOU, false);
|
||||
this.addAbility(new ConditionalTriggeredAbility(ability, new SourceHasCounterCondition(CounterType.LUCK, 10, Integer.MAX_VALUE),
|
||||
this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, new SourceHasCounterCondition(CounterType.LUCK, 10, Integer.MAX_VALUE),
|
||||
"At the beginning of your upkeep, if {this} has ten or more luck counters on it, you win the game"));
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -67,7 +67,7 @@ class ChancellorOfTheTangleDelayedTriggeredAbility extends DelayedTriggeredAbili
|
|||
|
||||
@Override
|
||||
public boolean checkTrigger(GameEvent event, Game game) {
|
||||
return game.getActivePlayerId().equals(controllerId);
|
||||
return game.isActivePlayer(controllerId);
|
||||
}
|
||||
@Override
|
||||
public ChancellorOfTheTangleDelayedTriggeredAbility copy() {
|
||||
|
|
|
|||
|
|
@ -82,14 +82,16 @@ class ChaosWandEffect extends OneShotEffect {
|
|||
break;
|
||||
}
|
||||
opponent.moveCards(card, Zone.EXILED, source, game);
|
||||
controller.revealCards(source, new CardsImpl(card), game);
|
||||
if (card.isInstant() || card.isSorcery()) {
|
||||
if (!controller.chooseUse(outcome, "Cast " + card.getName() + " without paying its mana cost?", source, game)
|
||||
|| !controller.cast(card.getSpellAbility(), game, true, new MageObjectReference(source.getSourceObject(game), game))) {
|
||||
cardsToShuffle.add(card);
|
||||
}
|
||||
break;
|
||||
} else {
|
||||
cardsToShuffle.add(card);
|
||||
}
|
||||
cardsToShuffle.add(card);
|
||||
}
|
||||
return opponent.putCardsOnBottomOfLibrary(cardsToShuffle, game, source, false);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -72,10 +72,9 @@ class ChronicFloodingAbility extends TriggeredAbilityImpl {
|
|||
@Override
|
||||
public boolean checkTrigger(GameEvent event, Game game) {
|
||||
Permanent source = game.getPermanent(this.sourceId);
|
||||
if (source != null && source.getAttachedTo().equals(event.getTargetId())) {
|
||||
if (source != null && source.isAttachedTo(event.getTargetId())) {
|
||||
Permanent attached = game.getPermanent(source.getAttachedTo());
|
||||
if (attached != null) {
|
||||
|
||||
for (Effect e : getEffects()) {
|
||||
e.setTargetPointer(new FixedTarget(attached.getControllerId()));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ import mage.abilities.Ability;
|
|||
import mage.abilities.common.DiesTriggeredAbility;
|
||||
import mage.abilities.common.EntersBattlefieldAbility;
|
||||
import mage.abilities.condition.common.LastTimeCounterRemovedCondition;
|
||||
import mage.abilities.decorator.ConditionalTriggeredAbility;
|
||||
import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.CreateTokenCopySourceEffect;
|
||||
import mage.abilities.effects.common.counter.AddCountersSourceEffect;
|
||||
|
|
@ -46,7 +46,7 @@ public final class Chronozoa extends CardImpl {
|
|||
// When Chronozoa is put into a graveyard from play, if it had no time counters on it, create two tokens that are copies of it.
|
||||
Effect effect = new CreateTokenCopySourceEffect(2);
|
||||
effect.setText("create two tokens that are copies of it");
|
||||
this.addAbility(new ConditionalTriggeredAbility(new DiesTriggeredAbility(effect, false),
|
||||
this.addAbility(new ConditionalInterveningIfTriggeredAbility(new DiesTriggeredAbility(effect, false),
|
||||
LastTimeCounterRemovedCondition.instance,
|
||||
"When {this} dies, if it had no time counters on it, create two tokens that are copies of it."));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -61,7 +61,7 @@ class CinderCloudEffect extends OneShotEffect {
|
|||
if (permanent != null && permanent.destroy(source.getSourceId(), game, false) && permanent.getColor(game).equals(ObjectColor.WHITE)) {
|
||||
game.applyEffects();
|
||||
if (permanent.getZoneChangeCounter(game) + 1 == game.getState().getZoneChangeCounter(permanent.getId())
|
||||
&& !game.getState().getZone(permanent.getId()).equals(Zone.GRAVEYARD)) {
|
||||
&& game.getState().getZone(permanent.getId()) != Zone.GRAVEYARD) {
|
||||
// A replacement effect has moved the card to another zone as grvayard
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
|
||||
package mage.cards.c;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.BeginningOfCombatTriggeredAbility;
|
||||
import mage.abilities.common.EntersBattlefieldAbility;
|
||||
|
|
@ -21,6 +20,8 @@ import mage.game.Game;
|
|||
import mage.target.common.TargetControlledCreaturePermanent;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author LevelX2
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ import java.util.UUID;
|
|||
import mage.MageInt;
|
||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||
import mage.abilities.condition.common.KickedCondition;
|
||||
import mage.abilities.decorator.ConditionalTriggeredAbility;
|
||||
import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility;
|
||||
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
|
||||
import mage.abilities.keyword.KickerAbility;
|
||||
import mage.cards.CardImpl;
|
||||
|
|
@ -31,7 +31,7 @@ public final class CitanulWoodreaders extends CardImpl {
|
|||
this.addAbility(new KickerAbility("{2}{G}"));
|
||||
|
||||
// When Citanul Woodreaders enters the battlefield, if it was kicked, draw two cards.
|
||||
this.addAbility(new ConditionalTriggeredAbility(
|
||||
this.addAbility(new ConditionalInterveningIfTriggeredAbility(
|
||||
new EntersBattlefieldTriggeredAbility(new DrawCardSourceControllerEffect(2)),
|
||||
KickedCondition.instance,
|
||||
"When {this} enters the battlefield, if it was kicked, draw two cards."
|
||||
|
|
|
|||
|
|
@ -67,7 +67,7 @@ class CityOfSolitudeEffect extends ContinuousRuleModifyingEffectImpl {
|
|||
|
||||
@Override
|
||||
public boolean applies(GameEvent event, Ability source, Game game) {
|
||||
return !game.getActivePlayerId().equals(event.getPlayerId());
|
||||
return !game.isActivePlayer(event.getPlayerId());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ import mage.abilities.condition.common.IsStepCondition;
|
|||
import mage.abilities.costs.common.TapSourceCost;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.decorator.ConditionalActivatedAbility;
|
||||
import mage.abilities.decorator.ConditionalTriggeredAbility;
|
||||
import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility;
|
||||
import mage.abilities.dynamicvalue.DynamicValue;
|
||||
import mage.abilities.dynamicvalue.common.ManacostVariableValue;
|
||||
import mage.abilities.effects.common.counter.AddCountersSourceEffect;
|
||||
|
|
@ -51,7 +51,7 @@ public final class ClockworkAvian extends CardImpl {
|
|||
));
|
||||
|
||||
// At end of combat, if Clockwork Avian attacked or blocked this combat, remove a +1/+0 counter from it.
|
||||
this.addAbility(new ConditionalTriggeredAbility(
|
||||
this.addAbility(new ConditionalInterveningIfTriggeredAbility(
|
||||
new EndOfCombatTriggeredAbility(new RemoveCounterSourceEffect(CounterType.P1P0.createInstance()), false),
|
||||
AttackedOrBlockedThisCombatSourceCondition.instance,
|
||||
"At end of combat, if {this} attacked or blocked this combat, remove a +1/+0 counter from it."),
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ import mage.abilities.condition.common.IsStepCondition;
|
|||
import mage.abilities.costs.common.TapSourceCost;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.decorator.ConditionalActivatedAbility;
|
||||
import mage.abilities.decorator.ConditionalTriggeredAbility;
|
||||
import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility;
|
||||
import mage.abilities.dynamicvalue.DynamicValue;
|
||||
import mage.abilities.dynamicvalue.common.ManacostVariableValue;
|
||||
import mage.abilities.effects.common.counter.AddCountersSourceEffect;
|
||||
|
|
@ -47,7 +47,7 @@ public final class ClockworkBeast extends CardImpl {
|
|||
));
|
||||
|
||||
// At end of combat, if Clockwork Beast attacked or blocked this combat, remove a +1/+0 counter from it.
|
||||
this.addAbility(new ConditionalTriggeredAbility(
|
||||
this.addAbility(new ConditionalInterveningIfTriggeredAbility(
|
||||
new EndOfCombatTriggeredAbility(new RemoveCounterSourceEffect(CounterType.P1P0.createInstance()), false),
|
||||
AttackedOrBlockedThisCombatSourceCondition.instance,
|
||||
"At end of combat, if {this} attacked or blocked this combat, remove a +1/+0 counter from it."),
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ import mage.abilities.condition.common.IsStepCondition;
|
|||
import mage.abilities.costs.common.TapSourceCost;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.decorator.ConditionalActivatedAbility;
|
||||
import mage.abilities.decorator.ConditionalTriggeredAbility;
|
||||
import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility;
|
||||
import mage.abilities.dynamicvalue.DynamicValue;
|
||||
import mage.abilities.dynamicvalue.common.ManacostVariableValue;
|
||||
import mage.abilities.effects.common.combat.CantBeBlockedByCreaturesSourceEffect;
|
||||
|
|
@ -58,7 +58,7 @@ public final class ClockworkSteed extends CardImpl {
|
|||
this.addAbility(new SimpleEvasionAbility(new CantBeBlockedByCreaturesSourceEffect(filter, Duration.WhileOnBattlefield)));
|
||||
|
||||
// At end of combat, if Clockwork Steed attacked or blocked this combat, remove a +1/+0 counter from it.
|
||||
this.addAbility(new ConditionalTriggeredAbility(
|
||||
this.addAbility(new ConditionalInterveningIfTriggeredAbility(
|
||||
new EndOfCombatTriggeredAbility(new RemoveCounterSourceEffect(CounterType.P1P0.createInstance()), false),
|
||||
AttackedOrBlockedThisCombatSourceCondition.instance,
|
||||
"At end of combat, if {this} attacked or blocked this combat, remove a +1/+0 counter from it."),
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ import mage.abilities.condition.common.IsStepCondition;
|
|||
import mage.abilities.costs.common.TapSourceCost;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.decorator.ConditionalActivatedAbility;
|
||||
import mage.abilities.decorator.ConditionalTriggeredAbility;
|
||||
import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility;
|
||||
import mage.abilities.dynamicvalue.DynamicValue;
|
||||
import mage.abilities.dynamicvalue.common.ManacostVariableValue;
|
||||
import mage.abilities.effects.common.combat.CantBeBlockedByCreaturesSourceEffect;
|
||||
|
|
@ -62,7 +62,7 @@ public final class ClockworkSwarm extends CardImpl {
|
|||
this.addAbility(new SimpleEvasionAbility(new CantBeBlockedByCreaturesSourceEffect(filter, Duration.WhileOnBattlefield)));
|
||||
|
||||
// At end of combat, if Clockwork Swarm attacked or blocked this combat, remove a +1/+0 counter from it.
|
||||
this.addAbility(new ConditionalTriggeredAbility(
|
||||
this.addAbility(new ConditionalInterveningIfTriggeredAbility(
|
||||
new EndOfCombatTriggeredAbility(new RemoveCounterSourceEffect(CounterType.P1P0.createInstance()), false),
|
||||
AttackedOrBlockedThisCombatSourceCondition.instance,
|
||||
"At end of combat, if {this} attacked or blocked this combat, remove a +1/+0 counter from it."),
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ import mage.MageInt;
|
|||
import mage.Mana;
|
||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||
import mage.abilities.condition.common.CastFromHandSourceCondition;
|
||||
import mage.abilities.decorator.ConditionalTriggeredAbility;
|
||||
import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility;
|
||||
import mage.abilities.effects.mana.BasicManaEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
|
|
@ -27,7 +27,7 @@ public final class CoalStoker extends CardImpl {
|
|||
this.toughness = new MageInt(3);
|
||||
|
||||
// When Coal Stoker enters the battlefield, if you cast it from your hand, add {R}{R}{R}.
|
||||
this.addAbility(new ConditionalTriggeredAbility(
|
||||
this.addAbility(new ConditionalInterveningIfTriggeredAbility(
|
||||
new EntersBattlefieldTriggeredAbility(new BasicManaEffect(Mana.RedMana(3)), false),
|
||||
CastFromHandSourceCondition.instance,
|
||||
"When {this} enters the battlefield, if you cast it from your hand, add {R}{R}{R}."),
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ package mage.cards.c;
|
|||
import java.util.UUID;
|
||||
import mage.abilities.common.BeginningOfUpkeepTriggeredAbility;
|
||||
import mage.abilities.condition.common.FerociousCondition;
|
||||
import mage.abilities.decorator.ConditionalTriggeredAbility;
|
||||
import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility;
|
||||
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
|
|
@ -20,7 +20,7 @@ public final class ColossalMajesty extends CardImpl {
|
|||
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{G}");
|
||||
|
||||
// At the beginning of your upkeep, if you control a creature with power 4 or greater, draw a card.
|
||||
this.addAbility(new ConditionalTriggeredAbility(
|
||||
this.addAbility(new ConditionalInterveningIfTriggeredAbility(
|
||||
new BeginningOfUpkeepTriggeredAbility(
|
||||
new DrawCardSourceControllerEffect(1),
|
||||
TargetController.YOU, false
|
||||
|
|
|
|||
|
|
@ -105,7 +105,7 @@ class CommuneWithLavaMayPlayEffect extends AsThoughEffectImpl {
|
|||
@Override
|
||||
public boolean isInactive(Ability source, Game game) {
|
||||
if (castOnTurn != game.getTurnNum() && game.getPhase().getStep().getType() == PhaseStep.END_TURN) {
|
||||
if (game.getActivePlayerId().equals(source.getControllerId())) {
|
||||
if (game.isActivePlayer(source.getControllerId())) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ import mage.MageInt;
|
|||
import mage.abilities.TriggeredAbility;
|
||||
import mage.abilities.common.BeginningOfUpkeepTriggeredAbility;
|
||||
import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition;
|
||||
import mage.abilities.decorator.ConditionalTriggeredAbility;
|
||||
import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility;
|
||||
import mage.abilities.effects.common.ReturnToHandSourceEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
|
|
@ -31,7 +31,7 @@ public final class ComplexAutomaton extends CardImpl {
|
|||
|
||||
// At the beginning of your upkeep, if you control seven or more permanents, return Complex Automaton to its owner's hand.
|
||||
TriggeredAbility ability = new BeginningOfUpkeepTriggeredAbility(new ReturnToHandSourceEffect(true), TargetController.YOU, false);
|
||||
this.addAbility(new ConditionalTriggeredAbility(ability, new PermanentsOnTheBattlefieldCondition(new FilterControlledPermanent(), ComparisonType.MORE_THAN, 6),
|
||||
this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, new PermanentsOnTheBattlefieldCondition(new FilterControlledPermanent(), ComparisonType.MORE_THAN, 6),
|
||||
"At the beginning of your upkeep, if you control seven or more permanents, return Complex Automaton to its owner's hand."));
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -149,7 +149,7 @@ class ConquerorsFlailEffect extends ContinuousRuleModifyingEffectImpl {
|
|||
}
|
||||
}
|
||||
|
||||
if (isAttached && game.getActivePlayerId().equals(source.getControllerId())
|
||||
if (isAttached && game.isActivePlayer(source.getControllerId())
|
||||
&& game.getPlayer(source.getControllerId()).hasOpponent(event.getPlayerId(), game)) {
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ import java.util.UUID;
|
|||
import mage.MageInt;
|
||||
import mage.abilities.common.AttacksTriggeredAbility;
|
||||
import mage.abilities.condition.common.RenownedSourceCondition;
|
||||
import mage.abilities.decorator.ConditionalTriggeredAbility;
|
||||
import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility;
|
||||
import mage.abilities.effects.common.continuous.BoostControlledEffect;
|
||||
import mage.abilities.keyword.FirstStrikeAbility;
|
||||
import mage.abilities.keyword.RenownAbility;
|
||||
|
|
@ -34,7 +34,7 @@ public final class ConsulsLieutenant extends CardImpl {
|
|||
// Renown 1
|
||||
this.addAbility(new RenownAbility(1));
|
||||
// Whenever Consul's Lieutenant attacks, if it's renowned, other attacking creatures you control get +1/+1 until end of turn.
|
||||
this.addAbility(new ConditionalTriggeredAbility(new AttacksTriggeredAbility(
|
||||
this.addAbility(new ConditionalInterveningIfTriggeredAbility(new AttacksTriggeredAbility(
|
||||
new BoostControlledEffect(1, 1, Duration.EndOfTurn, new FilterAttackingCreature("other attacking creatures you control"), true), false),
|
||||
RenownedSourceCondition.instance,
|
||||
"Whenever Consul's Lieutenant attacks, if it's renowned, other attacking creatures you control get +1/+1 until end of turn."));
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ import java.util.UUID;
|
|||
import mage.abilities.TriggeredAbility;
|
||||
import mage.abilities.common.BeginningOfUpkeepTriggeredAbility;
|
||||
import mage.abilities.condition.common.XorLessLifeCondition;
|
||||
import mage.abilities.decorator.ConditionalTriggeredAbility;
|
||||
import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
|
||||
import mage.abilities.effects.common.GainLifeEffect;
|
||||
|
|
@ -27,7 +27,7 @@ public final class ConvalescentCare extends CardImpl {
|
|||
Effect effect = new DrawCardSourceControllerEffect(1);
|
||||
TriggeredAbility ability = new BeginningOfUpkeepTriggeredAbility(new GainLifeEffect(3), TargetController.YOU, false);
|
||||
ability.addEffect(effect);
|
||||
this.addAbility(new ConditionalTriggeredAbility(ability, new XorLessLifeCondition(XorLessLifeCondition.CheckType.CONTROLLER, 5), "At the beginning of your upkeep, if you have 5 or less life, you gain 3 life and draw a card."));
|
||||
this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, new XorLessLifeCondition(XorLessLifeCondition.CheckType.CONTROLLER, 5), "At the beginning of your upkeep, if you have 5 or less life, you gain 3 life and draw a card."));
|
||||
}
|
||||
|
||||
public ConvalescentCare(final ConvalescentCare card) {
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ import mage.MageInt;
|
|||
import mage.abilities.TriggeredAbility;
|
||||
import mage.abilities.common.BeginningOfUpkeepTriggeredAbility;
|
||||
import mage.abilities.condition.common.NoSpellsWereCastLastTurnCondition;
|
||||
import mage.abilities.decorator.ConditionalTriggeredAbility;
|
||||
import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility;
|
||||
import mage.abilities.effects.common.TransformSourceEffect;
|
||||
import mage.abilities.keyword.TransformAbility;
|
||||
import mage.cards.CardImpl;
|
||||
|
|
@ -35,7 +35,7 @@ public final class ConvictedKiller extends CardImpl {
|
|||
// At the beginning of each upkeep, if no spells were cast last turn, transform Convicted Killer.
|
||||
this.addAbility(new TransformAbility());
|
||||
TriggeredAbility ability = new BeginningOfUpkeepTriggeredAbility(new TransformSourceEffect(true), TargetController.ANY, false);
|
||||
this.addAbility(new ConditionalTriggeredAbility(ability, NoSpellsWereCastLastTurnCondition.instance, TransformAbility.NO_SPELLS_TRANSFORM_RULE));
|
||||
this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, NoSpellsWereCastLastTurnCondition.instance, TransformAbility.NO_SPELLS_TRANSFORM_RULE));
|
||||
}
|
||||
|
||||
public ConvictedKiller(final ConvictedKiller card) {
|
||||
|
|
|
|||
|
|
@ -175,8 +175,8 @@ class CorrosiveOozeCombatWatcher extends Watcher {
|
|||
}
|
||||
|
||||
if (event.getType() == GameEvent.EventType.ZONE_CHANGE) {
|
||||
if (((ZoneChangeEvent) event).getFromZone().equals(Zone.BATTLEFIELD)) {
|
||||
if (game.getTurn() != null && TurnPhase.COMBAT.equals(game.getTurn().getPhaseType())) {
|
||||
if (((ZoneChangeEvent) event).getFromZone() == Zone.BATTLEFIELD) {
|
||||
if (game.getTurn() != null && TurnPhase.COMBAT == game.getTurn().getPhaseType()) {
|
||||
// Check if a previous blocked or blocked by creatures is leaving the battlefield
|
||||
for (Map.Entry<MageObjectReference, HashSet<MageObjectReference>> entry : oozeBlocksOrBlocked.entrySet()) {
|
||||
for (MageObjectReference mor : entry.getValue()) {
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
package mage.cards.c;
|
||||
|
||||
import java.util.HashMap;
|
||||
|
|
@ -28,7 +27,7 @@ import mage.target.common.TargetNonlandPermanent;
|
|||
public final class CouncilsJudgment extends CardImpl {
|
||||
|
||||
public CouncilsJudgment(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{1}{W}{W}");
|
||||
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{1}{W}{W}");
|
||||
|
||||
// Will of the council - Starting with you, each player votes for a nonland permanent you don't control. Exile each permanent with the most votes or tied for most votes.
|
||||
this.getSpellAbility().addEffect(new CouncilsJudgmentEffect());
|
||||
|
|
@ -89,7 +88,7 @@ class CouncilsJudgmentEffect extends OneShotEffect {
|
|||
}
|
||||
chosenCards.put(permanent, 1);
|
||||
}
|
||||
game.informPlayers(player.getLogName() + " has chosen: " + permanent.getName());
|
||||
game.informPlayers(player.getLogName() + " has chosen: " + permanent.getLogName());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ import mage.MageInt;
|
|||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||
import mage.abilities.condition.common.RevoltCondition;
|
||||
import mage.abilities.decorator.ConditionalTriggeredAbility;
|
||||
import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility;
|
||||
import mage.abilities.effects.common.CreateTokenEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
|
|
@ -31,7 +31,7 @@ public final class CountlessGearsRenegade extends CardImpl {
|
|||
|
||||
// <i>Revolt</i> — When Countless Gears Renegade enters the battlefield, if a permanent you controlled
|
||||
// left the battlefield this turn, create a 1/1 colorless Servo artifact creature token.
|
||||
Ability ability = new ConditionalTriggeredAbility(new EntersBattlefieldTriggeredAbility(
|
||||
Ability ability = new ConditionalInterveningIfTriggeredAbility(new EntersBattlefieldTriggeredAbility(
|
||||
new CreateTokenEffect(new ServoToken(), 1), false), RevoltCondition.instance,
|
||||
"<i>Revolt</i> — When {this} enters the battlefield, if a permanent you controlled left"
|
||||
+ " the battlefield this turn, create a 1/1 colorless Servo artifact creature token.");
|
||||
|
|
|
|||
102
Mage.Sets/src/mage/cards/c/CoverOfWinter.java
Normal file
102
Mage.Sets/src/mage/cards/c/CoverOfWinter.java
Normal file
|
|
@ -0,0 +1,102 @@
|
|||
package mage.cards.c;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.effects.PreventionEffectData;
|
||||
import mage.abilities.effects.PreventionEffectImpl;
|
||||
import mage.abilities.effects.common.counter.AddCountersSourceEffect;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.SuperType;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.keyword.CumulativeUpkeepAbility;
|
||||
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.events.GameEvent;
|
||||
import mage.game.permanent.Permanent;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author noahg
|
||||
*/
|
||||
public final class CoverOfWinter extends CardImpl {
|
||||
|
||||
public CoverOfWinter(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{W}");
|
||||
|
||||
this.addSuperType(SuperType.SNOW);
|
||||
|
||||
// Cumulative upkeep {S}
|
||||
this.addAbility(new CumulativeUpkeepAbility(new ManaCostsImpl("{S}")));
|
||||
|
||||
// If a creature would deal combat damage to you and/or one or more creatures you control, prevent X of that damage, where X is the number of age counters on Cover of Winter.
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new CoverOfWinterEffect()));
|
||||
|
||||
// {S}: Put an age counter on Cover of Winter.
|
||||
this.addAbility(new SimpleActivatedAbility(new AddCountersSourceEffect(CounterType.AGE.createInstance()), new ManaCostsImpl("{S}")));
|
||||
}
|
||||
|
||||
public CoverOfWinter(final CoverOfWinter card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public CoverOfWinter copy() {
|
||||
return new CoverOfWinter(this);
|
||||
}
|
||||
}
|
||||
|
||||
class CoverOfWinterEffect extends PreventionEffectImpl {
|
||||
|
||||
public CoverOfWinterEffect() {
|
||||
super(Duration.WhileOnBattlefield, -1, true);
|
||||
this.staticText = "If a creature would deal combat damage to you and/or one or more creatures you control, prevent X of that damage, where X is the number of age counters on {this}";
|
||||
}
|
||||
|
||||
public CoverOfWinterEffect(CoverOfWinterEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checksEventType(GameEvent event, Game game) {
|
||||
return event.getType() == GameEvent.EventType.DAMAGE_PLAYER || event.getType() == GameEvent.EventType.DAMAGE_CREATURE;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected PreventionEffectData preventDamageAction(GameEvent event, Ability source, Game game) {
|
||||
Permanent sourcePermanent = source.getSourcePermanentIfItStillExists(game);
|
||||
if (sourcePermanent != null) {
|
||||
return game.preventDamage(event, source, game, sourcePermanent.getCounters(game).getCount(CounterType.AGE));
|
||||
} else {
|
||||
this.discard();
|
||||
return game.preventDamage(event, source, game, 0);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean applies(GameEvent event, Ability source, Game game) {
|
||||
if (event.getType() == GameEvent.EventType.DAMAGE_PLAYER
|
||||
&& event.getTargetId().equals(source.getControllerId())) {
|
||||
return super.applies(event, source, game);
|
||||
}
|
||||
|
||||
if (event.getType() == GameEvent.EventType.DAMAGE_CREATURE) {
|
||||
Permanent permanent = game.getPermanent(event.getTargetId());
|
||||
if (permanent != null && permanent.getControllerId().equals(source.getControllerId())) {
|
||||
return super.applies(event, source, game);
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public CoverOfWinterEffect copy() {
|
||||
return new CoverOfWinterEffect(this);
|
||||
}
|
||||
}
|
||||
|
|
@ -80,7 +80,7 @@ class CowedByWisdomayCostToAttackBlockEffect extends PayCostToAttackBlockEffectI
|
|||
@Override
|
||||
public boolean applies(GameEvent event, Ability source, Game game) {
|
||||
Permanent enchantment = game.getPermanent(source.getSourceId());
|
||||
return enchantment != null && enchantment.getAttachedTo().equals(event.getSourceId());
|
||||
return enchantment != null && enchantment.isAttachedTo(event.getSourceId());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ import mage.MageInt;
|
|||
import mage.abilities.common.BeginningOfEndStepTriggeredAbility;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.condition.common.YouGainedLifeCondition;
|
||||
import mage.abilities.decorator.ConditionalTriggeredAbility;
|
||||
import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility;
|
||||
import mage.abilities.effects.common.CreateTokenEffect;
|
||||
import mage.abilities.effects.common.continuous.GainAbilityAllEffect;
|
||||
import mage.abilities.keyword.IndestructibleAbility;
|
||||
|
|
@ -47,7 +47,7 @@ public final class CrestedSunmare extends CardImpl {
|
|||
|
||||
// At the beginning of each end step, if you gained life this turn, create a 5/5 white Horse creature token.
|
||||
this.addAbility(
|
||||
new ConditionalTriggeredAbility(
|
||||
new ConditionalInterveningIfTriggeredAbility(
|
||||
new BeginningOfEndStepTriggeredAbility(new CreateTokenEffect(new CrestedSunmareToken()), TargetController.ANY, false),
|
||||
new YouGainedLifeCondition(ComparisonType.MORE_THAN, 0),
|
||||
"At the beginning of each end step, if you gained life this turn, create a 5/5 white Horse creature token."),
|
||||
|
|
|
|||
|
|
@ -85,7 +85,7 @@ class CruelRealityTriggeredAbiilty extends TriggeredAbilityImpl {
|
|||
&& enchantment.getAttachedTo() != null) {
|
||||
Player cursedPlayer = game.getPlayer(enchantment.getAttachedTo());
|
||||
if (cursedPlayer != null
|
||||
&& game.getActivePlayerId().equals(cursedPlayer.getId())) {
|
||||
&& game.isActivePlayer(cursedPlayer.getId())) {
|
||||
this.getEffects().get(0).setTargetPointer(new FixedTarget(cursedPlayer.getId()));
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ import mage.abilities.Ability;
|
|||
import mage.abilities.common.BeginningOfUpkeepTriggeredAbility;
|
||||
import mage.abilities.common.EntersBattlefieldTappedAbility;
|
||||
import mage.abilities.condition.common.XorLessLifeCondition;
|
||||
import mage.abilities.decorator.ConditionalTriggeredAbility;
|
||||
import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility;
|
||||
import mage.abilities.effects.common.LoseLifeAllPlayersEffect;
|
||||
import mage.abilities.effects.common.TransformSourceEffect;
|
||||
import mage.abilities.keyword.TransformAbility;
|
||||
|
|
@ -39,7 +39,7 @@ public final class CryptolithFragment extends CardImpl {
|
|||
|
||||
// At the beginning of your upkeep, if each player has 10 or less life, transform Cryptolith Fragment.
|
||||
this.addAbility(new TransformAbility());
|
||||
this.addAbility(new ConditionalTriggeredAbility(
|
||||
this.addAbility(new ConditionalInterveningIfTriggeredAbility(
|
||||
new BeginningOfUpkeepTriggeredAbility(new TransformSourceEffect(true), TargetController.YOU, false),
|
||||
new XorLessLifeCondition(XorLessLifeCondition.CheckType.EACH_PLAYER, 10),
|
||||
"At the beginning of your upkeep, if each player has 10 or less life, transform Cryptolith Fragment."));
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ import mage.abilities.common.SimpleActivatedAbility;
|
|||
import mage.abilities.common.SpellCastControllerTriggeredAbility;
|
||||
import mage.abilities.condition.common.SourceHasCounterCondition;
|
||||
import mage.abilities.costs.common.RemoveCountersSourceCost;
|
||||
import mage.abilities.decorator.ConditionalTriggeredAbility;
|
||||
import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility;
|
||||
import mage.abilities.effects.common.FlipSourceEffect;
|
||||
import mage.abilities.effects.common.continuous.GainControlTargetEffect;
|
||||
import mage.abilities.effects.common.counter.AddCountersSourceEffect;
|
||||
|
|
@ -24,7 +24,6 @@ import mage.counters.CounterType;
|
|||
import mage.filter.StaticFilters;
|
||||
import mage.game.events.GameEvent;
|
||||
import mage.game.permanent.token.TokenImpl;
|
||||
import mage.game.permanent.token.Token;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
/**
|
||||
|
|
@ -47,7 +46,7 @@ public final class CunningBandit extends CardImpl {
|
|||
this.addAbility(new SpellCastControllerTriggeredAbility(new AddCountersSourceEffect(CounterType.KI.createInstance()), StaticFilters.SPIRIT_OR_ARCANE_CARD, true));
|
||||
|
||||
// At the beginning of the end step, if there are two or more ki counters on Cunning Bandit, you may flip it.
|
||||
this.addAbility(new ConditionalTriggeredAbility(
|
||||
this.addAbility(new ConditionalInterveningIfTriggeredAbility(
|
||||
new OnEventTriggeredAbility(GameEvent.EventType.END_TURN_STEP_PRE, "beginning of the end step", true, new FlipSourceEffect(new AzamukiTreacheryIncarnate()), true),
|
||||
new SourceHasCounterCondition(CounterType.KI, 2, Integer.MAX_VALUE),
|
||||
"At the beginning of the end step, if there are two or more ki counters on {this}, you may flip it."));
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ import mage.abilities.Ability;
|
|||
import mage.abilities.common.BeginningOfUpkeepTriggeredAbility;
|
||||
import mage.abilities.condition.Condition;
|
||||
import mage.abilities.costs.common.TapSourceCost;
|
||||
import mage.abilities.decorator.ConditionalTriggeredAbility;
|
||||
import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility;
|
||||
import mage.abilities.effects.common.TransformSourceEffect;
|
||||
import mage.abilities.keyword.TransformAbility;
|
||||
import mage.abilities.mana.ConditionalColorlessManaAbility;
|
||||
|
|
@ -42,7 +42,7 @@ public final class CuriousHomunculus extends CardImpl {
|
|||
|
||||
// At the beginning of your upkeep, if there are three or more instant and/or sorcery cards in your graveyard, transform Curious Homunculus.
|
||||
this.addAbility(new TransformAbility());
|
||||
this.addAbility(new ConditionalTriggeredAbility(
|
||||
this.addAbility(new ConditionalInterveningIfTriggeredAbility(
|
||||
new BeginningOfUpkeepTriggeredAbility(new TransformSourceEffect(true), TargetController.YOU, false),
|
||||
new InstantOrSorceryCardsInControllerGraveCondition(3),
|
||||
"At the beginning of your upkeep, if there are three or more instant and/or sorcery cards in your graveyard, transform {this}"));
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
|
||||
package mage.cards.c;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.effects.ReplacementEffectImpl;
|
||||
|
|
@ -16,14 +15,15 @@ import mage.game.permanent.Permanent;
|
|||
import mage.target.TargetPlayer;
|
||||
import mage.util.CardUtil;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author BetaSteward
|
||||
*/
|
||||
public final class CurseOfBloodletting extends CardImpl {
|
||||
|
||||
public CurseOfBloodletting(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.ENCHANTMENT},"{3}{R}{R}");
|
||||
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{3}{R}{R}");
|
||||
this.subtype.add(SubType.AURA, SubType.CURSE);
|
||||
|
||||
|
||||
|
|
@ -71,10 +71,9 @@ class CurseOfBloodlettingEffect extends ReplacementEffectImpl {
|
|||
@Override
|
||||
public boolean applies(GameEvent event, Ability source, Game game) {
|
||||
Permanent enchantment = game.getPermanent(source.getSourceId());
|
||||
if (enchantment != null &&
|
||||
enchantment.getAttachedTo() != null &&
|
||||
event.getTargetId().equals(enchantment.getAttachedTo())) {
|
||||
return true;
|
||||
if (enchantment != null &&
|
||||
enchantment.isAttachedTo(event.getTargetId())) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -79,7 +79,7 @@ class CurseOfOblivionAbility extends TriggeredAbilityImpl {
|
|||
Permanent enchantment = game.getPermanent(this.sourceId);
|
||||
if (enchantment != null && enchantment.getAttachedTo() != null) {
|
||||
Player player = game.getPlayer(enchantment.getAttachedTo());
|
||||
if (player != null && game.getActivePlayerId().equals(player.getId())) {
|
||||
if (player != null && game.isActivePlayer(player.getId())) {
|
||||
this.getEffects().get(0).setTargetPointer(new FixedTarget(player.getId()));
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -78,7 +78,7 @@ class CurseOfOpulenceEffect extends OneShotEffect {
|
|||
if (enchantment != null) {
|
||||
Player enchantedPlayer = game.getPlayer(enchantment.getAttachedTo());
|
||||
if (enchantedPlayer != null) {
|
||||
Set<UUID> players = new HashSet();
|
||||
Set<UUID> players = new HashSet<>();
|
||||
for (UUID attacker : game.getCombat().getAttackers()) {
|
||||
UUID defender = game.getCombat().getDefenderId(attacker);
|
||||
if (defender.equals(enchantedPlayer.getId())
|
||||
|
|
|
|||
|
|
@ -84,8 +84,7 @@ class CurseOfPredationTriggeredAbility extends TriggeredAbilityImpl {
|
|||
if (defender != null) {
|
||||
Permanent enchantment = game.getPermanent(this.getSourceId());
|
||||
if (enchantment != null
|
||||
&& enchantment.getAttachedTo() != null
|
||||
&& enchantment.getAttachedTo().equals(defender.getId())) {
|
||||
&& enchantment.isAttachedTo(defender.getId())) {
|
||||
for (Effect effect: this.getEffects()) {
|
||||
effect.setTargetPointer(new FixedTarget(event.getSourceId()));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -79,7 +79,7 @@ class CurseOfTheBloodyTomeAbility extends TriggeredAbilityImpl {
|
|||
Permanent enchantment = game.getPermanent(this.sourceId);
|
||||
if (enchantment != null && enchantment.getAttachedTo() != null) {
|
||||
Player player = game.getPlayer(enchantment.getAttachedTo());
|
||||
if (player != null && game.getActivePlayerId().equals(player.getId())) {
|
||||
if (player != null && game.isActivePlayer(player.getId())) {
|
||||
this.getEffects().get(0).setTargetPointer(new FixedTarget(player.getId()));
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ import mage.abilities.condition.common.SuspendedCondition;
|
|||
import mage.abilities.costs.Cost;
|
||||
import mage.abilities.costs.common.SacrificeTargetCost;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.decorator.ConditionalTriggeredAbility;
|
||||
import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility;
|
||||
import mage.abilities.dynamicvalue.common.StaticValue;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.counter.AddCountersSourceEffect;
|
||||
|
|
@ -45,7 +45,7 @@ public final class CurseOfTheCabal extends CardImpl {
|
|||
// Suspend 2-{2}{B}{B}
|
||||
this.addAbility(new SuspendAbility(2, new ManaCostsImpl("{2}{B}{B}"), this));
|
||||
// At the beginning of each player's upkeep, if Curse of the Cabal is suspended, that player may sacrifice a permanent. If he or she does, put two time counters on Curse of the Cabal.
|
||||
this.addAbility(new CurseOfTheCabalTriggeredAbility());
|
||||
this.addAbility(new CurseOfTheCabalInterveningIfTriggeredAbility());
|
||||
}
|
||||
|
||||
public CurseOfTheCabal(final CurseOfTheCabal card) {
|
||||
|
|
@ -99,9 +99,9 @@ class CurseOfTheCabalSacrificeEffect extends OneShotEffect {
|
|||
}
|
||||
}
|
||||
|
||||
class CurseOfTheCabalTriggeredAbility extends ConditionalTriggeredAbility {
|
||||
class CurseOfTheCabalInterveningIfTriggeredAbility extends ConditionalInterveningIfTriggeredAbility {
|
||||
|
||||
public CurseOfTheCabalTriggeredAbility() {
|
||||
public CurseOfTheCabalInterveningIfTriggeredAbility() {
|
||||
super(new BeginningOfUpkeepTriggeredAbility(
|
||||
Zone.EXILED, new CurseOfTheCabalTriggeredAbilityConditionalDelay(),
|
||||
TargetController.ANY, false, true
|
||||
|
|
@ -113,13 +113,13 @@ class CurseOfTheCabalTriggeredAbility extends ConditionalTriggeredAbility {
|
|||
// counters aren't placed
|
||||
}
|
||||
|
||||
public CurseOfTheCabalTriggeredAbility(final CurseOfTheCabalTriggeredAbility effect) {
|
||||
public CurseOfTheCabalInterveningIfTriggeredAbility(final CurseOfTheCabalInterveningIfTriggeredAbility effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public CurseOfTheCabalTriggeredAbility copy() {
|
||||
return new CurseOfTheCabalTriggeredAbility(this);
|
||||
public CurseOfTheCabalInterveningIfTriggeredAbility copy() {
|
||||
return new CurseOfTheCabalInterveningIfTriggeredAbility(this);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue