diff --git a/Mage.Sets/src/mage/cards/a/AkromasWill.java b/Mage.Sets/src/mage/cards/a/AkromasWill.java index f9ea1387a8d..afddbde25d3 100644 --- a/Mage.Sets/src/mage/cards/a/AkromasWill.java +++ b/Mage.Sets/src/mage/cards/a/AkromasWill.java @@ -33,7 +33,7 @@ public final class AkromasWill extends CardImpl { this.getSpellAbility().getModes().setChooseText( "Choose one. If you control a commander as you cast this spell, you may choose both instead." ); - this.getSpellAbility().getModes().setMoreCondition(ControlACommanderCondition.instance); + this.getSpellAbility().getModes().setMoreCondition(2, ControlACommanderCondition.instance); // • Creatures you control gain flying, vigilance, and double strike until end of turn. this.getSpellAbility().addEffect(new GainAbilityControlledEffect( diff --git a/Mage.Sets/src/mage/cards/d/DiscipleOfPerdition.java b/Mage.Sets/src/mage/cards/d/DiscipleOfPerdition.java index dffa69afe73..d4bad5377df 100644 --- a/Mage.Sets/src/mage/cards/d/DiscipleOfPerdition.java +++ b/Mage.Sets/src/mage/cards/d/DiscipleOfPerdition.java @@ -36,7 +36,7 @@ public final class DiscipleOfPerdition extends CardImpl { // * You draw a card and you lose 1 life. Ability ability = new DiesSourceTriggeredAbility(new DrawCardSourceControllerEffect(1, true), false); ability.getModes().setChooseText("choose one. If you have exactly 13 life, you may choose both."); - ability.getModes().setMoreCondition(new LifeCompareCondition(TargetController.YOU, ComparisonType.EQUAL_TO, 13)); + ability.getModes().setMoreCondition(2, new LifeCompareCondition(TargetController.YOU, ComparisonType.EQUAL_TO, 13)); ability.addEffect(new LoseLifeSourceControllerEffect(1).concatBy("and")); // * Exile target opponent's graveyard. That player loses 1 life. diff --git a/Mage.Sets/src/mage/cards/d/DrownInDreams.java b/Mage.Sets/src/mage/cards/d/DrownInDreams.java index 39ae58f77c6..50712f11214 100644 --- a/Mage.Sets/src/mage/cards/d/DrownInDreams.java +++ b/Mage.Sets/src/mage/cards/d/DrownInDreams.java @@ -28,7 +28,7 @@ public final class DrownInDreams extends CardImpl { this.getSpellAbility().getModes().setChooseText( "Choose one. If you control a commander as you cast this spell, you may choose both." ); - this.getSpellAbility().getModes().setMoreCondition(ControlACommanderCondition.instance); + this.getSpellAbility().getModes().setMoreCondition(2, ControlACommanderCondition.instance); // • Target player draws X cards. this.getSpellAbility().addEffect(new DrawCardTargetEffect(GetXValue.instance)); diff --git a/Mage.Sets/src/mage/cards/f/FlameOfAnor.java b/Mage.Sets/src/mage/cards/f/FlameOfAnor.java index 19fc14d2f12..67dd5344c2a 100644 --- a/Mage.Sets/src/mage/cards/f/FlameOfAnor.java +++ b/Mage.Sets/src/mage/cards/f/FlameOfAnor.java @@ -32,8 +32,7 @@ public final class FlameOfAnor extends CardImpl { super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{1}{U}{R}"); // Choose one. If you control a Wizard as you cast this spell, you may choose two instead. - this.getSpellAbility().getModes().setMoreCondition(condition); - this.getSpellAbility().getModes().setMoreLimit(2); + this.getSpellAbility().getModes().setMoreCondition(2, condition); this.getSpellAbility().getModes().setChooseText( "Choose one. If you control a Wizard as you cast this spell, you may choose two instead." ); diff --git a/Mage.Sets/src/mage/cards/j/JeskasWill.java b/Mage.Sets/src/mage/cards/j/JeskasWill.java index 7cde1f4968b..041696a974b 100644 --- a/Mage.Sets/src/mage/cards/j/JeskasWill.java +++ b/Mage.Sets/src/mage/cards/j/JeskasWill.java @@ -29,7 +29,7 @@ public final class JeskasWill extends CardImpl { this.getSpellAbility().getModes().setChooseText( "Choose one. If you control a commander as you cast this spell, you may choose both instead." ); - this.getSpellAbility().getModes().setMoreCondition(ControlACommanderCondition.instance); + this.getSpellAbility().getModes().setMoreCondition(2, ControlACommanderCondition.instance); // • Add {R} for each card in target opponent's hand. this.getSpellAbility().addEffect(new JeskasWillEffect()); diff --git a/Mage.Sets/src/mage/cards/k/KamahlsWill.java b/Mage.Sets/src/mage/cards/k/KamahlsWill.java index 14c652aaa0d..6985bfc4e88 100644 --- a/Mage.Sets/src/mage/cards/k/KamahlsWill.java +++ b/Mage.Sets/src/mage/cards/k/KamahlsWill.java @@ -34,7 +34,7 @@ public final class KamahlsWill extends CardImpl { this.getSpellAbility().getModes().setChooseText( "Choose one. If you control a commander as you cast this spell, you may choose both." ); - this.getSpellAbility().getModes().setMoreCondition(ControlACommanderCondition.instance); + this.getSpellAbility().getModes().setMoreCondition(2, ControlACommanderCondition.instance); // • Until end of turn, any number of target lands you control become 1/1 Elemental creatures with vigilance, indestructible, and haste. They're still lands. this.getSpellAbility().addEffect(new BecomesCreatureTargetEffect( diff --git a/Mage.Sets/src/mage/cards/k/KlauthsWill.java b/Mage.Sets/src/mage/cards/k/KlauthsWill.java index bb3b0345926..e2f5d1e6c6f 100644 --- a/Mage.Sets/src/mage/cards/k/KlauthsWill.java +++ b/Mage.Sets/src/mage/cards/k/KlauthsWill.java @@ -40,7 +40,7 @@ public final class KlauthsWill extends CardImpl { this.getSpellAbility().getModes().setChooseText( "Choose one. If you control a commander as you cast this spell, you may choose both." ); - this.getSpellAbility().getModes().setMoreCondition(ControlACommanderCondition.instance); + this.getSpellAbility().getModes().setMoreCondition(2, ControlACommanderCondition.instance); // • Breathe Flame — Klauth's Will deals X damage to each creature without flying. this.getSpellAbility().addEffect(new DamageAllEffect(GetXValue.instance, filter)); @@ -76,4 +76,4 @@ enum KlauthsWillAdjuster implements TargetAdjuster { )); } } -} \ No newline at end of file +} diff --git a/Mage.Sets/src/mage/cards/l/LetsPlayAGame.java b/Mage.Sets/src/mage/cards/l/LetsPlayAGame.java index 85b4f2a6db1..3dd5c6a9a8b 100644 --- a/Mage.Sets/src/mage/cards/l/LetsPlayAGame.java +++ b/Mage.Sets/src/mage/cards/l/LetsPlayAGame.java @@ -30,7 +30,7 @@ public final class LetsPlayAGame extends CardImpl { this.getSpellAbility().getModes().setChooseText( "choose one. If there are four or more card types among cards in your graveyard, choose one or more instead." ); - this.getSpellAbility().getModes().setMoreCondition(DeliriumCondition.instance); + this.getSpellAbility().getModes().setMoreCondition(3, DeliriumCondition.instance); this.getSpellAbility().setAbilityWord(AbilityWord.DELIRIUM); this.getSpellAbility().addHint(CardTypesInGraveyardHint.YOU); diff --git a/Mage.Sets/src/mage/cards/m/MoltenCollapse.java b/Mage.Sets/src/mage/cards/m/MoltenCollapse.java index eb504c08d06..b25ff5cc866 100644 --- a/Mage.Sets/src/mage/cards/m/MoltenCollapse.java +++ b/Mage.Sets/src/mage/cards/m/MoltenCollapse.java @@ -34,7 +34,7 @@ public final class MoltenCollapse extends CardImpl { super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{B}{R}"); // Choose one. If you descended this turn, you may choose both instead. - this.getSpellAbility().getModes().setMoreCondition(DescendedThisTurnCondition.instance); + this.getSpellAbility().getModes().setMoreCondition(2, DescendedThisTurnCondition.instance); this.getSpellAbility().getModes().setChooseText( "Choose one. If you descended this turn, you may choose both instead." ); diff --git a/Mage.Sets/src/mage/cards/s/SakashimasWill.java b/Mage.Sets/src/mage/cards/s/SakashimasWill.java index 7345b329420..0dc4b8884c3 100644 --- a/Mage.Sets/src/mage/cards/s/SakashimasWill.java +++ b/Mage.Sets/src/mage/cards/s/SakashimasWill.java @@ -34,7 +34,7 @@ public final class SakashimasWill extends CardImpl { this.getSpellAbility().getModes().setChooseText( "Choose one. If you control a commander as you cast this spell, you may choose both." ); - this.getSpellAbility().getModes().setMoreCondition(ControlACommanderCondition.instance); + this.getSpellAbility().getModes().setMoreCondition(2, ControlACommanderCondition.instance); // • Target opponent chooses a creature they control. You gain control of it. this.getSpellAbility().addEffect(new SakashimasWillStealEffect()); diff --git a/Mage.Sets/src/mage/cards/s/SeeDouble.java b/Mage.Sets/src/mage/cards/s/SeeDouble.java index 617e13019aa..50b509f7971 100644 --- a/Mage.Sets/src/mage/cards/s/SeeDouble.java +++ b/Mage.Sets/src/mage/cards/s/SeeDouble.java @@ -30,7 +30,7 @@ public final class SeeDouble extends CardImpl { this.getSpellAbility().getModes().setChooseText( "Choose one. If an opponent has eight or more cards in their graveyard, you may choose both." ); - this.getSpellAbility().getModes().setMoreCondition(CardsInOpponentGraveyardCondition.EIGHT); + this.getSpellAbility().getModes().setMoreCondition(2, CardsInOpponentGraveyardCondition.EIGHT); this.getSpellAbility().addHint(CardsInOpponentGraveyardCondition.EIGHT.getHint()); // * Copy target spell. You may choose new targets for the copy. diff --git a/Mage.Sets/src/mage/cards/s/SoulTransfer.java b/Mage.Sets/src/mage/cards/s/SoulTransfer.java index 47c5caeaf75..7b787b4355f 100644 --- a/Mage.Sets/src/mage/cards/s/SoulTransfer.java +++ b/Mage.Sets/src/mage/cards/s/SoulTransfer.java @@ -36,7 +36,7 @@ public final class SoulTransfer extends CardImpl { this.getSpellAbility().getModes().setChooseText( "Choose one. If you control an artifact and an enchantment as you cast this spell, you may choose both." ); - this.getSpellAbility().getModes().setMoreCondition(SoulTransferCondition.instance); + this.getSpellAbility().getModes().setMoreCondition(2, SoulTransferCondition.instance); // • Exile target creature or planeswalker. this.getSpellAbility().addEffect(new ExileTargetEffect()); diff --git a/Mage.Sets/src/mage/cards/s/SzatsWill.java b/Mage.Sets/src/mage/cards/s/SzatsWill.java index 5e07b91a2a3..2bd46e1b517 100644 --- a/Mage.Sets/src/mage/cards/s/SzatsWill.java +++ b/Mage.Sets/src/mage/cards/s/SzatsWill.java @@ -45,7 +45,7 @@ public final class SzatsWill extends CardImpl { this.getSpellAbility().getModes().setChooseText( "Choose one. If you control a commander as you cast this spell, you may choose both." ); - this.getSpellAbility().getModes().setMoreCondition(ControlACommanderCondition.instance); + this.getSpellAbility().getModes().setMoreCondition(2, ControlACommanderCondition.instance); // • Each opponent sacrifices a creature they control with the greatest power. this.getSpellAbility().addEffect(new SacrificeOpponentsEffect(filter)); diff --git a/Mage.Sets/src/mage/cards/w/WailOfTheForgotten.java b/Mage.Sets/src/mage/cards/w/WailOfTheForgotten.java index 1725675130d..df296ccc797 100644 --- a/Mage.Sets/src/mage/cards/w/WailOfTheForgotten.java +++ b/Mage.Sets/src/mage/cards/w/WailOfTheForgotten.java @@ -27,7 +27,7 @@ public final class WailOfTheForgotten extends CardImpl { this.getSpellAbility().getModes().setChooseText( "choose one. If there are eight or more permanent cards in your graveyard as you cast this spell, choose one or more instead." ); - this.getSpellAbility().getModes().setMoreCondition(DescendCondition.EIGHT); + this.getSpellAbility().getModes().setMoreCondition(3, DescendCondition.EIGHT); this.getSpellAbility().setAbilityWord(AbilityWord.DESCEND_8); // * Return target nonland permanent to its owner's hand. diff --git a/Mage/src/main/java/mage/abilities/Modes.java b/Mage/src/main/java/mage/abilities/Modes.java index f4c1ffc56bf..fa84ea9e0db 100644 --- a/Mage/src/main/java/mage/abilities/Modes.java +++ b/Mage/src/main/java/mage/abilities/Modes.java @@ -38,7 +38,7 @@ public class Modes extends LinkedHashMap implements Copyable private int maxPawPrints; private Filter maxModesFilter; // calculates the max number of available modes private Condition moreCondition; // allows multiple modes choose (example: choose one... if condition, you may choose both) - private int moreLimit = Integer.MAX_VALUE; // if multiple modes are allowed, this limits how many additional modes may be chosen (usually doesn't need to change) + private int moreLimit; // if multiple modes are allowed, this limits how many additional modes may be chosen private boolean limitUsageByOnce = false; // limit mode selection to once per game private boolean limitUsageResetOnNewTurn = false; // reset once per game limit on new turn, example: Galadriel, Light of Valinor @@ -303,12 +303,9 @@ public class Modes extends LinkedHashMap implements Copyable this.put(mode.getId(), mode); } - public void setMoreCondition(Condition moreCondition) { - this.moreCondition = moreCondition; - } - - public void setMoreLimit(int moreLimit) { + public void setMoreCondition(int moreLimit, Condition moreCondition) { this.moreLimit = moreLimit; + this.moreCondition = moreCondition; } private boolean isAlreadySelectedModesOutdated(Game game, Ability source) {