Merge pull request #3101 from ingmargoudt/compile_error_fix

Merge request
This commit is contained in:
Jeff Wadsworth 2017-04-12 16:21:02 -05:00 committed by GitHub
commit 3e4665dbe7
3 changed files with 15 additions and 25 deletions

View file

@ -27,9 +27,7 @@
*/ */
package mage.cards.d; package mage.cards.d;
import java.util.UUID;
import mage.MageInt; import mage.MageInt;
import mage.abilities.CountType;
import mage.abilities.common.EntersBattlefieldTappedAbility; import mage.abilities.common.EntersBattlefieldTappedAbility;
import mage.abilities.condition.common.CardsInHandCondition; import mage.abilities.condition.common.CardsInHandCondition;
import mage.abilities.costs.mana.ManaCostsImpl; import mage.abilities.costs.mana.ManaCostsImpl;
@ -38,9 +36,12 @@ import mage.abilities.effects.common.ReturnSourceFromGraveyardToBattlefieldEffec
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.constants.ComparisonType;
import mage.constants.TimingRule; import mage.constants.TimingRule;
import mage.constants.Zone; import mage.constants.Zone;
import java.util.UUID;
/** /**
* *
* @author fireshoes * @author fireshoes
@ -60,7 +61,7 @@ public class DreadWanderer extends CardImpl {
// {2}{B}: Return Dread Wanderer from your graveyard to the battlefield. // {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. // 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); ConditionalActivatedAbility ability = new ConditionalActivatedAbility(Zone.GRAVEYARD, new ReturnSourceFromGraveyardToBattlefieldEffect(), new ManaCostsImpl("{2}{B}"), condition);
ability.setTiming(TimingRule.SORCERY); ability.setTiming(TimingRule.SORCERY);
addAbility(ability); addAbility(ability);

View file

@ -27,7 +27,6 @@
*/ */
package mage.cards.n; package mage.cards.n;
import java.util.UUID;
import mage.MageInt; import mage.MageInt;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.LoyaltyAbility; import mage.abilities.LoyaltyAbility;
@ -40,17 +39,9 @@ import mage.abilities.effects.common.continuous.BecomesCreatureTargetEffect;
import mage.abilities.effects.keyword.ScryEffect; import mage.abilities.effects.keyword.ScryEffect;
import mage.abilities.keyword.FlyingAbility; import mage.abilities.keyword.FlyingAbility;
import mage.abilities.keyword.HasteAbility; import mage.abilities.keyword.HasteAbility;
import mage.cards.Card; import mage.cards.*;
import mage.cards.CardImpl; import mage.constants.*;
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.counters.CounterType; import mage.counters.CounterType;
import mage.filter.Filter;
import mage.filter.common.FilterControlledLandPermanent; import mage.filter.common.FilterControlledLandPermanent;
import mage.filter.common.FilterPermanentCard; import mage.filter.common.FilterPermanentCard;
import mage.filter.predicate.Predicates; import mage.filter.predicate.Predicates;
@ -61,6 +52,8 @@ import mage.game.permanent.token.Token;
import mage.players.Player; import mage.players.Player;
import mage.target.TargetPermanent; import mage.target.TargetPermanent;
import java.util.UUID;
/** /**
* *
* @author fireshoes * @author fireshoes
@ -125,7 +118,7 @@ class NissaStewardOfElementsEffect extends OneShotEffect {
FilterPermanentCard filter = new FilterPermanentCard(); FilterPermanentCard filter = new FilterPermanentCard();
filter.add(Predicates.or(new CardTypePredicate(CardType.CREATURE), filter.add(Predicates.or(new CardTypePredicate(CardType.CREATURE),
new CardTypePredicate(CardType.LAND))); 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); Card card = player.getLibrary().getFromTop(game);
if (card != null) { if (card != null) {
Cards cards = new CardsImpl(); Cards cards = new CardsImpl();

View file

@ -27,10 +27,8 @@
*/ */
package mage.cards.r; package mage.cards.r;
import java.util.UUID;
import mage.MageInt; import mage.MageInt;
import mage.abilities.Ability; import mage.abilities.Ability;
import mage.abilities.CountType;
import mage.abilities.common.SimpleActivatedAbility; import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.common.SimpleStaticAbility; import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.costs.mana.ManaCostsImpl; import mage.abilities.costs.mana.ManaCostsImpl;
@ -43,11 +41,7 @@ import mage.abilities.keyword.IndestructibleAbility;
import mage.abilities.keyword.TrampleAbility; import mage.abilities.keyword.TrampleAbility;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.*;
import mage.constants.Duration;
import mage.constants.SuperType;
import mage.constants.Zone;
import mage.filter.Filter;
import mage.filter.common.FilterControlledCreaturePermanent; import mage.filter.common.FilterControlledCreaturePermanent;
import mage.filter.common.FilterCreaturePermanent; import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.mageobject.PowerPredicate; import mage.filter.predicate.mageobject.PowerPredicate;
@ -57,13 +51,15 @@ import mage.game.permanent.Permanent;
import mage.players.Player; import mage.players.Player;
import mage.target.common.TargetCreaturePermanent; import mage.target.common.TargetCreaturePermanent;
import java.util.UUID;
/** /**
*
* @author fireshoes * @author fireshoes
*/ */
public class RhonasTheIndomitable extends CardImpl { public class RhonasTheIndomitable extends CardImpl {
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("another target creature"); private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("another target creature");
static { static {
filter.add(new AnotherPredicate()); filter.add(new AnotherPredicate());
} }
@ -135,13 +131,13 @@ class RhonasTheIndomitableRestrictionEffect extends RestrictionEffect {
@Override @Override
public boolean applies(Permanent permanent, Ability source, Game game) { public boolean applies(Permanent permanent, Ability source, Game game) {
FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent(); FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent();
filter.add(new PowerPredicate(Filter.ComparisonType.GreaterThan, 3)); filter.add(new PowerPredicate(ComparisonType.MORE_THAN, 3));
filter.add(new AnotherPredicate()); filter.add(new AnotherPredicate());
if (permanent.getId().equals(source.getSourceId())) { if (permanent.getId().equals(source.getSourceId())) {
Player controller = game.getPlayer(source.getControllerId()); Player controller = game.getPlayer(source.getControllerId());
if (controller != null) { if (controller != null) {
int permanentsOnBattlefield = game.getBattlefield().count(filter, source.getSourceId(), source.getControllerId(), game); 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; return true;
} // do not apply to other creatures. } // do not apply to other creatures.