mirror of
https://github.com/correl/mage.git
synced 2025-01-11 19:13:02 +00:00
fix last compile issues
This commit is contained in:
parent
de8737697d
commit
f244f9d6bc
24 changed files with 57 additions and 49 deletions
|
@ -39,6 +39,7 @@ import mage.choices.Choice;
|
|||
import mage.choices.ChoiceImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.FilterCard;
|
||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||
|
@ -113,7 +114,7 @@ class BloodlineShamanEffect extends OneShotEffect {
|
|||
}
|
||||
|
||||
FilterCard filterSubtype = new FilterCard();
|
||||
filterSubtype.add(new SubtypePredicate(typeChoice.getChoice()));
|
||||
filterSubtype.add(new SubtypePredicate(SubType.byDescription(typeChoice.getChoice())));
|
||||
|
||||
// Reveal the top card of your library.
|
||||
if (controller.getLibrary().hasCards()) {
|
||||
|
|
|
@ -37,6 +37,7 @@ import mage.abilities.keyword.EnchantAbility;
|
|||
import mage.cards.*;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.common.FilterCreatureCard;
|
||||
import mage.filter.predicate.Predicate;
|
||||
|
@ -124,7 +125,7 @@ class CallToTheKindredEffect extends OneShotEffect {
|
|||
StringBuilder sb = new StringBuilder("creature card with at least one subtype from: ");
|
||||
ArrayList<Predicate<MageObject>> subtypes = new ArrayList<>();
|
||||
for (String subtype : creature.getSubtype(game)) {
|
||||
subtypes.add(new SubtypePredicate(subtype));
|
||||
subtypes.add(new SubtypePredicate(SubType.byDescription(subtype)));
|
||||
sb.append(subtype).append(", ");
|
||||
}
|
||||
filter.add(Predicates.or(subtypes));
|
||||
|
|
|
@ -38,6 +38,7 @@ import mage.abilities.keyword.ProtectionAbility;
|
|||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||
|
||||
|
@ -53,8 +54,8 @@ public class ChoArrimLegate extends CardImpl {
|
|||
private static final FilterPermanent filterSwamp = new FilterPermanent();
|
||||
|
||||
static {
|
||||
filterPlains.add(new SubtypePredicate(("Plains")));
|
||||
filterSwamp.add(new SubtypePredicate(("Swamp")));
|
||||
filterPlains.add(new SubtypePredicate(SubType.PLAINS));
|
||||
filterSwamp.add(new SubtypePredicate(SubType.SWAMP));
|
||||
}
|
||||
|
||||
public ChoArrimLegate(UUID ownerId, CardSetInfo setInfo) {
|
||||
|
|
|
@ -36,6 +36,7 @@ import mage.choices.Choice;
|
|||
import mage.choices.ChoiceImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.SubType;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||
import mage.game.Game;
|
||||
|
@ -91,11 +92,11 @@ class CoordinatedBarrageEffect extends OneShotEffect {
|
|||
if (controller != null) {
|
||||
Choice choice = new ChoiceImpl(true);
|
||||
choice.setMessage("Choose a creature type");
|
||||
choice.setChoices(CardRepository.instance.getCreatureTypes());
|
||||
choice.setChoices(SubType.getCreatureTypes(false));
|
||||
if (controller.choose(Outcome.Damage, choice, game)) {
|
||||
String chosenType = choice.getChoice();
|
||||
FilterControlledPermanent filter = new FilterControlledPermanent();
|
||||
filter.add(new SubtypePredicate(chosenType));
|
||||
filter.add(new SubtypePredicate(SubType.byDescription(chosenType)));
|
||||
int damageDealt = game.getBattlefield().count(filter, source.getSourceId(), source.getControllerId(), game);
|
||||
Permanent permanent = game.getPermanent(this.getTargetPointer().getFirst(game, source));
|
||||
if (permanent != null) {
|
||||
|
|
|
@ -37,6 +37,7 @@ import mage.abilities.effects.OneShotEffect;
|
|||
import mage.cards.*;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.FilterCard;
|
||||
import mage.filter.common.FilterControlledPermanent;
|
||||
|
@ -113,7 +114,7 @@ class CorpseHarvesterEffect extends OneShotEffect {
|
|||
|
||||
private void searchCard(Player player, Ability source, Game game, Cards cards, String subtype) {
|
||||
FilterCard filter = new FilterCard(subtype);
|
||||
filter.add(new SubtypePredicate(subtype));
|
||||
filter.add(new SubtypePredicate(SubType.byDescription(subtype)));
|
||||
TargetCardInLibrary target = new TargetCardInLibrary(filter);
|
||||
if (player.searchLibrary(target, game)) {
|
||||
Card card = player.getLibrary().remove(target.getFirstTarget(), game);
|
||||
|
|
|
@ -39,6 +39,7 @@ import mage.cards.CardImpl;
|
|||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.FilterCard;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
|
@ -203,14 +204,14 @@ class CrypticGatewayEffect extends OneShotEffect {
|
|||
|
||||
for (String subtype : creature.getSubtype(game)) {
|
||||
if (creature2.getSubtype(game).contains(subtype) || changeling2) {
|
||||
subtypes.add(new SubtypePredicate(subtype));
|
||||
subtypes.add(new SubtypePredicate(SubType.byDescription(subtype)));
|
||||
commonSubType = true;
|
||||
}
|
||||
}
|
||||
|
||||
for (String subtype : creature2.getSubtype(game)) {
|
||||
if (creature.getSubtype(game).contains(subtype) || changeling) {
|
||||
subtypes.add(new SubtypePredicate(subtype));
|
||||
subtypes.add(new SubtypePredicate(SubType.byDescription(subtype)));
|
||||
commonSubType = true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -40,6 +40,7 @@ import mage.cards.CardImpl;
|
|||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||
|
@ -56,8 +57,8 @@ public class DeepwoodLegate extends CardImpl {
|
|||
private static final FilterPermanent filterSwamp = new FilterPermanent();
|
||||
|
||||
static {
|
||||
filterForest.add(new SubtypePredicate(("Forest")));
|
||||
filterSwamp.add(new SubtypePredicate(("Swamp")));
|
||||
filterForest.add(new SubtypePredicate(SubType.FOREST));
|
||||
filterSwamp.add(new SubtypePredicate(SubType.SWAMP));
|
||||
}
|
||||
|
||||
public DeepwoodLegate(UUID ownerId, CardSetInfo setInfo) {
|
||||
|
|
|
@ -38,6 +38,7 @@ import mage.choices.Choice;
|
|||
import mage.choices.ChoiceImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.SubType;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||
import mage.game.Game;
|
||||
|
@ -98,7 +99,7 @@ class DistantMelodyEffect extends OneShotEffect {
|
|||
}
|
||||
}
|
||||
FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent();
|
||||
filter.add(new SubtypePredicate(typeChoice.getChoice()));
|
||||
filter.add(new SubtypePredicate(SubType.byDescription(typeChoice.getChoice())));
|
||||
return new DrawCardSourceControllerEffect(new PermanentsOnBattlefieldCount(filter)).apply(game, source);
|
||||
}
|
||||
return false;
|
||||
|
|
|
@ -106,7 +106,7 @@ class AddCounterAbility extends TriggeredAbilityImpl {
|
|||
if (subtype != null) {
|
||||
FilterSpell filter = new FilterSpell();
|
||||
filter.add(new ControllerPredicate(TargetController.YOU));
|
||||
filter.add(new SubtypePredicate(subtype));
|
||||
filter.add(new SubtypePredicate(SubType.byDescription(subtype)));
|
||||
Spell spell = game.getStack().getSpell(event.getTargetId());
|
||||
if (spell != null && filter.match(spell, getSourceId(), getControllerId(), game)) {
|
||||
return true;
|
||||
|
|
|
@ -37,6 +37,7 @@ import mage.choices.Choice;
|
|||
import mage.choices.ChoiceImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.SubType;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||
import mage.game.Game;
|
||||
|
@ -86,7 +87,7 @@ class ExtinctionEffect extends OneShotEffect {
|
|||
if (player != null) {
|
||||
Choice typeChoice = new ChoiceImpl(true);
|
||||
typeChoice.setMessage("Choose a creature type:");
|
||||
typeChoice.setChoices(CardRepository.instance.getCreatureTypes());
|
||||
typeChoice.setChoices(SubType.getCreatureTypes(false));
|
||||
while (!player.choose(outcome, typeChoice, game)) {
|
||||
if (!player.canRespond()) {
|
||||
return false;
|
||||
|
@ -96,7 +97,7 @@ class ExtinctionEffect extends OneShotEffect {
|
|||
game.informPlayers(sourceObject.getLogName() + " chosen type: " + typeChoice.getChoice());
|
||||
}
|
||||
FilterCreaturePermanent filterCreaturePermanent = new FilterCreaturePermanent();
|
||||
filterCreaturePermanent.add(new SubtypePredicate(typeChoice.getChoice()));
|
||||
filterCreaturePermanent.add(new SubtypePredicate(SubType.byDescription(typeChoice.getChoice())));
|
||||
for (Permanent creature : game.getBattlefield().getActivePermanents(filterCreaturePermanent, source.getSourceId(), game)) {
|
||||
creature.destroy(source.getSourceId(), game, true);
|
||||
}
|
||||
|
|
|
@ -36,6 +36,7 @@ import mage.abilities.effects.OneShotEffect;
|
|||
import mage.cards.*;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.common.FilterLandCard;
|
||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||
|
@ -109,7 +110,7 @@ class GemOfBecomingEffect extends OneShotEffect {
|
|||
|
||||
private void searchLand(Player player, Ability source, Game game, Cards cards, String subtype) {
|
||||
FilterLandCard filter = new FilterLandCard(subtype);
|
||||
filter.add(new SubtypePredicate(subtype));
|
||||
filter.add(new SubtypePredicate(SubType.byDescription(subtype)));
|
||||
TargetCardInLibrary target = new TargetCardInLibrary(filter);
|
||||
if (player.searchLibrary(target, game)) {
|
||||
Card card = player.getLibrary().remove(target.getFirstTarget(), game);
|
||||
|
|
|
@ -37,6 +37,7 @@ import mage.cards.CardImpl;
|
|||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||
|
@ -53,7 +54,7 @@ public class GoblinBurrows extends CardImpl {
|
|||
private static final FilterCreaturePermanent filter = new FilterCreaturePermanent("Goblin creature");
|
||||
|
||||
static {
|
||||
filter.add(new SubtypePredicate(("Goblin")));
|
||||
filter.add(new SubtypePredicate(SubType.GOBLIN));
|
||||
}
|
||||
|
||||
public GoblinBurrows(UUID ownerId, CardSetInfo setInfo) {
|
||||
|
|
|
@ -165,7 +165,7 @@ class KaronaFalseGodEffect extends OneShotEffect {
|
|||
if (!typeChosen.isEmpty()) {
|
||||
game.informPlayers(controller.getLogName() + " has chosen " + typeChosen);
|
||||
FilterCreaturePermanent filter = new FilterCreaturePermanent();
|
||||
filter.add(new SubtypePredicate(typeChosen));
|
||||
filter.add(new SubtypePredicate(SubType.byDescription(typeChosen)));
|
||||
game.addEffect(new BoostAllEffect(3, 3, Duration.EndOfTurn, filter, false), source);
|
||||
}
|
||||
return true;
|
||||
|
|
|
@ -38,6 +38,7 @@ import mage.abilities.keyword.HasteAbility;
|
|||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||
|
||||
|
@ -51,8 +52,8 @@ public class KyrenLegate extends CardImpl {
|
|||
private static final FilterPermanent filterMountain = new FilterPermanent();
|
||||
|
||||
static {
|
||||
filterPlains.add(new SubtypePredicate(("Plains")));
|
||||
filterMountain.add(new SubtypePredicate(("Mountain")));
|
||||
filterPlains.add(new SubtypePredicate(SubType.PLAINS));
|
||||
filterMountain.add(new SubtypePredicate(SubType.MOUNTAIN));
|
||||
}
|
||||
|
||||
public KyrenLegate(UUID ownerId, CardSetInfo setInfo) {
|
||||
|
|
|
@ -37,6 +37,7 @@ import mage.abilities.effects.common.DestroyTargetEffect;
|
|||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||
import mage.target.common.TargetArtifactPermanent;
|
||||
|
@ -51,8 +52,8 @@ public class MoggSalvage extends CardImpl {
|
|||
private static final FilterPermanent filterIsland = new FilterPermanent();
|
||||
|
||||
static {
|
||||
filterMountain.add(new SubtypePredicate(("Mountain")));
|
||||
filterIsland.add(new SubtypePredicate(("Island")));
|
||||
filterMountain.add(new SubtypePredicate(SubType.MOUNTAIN));
|
||||
filterIsland.add(new SubtypePredicate(SubType.ISLAND));
|
||||
}
|
||||
|
||||
public MoggSalvage(UUID ownerId, CardSetInfo setInfo) {
|
||||
|
|
|
@ -42,6 +42,7 @@ import mage.choices.ChoiceImpl;
|
|||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.SubType;
|
||||
import mage.filter.common.FilterControlledCreaturePermanent;
|
||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||
import mage.game.Game;
|
||||
|
@ -102,7 +103,7 @@ class PacksDisdainEffect extends OneShotEffect {
|
|||
}
|
||||
}
|
||||
FilterControlledCreaturePermanent filter = new FilterControlledCreaturePermanent();
|
||||
filter.add(new SubtypePredicate(typeChoice.getChoice()));
|
||||
filter.add(new SubtypePredicate(SubType.byDescription(typeChoice.getChoice())));
|
||||
DynamicValue negativePermanentsCount = new PermanentsOnBattlefieldCount(filter, -1);
|
||||
ContinuousEffect effect = new BoostTargetEffect(negativePermanentsCount, negativePermanentsCount, Duration.EndOfTurn, true);
|
||||
effect.setTargetPointer(new FixedTarget(source.getFirstTarget()));
|
||||
|
|
|
@ -42,6 +42,7 @@ import mage.choices.Choice;
|
|||
import mage.choices.ChoiceImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.FilterCard;
|
||||
import mage.filter.common.FilterCreatureCard;
|
||||
|
@ -113,7 +114,7 @@ class PatriarchsBiddingEffect extends OneShotEffect {
|
|||
|
||||
List<SubtypePredicate> predicates = new ArrayList<>();
|
||||
for (String type : chosenTypes) {
|
||||
predicates.add(new SubtypePredicate(type));
|
||||
predicates.add(new SubtypePredicate(SubType.byDescription(type)));
|
||||
}
|
||||
FilterCard filter = new FilterCreatureCard();
|
||||
filter.add(Predicates.or(predicates));
|
||||
|
|
|
@ -35,10 +35,7 @@ import mage.abilities.effects.OneShotEffect;
|
|||
import mage.cards.Card;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.TargetController;
|
||||
import mage.constants.Zone;
|
||||
import mage.constants.*;
|
||||
import mage.filter.common.FilterLandPermanent;
|
||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||
import mage.filter.predicate.permanent.ControllerPredicate;
|
||||
|
@ -94,9 +91,9 @@ class PlanarOverlayEffect extends OneShotEffect {
|
|||
for (UUID playerId : game.getState().getPlayersInRange(controller.getId(), game)) {
|
||||
Player player = game.getPlayer(playerId);
|
||||
if (player != null) {
|
||||
for (String landName : new String[]{"Plains", "Island", "Mountain", "Swamp", "Forest"}) {
|
||||
for (String landName : SubType.getBasicLands(false)) {
|
||||
FilterLandPermanent filter = new FilterLandPermanent(landName + " to return to hand");
|
||||
filter.add(new SubtypePredicate(landName));
|
||||
filter.add(new SubtypePredicate(SubType.byDescription(landName)));
|
||||
filter.add(new ControllerPredicate(TargetController.YOU));
|
||||
Target target = new TargetLandPermanent(1, 1, filter, true);
|
||||
if (target.canChoose(source.getSourceId(), player.getId(), game)) {
|
||||
|
|
|
@ -37,6 +37,7 @@ import mage.abilities.effects.common.GainLifeTargetEffect;
|
|||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||
import mage.target.TargetPlayer;
|
||||
|
@ -51,8 +52,8 @@ public class RefreshingRain extends CardImpl {
|
|||
private static final FilterPermanent filterSwamp = new FilterPermanent();
|
||||
|
||||
static {
|
||||
filterForest.add(new SubtypePredicate(("Forest")));
|
||||
filterSwamp.add(new SubtypePredicate(("Swamp")));
|
||||
filterForest.add(new SubtypePredicate(SubType.FOREST));
|
||||
filterSwamp.add(new SubtypePredicate(SubType.SWAMP));
|
||||
}
|
||||
|
||||
public RefreshingRain(UUID ownerId, CardSetInfo setInfo) {
|
||||
|
|
|
@ -42,6 +42,7 @@ import mage.choices.Choice;
|
|||
import mage.choices.ChoiceImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||
|
@ -96,7 +97,7 @@ class RiptideChronologistEffect extends OneShotEffect {
|
|||
if (player != null) {
|
||||
Choice typeChoice = new ChoiceImpl(true);
|
||||
typeChoice.setMessage("Choose a creature type:");
|
||||
typeChoice.setChoices(CardRepository.instance.getCreatureTypes());
|
||||
typeChoice.setChoices(SubType.getCreatureTypes(false));
|
||||
while (!player.choose(outcome, typeChoice, game)) {
|
||||
if (!player.canRespond()) {
|
||||
return false;
|
||||
|
@ -106,7 +107,7 @@ class RiptideChronologistEffect extends OneShotEffect {
|
|||
game.informPlayers(sourceObject.getLogName() + " chosen type: " + typeChoice.getChoice());
|
||||
}
|
||||
FilterCreaturePermanent filterCreaturePermanent = new FilterCreaturePermanent();
|
||||
filterCreaturePermanent.add(new SubtypePredicate(typeChoice.getChoice()));
|
||||
filterCreaturePermanent.add(new SubtypePredicate(SubType.byDescription(typeChoice.getChoice())));
|
||||
for (Permanent creature : game.getBattlefield().getActivePermanents(filterCreaturePermanent, source.getSourceId(), game)) {
|
||||
creature.untap(game);
|
||||
}
|
||||
|
|
|
@ -37,6 +37,7 @@ import mage.abilities.costs.AlternativeCostSourceAbility;
|
|||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||
|
||||
|
@ -50,8 +51,8 @@ public class RushwoodLegate extends CardImpl {
|
|||
private static final FilterPermanent filterForest = new FilterPermanent();
|
||||
|
||||
static {
|
||||
filterForest.add(new SubtypePredicate(("Forest")));
|
||||
filterIsland.add(new SubtypePredicate(("Island")));
|
||||
filterForest.add(new SubtypePredicate(SubType.FOREST));
|
||||
filterIsland.add(new SubtypePredicate(SubType.ISLAND));
|
||||
}
|
||||
|
||||
public RushwoodLegate(UUID ownerId, CardSetInfo setInfo) {
|
||||
|
|
|
@ -38,6 +38,7 @@ import mage.cards.CardSetInfo;
|
|||
import mage.cards.Cards;
|
||||
import mage.cards.CardsImpl;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.common.FilterLandCard;
|
||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||
|
@ -101,7 +102,7 @@ class ShardConvergenceEffect extends OneShotEffect {
|
|||
|
||||
private void searchLand(Player player, Ability source, Game game, Cards cards, String subtype) {
|
||||
FilterLandCard filter = new FilterLandCard(subtype);
|
||||
filter.add(new SubtypePredicate(subtype));
|
||||
filter.add(new SubtypePredicate(SubType.byDescription(subtype)));
|
||||
TargetCardInLibrary target = new TargetCardInLibrary(filter);
|
||||
if (player.searchLibrary(target, game)) {
|
||||
Card card = player.getLibrary().remove(target.getFirstTarget(), game);
|
||||
|
|
|
@ -30,7 +30,7 @@ package mage.cards.s;
|
|||
import java.util.ArrayList;
|
||||
import java.util.UUID;
|
||||
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.*;
|
||||
import mage.MageObject;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.Mode;
|
||||
|
@ -39,10 +39,6 @@ import mage.abilities.effects.ContinuousEffectImpl;
|
|||
import mage.abilities.keyword.ChangelingAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Layer;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.SubLayer;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.Predicate;
|
||||
import mage.filter.predicate.Predicates;
|
||||
|
@ -116,7 +112,7 @@ class SharedAnimosityEffect extends ContinuousEffectImpl {
|
|||
if(!allCreatureTypes){
|
||||
ArrayList<Predicate<MageObject>> predicateList = new ArrayList<>();
|
||||
for(String subtype : permanent.getSubtype(game)){
|
||||
predicateList.add(new SubtypePredicate(subtype));
|
||||
predicateList.add(new SubtypePredicate(SubType.byDescription(subtype)));
|
||||
}
|
||||
filter.add(Predicates.or(predicateList));
|
||||
}
|
||||
|
|
|
@ -45,11 +45,7 @@ import mage.cards.CardSetInfo;
|
|||
import mage.choices.Choice;
|
||||
import mage.choices.ChoiceBasicLandType;
|
||||
import mage.choices.ChoiceLandType;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Layer;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.SubLayer;
|
||||
import mage.constants.*;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.filter.common.FilterLandPermanent;
|
||||
import mage.filter.predicate.mageobject.SubtypePredicate;
|
||||
|
@ -128,7 +124,7 @@ class VisionCharmEffect extends ContinuousEffectImpl {
|
|||
this.discard();
|
||||
}
|
||||
FilterPermanent filter = new FilterLandPermanent();
|
||||
filter.add(new SubtypePredicate(targetLandType));
|
||||
filter.add(new SubtypePredicate(SubType.byDescription(targetLandType)));
|
||||
if (this.affectedObjectsSet) {
|
||||
for (Permanent permanent : game.getBattlefield().getAllActivePermanents(filter, game)) {
|
||||
affectedObjectList.add(new MageObjectReference(permanent, game));
|
||||
|
|
Loading…
Reference in a new issue