mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-17 11:18:01 +00:00
*Fixed enabling/disabling of buttons in partial paris mulligan.
This commit is contained in:
@@ -21,6 +21,7 @@ import java.util.Stack;
|
||||
|
||||
import forge.Singletons;
|
||||
import forge.game.GameState;
|
||||
import forge.game.GameType;
|
||||
import forge.game.phase.PhaseHandler;
|
||||
import forge.game.phase.PhaseType;
|
||||
import forge.game.player.Player;
|
||||
@@ -117,8 +118,14 @@ public class InputControl extends MyObservable implements java.io.Serializable {
|
||||
public final Input getActualInput(GameState game) {
|
||||
if ( !game.hasMulliganned() )
|
||||
{
|
||||
return new InputMulligan(Singletons.getModel().getMatch(), Singletons.getControl().getPlayer());
|
||||
//return new InputPartialParisMulligan(Singletons.getModel().getMatch(), Singletons.getControl().getPlayer());
|
||||
if(game.getType() == GameType.Commander)
|
||||
{
|
||||
return new InputPartialParisMulligan(Singletons.getModel().getMatch(), Singletons.getControl().getPlayer());
|
||||
}
|
||||
else
|
||||
{
|
||||
return new InputMulligan(Singletons.getModel().getMatch(), Singletons.getControl().getPlayer());
|
||||
}
|
||||
}
|
||||
final PhaseHandler handler = game.getPhaseHandler();
|
||||
final PhaseType phase = handler.getPhase();
|
||||
|
||||
@@ -204,26 +204,27 @@ public class InputPartialParisMulligan extends InputBase {
|
||||
{
|
||||
lastExiled.remove(c0);
|
||||
c0.setUsedToPay(false);
|
||||
return;
|
||||
}
|
||||
|
||||
Zone z0 = match.getCurrentGame().getZoneOf(c0);
|
||||
if (c0.getName().equals("Serum Powder") && z0.is(ZoneType.Hand)) {
|
||||
if (GuiDialog.confirm(c0, "Use " + c0.getName() + "'s ability?")) {
|
||||
List<Card> hand = new ArrayList<Card>(c0.getController().getCardsIn(ZoneType.Hand));
|
||||
for (Card c : hand) {
|
||||
match.getCurrentGame().getAction().exile(c);
|
||||
else
|
||||
{
|
||||
Zone z0 = match.getCurrentGame().getZoneOf(c0);
|
||||
if (c0.getName().equals("Serum Powder") && z0.is(ZoneType.Hand)) {
|
||||
if (GuiDialog.confirm(c0, "Use " + c0.getName() + "'s ability?")) {
|
||||
List<Card> hand = new ArrayList<Card>(c0.getController().getCardsIn(ZoneType.Hand));
|
||||
for (Card c : hand) {
|
||||
match.getCurrentGame().getAction().exile(c);
|
||||
}
|
||||
c0.getController().drawCards(hand.size());
|
||||
}
|
||||
c0.getController().drawCards(hand.size());
|
||||
}
|
||||
else
|
||||
{
|
||||
else
|
||||
{
|
||||
lastExiled.add(c0);
|
||||
c0.setUsedToPay(true);
|
||||
}
|
||||
} else {
|
||||
lastExiled.add(c0);
|
||||
c0.setUsedToPay(true);
|
||||
}
|
||||
} else {
|
||||
lastExiled.add(c0);
|
||||
c0.setUsedToPay(true);
|
||||
}
|
||||
|
||||
if(lastExiled.size() > 0)
|
||||
|
||||
Reference in New Issue
Block a user