From 1b31cd5b9eecde8a8ad60346cf0d9741c6810f28 Mon Sep 17 00:00:00 2001 From: PurpleCrowbar <26198472+PurpleCrowbar@users.noreply.github.com> Date: Thu, 20 Apr 2023 20:48:11 +0100 Subject: [PATCH] Fix Invasion of Segovia's second side causing Class Cast Exception on resolution --- .../src/mage/cards/c/CaetusSeaTyrantOfSegovia.java | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/Mage.Sets/src/mage/cards/c/CaetusSeaTyrantOfSegovia.java b/Mage.Sets/src/mage/cards/c/CaetusSeaTyrantOfSegovia.java index 5e0275afe8..680801f36a 100644 --- a/Mage.Sets/src/mage/cards/c/CaetusSeaTyrantOfSegovia.java +++ b/Mage.Sets/src/mage/cards/c/CaetusSeaTyrantOfSegovia.java @@ -6,15 +6,19 @@ import mage.abilities.common.BeginningOfEndStepTriggeredAbility; import mage.abilities.common.SimpleStaticAbility; import mage.abilities.effects.GainAbilitySpellsEffect; import mage.abilities.effects.common.UntapTargetEffect; +import mage.abilities.effects.common.continuous.GainAbilityControlledSpellsEffect; import mage.abilities.keyword.ConvokeAbility; +import mage.abilities.keyword.ImproviseAbility; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; import mage.constants.SubType; import mage.constants.SuperType; import mage.constants.TargetController; +import mage.filter.FilterCard; import mage.filter.FilterObject; import mage.filter.predicate.Predicates; +import mage.filter.predicate.mageobject.AbilityPredicate; import mage.target.common.TargetCreaturePermanent; import java.util.UUID; @@ -24,11 +28,12 @@ import java.util.UUID; */ public final class CaetusSeaTyrantOfSegovia extends CardImpl { - private static final FilterObject filter = new FilterObject("noncreature spells you cast"); + private static final FilterCard filter = new FilterCard("noncreature spells"); static { filter.add(Predicates.not(CardType.CREATURE.getPredicate())); - filter.add(TargetController.YOU.getControllerPredicate()); + filter.add(Predicates.not(CardType.LAND.getPredicate())); + filter.add(Predicates.not(new AbilityPredicate(ConvokeAbility.class))); // So there are not redundant copies being added to each card } public CaetusSeaTyrantOfSegovia(UUID ownerId, CardSetInfo setInfo) { @@ -42,7 +47,7 @@ public final class CaetusSeaTyrantOfSegovia extends CardImpl { this.nightCard = true; // Noncreature spells you cast have convoke. - this.addAbility(new SimpleStaticAbility(new GainAbilitySpellsEffect(new ConvokeAbility(), filter))); + this.addAbility(new SimpleStaticAbility(new GainAbilityControlledSpellsEffect(new ConvokeAbility(), filter))); // At the beginning of your end step, untap up to four target creatures. Ability ability = new BeginningOfEndStepTriggeredAbility(