mirror of
https://github.com/correl/mage.git
synced 2025-01-12 19:25:44 +00:00
Renamed condition to prevent misuse.
This commit is contained in:
parent
0e81b8fd78
commit
8e1d7c3ffb
20 changed files with 39 additions and 39 deletions
|
@ -4,7 +4,7 @@ package mage.cards.a;
|
|||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||
import mage.abilities.condition.common.CastFromHandSourceCondition;
|
||||
import mage.abilities.condition.common.CastFromHandSourcePermanentCondition;
|
||||
import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility;
|
||||
import mage.abilities.effects.common.ExileAllEffect;
|
||||
import mage.abilities.keyword.FlashAbility;
|
||||
|
@ -36,7 +36,7 @@ public final class AngelOfTheDireHour extends CardImpl {
|
|||
// When Angel of the Dire Hour enters the battlefield, if you cast it from your hand, exile all attacking creatures.
|
||||
this.addAbility(new ConditionalInterveningIfTriggeredAbility(
|
||||
new EntersBattlefieldTriggeredAbility(new ExileAllEffect(new FilterAttackingCreature("attacking creatures")), false),
|
||||
CastFromHandSourceCondition.instance,
|
||||
CastFromHandSourcePermanentCondition.instance,
|
||||
"When {this} enters the battlefield, if you cast it from your hand, exile all attacking creatures."),
|
||||
new CastFromHandWatcher());
|
||||
}
|
||||
|
|
|
@ -8,7 +8,7 @@ import mage.MageInt;
|
|||
import mage.ObjectColor;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||
import mage.abilities.condition.common.CastFromHandSourceCondition;
|
||||
import mage.abilities.condition.common.CastFromHandSourcePermanentCondition;
|
||||
import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility;
|
||||
import mage.abilities.effects.ContinuousEffect;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
|
@ -42,7 +42,7 @@ public final class BreachingLeviathan extends CardImpl {
|
|||
// 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 ConditionalInterveningIfTriggeredAbility(
|
||||
new EntersBattlefieldTriggeredAbility(new BreachingLeviathanEffect(), false),
|
||||
CastFromHandSourceCondition.instance,
|
||||
CastFromHandSourcePermanentCondition.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."),
|
||||
new CastFromHandWatcher());
|
||||
}
|
||||
|
|
|
@ -5,7 +5,7 @@ import java.util.UUID;
|
|||
import mage.MageInt;
|
||||
import mage.Mana;
|
||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||
import mage.abilities.condition.common.CastFromHandSourceCondition;
|
||||
import mage.abilities.condition.common.CastFromHandSourcePermanentCondition;
|
||||
import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility;
|
||||
import mage.abilities.effects.mana.BasicManaEffect;
|
||||
import mage.cards.CardImpl;
|
||||
|
@ -29,7 +29,7 @@ public final class CoalStoker extends CardImpl {
|
|||
// When Coal Stoker enters the battlefield, if you cast it from your hand, add {R}{R}{R}.
|
||||
this.addAbility(new ConditionalInterveningIfTriggeredAbility(
|
||||
new EntersBattlefieldTriggeredAbility(new BasicManaEffect(Mana.RedMana(3)), false),
|
||||
CastFromHandSourceCondition.instance,
|
||||
CastFromHandSourcePermanentCondition.instance,
|
||||
"When {this} enters the battlefield, if you cast it from your hand, add {R}{R}{R}."),
|
||||
new CastFromHandWatcher());
|
||||
}
|
||||
|
|
|
@ -6,7 +6,7 @@ import mage.MageInt;
|
|||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||
import mage.abilities.condition.Condition;
|
||||
import mage.abilities.condition.common.CastFromHandSourceCondition;
|
||||
import mage.abilities.condition.common.CastFromHandSourcePermanentCondition;
|
||||
import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility;
|
||||
import mage.abilities.effects.common.DestroyAllEffect;
|
||||
import mage.abilities.keyword.FlyingAbility;
|
||||
|
@ -63,7 +63,7 @@ class DeathbringerRegentCondition implements Condition {
|
|||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
return CastFromHandSourceCondition.instance.apply(game, source)
|
||||
return CastFromHandSourcePermanentCondition.instance.apply(game, source)
|
||||
&& game.getBattlefield().getAllActivePermanents(StaticFilters.FILTER_PERMANENT_CREATURE, game).size() >= 6;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -5,7 +5,7 @@ import java.util.UUID;
|
|||
import mage.MageInt;
|
||||
import mage.abilities.TriggeredAbility;
|
||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||
import mage.abilities.condition.common.CastFromHandSourceCondition;
|
||||
import mage.abilities.condition.common.CastFromHandSourcePermanentCondition;
|
||||
import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility;
|
||||
import mage.abilities.effects.common.DestroyAllEffect;
|
||||
import mage.abilities.effects.common.TapAllEffect;
|
||||
|
@ -44,7 +44,7 @@ public final class DreadCacodemon extends CardImpl {
|
|||
// if you cast it from your hand, destroy all creatures your opponents control, then tap all other creatures you control.
|
||||
TriggeredAbility ability = new EntersBattlefieldTriggeredAbility(new DestroyAllEffect(opponentsCreatures, false));
|
||||
ability.addEffect(new TapAllEffect(otherCreaturesYouControl));
|
||||
this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, CastFromHandSourceCondition.instance,
|
||||
this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, CastFromHandSourcePermanentCondition.instance,
|
||||
"When {this} enters the battlefield, if you cast it from your hand, destroy all creatures your opponents control, then tap all other creatures you control."), new CastFromHandWatcher());
|
||||
}
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@ import mage.abilities.Ability;
|
|||
import mage.abilities.common.DiesTriggeredAbility;
|
||||
import mage.abilities.common.EntersBattlefieldAbility;
|
||||
import mage.abilities.condition.InvertCondition;
|
||||
import mage.abilities.condition.common.CastFromHandSourceCondition;
|
||||
import mage.abilities.condition.common.CastFromHandSourcePermanentCondition;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.continuous.GainSuspendEffect;
|
||||
import mage.abilities.effects.common.counter.AddCountersSourceEffect;
|
||||
|
@ -41,7 +41,7 @@ public final class Epochrasite extends CardImpl {
|
|||
// Epochrasite enters the battlefield with three +1/+1 counters on it if you didn't cast it from your hand.
|
||||
this.addAbility(new EntersBattlefieldAbility(
|
||||
new AddCountersSourceEffect(CounterType.P1P1.createInstance(3)),
|
||||
new InvertCondition(CastFromHandSourceCondition.instance),
|
||||
new InvertCondition(CastFromHandSourcePermanentCondition.instance),
|
||||
"{this} enters the battlefield with three +1/+1 counters on it if you didn't cast it from your hand",""),
|
||||
new CastFromHandWatcher());
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@ package mage.cards.f;
|
|||
import mage.MageInt;
|
||||
import mage.abilities.common.ActivateIfConditionActivatedAbility;
|
||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||
import mage.abilities.condition.common.CastFromHandSourceCondition;
|
||||
import mage.abilities.condition.common.CastFromHandSourcePermanentCondition;
|
||||
import mage.abilities.condition.common.MyTurnCondition;
|
||||
import mage.abilities.costs.common.SacrificeTargetCost;
|
||||
import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility;
|
||||
|
@ -48,7 +48,7 @@ public final class FeastingTrollKing extends CardImpl {
|
|||
// When Feasting Troll King enters the battlefield, if you cast it from your hand, create three Food tokens.
|
||||
this.addAbility(new ConditionalInterveningIfTriggeredAbility(
|
||||
new EntersBattlefieldTriggeredAbility(new CreateTokenEffect(new FoodToken(), 3)),
|
||||
CastFromHandSourceCondition.instance, "When {this} enters the battlefield, " +
|
||||
CastFromHandSourcePermanentCondition.instance, "When {this} enters the battlefield, " +
|
||||
"if you cast it from your hand, create three Food tokens."
|
||||
), new CastFromHandWatcher());
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@ package mage.cards.f;
|
|||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||
import mage.abilities.condition.common.CastFromHandSourceCondition;
|
||||
import mage.abilities.condition.common.CastFromHandSourcePermanentCondition;
|
||||
import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility;
|
||||
import mage.abilities.effects.common.ExileAllEffect;
|
||||
import mage.abilities.keyword.AffinityForArtifactsAbility;
|
||||
|
@ -43,7 +43,7 @@ public final class FurnaceDragon extends CardImpl {
|
|||
// When Furnace Dragon enters the battlefield, if you cast it from your hand, exile all artifacts.
|
||||
this.addAbility(new ConditionalInterveningIfTriggeredAbility(
|
||||
new EntersBattlefieldTriggeredAbility(new ExileAllEffect(filter), false),
|
||||
CastFromHandSourceCondition.instance,
|
||||
CastFromHandSourcePermanentCondition.instance,
|
||||
"When {this} enters the battlefield, if you cast it from your hand, exile all artifacts."),
|
||||
new CastFromHandWatcher());
|
||||
}
|
||||
|
|
|
@ -7,7 +7,7 @@ import mage.abilities.Ability;
|
|||
import mage.abilities.TriggeredAbility;
|
||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||
import mage.abilities.common.LeavesBattlefieldTriggeredAbility;
|
||||
import mage.abilities.condition.common.CastFromHandSourceCondition;
|
||||
import mage.abilities.condition.common.CastFromHandSourcePermanentCondition;
|
||||
import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.keyword.FlyingAbility;
|
||||
|
@ -43,7 +43,7 @@ public final class Hypnox extends CardImpl {
|
|||
// When Hypnox enters the battlefield, if you cast it from your hand, exile all cards from target opponent's hand.
|
||||
TriggeredAbility ability = new EntersBattlefieldTriggeredAbility(new HypnoxExileEffect());
|
||||
ability.addTarget(new TargetOpponent());
|
||||
this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, CastFromHandSourceCondition.instance,
|
||||
this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, CastFromHandSourcePermanentCondition.instance,
|
||||
"When {this} enters the battlefield, if you cast it from your hand, exile all cards from target opponent's hand."), new CastFromHandWatcher());
|
||||
|
||||
// When Hypnox leaves the battlefield, return the exiled cards to their owner's hand.
|
||||
|
|
|
@ -7,7 +7,7 @@ import mage.MageObject;
|
|||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.DiesTriggeredAbility;
|
||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||
import mage.abilities.condition.common.CastFromHandSourceCondition;
|
||||
import mage.abilities.condition.common.CastFromHandSourcePermanentCondition;
|
||||
import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
|
@ -51,7 +51,7 @@ public final class InameAsOne extends CardImpl {
|
|||
// When Iname as One enters the battlefield, if you cast it from your hand, you may search your library for a Spirit permanent card, put it onto the battlefield, then shuffle your library.
|
||||
this.addAbility(new ConditionalInterveningIfTriggeredAbility(
|
||||
new EntersBattlefieldTriggeredAbility(new SearchLibraryPutInPlayEffect(new TargetCardInLibrary(0, 1, filter)), true),
|
||||
CastFromHandSourceCondition.instance,
|
||||
CastFromHandSourcePermanentCondition.instance,
|
||||
"When {this} enters the battlefield, if you cast it from your hand, you may search your library for a Spirit permanent card, put it onto the battlefield, then shuffle your library."),
|
||||
new CastFromHandWatcher());
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@ import mage.MageInt;
|
|||
import mage.abilities.common.EntersBattlefieldAbility;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.condition.common.CastFromHandSourceCondition;
|
||||
import mage.abilities.condition.common.CastFromHandSourcePermanentCondition;
|
||||
import mage.abilities.condition.common.SourceHasCounterCondition;
|
||||
import mage.abilities.costs.common.RemoveCountersSourceCost;
|
||||
import mage.abilities.decorator.ConditionalContinuousEffect;
|
||||
|
@ -48,7 +48,7 @@ public final class MyojinOfCleansingFire extends CardImpl {
|
|||
this.getSpellAbility().addWatcher(new CastFromHandWatcher());
|
||||
|
||||
// Myojin of Cleansing Fire enters the battlefield with a divinity counter on it if you cast it from your hand.
|
||||
this.addAbility(new EntersBattlefieldAbility(new ConditionalOneShotEffect(new AddCountersSourceEffect(CounterType.DIVINITY.createInstance()), CastFromHandSourceCondition.instance, ""), "{this} enters the battlefield with a divinity counter on it if you cast it from your hand"));
|
||||
this.addAbility(new EntersBattlefieldAbility(new ConditionalOneShotEffect(new AddCountersSourceEffect(CounterType.DIVINITY.createInstance()), CastFromHandSourcePermanentCondition.instance, ""), "{this} enters the battlefield with a divinity counter on it if you cast it from your hand"));
|
||||
// Myojin of Cleansing Fire is indestructible as long as it has a divinity counter on it.
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new ConditionalContinuousEffect(new GainAbilitySourceEffect(IndestructibleAbility.getInstance(), Duration.WhileOnBattlefield),
|
||||
new SourceHasCounterCondition(CounterType.DIVINITY), "{this} is indestructible as long as it has a divinity counter on it")));
|
||||
|
|
|
@ -6,7 +6,7 @@ import mage.MageInt;
|
|||
import mage.abilities.common.EntersBattlefieldAbility;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.condition.common.CastFromHandSourceCondition;
|
||||
import mage.abilities.condition.common.CastFromHandSourcePermanentCondition;
|
||||
import mage.abilities.condition.common.SourceHasCounterCondition;
|
||||
import mage.abilities.costs.common.RemoveCountersSourceCost;
|
||||
import mage.abilities.decorator.ConditionalContinuousEffect;
|
||||
|
@ -42,7 +42,7 @@ public final class MyojinOfInfiniteRage extends CardImpl {
|
|||
this.getSpellAbility().addWatcher(new CastFromHandWatcher());
|
||||
|
||||
// Myojin of Infinite Rage enters the battlefield with a divinity counter on it if you cast it from your hand.
|
||||
this.addAbility(new EntersBattlefieldAbility(new ConditionalOneShotEffect(new AddCountersSourceEffect(CounterType.DIVINITY.createInstance()), CastFromHandSourceCondition.instance, ""), "{this} enters the battlefield with a divinity counter on it if you cast it from your hand"));
|
||||
this.addAbility(new EntersBattlefieldAbility(new ConditionalOneShotEffect(new AddCountersSourceEffect(CounterType.DIVINITY.createInstance()), CastFromHandSourcePermanentCondition.instance, ""), "{this} enters the battlefield with a divinity counter on it if you cast it from your hand"));
|
||||
// Myojin of Infinite Rage is indestructible as long as it has a divinity counter on it.
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new ConditionalContinuousEffect(new GainAbilitySourceEffect(IndestructibleAbility.getInstance(), Duration.WhileOnBattlefield),
|
||||
new SourceHasCounterCondition(CounterType.DIVINITY), "{this} is indestructible as long as it has a divinity counter on it")));
|
||||
|
|
|
@ -7,7 +7,7 @@ import mage.abilities.Ability;
|
|||
import mage.abilities.common.EntersBattlefieldAbility;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.condition.common.CastFromHandSourceCondition;
|
||||
import mage.abilities.condition.common.CastFromHandSourcePermanentCondition;
|
||||
import mage.abilities.condition.common.SourceHasCounterCondition;
|
||||
import mage.abilities.costs.common.RemoveCountersSourceCost;
|
||||
import mage.abilities.decorator.ConditionalContinuousEffect;
|
||||
|
@ -43,7 +43,7 @@ public final class MyojinOfLifesWeb extends CardImpl {
|
|||
this.getSpellAbility().addWatcher(new CastFromHandWatcher());
|
||||
|
||||
// Myojin of Life's Web enters the battlefield with a divinity counter on it if you cast it from your hand.
|
||||
this.addAbility(new EntersBattlefieldAbility(new ConditionalOneShotEffect(new AddCountersSourceEffect(CounterType.DIVINITY.createInstance()), CastFromHandSourceCondition.instance, ""), "{this} enters the battlefield with a divinity counter on it if you cast it from your hand"));
|
||||
this.addAbility(new EntersBattlefieldAbility(new ConditionalOneShotEffect(new AddCountersSourceEffect(CounterType.DIVINITY.createInstance()), CastFromHandSourcePermanentCondition.instance, ""), "{this} enters the battlefield with a divinity counter on it if you cast it from your hand"));
|
||||
// Myojin of Life's Web is indestructible as long as it has a divinity counter on it.
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD,
|
||||
new ConditionalContinuousEffect(new GainAbilitySourceEffect(IndestructibleAbility.getInstance(), Duration.WhileOnBattlefield),
|
||||
|
|
|
@ -5,7 +5,7 @@ import mage.abilities.Ability;
|
|||
import mage.abilities.common.EntersBattlefieldAbility;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.condition.common.CastFromHandSourceCondition;
|
||||
import mage.abilities.condition.common.CastFromHandSourcePermanentCondition;
|
||||
import mage.abilities.condition.common.SourceHasCounterCondition;
|
||||
import mage.abilities.costs.common.RemoveCountersSourceCost;
|
||||
import mage.abilities.decorator.ConditionalContinuousEffect;
|
||||
|
@ -40,7 +40,7 @@ public final class MyojinOfNightsReach extends CardImpl {
|
|||
this.getSpellAbility().addWatcher(new CastFromHandWatcher());
|
||||
|
||||
// Myojin of Night's Reach enters the battlefield with a divinity counter on it if you cast it from your hand.
|
||||
this.addAbility(new EntersBattlefieldAbility(new ConditionalOneShotEffect(new AddCountersSourceEffect(CounterType.DIVINITY.createInstance()), CastFromHandSourceCondition.instance, ""), "{this} enters the battlefield with a divinity counter on it if you cast it from your hand"));
|
||||
this.addAbility(new EntersBattlefieldAbility(new ConditionalOneShotEffect(new AddCountersSourceEffect(CounterType.DIVINITY.createInstance()), CastFromHandSourcePermanentCondition.instance, ""), "{this} enters the battlefield with a divinity counter on it if you cast it from your hand"));
|
||||
// Myojin of Night's Reach is indestructible as long as it has a divinity counter on it.
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new ConditionalContinuousEffect(new GainAbilitySourceEffect(IndestructibleAbility.getInstance(), Duration.WhileOnBattlefield),
|
||||
new SourceHasCounterCondition(CounterType.DIVINITY), "{this} is indestructible as long as it has a divinity counter on it")));
|
||||
|
|
|
@ -7,7 +7,7 @@ import mage.abilities.Ability;
|
|||
import mage.abilities.common.EntersBattlefieldAbility;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.condition.common.CastFromHandSourceCondition;
|
||||
import mage.abilities.condition.common.CastFromHandSourcePermanentCondition;
|
||||
import mage.abilities.condition.common.SourceHasCounterCondition;
|
||||
import mage.abilities.costs.common.RemoveCountersSourceCost;
|
||||
import mage.abilities.decorator.ConditionalContinuousEffect;
|
||||
|
@ -45,7 +45,7 @@ public final class MyojinOfSeeingWinds extends CardImpl {
|
|||
this.getSpellAbility().addWatcher(new CastFromHandWatcher());
|
||||
|
||||
// Myojin of Seeing Winds enters the battlefield with a divinity counter on it if you cast it from your hand.
|
||||
this.addAbility(new EntersBattlefieldAbility(new ConditionalOneShotEffect(new AddCountersSourceEffect(CounterType.DIVINITY.createInstance()), CastFromHandSourceCondition.instance, ""), "{this} enters the battlefield with a divinity counter on it if you cast it from your hand"));
|
||||
this.addAbility(new EntersBattlefieldAbility(new ConditionalOneShotEffect(new AddCountersSourceEffect(CounterType.DIVINITY.createInstance()), CastFromHandSourcePermanentCondition.instance, ""), "{this} enters the battlefield with a divinity counter on it if you cast it from your hand"));
|
||||
// Myojin of Seeing Winds is indestructible as long as it has a divinity counter on it.
|
||||
this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new ConditionalContinuousEffect(new GainAbilitySourceEffect(IndestructibleAbility.getInstance(), Duration.WhileOnBattlefield),
|
||||
new SourceHasCounterCondition(CounterType.DIVINITY), "{this} is indestructible as long as it has a divinity counter on it")));
|
||||
|
|
|
@ -7,7 +7,7 @@ import mage.abilities.common.DealsCombatDamageToACreatureTriggeredAbility;
|
|||
import mage.abilities.common.DealsCombatDamageToAPlayerTriggeredAbility;
|
||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||
import mage.abilities.condition.InvertCondition;
|
||||
import mage.abilities.condition.common.CastFromHandSourceCondition;
|
||||
import mage.abilities.condition.common.CastFromHandSourcePermanentCondition;
|
||||
import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility;
|
||||
import mage.abilities.effects.common.DestroyTargetEffect;
|
||||
import mage.abilities.effects.common.LoseGameSourceControllerEffect;
|
||||
|
@ -37,7 +37,7 @@ public final class PhageTheUntouchable extends CardImpl {
|
|||
// When Phage the Untouchable enters the battlefield, if you didn't cast it from your hand, you lose the game.
|
||||
this.addAbility(new ConditionalInterveningIfTriggeredAbility(
|
||||
new EntersBattlefieldTriggeredAbility(new LoseGameSourceControllerEffect(), false),
|
||||
new InvertCondition(CastFromHandSourceCondition.instance),
|
||||
new InvertCondition(CastFromHandSourcePermanentCondition.instance),
|
||||
"When {this} enters the battlefield, if you didn't cast it from your hand, you lose the game"
|
||||
), new CastFromHandWatcher());
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@ import java.util.UUID;
|
|||
import mage.MageInt;
|
||||
import mage.ObjectColor;
|
||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||
import mage.abilities.condition.common.CastFromHandSourceCondition;
|
||||
import mage.abilities.condition.common.CastFromHandSourcePermanentCondition;
|
||||
import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility;
|
||||
import mage.abilities.effects.common.DestroyAllEffect;
|
||||
import mage.abilities.keyword.FlyingAbility;
|
||||
|
@ -43,7 +43,7 @@ public final class ReiverDemon extends CardImpl {
|
|||
// When Reiver Demon enters the battlefield, if you cast it from your hand, destroy all nonartifact, nonblack creatures. They can't be regenerated.
|
||||
this.addAbility(new ConditionalInterveningIfTriggeredAbility(
|
||||
new EntersBattlefieldTriggeredAbility(new DestroyAllEffect(filter, true), false),
|
||||
CastFromHandSourceCondition.instance,
|
||||
CastFromHandSourcePermanentCondition.instance,
|
||||
"When {this} enters the battlefield, if you cast it from your hand, destroy all nonartifact, nonblack creatures. They can't be regenerated."),
|
||||
new CastFromHandWatcher());
|
||||
}
|
||||
|
|
|
@ -5,7 +5,7 @@ import java.util.UUID;
|
|||
import mage.MageInt;
|
||||
import mage.abilities.TriggeredAbility;
|
||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||
import mage.abilities.condition.common.CastFromHandSourceCondition;
|
||||
import mage.abilities.condition.common.CastFromHandSourcePermanentCondition;
|
||||
import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility;
|
||||
import mage.abilities.effects.common.CreateTokenEffect;
|
||||
import mage.abilities.effects.common.PopulateEffect;
|
||||
|
@ -32,7 +32,7 @@ public final class ScionOfVituGhazi extends CardImpl {
|
|||
//When Scion of Vitu-Ghazi enters the battlefield, if you cast it from your hand, create a 1/1 white Bird creature token with flying, then populate.
|
||||
TriggeredAbility ability = new EntersBattlefieldTriggeredAbility(new CreateTokenEffect(new BirdToken()), false);
|
||||
ability.addEffect(new PopulateEffect("then"));
|
||||
this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, CastFromHandSourceCondition.instance,
|
||||
this.addAbility(new ConditionalInterveningIfTriggeredAbility(ability, CastFromHandSourcePermanentCondition.instance,
|
||||
"When {this} enters the battlefield, if you cast it from your hand, create a 1/1 white Bird creature token with flying, then populate."),
|
||||
new CastFromHandWatcher());
|
||||
}
|
||||
|
|
|
@ -4,7 +4,7 @@ package mage.cards.w;
|
|||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||
import mage.abilities.condition.common.CastFromHandSourceCondition;
|
||||
import mage.abilities.condition.common.CastFromHandSourcePermanentCondition;
|
||||
import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility;
|
||||
import mage.abilities.effects.common.DestroyAllEffect;
|
||||
import mage.cards.CardImpl;
|
||||
|
@ -38,7 +38,7 @@ public final class WakeningSunsAvatar extends CardImpl {
|
|||
// When Wakening Sun's Avatar enters the battlefield, if you cast it from you hand, destroy all non-Dinosaur creatures.
|
||||
this.addAbility(new ConditionalInterveningIfTriggeredAbility(
|
||||
new EntersBattlefieldTriggeredAbility(new DestroyAllEffect(filter), false),
|
||||
CastFromHandSourceCondition.instance,
|
||||
CastFromHandSourcePermanentCondition.instance,
|
||||
"When {this} enters the battlefield, if you cast it from your hand, destroy all non-Dinosaur creatures."),
|
||||
new CastFromHandWatcher());
|
||||
}
|
||||
|
|
|
@ -13,7 +13,7 @@ import mage.watchers.common.CastFromHandWatcher;
|
|||
*
|
||||
* @author Loki
|
||||
*/
|
||||
public enum CastFromHandSourceCondition implements Condition {
|
||||
public enum CastFromHandSourcePermanentCondition implements Condition {
|
||||
|
||||
instance;
|
||||
|
Loading…
Reference in a new issue