mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-17 19:28:01 +00:00
ReplacementEffect optional choice and confirm shuffle effect moved to PlayerController
This commit is contained in:
@@ -1753,7 +1753,7 @@ public class Card extends GameEntity implements Comparable<Card> {
|
|||||||
* @param c
|
* @param c
|
||||||
* an ArrayList<String> object.
|
* an ArrayList<String> object.
|
||||||
*/
|
*/
|
||||||
public final void setChosenCard(final ArrayList<Card> c) {
|
public final void setChosenCard(final List<Card> c) {
|
||||||
this.chosenCard = c;
|
this.chosenCard = c;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -39,35 +39,33 @@ public class ChoosePlayerEffect extends SpellAbilityEffect {
|
|||||||
|
|
||||||
for (final Player p : tgtPlayers) {
|
for (final Player p : tgtPlayers) {
|
||||||
if ((tgt == null) || p.canBeTargetedBy(sa)) {
|
if ((tgt == null) || p.canBeTargetedBy(sa)) {
|
||||||
|
Player chosen = null;
|
||||||
if (p.isHuman()) {
|
if (p.isHuman()) {
|
||||||
// Was if (sa.getActivatingPlayer().isHuman()) but defined player was being
|
// Was if (sa.getActivatingPlayer().isHuman()) but defined player was being
|
||||||
// overwritten by activatingPlayer (or controller if no activator was set).
|
// overwritten by activatingPlayer (or controller if no activator was set).
|
||||||
// Revert if it causes issues and remove Goblin Festival from card database.
|
// Revert if it causes issues and remove Goblin Festival from card database.
|
||||||
final Object o = GuiChoose.one(choiceDesc, choices);
|
chosen = GuiChoose.one(choiceDesc, choices);
|
||||||
if (null == o) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
final Player chosen = (Player) o;
|
|
||||||
card.setChosenPlayer(chosen);
|
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
if ("Curse".equals(sa.getParam("AILogic"))) {
|
if ("Curse".equals(sa.getParam("AILogic"))) {
|
||||||
for (Player pc : choices) {
|
for (Player pc : choices) {
|
||||||
if (pc.isOpponentOf(p)) {
|
if (pc.isOpponentOf(p)) {
|
||||||
card.setChosenPlayer(pc);
|
chosen = pc;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (card.getChosenPlayer() == null) {
|
if (chosen == null) {
|
||||||
System.out.println("No good curse choices. Picking first available: " + choices.get(0));
|
System.out.println("No good curse choices. Picking first available: " + choices.get(0));
|
||||||
card.setChosenPlayer(choices.get(0));
|
chosen = choices.get(0);
|
||||||
}
|
}
|
||||||
} else if ("Pump".equals(sa.getParam("AILogic"))) {
|
} else if ("Pump".equals(sa.getParam("AILogic"))) {
|
||||||
card.setChosenPlayer(choices.contains(p) ? p : choices.get(0));
|
chosen = choices.contains(p) ? p : choices.get(0);
|
||||||
} else {
|
} else {
|
||||||
card.setChosenPlayer(p);
|
chosen = p;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if( null != chosen )
|
||||||
|
card.setChosenPlayer(chosen);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -38,7 +38,6 @@ public class ChooseSourceEffect extends SpellAbilityEffect {
|
|||||||
@Override
|
@Override
|
||||||
public void resolve(SpellAbility sa) {
|
public void resolve(SpellAbility sa) {
|
||||||
final Card host = sa.getSourceCard();
|
final Card host = sa.getSourceCard();
|
||||||
final ArrayList<Card> chosen = new ArrayList<Card>();
|
|
||||||
final GameState game = sa.getActivatingPlayer().getGame();
|
final GameState game = sa.getActivatingPlayer().getGame();
|
||||||
|
|
||||||
final Target tgt = sa.getTarget();
|
final Target tgt = sa.getTarget();
|
||||||
@@ -126,6 +125,7 @@ public class ChooseSourceEffect extends SpellAbilityEffect {
|
|||||||
final int validAmount = StringUtils.isNumeric(numericAmount) ? Integer.parseInt(numericAmount) : CardFactoryUtil.xCount(host, host.getSVar(numericAmount));
|
final int validAmount = StringUtils.isNumeric(numericAmount) ? Integer.parseInt(numericAmount) : CardFactoryUtil.xCount(host, host.getSVar(numericAmount));
|
||||||
|
|
||||||
for (final Player p : tgtPlayers) {
|
for (final Player p : tgtPlayers) {
|
||||||
|
final List<Card> chosen = new ArrayList<Card>();
|
||||||
if ((tgt == null) || p.canBeTargetedBy(sa)) {
|
if ((tgt == null) || p.canBeTargetedBy(sa)) {
|
||||||
for (int i = 0; i < validAmount; i++) {
|
for (int i = 0; i < validAmount; i++) {
|
||||||
if (p.isHuman()) {
|
if (p.isHuman()) {
|
||||||
|
|||||||
@@ -3,18 +3,15 @@ package forge.card.ability.effects;
|
|||||||
import java.util.Iterator;
|
import java.util.Iterator;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import forge.Card;
|
|
||||||
import forge.card.ability.SpellAbilityEffect;
|
import forge.card.ability.SpellAbilityEffect;
|
||||||
import forge.card.spellability.SpellAbility;
|
import forge.card.spellability.SpellAbility;
|
||||||
import forge.card.spellability.Target;
|
import forge.card.spellability.Target;
|
||||||
import forge.game.player.Player;
|
import forge.game.player.Player;
|
||||||
import forge.gui.GuiDialog;
|
|
||||||
|
|
||||||
public class ShuffleEffect extends SpellAbilityEffect {
|
public class ShuffleEffect extends SpellAbilityEffect {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void resolve(SpellAbility sa) {
|
public void resolve(SpellAbility sa) {
|
||||||
final Card host = sa.getSourceCard();
|
|
||||||
final boolean optional = sa.hasParam("Optional");
|
final boolean optional = sa.hasParam("Optional");
|
||||||
|
|
||||||
final List<Player> tgtPlayers = getTargetPlayers(sa);
|
final List<Player> tgtPlayers = getTargetPlayers(sa);
|
||||||
@@ -23,7 +20,7 @@ public class ShuffleEffect extends SpellAbilityEffect {
|
|||||||
|
|
||||||
for (final Player p : tgtPlayers) {
|
for (final Player p : tgtPlayers) {
|
||||||
if ((tgt == null) || p.canBeTargetedBy(sa)) {
|
if ((tgt == null) || p.canBeTargetedBy(sa)) {
|
||||||
boolean mustShuffle = !optional || sa.getActivatingPlayer().isComputer() || GuiDialog.confirm(host, "Have " + p + " shuffle?");
|
boolean mustShuffle = !optional || sa.getActivatingPlayer().getController().confirmAction(sa, null, "Have " + p + " shuffle?");
|
||||||
if (mustShuffle)
|
if (mustShuffle)
|
||||||
p.shuffle();
|
p.shuffle();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -88,16 +88,10 @@ public class UntapEffect extends SpellAbilityEffect {
|
|||||||
for( Card c : sc.getSelected() )
|
for( Card c : sc.getSelected() )
|
||||||
c.untap();
|
c.untap();
|
||||||
} else {
|
} else {
|
||||||
|
for (int count = 0; !list.isEmpty() && count < num; count++) {
|
||||||
int count = 0;
|
final Card c = ComputerUtilCard.getBestLandAI(list);
|
||||||
while ((list.size() != 0) && (count < num)) {
|
c.untap();
|
||||||
for (int i = 0; (i < list.size()) && (count < num); i++) {
|
list.remove(c);
|
||||||
|
|
||||||
final Card c = ComputerUtilCard.getBestLandAI(list);
|
|
||||||
c.untap();
|
|
||||||
list.remove(c);
|
|
||||||
count++;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2751,7 +2751,6 @@ public class CardFactoryUtil {
|
|||||||
// need to do it this way because I don't know quite how to
|
// need to do it this way because I don't know quite how to
|
||||||
// make TriggerHandler respect BeforePayMana.
|
// make TriggerHandler respect BeforePayMana.
|
||||||
if (card.getController().isHuman()) {
|
if (card.getController().isHuman()) {
|
||||||
|
|
||||||
final InputSelectCards target = new InputSelectCards(1, 1) {
|
final InputSelectCards target = new InputSelectCards(1, 1) {
|
||||||
private static final long serialVersionUID = 1981791992623774490L;
|
private static final long serialVersionUID = 1981791992623774490L;
|
||||||
@Override
|
@Override
|
||||||
@@ -3141,54 +3140,46 @@ public class CardFactoryUtil {
|
|||||||
final String magnitude = k[1];
|
final String magnitude = k[1];
|
||||||
|
|
||||||
// final String player = card.getController();
|
// final String player = card.getController();
|
||||||
final int[] numCreatures = new int[1];
|
|
||||||
|
|
||||||
|
final GameState game = card.getGame();
|
||||||
final Command intoPlay = new Command() {
|
final Command intoPlay = new Command() {
|
||||||
private static final long serialVersionUID = -7530312713496897814L;
|
private static final long serialVersionUID = -7530312713496897814L;
|
||||||
|
|
||||||
|
private void devour(Card eater, Card dinner) {
|
||||||
|
eater.addDevoured(dinner);
|
||||||
|
game.getAction().sacrifice(dinner, null);
|
||||||
|
final HashMap<String, Object> runParams = new HashMap<String, Object>();
|
||||||
|
runParams.put("Devoured", dinner);
|
||||||
|
game.getTriggerHandler().runTrigger(TriggerType.Devoured, runParams, false);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
final List<Card> creats = card.getController().getCreaturesInPlay();
|
final List<Card> creats = card.getController().getCreaturesInPlay();
|
||||||
final GameState game = card.getGame();
|
|
||||||
creats.remove(card);
|
creats.remove(card);
|
||||||
|
card.clearDevoured();
|
||||||
// System.out.println("Creats size: " + creats.size());
|
// System.out.println("Creats size: " + creats.size());
|
||||||
|
|
||||||
card.clearDevoured();
|
List<Card> selection = new ArrayList<Card>();
|
||||||
|
|
||||||
if (card.getController().isHuman()) {
|
if (card.getController().isHuman()) {
|
||||||
if (creats.size() > 0) {
|
if (creats.size() > 0) {
|
||||||
final List<Card> selection = GuiChoose.order("Devour", "Devouring", -1, creats, null, card);
|
selection = GuiChoose.order("Devour", "Devouring", -1, creats, null, card);
|
||||||
numCreatures[0] = selection.size();
|
}
|
||||||
|
} else {
|
||||||
|
for(Card c : creats) {
|
||||||
|
if ((c.getNetAttack() <= 1) && ((c.getNetAttack() + c.getNetDefense()) <= 3))
|
||||||
|
selection.add(c);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
for (Object o : selection) {
|
for (Card dinner : selection) {
|
||||||
Card dinner = (Card) o;
|
devour(card, dinner);
|
||||||
card.addDevoured(dinner);
|
|
||||||
game.getAction().sacrifice(dinner, null);
|
|
||||||
final HashMap<String, Object> runParams = new HashMap<String, Object>();
|
|
||||||
runParams.put("Devoured", dinner);
|
|
||||||
card.getController().getGame().getTriggerHandler()
|
|
||||||
.runTrigger(TriggerType.Devoured, runParams, false);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} // human
|
|
||||||
else {
|
|
||||||
int count = 0;
|
|
||||||
for (int i = 0; i < creats.size(); i++) {
|
|
||||||
final Card c = creats.get(i);
|
|
||||||
if ((c.getNetAttack() <= 1) && ((c.getNetAttack() + c.getNetDefense()) <= 3)) {
|
|
||||||
card.addDevoured(c);
|
|
||||||
game.getAction().sacrifice(c, null);
|
|
||||||
final HashMap<String, Object> runParams = new HashMap<String, Object>();
|
|
||||||
runParams.put("Devoured", c);
|
|
||||||
card.getController().getGame().getTriggerHandler()
|
|
||||||
.runTrigger(TriggerType.Devoured, runParams, false);
|
|
||||||
count++;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
numCreatures[0] = count;
|
|
||||||
}
|
}
|
||||||
final int multiplier = magnitude.equals("X") ? AbilityUtils.calculateAmount(card, magnitude, null)
|
final int multiplier = magnitude.equals("X") ? AbilityUtils.calculateAmount(card, magnitude, null)
|
||||||
: Integer.parseInt(magnitude);
|
: Integer.parseInt(magnitude);
|
||||||
final int totalCounters = numCreatures[0] * multiplier;
|
final int totalCounters = selection.size() * multiplier;
|
||||||
|
|
||||||
card.addCounter(CounterType.P1P1, totalCounters, true);
|
card.addCounter(CounterType.P1P1, totalCounters, true);
|
||||||
|
|
||||||
|
|||||||
@@ -57,7 +57,7 @@ public abstract class ReplacementEffect extends TriggerReplacementBase {
|
|||||||
* @return true, if is secondary
|
* @return true, if is secondary
|
||||||
*/
|
*/
|
||||||
public final boolean isSecondary() {
|
public final boolean isSecondary() {
|
||||||
return this.mapParams.containsKey("Secondary");
|
return this.getMapParams().containsKey("Secondary");
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -67,24 +67,24 @@ public abstract class ReplacementEffect extends TriggerReplacementBase {
|
|||||||
* @param ai
|
* @param ai
|
||||||
* @return true, if successful
|
* @return true, if successful
|
||||||
*/
|
*/
|
||||||
public final boolean aiShouldRun(final SpellAbility sa, Player ai) {
|
public final static boolean aiShouldRun(final ReplacementEffect effect, final SpellAbility sa, Player ai) {
|
||||||
if (this.mapParams.containsKey("AICheckSVar")) {
|
if (effect.getMapParams().containsKey("AICheckSVar")) {
|
||||||
System.out.println("aiShouldRun?" + sa);
|
System.out.println("aiShouldRun?" + sa);
|
||||||
final String svarToCheck = this.mapParams.get("AICheckSVar");
|
final String svarToCheck = effect.getMapParams().get("AICheckSVar");
|
||||||
String comparator = "GE";
|
String comparator = "GE";
|
||||||
int compareTo = 1;
|
int compareTo = 1;
|
||||||
|
|
||||||
if (this.mapParams.containsKey("AISVarCompare")) {
|
if (effect.getMapParams().containsKey("AISVarCompare")) {
|
||||||
final String fullCmp = this.mapParams.get("AISVarCompare");
|
final String fullCmp = effect.getMapParams().get("AISVarCompare");
|
||||||
comparator = fullCmp.substring(0, 2);
|
comparator = fullCmp.substring(0, 2);
|
||||||
final String strCmpTo = fullCmp.substring(2);
|
final String strCmpTo = fullCmp.substring(2);
|
||||||
try {
|
try {
|
||||||
compareTo = Integer.parseInt(strCmpTo);
|
compareTo = Integer.parseInt(strCmpTo);
|
||||||
} catch (final Exception ignored) {
|
} catch (final Exception ignored) {
|
||||||
if (sa == null) {
|
if (sa == null) {
|
||||||
compareTo = CardFactoryUtil.xCount(this.hostCard, this.hostCard.getSVar(strCmpTo));
|
compareTo = CardFactoryUtil.xCount(effect.hostCard, effect.hostCard.getSVar(strCmpTo));
|
||||||
} else {
|
} else {
|
||||||
compareTo = AbilityUtils.calculateAmount(this.hostCard, this.hostCard.getSVar(strCmpTo), sa);
|
compareTo = AbilityUtils.calculateAmount(effect.hostCard, effect.hostCard.getSVar(strCmpTo), sa);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -92,9 +92,9 @@ public abstract class ReplacementEffect extends TriggerReplacementBase {
|
|||||||
int left = 0;
|
int left = 0;
|
||||||
|
|
||||||
if (sa == null) {
|
if (sa == null) {
|
||||||
left = CardFactoryUtil.xCount(this.hostCard, this.hostCard.getSVar(svarToCheck));
|
left = CardFactoryUtil.xCount(effect.hostCard, effect.hostCard.getSVar(svarToCheck));
|
||||||
} else {
|
} else {
|
||||||
left = AbilityUtils.calculateAmount(this.hostCard, svarToCheck, sa);
|
left = AbilityUtils.calculateAmount(effect.hostCard, svarToCheck, sa);
|
||||||
}
|
}
|
||||||
System.out.println("aiShouldRun?" + left + comparator + compareTo);
|
System.out.println("aiShouldRun?" + left + comparator + compareTo);
|
||||||
if (Expressions.compare(left, comparator, compareTo)) {
|
if (Expressions.compare(left, comparator, compareTo)) {
|
||||||
|
|||||||
@@ -33,7 +33,6 @@ import forge.game.player.HumanPlay;
|
|||||||
import forge.game.player.Player;
|
import forge.game.player.Player;
|
||||||
import forge.game.zone.ZoneType;
|
import forge.game.zone.ZoneType;
|
||||||
import forge.gui.GuiChoose;
|
import forge.gui.GuiChoose;
|
||||||
import forge.gui.GuiDialog;
|
|
||||||
import forge.util.FileSection;
|
import forge.util.FileSection;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -213,20 +212,11 @@ public class ReplacementHandler {
|
|||||||
mapParams.get("OptionalDecider"), effectSA).get(0);
|
mapParams.get("OptionalDecider"), effectSA).get(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (optDecider.isHuman()) {
|
String effectDesc = replacementEffect.toString().replace("CARDNAME", replacementEffect.getHostCard().getName());
|
||||||
final StringBuilder buildQuestion = new StringBuilder("Apply replacement effect of ");
|
final String question = String.format("Apply replacement effect of %s?\r\n(%s)", replacementEffect.getHostCard(), effectDesc);
|
||||||
buildQuestion.append(replacementEffect.getHostCard());
|
boolean confirmed = optDecider.getController().confirmReplacementEffect(replacementEffect, effectSA, question);
|
||||||
buildQuestion.append("?\r\n(");
|
if (!confirmed) {
|
||||||
buildQuestion.append(replacementEffect.toString().replace("CARDNAME", replacementEffect.getHostCard().getName()));
|
return ReplacementResult.NotReplaced;
|
||||||
buildQuestion.append(")");
|
|
||||||
if (!GuiDialog.confirm(replacementEffect.getHostCard(), buildQuestion.toString())) {
|
|
||||||
return ReplacementResult.NotReplaced;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
// AI-logic
|
|
||||||
if (!replacementEffect.aiShouldRun(effectSA, optDecider)) {
|
|
||||||
return ReplacementResult.NotReplaced;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -733,6 +733,8 @@ public class AiController {
|
|||||||
AbilitySub subAb = sa.getSubAbility();
|
AbilitySub subAb = sa.getSubAbility();
|
||||||
return subAb != null && subAb.getAi().chkDrawbackWithSubs(player, subAb);
|
return subAb != null && subAb.getAi().chkDrawbackWithSubs(player, subAb);
|
||||||
|
|
||||||
|
case Shuffle: // ai could analyze parameter denoting the player to shuffle
|
||||||
|
return true;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ import org.apache.commons.lang3.tuple.ImmutablePair;
|
|||||||
import forge.Card;
|
import forge.Card;
|
||||||
import forge.GameEntity;
|
import forge.GameEntity;
|
||||||
import forge.card.mana.Mana;
|
import forge.card.mana.Mana;
|
||||||
|
import forge.card.replacement.ReplacementEffect;
|
||||||
import forge.card.spellability.SpellAbility;
|
import forge.card.spellability.SpellAbility;
|
||||||
import forge.card.spellability.Target;
|
import forge.card.spellability.Target;
|
||||||
import forge.control.input.Input;
|
import forge.control.input.Input;
|
||||||
@@ -137,4 +138,5 @@ public abstract class PlayerController {
|
|||||||
public abstract Mana chooseManaFromPool(List<Mana> manaChoices);
|
public abstract Mana chooseManaFromPool(List<Mana> manaChoices);
|
||||||
|
|
||||||
public abstract String chooseSomeType(String kindOfType, String aiLogic, List<String> validTypes, List<String> invalidTypes);
|
public abstract String chooseSomeType(String kindOfType, String aiLogic, List<String> validTypes, List<String> invalidTypes);
|
||||||
|
public abstract boolean confirmReplacementEffect(ReplacementEffect replacementEffect, SpellAbility effectSA, String question);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ import forge.CardLists;
|
|||||||
import forge.CardPredicates;
|
import forge.CardPredicates;
|
||||||
import forge.GameEntity;
|
import forge.GameEntity;
|
||||||
import forge.card.mana.Mana;
|
import forge.card.mana.Mana;
|
||||||
|
import forge.card.replacement.ReplacementEffect;
|
||||||
import forge.card.spellability.Spell;
|
import forge.card.spellability.Spell;
|
||||||
import forge.card.spellability.SpellAbility;
|
import forge.card.spellability.SpellAbility;
|
||||||
import forge.card.spellability.Target;
|
import forge.card.spellability.Target;
|
||||||
@@ -278,5 +279,13 @@ public class PlayerControllerAi extends PlayerController {
|
|||||||
return ComputerUtil.chooseSomeType(player, kindOfType, aiLogic, invalidTypes);
|
return ComputerUtil.chooseSomeType(player, kindOfType, aiLogic, invalidTypes);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* (non-Javadoc)
|
||||||
|
* @see forge.game.player.PlayerController#confirmReplacementEffect(forge.card.replacement.ReplacementEffect, forge.card.spellability.SpellAbility, java.lang.String)
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public boolean confirmReplacementEffect(ReplacementEffect replacementEffect, SpellAbility effectSA, String question) {
|
||||||
|
return ReplacementEffect.aiShouldRun(replacementEffect, effectSA, player);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ import forge.Card;
|
|||||||
import forge.FThreads;
|
import forge.FThreads;
|
||||||
import forge.GameEntity;
|
import forge.GameEntity;
|
||||||
import forge.card.mana.Mana;
|
import forge.card.mana.Mana;
|
||||||
|
import forge.card.replacement.ReplacementEffect;
|
||||||
import forge.card.spellability.SpellAbility;
|
import forge.card.spellability.SpellAbility;
|
||||||
import forge.card.spellability.Target;
|
import forge.card.spellability.Target;
|
||||||
import forge.card.spellability.TargetSelection;
|
import forge.card.spellability.TargetSelection;
|
||||||
@@ -458,4 +459,12 @@ public class PlayerControllerHuman extends PlayerController {
|
|||||||
return GuiChoose.one("Choose a " + kindOfType.toLowerCase() + " type", validTypes);
|
return GuiChoose.one("Choose a " + kindOfType.toLowerCase() + " type", validTypes);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* (non-Javadoc)
|
||||||
|
* @see forge.game.player.PlayerController#confirmReplacementEffect(forge.card.replacement.ReplacementEffect, forge.card.spellability.SpellAbility, java.lang.String)
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public boolean confirmReplacementEffect(ReplacementEffect replacementEffect, SpellAbility effectSA, String question) {
|
||||||
|
return GuiDialog.confirm(replacementEffect.getHostCard(), question);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user