From 8871be844f706eb3c81888e3d025330f7ea74b25 Mon Sep 17 00:00:00 2001 From: ingmargoudt Date: Wed, 12 Apr 2017 22:34:10 +0200 Subject: [PATCH] fix compile errors --- Mage.Sets/src/mage/cards/d/DreadWanderer.java | 7 ++++--- .../mage/cards/n/NissaStewardOfElements.java | 17 +++++------------ .../src/mage/cards/r/RhonasTheIndomitable.java | 16 ++++++---------- 3 files changed, 15 insertions(+), 25 deletions(-) diff --git a/Mage.Sets/src/mage/cards/d/DreadWanderer.java b/Mage.Sets/src/mage/cards/d/DreadWanderer.java index f8d9bd3fdd..c8b7dd76c0 100644 --- a/Mage.Sets/src/mage/cards/d/DreadWanderer.java +++ b/Mage.Sets/src/mage/cards/d/DreadWanderer.java @@ -27,9 +27,7 @@ */ package mage.cards.d; -import java.util.UUID; import mage.MageInt; -import mage.abilities.CountType; import mage.abilities.common.EntersBattlefieldTappedAbility; import mage.abilities.condition.common.CardsInHandCondition; import mage.abilities.costs.mana.ManaCostsImpl; @@ -38,9 +36,12 @@ import mage.abilities.effects.common.ReturnSourceFromGraveyardToBattlefieldEffec import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; +import mage.constants.ComparisonType; import mage.constants.TimingRule; import mage.constants.Zone; +import java.util.UUID; + /** * * @author fireshoes @@ -60,7 +61,7 @@ public class DreadWanderer extends CardImpl { // {2}{B}: Return Dread Wanderer from your graveyard to the battlefield. // Activate this ability only any time you could cast a sorcery and only if you have one or fewer cards in hand. - CardsInHandCondition condition = new CardsInHandCondition(CountType.FEWER_THAN, 2); + CardsInHandCondition condition = new CardsInHandCondition(ComparisonType.FEWER_THAN, 2); ConditionalActivatedAbility ability = new ConditionalActivatedAbility(Zone.GRAVEYARD, new ReturnSourceFromGraveyardToBattlefieldEffect(), new ManaCostsImpl("{2}{B}"), condition); ability.setTiming(TimingRule.SORCERY); addAbility(ability); diff --git a/Mage.Sets/src/mage/cards/n/NissaStewardOfElements.java b/Mage.Sets/src/mage/cards/n/NissaStewardOfElements.java index 1491771262..f9d22ebf8c 100644 --- a/Mage.Sets/src/mage/cards/n/NissaStewardOfElements.java +++ b/Mage.Sets/src/mage/cards/n/NissaStewardOfElements.java @@ -27,7 +27,6 @@ */ package mage.cards.n; -import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; import mage.abilities.LoyaltyAbility; @@ -40,17 +39,9 @@ import mage.abilities.effects.common.continuous.BecomesCreatureTargetEffect; import mage.abilities.effects.keyword.ScryEffect; import mage.abilities.keyword.FlyingAbility; import mage.abilities.keyword.HasteAbility; -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.Duration; -import mage.constants.Outcome; -import mage.constants.Zone; +import mage.cards.*; +import mage.constants.*; import mage.counters.CounterType; -import mage.filter.Filter; import mage.filter.common.FilterControlledLandPermanent; import mage.filter.common.FilterPermanentCard; import mage.filter.predicate.Predicates; @@ -61,6 +52,8 @@ import mage.game.permanent.token.Token; import mage.players.Player; import mage.target.TargetPermanent; +import java.util.UUID; + /** * * @author fireshoes @@ -125,7 +118,7 @@ class NissaStewardOfElementsEffect extends OneShotEffect { FilterPermanentCard filter = new FilterPermanentCard(); filter.add(Predicates.or(new CardTypePredicate(CardType.CREATURE), new CardTypePredicate(CardType.LAND))); - filter.add(new ConvertedManaCostPredicate(Filter.ComparisonType.LessThan, count)); + filter.add(new ConvertedManaCostPredicate(ComparisonType.FEWER_THAN, count)); Card card = player.getLibrary().getFromTop(game); if (card != null) { Cards cards = new CardsImpl(); diff --git a/Mage.Sets/src/mage/cards/r/RhonasTheIndomitable.java b/Mage.Sets/src/mage/cards/r/RhonasTheIndomitable.java index bb20f84846..ff31deeccf 100644 --- a/Mage.Sets/src/mage/cards/r/RhonasTheIndomitable.java +++ b/Mage.Sets/src/mage/cards/r/RhonasTheIndomitable.java @@ -27,10 +27,8 @@ */ package mage.cards.r; -import java.util.UUID; import mage.MageInt; import mage.abilities.Ability; -import mage.abilities.CountType; import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.common.SimpleStaticAbility; import mage.abilities.costs.mana.ManaCostsImpl; @@ -43,11 +41,7 @@ import mage.abilities.keyword.IndestructibleAbility; import mage.abilities.keyword.TrampleAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; -import mage.constants.CardType; -import mage.constants.Duration; -import mage.constants.SuperType; -import mage.constants.Zone; -import mage.filter.Filter; +import mage.constants.*; import mage.filter.common.FilterControlledCreaturePermanent; import mage.filter.common.FilterCreaturePermanent; import mage.filter.predicate.mageobject.PowerPredicate; @@ -57,13 +51,15 @@ import mage.game.permanent.Permanent; import mage.players.Player; import mage.target.common.TargetCreaturePermanent; +import java.util.UUID; + /** - * * @author fireshoes */ public class RhonasTheIndomitable extends CardImpl { private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("another target creature"); + static { filter.add(new AnotherPredicate()); } @@ -135,13 +131,13 @@ class RhonasTheIndomitableRestrictionEffect extends RestrictionEffect { @Override public boolean applies(Permanent permanent, Ability source, Game game) { FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent(); - filter.add(new PowerPredicate(Filter.ComparisonType.GreaterThan, 3)); + filter.add(new PowerPredicate(ComparisonType.MORE_THAN, 3)); filter.add(new AnotherPredicate()); if (permanent.getId().equals(source.getSourceId())) { Player controller = game.getPlayer(source.getControllerId()); if (controller != null) { int permanentsOnBattlefield = game.getBattlefield().count(filter, source.getSourceId(), source.getControllerId(), game); - return (CountType.compare(permanentsOnBattlefield, CountType.FEWER_THAN, 1)); + return permanentsOnBattlefield < 1; // is this correct? } return true; } // do not apply to other creatures.