mirror of
https://github.com/magefree/mage.git
synced 2026-01-26 21:29:17 -08:00
GUI: added card hints in choice dialogs (additional to d587cc9151);
This commit is contained in:
parent
ef010bc2f3
commit
5725e15771
5 changed files with 10 additions and 5 deletions
|
|
@ -14,6 +14,7 @@ import mage.cards.repository.CardCriteria;
|
|||
import mage.cards.repository.CardInfo;
|
||||
import mage.cards.repository.CardRepository;
|
||||
import mage.choices.Choice;
|
||||
import mage.choices.ChoiceHintType;
|
||||
import mage.choices.ChoiceImpl;
|
||||
import mage.constants.*;
|
||||
import mage.game.Game;
|
||||
|
|
@ -105,7 +106,7 @@ class GarthOneEyeEffect extends OneShotEffect {
|
|||
chosen = choices.stream().findAny().orElse(null);
|
||||
break;
|
||||
default:
|
||||
Choice choice = new ChoiceImpl(true);
|
||||
Choice choice = new ChoiceImpl(true, ChoiceHintType.CARD);
|
||||
choice.setChoices(choices);
|
||||
player.choose(outcome, choice, game);
|
||||
chosen = choice.getChoice();
|
||||
|
|
|
|||
|
|
@ -13,6 +13,7 @@ import mage.cards.Card;
|
|||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.choices.Choice;
|
||||
import mage.choices.ChoiceHintType;
|
||||
import mage.choices.ChoiceImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
|
|
@ -86,7 +87,7 @@ class SphinxAmbassadorEffect extends OneShotEffect {
|
|||
}
|
||||
}
|
||||
|
||||
Choice cardChoice = new ChoiceImpl();
|
||||
Choice cardChoice = new ChoiceImpl(false, ChoiceHintType.CARD);
|
||||
cardChoice.setChoices(choices);
|
||||
cardChoice.clearChoice();
|
||||
if (!targetPlayer.choose(Outcome.Benefit, cardChoice, game)) {
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@ import mage.abilities.costs.common.TapSourceCost;
|
|||
import mage.abilities.effects.common.continuous.BecomesBasicLandTargetEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.choices.ChoiceHintType;
|
||||
import mage.choices.ChoiceImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
|
|
@ -72,7 +73,7 @@ class TundraKavuEffect extends BecomesBasicLandTargetEffect {
|
|||
Set<String> choiceSet = new LinkedHashSet<>();
|
||||
choiceSet.add("Island");
|
||||
choiceSet.add("Plains");
|
||||
ChoiceImpl choice = new ChoiceImpl(true);
|
||||
ChoiceImpl choice = new ChoiceImpl(true, ChoiceHintType.CARD);
|
||||
choice.setChoices(choiceSet);
|
||||
choice.setMessage("Choose a basic land type");
|
||||
if (!controller.choose(outcome, choice, game)) {
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@ import mage.abilities.Ability;
|
|||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.cards.repository.CardRepository;
|
||||
import mage.choices.Choice;
|
||||
import mage.choices.ChoiceHintType;
|
||||
import mage.choices.ChoiceImpl;
|
||||
import mage.constants.Outcome;
|
||||
import mage.game.Game;
|
||||
|
|
@ -56,7 +57,7 @@ public class ChooseACardNameEffect extends OneShotEffect {
|
|||
if (player == null) {
|
||||
return null;
|
||||
}
|
||||
Choice cardChoice = new ChoiceImpl(true);
|
||||
Choice cardChoice = new ChoiceImpl(true, ChoiceHintType.CARD);
|
||||
cardChoice.setChoices(this.getNames());
|
||||
cardChoice.setMessage(CardUtil.getTextWithFirstCharUpperCase(this.getMessage()));
|
||||
cardChoice.clearChoice();
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@ import mage.abilities.Ability;
|
|||
import mage.abilities.Mode;
|
||||
import mage.abilities.dynamicvalue.common.StaticValue;
|
||||
import mage.choices.Choice;
|
||||
import mage.choices.ChoiceHintType;
|
||||
import mage.choices.ChoiceImpl;
|
||||
import mage.constants.Outcome;
|
||||
import mage.filter.predicate.Predicate;
|
||||
|
|
@ -93,7 +94,7 @@ public abstract class StackObjectImpl implements StackObject {
|
|||
if (choice != null) {
|
||||
return;
|
||||
}
|
||||
choice = new ChoiceImpl(false);
|
||||
choice = new ChoiceImpl(false, ChoiceHintType.CARD);
|
||||
choice.setMessage("Choose the order of copies to go on the stack");
|
||||
choice.setSubMessage("Press cancel to put the rest in any order");
|
||||
choice.setChoices(new HashSet<>(predicateMap.keySet()));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue