diff --git a/Mage.Client/src/main/java/mage/client/deckeditor/DeckEditorPanel.java b/Mage.Client/src/main/java/mage/client/deckeditor/DeckEditorPanel.java index bf14225bbd..d5e8afa1a7 100644 --- a/Mage.Client/src/main/java/mage/client/deckeditor/DeckEditorPanel.java +++ b/Mage.Client/src/main/java/mage/client/deckeditor/DeckEditorPanel.java @@ -711,7 +711,7 @@ public class DeckEditorPanel extends javax.swing.JPanel { Object[] options = {"From file", "From clipboard (new deck)", "From clipboard (append cards)"}; int n = JOptionPane.showOptionDialog(MageFrame.getDesktop(), - "Where would you like to import from?", + "Choose import location", "Deck import", JOptionPane.YES_NO_CANCEL_OPTION, JOptionPane.QUESTION_MESSAGE, @@ -817,7 +817,7 @@ public class DeckEditorPanel extends javax.swing.JPanel { Object[] options = {"To file", "To clipboard"}; int n = JOptionPane.showOptionDialog(MageFrame.getDesktop(), - "Where would you like to export?", + "Choose export location", "Deck export", JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE, diff --git a/Mage.Sets/src/mage/cards/b/BrokenAmbitions.java b/Mage.Sets/src/mage/cards/b/BrokenAmbitions.java index fb813d1651..d1899824a3 100644 --- a/Mage.Sets/src/mage/cards/b/BrokenAmbitions.java +++ b/Mage.Sets/src/mage/cards/b/BrokenAmbitions.java @@ -1,12 +1,10 @@ package mage.cards.b; import mage.abilities.Ability; -import mage.abilities.costs.Cost; -import mage.abilities.costs.mana.ManaCost; -import mage.abilities.dynamicvalue.DynamicValue; import mage.abilities.dynamicvalue.common.ManacostVariableValue; import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.common.ClashEffect; +import mage.abilities.effects.common.CounterUnlessPaysEffect; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; @@ -15,7 +13,6 @@ import mage.game.Game; import mage.game.stack.Spell; import mage.players.Player; import mage.target.TargetSpell; -import mage.util.ManaUtil; import java.util.UUID; @@ -28,7 +25,8 @@ public final class BrokenAmbitions extends CardImpl { super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{X}{U}"); // Counter target spell unless its controller pays {X}. Clash with an opponent. If you win, that spell's controller puts the top four cards of their library into their graveyard. - this.getSpellAbility().addEffect(new BrokenAmbitionsEffect(ManacostVariableValue.instance)); + this.getSpellAbility().addEffect(new CounterUnlessPaysEffect(ManacostVariableValue.instance)); + this.getSpellAbility().addEffect(new BrokenAmbitionsEffect()); this.getSpellAbility().addTarget(new TargetSpell()); } @@ -44,32 +42,13 @@ public final class BrokenAmbitions extends CardImpl { class BrokenAmbitionsEffect extends OneShotEffect { - private static final String effectText = "Counter target spell unless its controller pays {X}. Clash with an opponent. If you win, that spell's controller mills four cards"; - - protected Cost cost; - protected DynamicValue genericMana; - - public BrokenAmbitionsEffect(Cost cost) { + BrokenAmbitionsEffect() { super(Outcome.Benefit); - this.cost = cost; - this.staticText = effectText; + this.staticText = "Clash with an opponent. If you win, that spell's controller mills four cards"; } - public BrokenAmbitionsEffect(DynamicValue genericMana) { - super(Outcome.Detriment); - this.genericMana = genericMana; - this.staticText = effectText; - } - - public BrokenAmbitionsEffect(final BrokenAmbitionsEffect effect) { + private BrokenAmbitionsEffect(final BrokenAmbitionsEffect effect) { super(effect); - if (effect.cost != null) { - this.cost = effect.cost.copy(); - } - if (effect.genericMana != null) { - this.genericMana = effect.genericMana.copy(); - } - this.staticText = effectText; } @Override @@ -79,37 +58,17 @@ class BrokenAmbitionsEffect extends OneShotEffect { @Override public boolean apply(Game game, Ability source) { - Spell spell = (Spell) game.getStack().getStackObject(getTargetPointer().getFirst(game, source)); - Player player = game.getPlayer(spell.getControllerId()); - if (player != null) { - Cost costToPay; - String costValueMessage; - if (cost != null) { - costToPay = cost.copy(); - costValueMessage = costToPay.getText(); - } else { - costToPay = ManaUtil.createManaCost(genericMana, game, source, this); - costValueMessage = "{" + genericMana.calculate(game, source, this) + "}"; - } - String message; - if (costToPay instanceof ManaCost) { - message = "Would you like to pay " + costValueMessage + " to prevent counter effect?"; - } else { - message = costValueMessage + " to prevent counter effect?"; - } - - costToPay.clearPaid(); - if (!(player.chooseUse(Outcome.Benefit, message, source, game) && costToPay.pay(source, game, source, spell.getControllerId(), false, null))) { - game.informPlayers(player.getLogName() + " chooses not to pay " + costValueMessage + " to prevent the counter effect"); - game.getStack().counter(spell.getId(), source, game); - } - game.informPlayers(player.getLogName() + " chooses to pay " + costValueMessage + " to prevent the counter effect"); - - if (ClashEffect.getInstance().apply(game, source)) { - player.millCards(4, source, game); - } - return true; + Spell spell = game.getSpellOrLKIStack(source.getFirstTarget()); + if (spell == null) { + return false; } - return false; + Player player = game.getPlayer(spell.getControllerId()); + if (player == null) { + return false; + } + if (ClashEffect.getInstance().apply(game, source)) { + player.millCards(4, source, game); + } + return true; } -} \ No newline at end of file +} diff --git a/Mage.Sets/src/mage/cards/c/ChannelHarm.java b/Mage.Sets/src/mage/cards/c/ChannelHarm.java index d3717f7150..0572080c55 100644 --- a/Mage.Sets/src/mage/cards/c/ChannelHarm.java +++ b/Mage.Sets/src/mage/cards/c/ChannelHarm.java @@ -70,7 +70,7 @@ class ChannelHarmEffect extends PreventionEffectImpl { if (preventionData.getPreventedDamage() > 0) { Permanent targetCreature = game.getPermanent(source.getFirstTarget()); if (targetCreature != null) { - if (sourceController != null && sourceController.chooseUse(outcome, "Would you like to have " + preventionData.getPreventedDamage() + " damage dealt to " + targetCreature.getLogName() + "?", source, game)) { + if (sourceController != null && sourceController.chooseUse(outcome, "Have " + preventionData.getPreventedDamage() + " damage dealt to " + targetCreature.getLogName() + "?", source, game)) { targetCreature.damage(preventionData.getPreventedDamage(), source.getSourceId(), source, game, false, true); } } diff --git a/Mage.Sets/src/mage/cards/f/Fasting.java b/Mage.Sets/src/mage/cards/f/Fasting.java index e537226a17..1fa6e0af56 100644 --- a/Mage.Sets/src/mage/cards/f/Fasting.java +++ b/Mage.Sets/src/mage/cards/f/Fasting.java @@ -91,7 +91,7 @@ class FastingReplacementEffect extends ReplacementEffectImpl { Player controller = game.getPlayer(source.getControllerId()); if (event.getPlayerId().equals(source.getControllerId()) && controller != null - && controller.chooseUse(outcome, "Would you like to skip your draw step to gain 2 life?", source, game)) { + && controller.chooseUse(outcome, "Skip your draw step to gain 2 life?", source, game)) { controller.gainLife(2, game, source); return true; } diff --git a/Mage.Sets/src/mage/cards/f/ForceOfNature.java b/Mage.Sets/src/mage/cards/f/ForceOfNature.java index fa5386d94e..a9f48d6bab 100644 --- a/Mage.Sets/src/mage/cards/f/ForceOfNature.java +++ b/Mage.Sets/src/mage/cards/f/ForceOfNature.java @@ -68,8 +68,7 @@ class ForceOfNatureEffect extends OneShotEffect { Player controller = game.getPlayer(source.getControllerId()); if (controller != null) { Cost cost = new ManaCostsImpl("{G}{G}{G}{G}"); - String message = "Would you like to pay {G}{G}{G}{G} to prevent taking 8 damage from {this}?"; - if (!(controller.chooseUse(Outcome.Benefit, message, source, game) + if (!(controller.chooseUse(Outcome.Benefit, "Pay {G}{G}{G}{G}?", source, game) && cost.pay(source, game, source, controller.getId(), false, null))) { controller.damage(8, source.getSourceId(), source, game); } diff --git a/Mage.Sets/src/mage/cards/g/GodEternalKefnet.java b/Mage.Sets/src/mage/cards/g/GodEternalKefnet.java index 70e76107be..9f7b37a5dd 100644 --- a/Mage.Sets/src/mage/cards/g/GodEternalKefnet.java +++ b/Mage.Sets/src/mage/cards/g/GodEternalKefnet.java @@ -91,7 +91,7 @@ class GodEternalKefnetDrawCardReplacementEffect extends ReplacementEffectImpl { // cast copy if (topCard.isInstantOrSorcery() - && you.chooseUse(outcome, "Would you like to copy " + topCard.getName() + " and cast it for {2} less?", source, game)) { + && you.chooseUse(outcome, "Copy " + topCard.getName() + " and cast it for {2} less?", source, game)) { Card blueprint = topCard.copy(); if (blueprint instanceof SplitCard) { ((SplitCard) blueprint).getLeftHalfCard().addAbility(new SimpleStaticAbility(Zone.ALL, new SpellCostReductionSourceEffect(2))); @@ -157,7 +157,7 @@ class GodEternalKefnetDrawCardReplacementEffect extends ReplacementEffectImpl { String mes = topCard.getName() + ", " + (topCard.isInstantOrSorcery() ? HintUtils.prepareText("you can copy it and cast {2} less", Color.green) : HintUtils.prepareText("you can't copy it", Color.red)); - return you.chooseUse(Outcome.Benefit, "Would you like to reveal first drawn card (" + mes + ")?", source, game); + return you.chooseUse(Outcome.Benefit, "Reveal first drawn card (" + mes + ")?", source, game); } } diff --git a/Mage.Sets/src/mage/cards/h/HasranOgress.java b/Mage.Sets/src/mage/cards/h/HasranOgress.java index e417146375..124d238d00 100644 --- a/Mage.Sets/src/mage/cards/h/HasranOgress.java +++ b/Mage.Sets/src/mage/cards/h/HasranOgress.java @@ -62,8 +62,7 @@ class HasranOgressEffect extends OneShotEffect { Player controller = game.getPlayer(source.getControllerId()); if (controller != null) { Cost cost = new ManaCostsImpl("{2}"); - String message = "Would you like to pay {2} to prevent taking 3 damage from Hasran Ogress?"; - if (!(controller.chooseUse(Outcome.Benefit, message, source, game) + if (!(controller.chooseUse(Outcome.Benefit, "Pay {2}?", source, game) && cost.pay(source, game, source, controller.getId(), false, null))) { controller.damage(3, source.getSourceId(), source, game); } diff --git a/Mage.Sets/src/mage/cards/l/LimDulsHex.java b/Mage.Sets/src/mage/cards/l/LimDulsHex.java index 5f36812a75..5af0a76c39 100644 --- a/Mage.Sets/src/mage/cards/l/LimDulsHex.java +++ b/Mage.Sets/src/mage/cards/l/LimDulsHex.java @@ -63,8 +63,7 @@ class LimDulsHexEffect extends OneShotEffect { if (player != null) { OrCost costToPay = new OrCost(new ManaCostsImpl("{B}"), new ManaCostsImpl("{3}"), "{B} or {3}"); costToPay.clearPaid(); - String message = "Would you like to pay " + costToPay.getText() + " to prevent 1 damage from " + sourcePermanent.getLogName() + "?"; - if (!(player.chooseUse(Outcome.Benefit, message, source, game) && costToPay.pay(source, game, source, player.getId(), false, null))) { + if (!(player.chooseUse(Outcome.Benefit, "Pay {B} or {3}?", source, game) && costToPay.pay(source, game, source, player.getId(), false, null))) { game.informPlayers(player.getLogName() + " chooses not to pay " + costToPay.getText() + " to prevent 1 damage from " + sourcePermanent.getLogName()); player.damage(1, sourcePermanent.getId(), source, game); } else { diff --git a/Mage.Sets/src/mage/cards/m/MysticRemora.java b/Mage.Sets/src/mage/cards/m/MysticRemora.java index 36faba2a75..8971c0a5c4 100644 --- a/Mage.Sets/src/mage/cards/m/MysticRemora.java +++ b/Mage.Sets/src/mage/cards/m/MysticRemora.java @@ -118,8 +118,7 @@ class MysticRemoraEffect extends OneShotEffect { if (controller != null && opponent != null && sourceObject != null) { if (controller.chooseUse(Outcome.DrawCard, "Draw a card (" + sourceObject.getLogName() + ')', source, game)) { Cost cost = ManaUtil.createManaCost(4, false); - String message = "Would you like to pay {4} to prevent the opponent to draw a card?"; - if (opponent.chooseUse(Outcome.Benefit, message, source, game) + if (opponent.chooseUse(Outcome.Benefit, "Pay {4}?", source, game) && cost.pay(source, game, source, opponent.getId(), false, null)) { return true; } diff --git a/Mage.Sets/src/mage/cards/o/ObstinateFamiliar.java b/Mage.Sets/src/mage/cards/o/ObstinateFamiliar.java index 18a4d0e15b..a22a881438 100644 --- a/Mage.Sets/src/mage/cards/o/ObstinateFamiliar.java +++ b/Mage.Sets/src/mage/cards/o/ObstinateFamiliar.java @@ -69,7 +69,7 @@ class ObstinateFamiliarReplacementEffect extends ReplacementEffectImpl { @Override public boolean replaceEvent(GameEvent event, Ability source, Game game) { Player you = game.getPlayer(source.getControllerId()); - if (you != null && you.chooseUse(Outcome.AIDontUseIt, "Would you like to skip drawing a card?", source, game)){ + if (you != null && you.chooseUse(Outcome.AIDontUseIt, "Skip this draw?", source, game)){ return true; } return false; diff --git a/Mage.Sets/src/mage/cards/r/RhysticStudy.java b/Mage.Sets/src/mage/cards/r/RhysticStudy.java index bb75974a2b..53cea2e790 100644 --- a/Mage.Sets/src/mage/cards/r/RhysticStudy.java +++ b/Mage.Sets/src/mage/cards/r/RhysticStudy.java @@ -64,8 +64,7 @@ class RhysticStudyDrawEffect extends OneShotEffect { if (controller != null && opponent != null && sourceObject != null) { if (controller.chooseUse(Outcome.DrawCard, "Draw a card (" + sourceObject.getLogName() + ')', source, game)) { Cost cost = ManaUtil.createManaCost(1, false); - String message = "Would you like to pay {1} to prevent the opponent to draw a card?"; - if (opponent.chooseUse(Outcome.Benefit, message, source, game) + if (opponent.chooseUse(Outcome.Benefit, "Pay {1}?", source, game) && cost.pay(source, game, source, opponent.getId(), false, null)) { return true; } diff --git a/Mage.Sets/src/mage/cards/s/SelvalaHeartOfTheWilds.java b/Mage.Sets/src/mage/cards/s/SelvalaHeartOfTheWilds.java index 466d32c801..a599a9cecf 100644 --- a/Mage.Sets/src/mage/cards/s/SelvalaHeartOfTheWilds.java +++ b/Mage.Sets/src/mage/cards/s/SelvalaHeartOfTheWilds.java @@ -97,7 +97,7 @@ class SelvalaHeartOfTheWildsEffect extends OneShotEffect { if (filter2.match(permanent, game)) { Player permanentController = game.getPlayer(permanent.getControllerId()); if (permanentController != null - && permanentController.chooseUse(Outcome.DrawCard, "Would you like to draw a card?", source, game)) { + && permanentController.chooseUse(Outcome.DrawCard, "Draw a card?", source, game)) { permanentController.drawCards(1, source, game); } } diff --git a/Mage.Sets/src/mage/cards/s/SoulBarrier.java b/Mage.Sets/src/mage/cards/s/SoulBarrier.java index ae28138ad8..ce35957adf 100644 --- a/Mage.Sets/src/mage/cards/s/SoulBarrier.java +++ b/Mage.Sets/src/mage/cards/s/SoulBarrier.java @@ -64,8 +64,7 @@ class SoulBarrierEffect extends OneShotEffect { if (player != null && permanent != null) { Cost cost = ManaUtil.createManaCost(2, false); - String message = "Would you like to pay {2} to prevent taking 2 damage from " + permanent.getLogName() + "?"; - if (!(player.chooseUse(Outcome.Benefit, message, source, game) + if (!(player.chooseUse(Outcome.Benefit, "Pay {2}?", source, game) && cost.pay(source, game, source, player.getId(), false, null))) { player.damage(2, source.getSourceId(), source, game); } diff --git a/Mage.Sets/src/mage/cards/s/SoulEcho.java b/Mage.Sets/src/mage/cards/s/SoulEcho.java index ef525f541f..eb227a537d 100644 --- a/Mage.Sets/src/mage/cards/s/SoulEcho.java +++ b/Mage.Sets/src/mage/cards/s/SoulEcho.java @@ -81,7 +81,7 @@ class SoulEchoOpponentsChoiceEffect extends OneShotEffect { Player controller = game.getPlayer(source.getControllerId()); Player opponent = game.getPlayer(targetPointer.getFirst(game, source)); if (controller != null && opponent != null && permanent != null) { - if (opponent.chooseUse(outcome, "Would you like to have all damage dealt to " + controller.getLogName() + " be decremented from echo counters on " + permanent.getLogName() + " until " + controller.getLogName() + "'s next upkeep instead?", source, game)) { + if (opponent.chooseUse(outcome, "Have all damage dealt to " + controller.getLogName() + " be decremented from echo counters on " + permanent.getLogName() + " until " + controller.getLogName() + "'s next upkeep instead?", source, game)) { game.informPlayers("Until " + controller.getLogName() + "'s next upkeep, for each 1 damage that would be dealt to " + controller.getLogName() + ", an echo counter from " + permanent.getLogName() + " is removed instead"); game.addEffect(new SoulEchoReplacementEffect(), source); } diff --git a/Mage.Sets/src/mage/cards/v/VaporousDjinn.java b/Mage.Sets/src/mage/cards/v/VaporousDjinn.java index 5ceb10e9d1..70df115b41 100644 --- a/Mage.Sets/src/mage/cards/v/VaporousDjinn.java +++ b/Mage.Sets/src/mage/cards/v/VaporousDjinn.java @@ -70,7 +70,7 @@ class VaporousDjinnEffect extends OneShotEffect { Player controller = game.getPlayer(source.getControllerId()); if (controller != null) { Cost cost = new ManaCostsImpl("{U}{U}"); - String message = "Would you like to pay {U}{U} to prevent {this} from phasing out?"; + String message = "Pay {U}{U} to prevent this permanent from phasing out?"; if (!(controller.chooseUse(Outcome.Benefit, message, source, game) && cost.pay(source, game, source, controller.getId(), false, null))) { permanent.phaseOut(game); diff --git a/Mage/src/main/java/mage/abilities/effects/common/CounterUnlessPaysEffect.java b/Mage/src/main/java/mage/abilities/effects/common/CounterUnlessPaysEffect.java index b89b75a679..6105581a7f 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/CounterUnlessPaysEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/CounterUnlessPaysEffect.java @@ -60,12 +60,11 @@ public class CounterUnlessPaysEffect extends OneShotEffect { costToPay = ManaUtil.createManaCost(genericMana, game, source, this); costValueMessage = "{" + genericMana.calculate(game, source, this) + "}"; } - String message; + String message = ""; if (costToPay instanceof ManaCost) { - message = "Would you like to pay " + costValueMessage + " to prevent counter effect?"; - } else { - message = costValueMessage + " to prevent counter effect?"; + message += "Pay "; } + message += costValueMessage + '?'; costToPay.clearPaid(); if (!(player.chooseUse(Outcome.Benefit, message, source, game) diff --git a/Mage/src/main/java/mage/abilities/effects/common/SacrificeOpponentsUnlessPayEffect.java b/Mage/src/main/java/mage/abilities/effects/common/SacrificeOpponentsUnlessPayEffect.java index 11998312f6..f7d199659a 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/SacrificeOpponentsUnlessPayEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/SacrificeOpponentsUnlessPayEffect.java @@ -113,12 +113,11 @@ public class SacrificeOpponentsUnlessPayEffect extends OneShotEffect { costToPay = ManaUtil.createManaCost(genericMana, game, source, this); costValueMessage = "{" + genericMana.calculate(game, source, this) + "}"; } - String message; + String message = ""; if (costToPay instanceof ManaCost) { - message = "Would you like to pay " + costValueMessage + " to prevent sacrifice effect?"; - } else { - message = costValueMessage + " to prevent sacrifice effect?"; + message += "Pay "; } + message += costValueMessage + '?'; costToPay.clearPaid(); if (!(player.chooseUse(Outcome.Benefit, message, source, game) diff --git a/Mage/src/main/java/mage/abilities/effects/common/SacrificeSourceUnlessPaysEffect.java b/Mage/src/main/java/mage/abilities/effects/common/SacrificeSourceUnlessPaysEffect.java index 1ac7974e8a..488c627d09 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/SacrificeSourceUnlessPaysEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/SacrificeSourceUnlessPaysEffect.java @@ -58,12 +58,11 @@ public class SacrificeSourceUnlessPaysEffect extends OneShotEffect { costToPay = ManaUtil.createManaCost(genericMana, game, source, this); costValueMessage = "{" + genericMana.calculate(game, source, this) + "}"; } - String message; + String message = ""; if (costToPay instanceof ManaCost) { - message = "Would you like to pay " + costValueMessage + " to prevent sacrifice effect?"; - } else { - message = costValueMessage + " to prevent sacrifice effect?"; + message += "Pay "; } + message += costValueMessage + '?'; costToPay.clearPaid(); if (costToPay.canPay(source, source, source.getControllerId(), game) diff --git a/Mage/src/main/java/mage/players/PlayerImpl.java b/Mage/src/main/java/mage/players/PlayerImpl.java index e10248f5df..cfbeca1759 100644 --- a/Mage/src/main/java/mage/players/PlayerImpl.java +++ b/Mage/src/main/java/mage/players/PlayerImpl.java @@ -4297,7 +4297,7 @@ public abstract class PlayerImpl implements Player, Serializable { if (userData.askMoveToGraveOrder()) { if (cards.size() > 1) { chooseOrder = choosingPlayer.chooseUse(Outcome.Neutral, - "Would you like to choose the order the cards go to graveyard?", source, game); + "Choose the order in which the cards go to the graveyard?", source, game); } } if (chooseOrder) {