From a26c5a509ff88f9ba8ca63d5215e2aa442d945e3 Mon Sep 17 00:00:00 2001 From: Evan Kranzler Date: Tue, 12 Sep 2017 12:14:01 -0400 Subject: [PATCH] updated various activated abilities --- .../src/mage/cards/a/AncientHellkite.java | 100 ++++-------------- .../src/mage/cards/b/BrutalDeceiver.java | 52 ++++----- .../src/mage/cards/c/CallousDeceiver.java | 2 +- Mage.Sets/src/mage/cards/c/CruelDeceiver.java | 27 +++-- Mage.Sets/src/mage/cards/f/FeralDeceiver.java | 54 ++++++++-- Mage.Sets/src/mage/cards/h/HarshDeceiver.java | 55 ++++++++-- .../common/FeralDeceiverAbility.java | 50 --------- .../ConditionalActivatedAbility.java | 1 - .../ConditionalGainActivatedAbility.java | 2 - .../mana/ActivateIfConditionManaAbility.java | 1 - 10 files changed, 163 insertions(+), 181 deletions(-) delete mode 100644 Mage/src/main/java/mage/abilities/common/FeralDeceiverAbility.java diff --git a/Mage.Sets/src/mage/cards/a/AncientHellkite.java b/Mage.Sets/src/mage/cards/a/AncientHellkite.java index a44e3c9817f..bb830ed9732 100644 --- a/Mage.Sets/src/mage/cards/a/AncientHellkite.java +++ b/Mage.Sets/src/mage/cards/a/AncientHellkite.java @@ -25,28 +25,24 @@ * authors and should not be interpreted as representing official policies, either expressed * or implied, of BetaSteward_at_googlemail.com. */ - package mage.cards.a; import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; -import mage.abilities.ActivatedAbilityImpl; -import mage.abilities.costs.Cost; -import mage.abilities.costs.CostImpl; -import mage.abilities.costs.mana.ColoredManaCost; +import mage.abilities.condition.common.SourceAttackingCondition; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.decorator.ConditionalActivatedAbility; import mage.abilities.effects.common.DamageTargetEffect; import mage.abilities.keyword.FlyingAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; -import mage.constants.ColoredManaSymbol; import mage.constants.SubType; import mage.constants.Zone; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.permanent.ControllerIdPredicate; import mage.game.Game; -import mage.game.permanent.Permanent; import mage.target.common.TargetCreaturePermanent; /** @@ -55,19 +51,37 @@ import mage.target.common.TargetCreaturePermanent; */ public class AncientHellkite extends CardImpl { + private final UUID originalId; + public AncientHellkite(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{4}{R}{R}{R}"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{R}{R}{R}"); this.subtype.add(SubType.DRAGON); this.power = new MageInt(6); this.toughness = new MageInt(6); this.addAbility(FlyingAbility.getInstance()); - this.addAbility(new AncientHellkiteAbility()); + Ability ability = new ConditionalActivatedAbility(Zone.BATTLEFIELD, new DamageTargetEffect(1), new ManaCostsImpl("{R}"), SourceAttackingCondition.instance); + ability.addTarget(new TargetCreaturePermanent(new FilterCreaturePermanent("creature defending player controls"))); + originalId = ability.getOriginalId(); + this.addAbility(ability); } public AncientHellkite(final AncientHellkite card) { super(card); + this.originalId = card.originalId; + } + + @Override + public void adjustTargets(Ability ability, Game game) { + if (ability.getOriginalId().equals(originalId)) { + ability.getTargets().clear(); + FilterCreaturePermanent filter = new FilterCreaturePermanent("creature defending player controls"); + UUID defenderId = game.getCombat().getDefenderId(ability.getSourceId()); + filter.add(new ControllerIdPredicate(defenderId)); + TargetCreaturePermanent target = new TargetCreaturePermanent(filter); + ability.addTarget(target); + } } @Override @@ -76,71 +90,3 @@ public class AncientHellkite extends CardImpl { } } - -class AncientHellkiteAbility extends ActivatedAbilityImpl { - - private static final FilterCreaturePermanent filterTemplate = new FilterCreaturePermanent("creature defending player controls"); - - public AncientHellkiteAbility() { - super(Zone.BATTLEFIELD, new DamageTargetEffect(1)); - addCost(new AncientHellkiteCost()); - addManaCost(new ColoredManaCost(ColoredManaSymbol.R)); - addTarget(new TargetCreaturePermanent(filterTemplate)); - } - - public AncientHellkiteAbility(final AncientHellkiteAbility ability) { - super(ability); - } - - @Override - public AncientHellkiteAbility copy() { - return new AncientHellkiteAbility(this); - } - - @Override - public boolean activate(Game game, boolean noMana) { - UUID defenderId = game.getCombat().getDefenderId(sourceId); - if (defenderId != null) { - FilterCreaturePermanent filter = filterTemplate.copy(); - filter.add(new ControllerIdPredicate(defenderId)); - - this.getTargets().clear(); - TargetCreaturePermanent target = new TargetCreaturePermanent(filter); - this.addTarget(target); - return super.activate(game, noMana); - } - return false; - } -} - -class AncientHellkiteCost extends CostImpl { - - public AncientHellkiteCost() { - this.text = "Activate this ability only if Ancient Hellkite is attacking"; - } - - public AncientHellkiteCost(final AncientHellkiteCost cost) { - super(cost); - } - - @Override - public AncientHellkiteCost copy() { - return new AncientHellkiteCost(this); - } - - @Override - public boolean canPay(Ability ability, UUID sourceId, UUID controllerId, Game game) { - Permanent permanent = game.getPermanent(sourceId); - if (permanent != null && permanent.isAttacking()) { - return true; - } - return false; - } - - @Override - public boolean pay(Ability ability, Game game, UUID sourceId, UUID controllerId, boolean noMana, Cost costToPay) { - this.paid = true; - return paid; - } - -} \ No newline at end of file diff --git a/Mage.Sets/src/mage/cards/b/BrutalDeceiver.java b/Mage.Sets/src/mage/cards/b/BrutalDeceiver.java index 0ff4dc40918..e443ace2d94 100644 --- a/Mage.Sets/src/mage/cards/b/BrutalDeceiver.java +++ b/Mage.Sets/src/mage/cards/b/BrutalDeceiver.java @@ -29,13 +29,13 @@ package mage.cards.b; import java.util.UUID; import mage.MageInt; +import mage.MageObject; import mage.abilities.Ability; import mage.abilities.common.LimitedTimesPerTurnActivatedAbility; import mage.abilities.common.SimpleActivatedAbility; -import mage.abilities.costs.Cost; import mage.abilities.costs.mana.GenericManaCost; import mage.abilities.costs.mana.ManaCostsImpl; -import mage.abilities.effects.Effect; +import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.common.LookLibraryControllerEffect; import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.abilities.effects.common.continuous.GainAbilitySourceEffect; @@ -43,6 +43,7 @@ import mage.abilities.keyword.FirstStrikeAbility; import mage.cards.*; import mage.constants.CardType; import mage.constants.Duration; +import mage.constants.Outcome; import mage.constants.SubType; import mage.constants.Zone; import mage.game.Game; @@ -55,7 +56,7 @@ import mage.players.Player; public class BrutalDeceiver extends CardImpl { public BrutalDeceiver(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{R}"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{R}"); this.subtype.add(SubType.SPIRIT); this.power = new MageInt(2); @@ -65,9 +66,7 @@ public class BrutalDeceiver extends CardImpl { this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new LookLibraryControllerEffect(), new GenericManaCost(1))); // {2}: Reveal the top card of your library. If it's a land card, {this} gets +1/+0 and gains first strike until end of turn. - Ability ability = new BrutalDeceiverAbility(Zone.BATTLEFIELD, new BoostSourceEffect(1, 0, Duration.EndOfTurn), new ManaCostsImpl("{2}")); - ability.addEffect(new GainAbilitySourceEffect(FirstStrikeAbility.getInstance(), Duration.EndOfTurn)); - this.addAbility(ability); + this.addAbility(new LimitedTimesPerTurnActivatedAbility(Zone.BATTLEFIELD, new BrutalDeceiverEffect(), new ManaCostsImpl("{2}"))); } public BrutalDeceiver(final BrutalDeceiver card) { @@ -80,38 +79,39 @@ public class BrutalDeceiver extends CardImpl { } } -class BrutalDeceiverAbility extends LimitedTimesPerTurnActivatedAbility { +class BrutalDeceiverEffect extends OneShotEffect { - public BrutalDeceiverAbility(Zone zone, Effect effect, Cost cost) { - super(zone, effect, cost); + public BrutalDeceiverEffect() { + super(Outcome.BoostCreature); + this.staticText = "Reveal the top card of your library. If it's a land card, {this} gets +1/+0 and gains first strike until end of turn"; } - public BrutalDeceiverAbility(BrutalDeceiverAbility ability) { - super(ability); + public BrutalDeceiverEffect(final BrutalDeceiverEffect effect) { + super(effect); } @Override - public BrutalDeceiverAbility copy() { - return new BrutalDeceiverAbility(this); + public BrutalDeceiverEffect copy() { + return new BrutalDeceiverEffect(this); } @Override - public boolean checkIfClause(Game game) { - Player player = game.getPlayer(this.getControllerId()); - if (player != null) { + public boolean apply(Game game, Ability source) { + Player controller = game.getPlayer(source.getControllerId()); + MageObject sourceObject = source.getSourceObject(game); + if (controller != null && sourceObject != null) { Cards cards = new CardsImpl(); - Card card = player.getLibrary().getFromTop(game); - cards.add(card); - player.revealCards("Brutal Deceiver", cards, game); - if (card != null && card.isLand()) { - return true; + Card card = controller.getLibrary().getFromTop(game); + if (card != null) { + cards.add(card); + controller.revealCards(sourceObject.getIdName(), cards, game); + if (card.isLand()) { + game.addEffect(new BoostSourceEffect(1, 0, Duration.EndOfTurn), source); + game.addEffect(new GainAbilitySourceEffect(FirstStrikeAbility.getInstance(), Duration.EndOfTurn), source); + } } + return true; } return false; } - - @Override - public String getRule() { - return "{2}: Reveal the top card of your library. If it's a land card, {this} gets +1/+0 and gains first strike until end of turn. Activate this ability only once each turn."; - } } diff --git a/Mage.Sets/src/mage/cards/c/CallousDeceiver.java b/Mage.Sets/src/mage/cards/c/CallousDeceiver.java index 4aa3f68801a..03c905e245a 100644 --- a/Mage.Sets/src/mage/cards/c/CallousDeceiver.java +++ b/Mage.Sets/src/mage/cards/c/CallousDeceiver.java @@ -56,7 +56,7 @@ import mage.players.Player; public class CallousDeceiver extends CardImpl { public CallousDeceiver(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{U}"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{U}"); this.subtype.add(SubType.SPIRIT); this.power = new MageInt(1); diff --git a/Mage.Sets/src/mage/cards/c/CruelDeceiver.java b/Mage.Sets/src/mage/cards/c/CruelDeceiver.java index ed6b1ef8e38..95bab5f5e99 100644 --- a/Mage.Sets/src/mage/cards/c/CruelDeceiver.java +++ b/Mage.Sets/src/mage/cards/c/CruelDeceiver.java @@ -29,16 +29,18 @@ package mage.cards.c; import java.util.UUID; import mage.MageInt; +import mage.MageObject; import mage.abilities.Ability; +import mage.abilities.common.DealsDamageToACreatureTriggeredAbility; import mage.abilities.common.LimitedTimesPerTurnActivatedAbility; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.costs.mana.GenericManaCost; import mage.abilities.costs.mana.ManaCostsImpl; import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.DestroyTargetEffect; import mage.abilities.effects.common.LookLibraryControllerEffect; import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.abilities.effects.common.continuous.GainAbilitySourceEffect; -import mage.abilities.keyword.TrampleAbility; import mage.cards.*; import mage.constants.CardType; import mage.constants.SubType; @@ -55,7 +57,7 @@ import mage.players.Player; public class CruelDeceiver extends CardImpl { public CruelDeceiver(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{B}"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{B}"); this.subtype.add(SubType.SPIRIT); this.power = new MageInt(2); @@ -82,7 +84,7 @@ class CruelDeceiverEffect extends OneShotEffect { public CruelDeceiverEffect() { super(Outcome.AddAbility); - this.staticText = "Reveal the top card of your library. If it's a land card, {this} gets +2/+2 and gains trample until end of turn"; + this.staticText = "Reveal the top card of your library. If it's a land card, Cruel Deceiver gains \"Whenever Cruel Deceiver deals damage to a creature, destroy that creature\" until end of turn"; } public CruelDeceiverEffect(final CruelDeceiverEffect effect) { @@ -96,15 +98,18 @@ class CruelDeceiverEffect extends OneShotEffect { @Override public boolean apply(Game game, Ability source) { - Player player = game.getPlayer(source.getControllerId()); - if (player != null) { + Player controller = game.getPlayer(source.getControllerId()); + MageObject sourceObject = source.getSourceObject(game); + if (controller != null && sourceObject != null) { Cards cards = new CardsImpl(); - Card card = player.getLibrary().getFromTop(game); - cards.add(card); - player.revealCards("Cruel Deceiver", cards, game); - if (card != null && card.isLand()) { - game.addEffect(new BoostSourceEffect(2,2,Duration.EndOfTurn), source); - game.addEffect(new GainAbilitySourceEffect(TrampleAbility.getInstance(),Duration.EndOfTurn), source); + Card card = controller.getLibrary().getFromTop(game); + if (card != null) { + cards.add(card); + controller.revealCards(sourceObject.getIdName(), cards, game); + if (card.isLand()) { + game.addEffect(new BoostSourceEffect(1, 0, Duration.EndOfTurn), source); + game.addEffect(new GainAbilitySourceEffect(new DealsDamageToACreatureTriggeredAbility(new DestroyTargetEffect(true), false, false, true), Duration.EndOfTurn), source); + } } return true; } diff --git a/Mage.Sets/src/mage/cards/f/FeralDeceiver.java b/Mage.Sets/src/mage/cards/f/FeralDeceiver.java index c590aced713..5bde2e76fc3 100644 --- a/Mage.Sets/src/mage/cards/f/FeralDeceiver.java +++ b/Mage.Sets/src/mage/cards/f/FeralDeceiver.java @@ -29,21 +29,29 @@ package mage.cards.f; import java.util.UUID; import mage.MageInt; +import mage.MageObject; import mage.abilities.Ability; -import mage.abilities.common.FeralDeceiverAbility; +import mage.abilities.common.LimitedTimesPerTurnActivatedAbility; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.costs.mana.GenericManaCost; import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.common.LookLibraryControllerEffect; import mage.abilities.effects.common.continuous.BoostSourceEffect; import mage.abilities.effects.common.continuous.GainAbilitySourceEffect; import mage.abilities.keyword.TrampleAbility; +import mage.cards.Card; import mage.cards.CardImpl; import mage.cards.CardSetInfo; +import mage.cards.Cards; +import mage.cards.CardsImpl; import mage.constants.CardType; import mage.constants.SubType; import mage.constants.Duration; +import mage.constants.Outcome; import mage.constants.Zone; +import mage.game.Game; +import mage.players.Player; /** * @@ -52,19 +60,17 @@ import mage.constants.Zone; public class FeralDeceiver extends CardImpl { public FeralDeceiver(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{G}"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{G}"); this.subtype.add(SubType.SPIRIT); this.power = new MageInt(3); this.toughness = new MageInt(2); // {1}: Look at the top card of your library. - this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new LookLibraryControllerEffect(), new GenericManaCost(1))); + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new LookLibraryControllerEffect(), new GenericManaCost(1))); // {2}: Reveal the top card of your library. If it's a land card, {this} gets +2/+2 and gains trample until end of turn. - Ability ability = new FeralDeceiverAbility(Zone.BATTLEFIELD, new BoostSourceEffect(2,2,Duration.EndOfTurn), new ManaCostsImpl("{2}")); - ability.addEffect(new GainAbilitySourceEffect(TrampleAbility.getInstance(),Duration.EndOfTurn)); - this.addAbility(ability); + this.addAbility(new LimitedTimesPerTurnActivatedAbility(Zone.BATTLEFIELD, new FeralDeceiverEffect(), new ManaCostsImpl("{2}"))); } public FeralDeceiver(final FeralDeceiver card) { @@ -77,3 +83,39 @@ public class FeralDeceiver extends CardImpl { } } +class FeralDeceiverEffect extends OneShotEffect { + + public FeralDeceiverEffect() { + super(Outcome.BoostCreature); + this.staticText = "Reveal the top card of your library. If it's a land card, {this} gets +2/+2 and gains trample until end of turn"; + } + + public FeralDeceiverEffect(final FeralDeceiverEffect effect) { + super(effect); + } + + @Override + public FeralDeceiverEffect copy() { + return new FeralDeceiverEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player controller = game.getPlayer(source.getControllerId()); + MageObject sourceObject = source.getSourceObject(game); + if (controller != null && sourceObject != null) { + Cards cards = new CardsImpl(); + Card card = controller.getLibrary().getFromTop(game); + if (card != null) { + cards.add(card); + controller.revealCards(sourceObject.getIdName(), cards, game); + if (card.isLand()) { + game.addEffect(new BoostSourceEffect(2, 2, Duration.EndOfTurn), source); + game.addEffect(new GainAbilitySourceEffect(TrampleAbility.getInstance(), Duration.EndOfTurn), source); + } + } + return true; + } + return false; + } +} diff --git a/Mage.Sets/src/mage/cards/h/HarshDeceiver.java b/Mage.Sets/src/mage/cards/h/HarshDeceiver.java index 6debef53fae..af887e3e3b8 100644 --- a/Mage.Sets/src/mage/cards/h/HarshDeceiver.java +++ b/Mage.Sets/src/mage/cards/h/HarshDeceiver.java @@ -29,20 +29,28 @@ package mage.cards.h; import java.util.UUID; import mage.MageInt; +import mage.MageObject; import mage.abilities.Ability; -import mage.abilities.common.FeralDeceiverAbility; +import mage.abilities.common.LimitedTimesPerTurnActivatedAbility; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.costs.mana.GenericManaCost; import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.common.LookLibraryControllerEffect; import mage.abilities.effects.common.UntapSourceEffect; import mage.abilities.effects.common.continuous.BoostSourceEffect; +import mage.cards.Card; import mage.cards.CardImpl; import mage.cards.CardSetInfo; +import mage.cards.Cards; +import mage.cards.CardsImpl; import mage.constants.CardType; import mage.constants.SubType; import mage.constants.Duration; +import mage.constants.Outcome; import mage.constants.Zone; +import mage.game.Game; +import mage.players.Player; /** * @@ -51,19 +59,17 @@ import mage.constants.Zone; public class HarshDeceiver extends CardImpl { public HarshDeceiver(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{3}{W}"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{W}"); this.subtype.add(SubType.SPIRIT); this.power = new MageInt(1); this.toughness = new MageInt(4); // {1}: Look at the top card of your library. - this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new LookLibraryControllerEffect(), new GenericManaCost(1))); + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new LookLibraryControllerEffect(), new GenericManaCost(1))); // {2}: Reveal the top card of your library. If it's a land card, untap {this} and it gets +1/+1 until end of turn. - Ability ability = new FeralDeceiverAbility(Zone.BATTLEFIELD, new UntapSourceEffect(), new ManaCostsImpl("{2}")); - ability.addEffect(new BoostSourceEffect(1,1,Duration.EndOfTurn)); - this.addAbility(ability); + this.addAbility(new LimitedTimesPerTurnActivatedAbility(Zone.BATTLEFIELD, new HarshDeceiverEffect(), new ManaCostsImpl("{2}"))); } public HarshDeceiver(final HarshDeceiver card) { @@ -75,3 +81,40 @@ public class HarshDeceiver extends CardImpl { return new HarshDeceiver(this); } } + +class HarshDeceiverEffect extends OneShotEffect { + + public HarshDeceiverEffect() { + super(Outcome.BoostCreature); + this.staticText = "Reveal the top card of your library. If it's a land card, untap {this} and it gets +1/+1 until end of turn"; + } + + public HarshDeceiverEffect(final HarshDeceiverEffect effect) { + super(effect); + } + + @Override + public HarshDeceiverEffect copy() { + return new HarshDeceiverEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player controller = game.getPlayer(source.getControllerId()); + MageObject sourceObject = source.getSourceObject(game); + if (controller != null && sourceObject != null) { + Cards cards = new CardsImpl(); + Card card = controller.getLibrary().getFromTop(game); + if (card != null) { + cards.add(card); + controller.revealCards(sourceObject.getIdName(), cards, game); + if (card.isLand()) { + new UntapSourceEffect().apply(game, source); + game.addEffect(new BoostSourceEffect(1, 1, Duration.EndOfTurn), source); + } + } + return true; + } + return false; + } +} diff --git a/Mage/src/main/java/mage/abilities/common/FeralDeceiverAbility.java b/Mage/src/main/java/mage/abilities/common/FeralDeceiverAbility.java deleted file mode 100644 index 49c73bb6131..00000000000 --- a/Mage/src/main/java/mage/abilities/common/FeralDeceiverAbility.java +++ /dev/null @@ -1,50 +0,0 @@ -package mage.abilities.common; - -import mage.abilities.costs.Cost; -import mage.abilities.effects.Effect; -import mage.cards.Card; -import mage.cards.Cards; -import mage.cards.CardsImpl; -import mage.constants.CardType; -import mage.constants.Zone; -import mage.game.Game; -import mage.players.Player; - -/** - * Created by Eric on 9/24/2016. - */ -public class FeralDeceiverAbility extends LimitedTimesPerTurnActivatedAbility { - - public FeralDeceiverAbility(Zone zone, Effect effect, Cost cost) { - super(zone, effect, cost); - } - - public FeralDeceiverAbility(FeralDeceiverAbility ability) { - super(ability); - } - - @Override - public FeralDeceiverAbility copy() { - return new FeralDeceiverAbility(this); - } - - @Override - public boolean checkIfClause(Game game) { - Player player = game.getPlayer(this.getControllerId()); - if (player != null) { - Cards cards = new CardsImpl(); - Card card = player.getLibrary().getFromTop(game); - cards.add(card); - player.revealCards("Feral Deceiver", cards, game); - if (card != null && card.isLand()) { - return true; - } - } - return false; - } - - @Override - public String getRule() { - return "{2}: Reveal the top card of your library. If it's a land card, {this} gets +2/+2 and gains trample until end of turn. Activate this ability only once each turn."; - } -} diff --git a/Mage/src/main/java/mage/abilities/decorator/ConditionalActivatedAbility.java b/Mage/src/main/java/mage/abilities/decorator/ConditionalActivatedAbility.java index 0e159549ff2..86186e4b013 100644 --- a/Mage/src/main/java/mage/abilities/decorator/ConditionalActivatedAbility.java +++ b/Mage/src/main/java/mage/abilities/decorator/ConditionalActivatedAbility.java @@ -50,7 +50,6 @@ public class ConditionalActivatedAbility extends ActivatedAbilityImpl { public ConditionalActivatedAbility(final ConditionalActivatedAbility ability) { super(ability); - this.condition = ability.condition; this.ruleText = ability.ruleText; } diff --git a/Mage/src/main/java/mage/abilities/decorator/ConditionalGainActivatedAbility.java b/Mage/src/main/java/mage/abilities/decorator/ConditionalGainActivatedAbility.java index 9fe5123f838..41660dda3e3 100644 --- a/Mage/src/main/java/mage/abilities/decorator/ConditionalGainActivatedAbility.java +++ b/Mage/src/main/java/mage/abilities/decorator/ConditionalGainActivatedAbility.java @@ -46,7 +46,6 @@ import mage.game.Game; */ public class ConditionalGainActivatedAbility extends ActivatedAbilityImpl { - private final Condition condition; private String staticText = ""; private static final Effects emptyEffects = new Effects(); @@ -71,7 +70,6 @@ public class ConditionalGainActivatedAbility extends ActivatedAbilityImpl { public ConditionalGainActivatedAbility(ConditionalGainActivatedAbility ability) { super(ability); - this.condition = ability.condition; this.staticText = ability.staticText; } diff --git a/Mage/src/main/java/mage/abilities/mana/ActivateIfConditionManaAbility.java b/Mage/src/main/java/mage/abilities/mana/ActivateIfConditionManaAbility.java index d851810563c..f6c63bc2d46 100644 --- a/Mage/src/main/java/mage/abilities/mana/ActivateIfConditionManaAbility.java +++ b/Mage/src/main/java/mage/abilities/mana/ActivateIfConditionManaAbility.java @@ -50,7 +50,6 @@ public class ActivateIfConditionManaAbility extends ActivatedManaAbilityImpl { public ActivateIfConditionManaAbility(ActivateIfConditionManaAbility ability) { super(ability); - this.condition = ability.condition; } @Override