From 13c1888c2277a15f9a3200c06138e837d5147c86 Mon Sep 17 00:00:00 2001 From: LevelX2 Date: Mon, 16 Mar 2015 19:05:57 +0100 Subject: [PATCH] [DTK] Added 3 blue cards, 1 green card and some fixes. --- .../DragonlordsPrerogative.java | 2 +- .../sets/dragonsoftarkir/ReduceInStature.java | 112 ++++++++++++++++ .../dragonsoftarkir/ScaleguardSentinels.java | 52 ++++++++ .../sets/dragonsoftarkir/SidisisFaithful.java | 72 ++++++++++ .../dragonsoftarkir/SightBeyondSight.java | 65 +++++++++ .../sets/dragonsoftarkir/SilumgarsScorn.java | 4 +- .../sets/gameday/ScaleguardSentinels.java | 124 ++++++++++++++++++ 7 files changed, 428 insertions(+), 3 deletions(-) create mode 100644 Mage.Sets/src/mage/sets/dragonsoftarkir/ReduceInStature.java create mode 100644 Mage.Sets/src/mage/sets/dragonsoftarkir/ScaleguardSentinels.java create mode 100644 Mage.Sets/src/mage/sets/dragonsoftarkir/SidisisFaithful.java create mode 100644 Mage.Sets/src/mage/sets/dragonsoftarkir/SightBeyondSight.java create mode 100644 Mage.Sets/src/mage/sets/gameday/ScaleguardSentinels.java diff --git a/Mage.Sets/src/mage/sets/dragonsoftarkir/DragonlordsPrerogative.java b/Mage.Sets/src/mage/sets/dragonsoftarkir/DragonlordsPrerogative.java index bed365f726..1713823c73 100644 --- a/Mage.Sets/src/mage/sets/dragonsoftarkir/DragonlordsPrerogative.java +++ b/Mage.Sets/src/mage/sets/dragonsoftarkir/DragonlordsPrerogative.java @@ -72,7 +72,7 @@ public class DragonlordsPrerogative extends CardImpl { Condition condition = new DragonlordsPrerogativeCondition(); ContinuousRuleModifyingEffect cantBeCountered = new CantBeCounteredSourceEffect(); ConditionalContinuousRuleModifyingEffect conditionalCantBeCountered = new ConditionalContinuousRuleModifyingEffect(cantBeCountered, condition); - conditionalCantBeCountered.setText("If you revealed a Dragon card or controlled a Dragon as you cast {this}, {this} can't be countered"); + conditionalCantBeCountered.setText("
If you revealed a Dragon card or controlled a Dragon as you cast {this}, {this} can't be countered"); Ability ability = new SimpleStaticAbility(Zone.STACK, conditionalCantBeCountered); this.addAbility(ability); diff --git a/Mage.Sets/src/mage/sets/dragonsoftarkir/ReduceInStature.java b/Mage.Sets/src/mage/sets/dragonsoftarkir/ReduceInStature.java new file mode 100644 index 0000000000..5f63ceeeea --- /dev/null +++ b/Mage.Sets/src/mage/sets/dragonsoftarkir/ReduceInStature.java @@ -0,0 +1,112 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.dragonsoftarkir; + +import java.util.UUID; +import mage.abilities.Ability; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.effects.ContinuousEffectImpl; +import mage.abilities.effects.common.AttachEffect; +import mage.abilities.keyword.EnchantAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.Layer; +import mage.constants.Outcome; +import mage.constants.Rarity; +import mage.constants.SubLayer; +import mage.constants.Zone; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.target.TargetPermanent; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author LevelX2 + */ +public class ReduceInStature extends CardImpl { + + public ReduceInStature(UUID ownerId) { + super(ownerId, 72, "Reduce in Stature", Rarity.COMMON, new CardType[]{CardType.ENCHANTMENT}, "{2}{U}"); + this.expansionSetCode = "DTK"; + this.subtype.add("Aura"); + + // Enchant creature + TargetPermanent auraTarget = new TargetCreaturePermanent(); + this.getSpellAbility().addTarget(auraTarget); + this.getSpellAbility().addEffect(new AttachEffect(Outcome.UnboostCreature)); + Ability ability = new EnchantAbility(auraTarget.getTargetName()); + this.addAbility(ability); + + // Enchanted creature has base power and toughness 0/2. + this.addAbility(new SimpleStaticAbility(Zone.BATTLEFIELD, new SetPowerToughnessEnchantedEffect())); + + } + + public ReduceInStature(final ReduceInStature card) { + super(card); + } + + @Override + public ReduceInStature copy() { + return new ReduceInStature(this); + } +} + +class SetPowerToughnessEnchantedEffect extends ContinuousEffectImpl { + + public SetPowerToughnessEnchantedEffect() { + super(Duration.WhileOnBattlefield, Layer.PTChangingEffects_7, SubLayer.SetPT_7b, Outcome.BoostCreature); + staticText = "Enchanted creature has base power and toughness 0/2"; + } + + public SetPowerToughnessEnchantedEffect(final SetPowerToughnessEnchantedEffect effect) { + super(effect); + } + + @Override + public SetPowerToughnessEnchantedEffect copy() { + return new SetPowerToughnessEnchantedEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Permanent enchantment = game.getPermanent(source.getSourceId()); + if (enchantment != null && enchantment.getAttachedTo() != null) { + Permanent enchanted = game.getPermanent(enchantment.getAttachedTo()); + if (enchanted != null) { + enchanted.getPower().setValue(0); + enchanted.getToughness().setValue(2); + } + return true; + } + return false; + } + +} diff --git a/Mage.Sets/src/mage/sets/dragonsoftarkir/ScaleguardSentinels.java b/Mage.Sets/src/mage/sets/dragonsoftarkir/ScaleguardSentinels.java new file mode 100644 index 0000000000..dfd10080cb --- /dev/null +++ b/Mage.Sets/src/mage/sets/dragonsoftarkir/ScaleguardSentinels.java @@ -0,0 +1,52 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.dragonsoftarkir; + +import java.util.UUID; + +/** + * + * @author LevelX2 + */ +public class ScaleguardSentinels extends mage.sets.gameday.ScaleguardSentinels { + + public ScaleguardSentinels(UUID ownerId) { + super(ownerId); + this.cardNumber = 201; + this.expansionSetCode = "DTK"; + } + + public ScaleguardSentinels(final ScaleguardSentinels card) { + super(card); + } + + @Override + public ScaleguardSentinels copy() { + return new ScaleguardSentinels(this); + } +} diff --git a/Mage.Sets/src/mage/sets/dragonsoftarkir/SidisisFaithful.java b/Mage.Sets/src/mage/sets/dragonsoftarkir/SidisisFaithful.java new file mode 100644 index 0000000000..c80473bc21 --- /dev/null +++ b/Mage.Sets/src/mage/sets/dragonsoftarkir/SidisisFaithful.java @@ -0,0 +1,72 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.dragonsoftarkir; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.ExploitCreatureTriggeredAbility; +import mage.abilities.effects.common.ReturnToHandTargetEffect; +import mage.abilities.keyword.ExploitAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.target.common.TargetCreaturePermanent; + +/** + * + * @author LevelX2 + */ +public class SidisisFaithful extends CardImpl { + + public SidisisFaithful(UUID ownerId) { + super(ownerId, 74, "Sidisi's Faithful", Rarity.COMMON, new CardType[]{CardType.CREATURE}, "{U}"); + this.expansionSetCode = "DTK"; + this.subtype.add("Naga"); + this.subtype.add("Wizard"); + this.power = new MageInt(0); + this.toughness = new MageInt(4); + + // Exploit + this.addAbility(new ExploitAbility()); + + // When Sidisi's Faithful exploits a creature, return target creature to its owner's hand. + Ability ability = new ExploitCreatureTriggeredAbility(new ReturnToHandTargetEffect(), false); + ability.addTarget(new TargetCreaturePermanent()); + this.addAbility(ability); + } + + public SidisisFaithful(final SidisisFaithful card) { + super(card); + } + + @Override + public SidisisFaithful copy() { + return new SidisisFaithful(this); + } +} diff --git a/Mage.Sets/src/mage/sets/dragonsoftarkir/SightBeyondSight.java b/Mage.Sets/src/mage/sets/dragonsoftarkir/SightBeyondSight.java new file mode 100644 index 0000000000..d36e0f247c --- /dev/null +++ b/Mage.Sets/src/mage/sets/dragonsoftarkir/SightBeyondSight.java @@ -0,0 +1,65 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.dragonsoftarkir; + +import java.util.UUID; +import mage.abilities.dynamicvalue.common.StaticValue; +import mage.abilities.effects.common.LookLibraryAndPickControllerEffect; +import mage.abilities.keyword.ReboundAbility; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.constants.Zone; +import mage.filter.FilterCard; + +/** + * + * @author LevelX2 + */ +public class SightBeyondSight extends CardImpl { + + public SightBeyondSight(UUID ownerId) { + super(ownerId, 75, "Sight Beyond Sight", Rarity.UNCOMMON, new CardType[]{CardType.SORCERY}, "{3}{U}"); + this.expansionSetCode = "DTK"; + + // Look at the top two cards of your library. Put of them into your hand and the other on the bottom of your library. + this.getSpellAbility().addEffect(new LookLibraryAndPickControllerEffect(new StaticValue(2), false, new StaticValue(1), new FilterCard(), Zone.LIBRARY, false, false)); + + // Rebound + this.addAbility(new ReboundAbility()); + } + + public SightBeyondSight(final SightBeyondSight card) { + super(card); + } + + @Override + public SightBeyondSight copy() { + return new SightBeyondSight(this); + } +} diff --git a/Mage.Sets/src/mage/sets/dragonsoftarkir/SilumgarsScorn.java b/Mage.Sets/src/mage/sets/dragonsoftarkir/SilumgarsScorn.java index b19b8cdf1f..90f96207fa 100644 --- a/Mage.Sets/src/mage/sets/dragonsoftarkir/SilumgarsScorn.java +++ b/Mage.Sets/src/mage/sets/dragonsoftarkir/SilumgarsScorn.java @@ -64,7 +64,7 @@ public class SilumgarsScorn extends CardImpl { this.expansionSetCode = "DTK"; // As an additional cost to cast Silumgar's Scorn, you may reveal a Dragon card from your hand. - this.getSpellAbility().addEffect(new InfoEffect("As an additional cost to cast {this}, you may reveal a Dragon card from your hand
")); + this.getSpellAbility().addEffect(new InfoEffect("As an additional cost to cast {this}, you may reveal a Dragon card from your hand")); // Counter target spell unless its controller pays {1}. If you revealed a Dragon card or controlled a Dragon as you cast Silumgar's Scorn, counter that spell instead. this.getSpellAbility().addEffect(new SilumgarsScornCounterEffect()); @@ -98,7 +98,7 @@ class SilumgarsScornCounterEffect extends OneShotEffect { public SilumgarsScornCounterEffect() { super(Outcome.Detriment); - staticText = "Counter target spell unless its controller pays {1}. If you revealed a Dragon card or controlled a Dragon as you cast {this}, counter that spell instead"; + staticText = "
Counter target spell unless its controller pays {1}. If you revealed a Dragon card or controlled a Dragon as you cast {this}, counter that spell instead"; } public SilumgarsScornCounterEffect(final SilumgarsScornCounterEffect effect) { diff --git a/Mage.Sets/src/mage/sets/gameday/ScaleguardSentinels.java b/Mage.Sets/src/mage/sets/gameday/ScaleguardSentinels.java new file mode 100644 index 0000000000..a54e655a20 --- /dev/null +++ b/Mage.Sets/src/mage/sets/gameday/ScaleguardSentinels.java @@ -0,0 +1,124 @@ +/* + * Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ +package mage.sets.gameday; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldAbility; +import mage.abilities.condition.Condition; +import mage.abilities.costs.Cost; +import mage.abilities.costs.common.RevealTargetFromHandCost; +import mage.abilities.effects.common.InfoEffect; +import mage.abilities.effects.common.counter.AddCountersSourceEffect; +import mage.cards.CardImpl; +import mage.constants.CardType; +import mage.constants.Rarity; +import mage.counters.CounterType; +import mage.filter.common.FilterCreatureCard; +import mage.filter.predicate.mageobject.SubtypePredicate; +import mage.game.Game; +import mage.players.Player; +import mage.target.common.TargetCardInHand; +import mage.watchers.common.DragonOnTheBattlefieldWhileSpellWasCastWatcher; + +/** + * + * @author LevelX2 + */ +public class ScaleguardSentinels extends CardImpl { + + private static final FilterCreatureCard filter = new FilterCreatureCard("a Dragon card from your hand (you don't have to)"); + + static { + filter.add(new SubtypePredicate("Dragon")); + } + + public ScaleguardSentinels(UUID ownerId) { + super(ownerId, 43, "Scaleguard Sentinels", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{G}{G}"); + this.expansionSetCode = "MGDC"; + this.subtype.add("Human"); + this.subtype.add("Soldier"); + this.power = new MageInt(2); + this.toughness = new MageInt(3); + + // As an additional cost to cast Scaleguard Sentinels, you may reveal a Dragon card from your hand. + this.getSpellAbility().addEffect(new InfoEffect("As an additional cost to cast {this}, you may reveal a Dragon card from your hand")); + + // Scaleguard Sentinels enters the battlefield with a +1/+1 counter on it if you revealed a Dragon card or controlled a Dragon as you cast Scaleguard Sentinels. + this.addAbility(new EntersBattlefieldAbility(new AddCountersSourceEffect(CounterType.P1P1.createInstance(), true), + ScaleguardSentinelsCondition.getInstance(), true, + "{this} enters the battlefield with a +1/+1 counter on it if you revealed a Dragon card or controlled a Dragon as you cast {this}", ""), + new DragonOnTheBattlefieldWhileSpellWasCastWatcher()); + + } + + @Override + public void adjustCosts(Ability ability, Game game) { + if (ability instanceof EntersBattlefieldAbility) { + Player controller = game.getPlayer(ability.getControllerId()); + if (controller != null) { + if (controller.getHand().count(filter, game) > 0) { + ability.addCost(new RevealTargetFromHandCost(new TargetCardInHand(0,1, filter))); + } + } + } + } + + public ScaleguardSentinels(final ScaleguardSentinels card) { + super(card); + } + + @Override + public ScaleguardSentinels copy() { + return new ScaleguardSentinels(this); + } +} + +class ScaleguardSentinelsCondition implements Condition { + + private static final ScaleguardSentinelsCondition fInstance = new ScaleguardSentinelsCondition(); + + public static Condition getInstance() { + return fInstance; + } + + @Override + public boolean apply(Game game, Ability source) { + DragonOnTheBattlefieldWhileSpellWasCastWatcher watcher = (DragonOnTheBattlefieldWhileSpellWasCastWatcher) game.getState().getWatchers().get("DragonOnTheBattlefieldWhileSpellWasCastWatcher"); + boolean condition = watcher != null && watcher.castWithConditionTrue(source.getId()); + if (!condition) { + for (Cost cost: source.getCosts()) { + if (cost instanceof RevealTargetFromHandCost) { + condition = ((RevealTargetFromHandCost)cost).getNumberRevealedCards() > 0; + } + } + } + return condition; + } +}