mirror of
https://github.com/correl/mage.git
synced 2024-12-26 19:16:54 +00:00
Merge pull request #3101 from ingmargoudt/compile_error_fix
Merge request
This commit is contained in:
commit
3e4665dbe7
3 changed files with 15 additions and 25 deletions
|
@ -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);
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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.
|
||||
|
|
Loading…
Reference in a new issue