some user dialog changes

This commit is contained in:
Evan Kranzler 2021-05-20 20:36:37 -04:00
parent d7960837a6
commit a60aba3458
23 changed files with 47 additions and 125 deletions

View file

@ -89,7 +89,7 @@ class AetherbornMarauderEffect extends OneShotEffect {
int numberOfCounters = fromPermanent.getCounters(game).getCount(CounterType.P1P1);
int numberToMove = 1;
if (numberOfCounters > 1) {
numberToMove = controller.getAmount(0, numberOfCounters, "How many +1/+1 counters do you want to move?", game);
numberToMove = controller.getAmount(0, numberOfCounters, "Choose how many +1/+1 counters to move", game);
}
if (numberToMove > 0) {
fromPermanent.removeCounters(CounterType.P1P1.createInstance(numberToMove), source, game);

View file

@ -76,7 +76,7 @@ class ArsenalThresherEffect extends OneShotEffect {
Permanent arsenalThresher = game.getPermanentEntering(source.getSourceId());
FilterArtifactCard filter = new FilterArtifactCard();
filter.add(new AnotherCardPredicate());
if (controller.chooseUse(Outcome.Benefit, "Do you want to reveal other artifacts in your hand?", source, game)) {
if (controller.chooseUse(Outcome.Benefit, "Reveal other artifacts in your hand?", source, game)) {
Cards cards = new CardsImpl();
if (controller.getHand().count(filter, source.getSourceId(), source.getControllerId(), game) > 0) {
TargetCardInHand target = new TargetCardInHand(0, Integer.MAX_VALUE, filter);

View file

@ -87,7 +87,7 @@ class MoveCounterFromTargetToTargetEffect extends OneShotEffect {
}
int amountCounters = fromPermanent.getCounters(game).getCount(CounterType.P1P1);
if (amountCounters > 0) {
int amountToMove = controller.getAmount(0, amountCounters, "How many counters do you want to move?", game);
int amountToMove = controller.getAmount(0, amountCounters, "Choose how many counters to move", game);
if (amountToMove > 0) {
fromPermanent.removeCounters(CounterType.P1P1.createInstance(amountToMove), source, game);
toPermanent.addCounters(CounterType.P1P1.createInstance(amountToMove), source.getControllerId(), source, game);

View file

@ -106,7 +106,7 @@ class BrilliantUltimatumEffect extends OneShotEffect {
selectedPile = pile2;
}
game.informPlayers(controller.getLogName() + " chose " + selectedPileName + '.');
while (!selectedPileCards.isEmpty() && controller.chooseUse(Outcome.PlayForFree, "Do you want to play a card for free from " + selectedPileName + '?', source, game)) {
while (!selectedPileCards.isEmpty() && controller.chooseUse(Outcome.PlayForFree, "Play a card for free from " + selectedPileName + '?', source, game)) {
TargetCard targetExiledCard = new TargetCard(Zone.EXILED, new FilterCard());
if (controller.chooseTarget(Outcome.PlayForFree, selectedPile, targetExiledCard, source, game)) {
Card card = selectedPile.get(targetExiledCard.getFirstTarget(), game);

View file

@ -134,7 +134,7 @@ class ClockspinningAddOrRemoveCounterEffect extends OneShotEffect {
Permanent permanent = game.getPermanent(source.getFirstTarget());
if (player != null && permanent != null) {
if (player.chooseUse(Outcome.Neutral, "Do you want to to remove a counter?", source, game)) {
if (player.chooseUse(Outcome.Neutral, "Remove a counter?", source, game)) {
RemoveCounterTargetEffect effect = new RemoveCounterTargetEffect();
effect.setTargetPointer(new FixedTarget(source.getFirstTarget()));
effect.apply(game, source);
@ -152,7 +152,7 @@ class ClockspinningAddOrRemoveCounterEffect extends OneShotEffect {
Card card = game.getCard(source.getFirstTarget());
if (player != null && card != null) {
if (player.chooseUse(Outcome.Neutral, "Do you want to to remove a counter?", source, game)) {
if (player.chooseUse(Outcome.Neutral, "Remove a counter?", source, game)) {
Counter counter = selectCounterType(game, source, card);
RemoveCounterTargetEffect effect = new RemoveCounterTargetEffect(counter);
effect.setTargetPointer(new FixedTarget(source.getFirstTarget()));

View file

@ -87,7 +87,7 @@ class DarkSupplicantEffect extends OneShotEffect {
}
Card selectedCard = null;
// Graveyard check
if (controller.chooseUse(Outcome.Benefit, "Do you want to search your graveyard for Scion of Darkness?", source, game)) {
if (controller.chooseUse(Outcome.Benefit, "Search your graveyard for Scion of Darkness?", source, game)) {
TargetCardInYourGraveyard target = new TargetCardInYourGraveyard(1, 1, filter, true);
if (controller.choose(outcome, controller.getGraveyard(), target, game)) {
selectedCard = game.getCard(target.getFirstTarget());
@ -95,7 +95,7 @@ class DarkSupplicantEffect extends OneShotEffect {
}
// Hand check
if (selectedCard == null
&& controller.chooseUse(Outcome.Benefit, "Do you want to search your hand for Scion of Darkness?", source, game)) {
&& controller.chooseUse(Outcome.Benefit, "Search your hand for Scion of Darkness?", source, game)) {
TargetCardInHand target = new TargetCardInHand(0, 1, filter);
if (controller.choose(Outcome.PutCardInPlay, controller.getHand(), target, game)) {
if (!target.getTargets().isEmpty()) {
@ -106,7 +106,7 @@ class DarkSupplicantEffect extends OneShotEffect {
// Library check
boolean librarySearched = false;
if (selectedCard == null
&& controller.chooseUse(Outcome.Benefit, "Do you want to search your library for Scion of Darkness?", source, game)) {
&& controller.chooseUse(Outcome.Benefit, "Search your library for Scion of Darkness?", source, game)) {
librarySearched = true;
TargetCardInLibrary target = new TargetCardInLibrary(0, 1, filter);
if (controller.searchLibrary(target, source, game)) {

View file

@ -76,7 +76,7 @@ class DismantleEffect extends OneShotEffect {
controller.chooseTarget(Outcome.Benefit, target, source, game);
Permanent artifact = game.getPermanent(target.getFirstTarget());
Counter counter;
if (controller.chooseUse(Outcome.BoostCreature, "What kind of counters do you want to add?", null, "+1/+1 counters", "Charge counters", source, game)) {
if (controller.chooseUse(Outcome.BoostCreature, "Choose which kind of counters to add", null, "+1/+1 counters", "Charge counters", source, game)) {
counter = CounterType.P1P1.createInstance(counterCount);
} else {
counter = CounterType.CHARGE.createInstance(counterCount);

View file

@ -115,7 +115,7 @@ class FalseOrdersUnblockEffect extends OneShotEffect {
}
if (!permanent.isCreature()
|| !controller.chooseUse(Outcome.Benefit, "Do you want " + permanent.getLogName() + " to block an attacking creature?", source, game)) {
|| !controller.chooseUse(Outcome.Benefit, "Have " + permanent.getLogName() + " block an attacking creature?", source, game)) {
return false;
}
// Choose new creature to block

View file

@ -105,7 +105,7 @@ public final class ForgottenAncient extends CardImpl {
break;
}
int amountToMove = controller.getAmount(0, numCounters, "How many counters do you want to move? " + '(' + numCounters + ')' + " counters remaining.", game);
int amountToMove = controller.getAmount(0, numCounters, "Choose how many counters to move (" + numCounters + " counters remaining.)", game);
if (amountToMove == 0) {
break;
}

View file

@ -103,14 +103,14 @@ class GateToTheAfterlifeEffect extends OneShotEffect {
filter.add(new NamePredicate(cardName));
Card card = null;
// Graveyard check
if (controller.chooseUse(Outcome.Benefit, "Do you want to search your graveyard for " + cardName + "?", source, game)) {
if (controller.chooseUse(Outcome.Benefit, "Search your graveyard for " + cardName + "?", source, game)) {
TargetCardInYourGraveyard target = new TargetCardInYourGraveyard(1, 1, filter, true);
if (controller.choose(outcome, controller.getGraveyard(), target, game)) {
card = game.getCard(target.getFirstTarget());
}
}
// Hand check
if (card == null && controller.chooseUse(Outcome.Benefit, "Do you want to search your hand for " + cardName + "?", source, game)) {
if (card == null && controller.chooseUse(Outcome.Benefit, "Search your hand for " + cardName + "?", source, game)) {
TargetCardInHand target = new TargetCardInHand(0, 1, filter);
if (controller.choose(Outcome.PutCardInPlay, controller.getHand(), target, game)) {
card = game.getCard(target.getFirstTarget());
@ -118,7 +118,7 @@ class GateToTheAfterlifeEffect extends OneShotEffect {
}
// Library check
boolean librarySearched = false;
if (card == null && controller.chooseUse(Outcome.Benefit, "Do you want to search your library for " + cardName + "?", source, game)) {
if (card == null && controller.chooseUse(Outcome.Benefit, "Search your library for " + cardName + "?", source, game)) {
librarySearched = true;
TargetCardInLibrary target = new TargetCardInLibrary(filter);
if (controller.searchLibrary(target, source, game)) {

View file

@ -1,25 +1,19 @@
package mage.cards.g;
import java.util.UUID;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.AllyEntersBattlefieldTriggeredAbility;
import mage.abilities.costs.Cost;
import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.effects.OneShotEffect;
import mage.abilities.costs.mana.GenericManaCost;
import mage.abilities.effects.common.CreateTokenEffect;
import mage.abilities.effects.common.DoIfCostPaid;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.Outcome;
import mage.game.Game;
import mage.game.permanent.token.GrovetenderDruidsPlantToken;
import mage.players.Player;
import java.util.UUID;
/**
*
* @author fireshoes
*/
public final class GrovetenderDruids extends CardImpl {
@ -34,7 +28,9 @@ public final class GrovetenderDruids extends CardImpl {
// <i>Rally</i>-Whenever Grovetender Druids or another Ally enters the battlefield under your control, you may pay {1}.
// If you do, create a 1/1 green Plant creature token.
this.addAbility(new AllyEntersBattlefieldTriggeredAbility(new GrovetenderDruidsEffect(), false));
this.addAbility(new AllyEntersBattlefieldTriggeredAbility(new DoIfCostPaid(
new CreateTokenEffect(new GrovetenderDruidsPlantToken()), new GenericManaCost(1)
), false));
}
private GrovetenderDruids(final GrovetenderDruids card) {
@ -46,35 +42,3 @@ public final class GrovetenderDruids extends CardImpl {
return new GrovetenderDruids(this);
}
}
class GrovetenderDruidsEffect extends OneShotEffect {
GrovetenderDruidsEffect() {
super(Outcome.Benefit);
this.staticText = "you may pay {1}. If you do, create a 1/1 green Plant creature token";
}
GrovetenderDruidsEffect(final GrovetenderDruidsEffect effect) {
super(effect);
}
@Override
public GrovetenderDruidsEffect copy() {
return new GrovetenderDruidsEffect(this);
}
@Override
public boolean apply(Game game, Ability source) {
Player player = game.getPlayer(source.getControllerId());
if (player != null) {
if (player.chooseUse(Outcome.BoostCreature, "Do you want to to pay {1}?", source, game)) {
Cost cost = new ManaCostsImpl("{1}");
if (cost.pay(source, game, source, source.getControllerId(), false, null)) {
new CreateTokenEffect(new GrovetenderDruidsPlantToken()).apply(game, source);
}
return true;
}
}
return false;
}
}

View file

@ -85,7 +85,7 @@ class HeartlessActEffect extends OneShotEffect {
int removed = 0;
String[] counterNames = permanent.getCounters(game).keySet().toArray(new String[0]);
for (String counterName : counterNames) {
if (controller.chooseUse(Outcome.Neutral, "Do you want to remove " + counterName + " counters?", source, game)) {
if (controller.chooseUse(Outcome.Neutral, "Remove " + counterName + " counters?", source, game)) {
if (permanent.getCounters(game).get(counterName).getCount() == 1 || (toRemove - removed == 1)) {
permanent.removeCounters(counterName, 1, source, game);
removed++;

View file

@ -71,7 +71,7 @@ class HexParasiteEffect extends OneShotEffect {
int removed = 0;
String[] counterNames = permanent.getCounters(game).keySet().toArray(new String[0]);
for (String counterName : counterNames) {
if (controller.chooseUse(Outcome.Neutral, "Do you want to remove " + counterName + " counters?", source, game)) {
if (controller.chooseUse(Outcome.Neutral, "Remove " + counterName + " counters?", source, game)) {
if (permanent.getCounters(game).get(counterName).getCount() == 1 || (toRemove - removed == 1)) {
permanent.removeCounters(counterName, 1, source, game);
removed++;

View file

@ -116,7 +116,7 @@ class KefnetTheMindfulEffect extends OneShotEffect {
Player controller = game.getPlayer(source.getControllerId());
if (controller != null) {
controller.drawCards(1, source, game);
if (controller.chooseUse(Outcome.AIDontUseIt, "Do you want to return a land you control to its owner's hand?", null, "Yes", "No", source, game)) {
if (controller.chooseUse(Outcome.AIDontUseIt, "Return a land you control to its owner's hand?", source, game)) {
Effect effect = new ReturnToHandChosenControlledPermanentEffect(filterControlledLand);
effect.apply(game, source);
}

View file

@ -1,34 +1,31 @@
package mage.cards.m;
import java.util.UUID;
import mage.abilities.Ability;
import mage.abilities.costs.Cost;
import mage.abilities.costs.common.DiscardTargetCost;
import mage.abilities.effects.OneShotEffect;
import mage.abilities.costs.common.DiscardCardCost;
import mage.abilities.effects.common.DoIfCostPaid;
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
import mage.abilities.effects.common.discard.DiscardControllerEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Outcome;
import mage.filter.FilterCard;
import mage.game.Game;
import mage.players.Player;
import mage.target.common.TargetCardInHand;
import mage.filter.StaticFilters;
import java.util.UUID;
/**
*
* @author LevelX2
*/
public final class MysticMeditation extends CardImpl {
public MysticMeditation(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{3}{U}");
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{3}{U}");
// Draw three cards. Then discard two cards unless you discard a creature card.
DiscardCardCost cost = new DiscardCardCost(StaticFilters.FILTER_CARD_CREATURE_A);
cost.setText("discard a creature card instead of discarding two cards");
this.getSpellAbility().addEffect(new DrawCardSourceControllerEffect(3));
this.getSpellAbility().addEffect(new MysticMeditationEffect());
this.getSpellAbility().addEffect(new DoIfCostPaid(
null, new DiscardControllerEffect(2), cost
).setText("Then discard two cards unless you discard a creature card"));
}
private MysticMeditation(final MysticMeditation card) {
@ -40,42 +37,3 @@ public final class MysticMeditation extends CardImpl {
return new MysticMeditation(this);
}
}
class MysticMeditationEffect extends OneShotEffect {
public MysticMeditationEffect() {
super(Outcome.Damage);
staticText = "Then discard two cards unless you discard a creature card";
}
public MysticMeditationEffect(final MysticMeditationEffect effect) {
super(effect);
}
@Override
public MysticMeditationEffect copy() {
return new MysticMeditationEffect(this);
}
@Override
public boolean apply(Game game, Ability source) {
Player controller = game.getPlayer(source.getControllerId());
FilterCard filter = new FilterCard("creature card to discard");
filter.add(CardType.CREATURE.getPredicate());
if (controller != null
&& controller.getHand().count(filter, game) > 0
&& controller.chooseUse(Outcome.Discard, "Do you want to discard a creature card? If you don't, you must discard 2 cards", source, game)) {
Cost cost = new DiscardTargetCost(new TargetCardInHand(filter));
if (cost.canPay(source, source, controller.getId(), game)) {
if (cost.pay(source, game, source, controller.getId(), false, null)) {
return true;
}
}
}
if (controller != null) {
controller.discard(2, false, false, source, game);
return true;
}
return false;
}
}

View file

@ -82,7 +82,7 @@ class PriceOfBetrayalEffect extends OneShotEffect {
int removed = 0;
String[] counterNames = permanent.getCounters(game).keySet().toArray(new String[0]);
for (String counterName : counterNames) {
if (controller.chooseUse(Outcome.Neutral, "Do you want to remove " + counterName + " counters?", source, game)) {
if (controller.chooseUse(Outcome.Neutral, "Remove " + counterName + " counters?", source, game)) {
if (permanent.getCounters(game).get(counterName).getCount() == 1 || (toRemove - removed == 1)) {
permanent.removeCounters(counterName, 1, source, game);
removed++;
@ -108,7 +108,7 @@ class PriceOfBetrayalEffect extends OneShotEffect {
int removed = 0;
String[] counterNames = player.getCounters().keySet().toArray(new String[0]);
for (String counterName : counterNames) {
if (controller.chooseUse(Outcome.Neutral, "Do you want to remove " + counterName + " counters?", source, game)) {
if (controller.chooseUse(Outcome.Neutral, "Remove " + counterName + " counters?", source, game)) {
if (player.getCounters().get(counterName).getCount() == 1 || (toRemove - removed == 1)) {
player.removeCounters(counterName, 1, source, game);
removed++;

View file

@ -74,7 +74,7 @@ class QuarryHaulerEffect extends OneShotEffect {
Counters counters = permanent.getCounters(game).copy();
CounterType counterType;
for (Counter counter : counters.values()) {
if (controller.chooseUse(Outcome.BoostCreature, "Do you want to add or remove a " + counter.getName() + " counter?", null, "add", "remove", source, game)) {
if (controller.chooseUse(Outcome.BoostCreature, "Choose whether to add or remove a " + counter.getName() + " counter", null, "Add", "Remove", source, game)) {
counterType = CounterType.findByName(counter.getName());
Counter counterToAdd;
if (counterType != null) {

View file

@ -192,7 +192,7 @@ class TergridsLaternEffect extends OneShotEffect {
// AI hint to discard/sacrifice before die
Outcome aiOutcome = (targetedPlayer.getLife() <= 3 * 2) ? Outcome.Benefit : Outcome.Detriment;
if (targetedPlayer.chooseUse(aiOutcome, "Question 1 of 2: do you wish to sacrifice a nonland permanent to prevent the loss of 3 life?", source, game)) {
if (targetedPlayer.chooseUse(aiOutcome, "Question 1 of 2: Sacrifice a nonland permanent to prevent the loss of 3 life?", source, game)) {
TargetPermanent target = new TargetPermanent(StaticFilters.FILTER_CONTROLLED_PERMANENT_NON_LAND);
target.setNotTarget(true);
if (targetedPlayer.choose(Outcome.Sacrifice, target, source.getSourceId(), game)) {
@ -205,7 +205,7 @@ class TergridsLaternEffect extends OneShotEffect {
}
}
if (targetedPlayer.chooseUse(aiOutcome, "Question 2 of 2: do you wish to discard a card to prevent the loss of 3 life?", source, game)) {
if (targetedPlayer.chooseUse(aiOutcome, "Question 2 of 2: Discard a card to prevent the loss of 3 life?", source, game)) {
TargetCardInHand targetCard = new TargetCardInHand();
if (targetedPlayer.chooseTarget(Outcome.Discard, targetCard, source, game)) {
Card chosenCard = game.getCard(targetCard.getFirstTarget());

View file

@ -77,7 +77,7 @@ class WalkingSpongeEffect extends OneShotEffect {
Permanent permanent = game.getPermanent(source.getSourceId());
if (controller != null && permanent != null) {
ChoiceImpl chooseAbility = new ChoiceImpl();
chooseAbility.setMessage("What ability do you wish to remove? (default is Flying)");
chooseAbility.setMessage("Choose an ability to remove (default is flying)");
Set<String> choice = new LinkedHashSet<>();
choice.add("Flying");
choice.add("First strike");

View file

@ -52,7 +52,7 @@ public class HideawayPlayEffect extends OneShotEffect {
Card card = cards.iterator().next();
Player controller = game.getPlayer(source.getControllerId());
if (card != null && controller != null) {
if (controller.chooseUse(Outcome.PlayForFree, "Do you want to play " + card.getIdName() + " for free now?", source, game)) {
if (controller.chooseUse(Outcome.PlayForFree, "Play " + card.getIdName() + " for free?", source, game)) {
card.setFaceDown(false, game);
int zcc = card.getZoneChangeCounter(game);

View file

@ -82,7 +82,7 @@ public class LookLibraryTopCardTargetPlayerEffect extends OneShotEffect {
}
}
if (mayShuffleAfter) {
if (player.chooseUse(Outcome.Benefit, (player == targetPlayer ? "Shuffle your library?" : "Do you want the chosen player to shuffle?"), source, game)) {
if (player.chooseUse(Outcome.Benefit, (player == targetPlayer ? "Shuffle your library?" : "Have the chosen player shuffle?"), source, game)) {
targetPlayer.shuffleLibrary(source, game);
}
}

View file

@ -44,7 +44,7 @@ public class LoseAbilityOrAnotherAbilityTargetEffect extends LoseAbilityTargetEf
Permanent permanent = game.getPermanent(source.getFirstTarget());
if (permanent != null) {
ChoiceImpl chooseAbility = new ChoiceImpl();
chooseAbility.setMessage("What ability do you wish to remove?");
chooseAbility.setMessage("Choose an ability to remove");
Set<String> choice = new HashSet<>();

View file

@ -2734,7 +2734,7 @@ public abstract class PlayerImpl implements Player, Serializable {
return false;
}
if (!targetPlayer.chooseUse(Outcome.AIDontUseIt, "Library have " + castableCards.size() + " castable cards on searching. Do you want to cast it?", null, game)) {
if (!targetPlayer.chooseUse(Outcome.AIDontUseIt, "There are " + castableCards.size() + " cards you can cast while searching your library. Cast any of them?", null, game)) {
return false;
}