mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 12:48:00 +00:00
Some minor GUI fixes, amongst which fixes for Morph display and Ponder effects.
This commit is contained in:
@@ -573,24 +573,34 @@ public class PlayerControllerHuman extends PlayerController {
|
||||
|
||||
@Override
|
||||
public List<Card> orderMoveToZoneList(List<Card> cards, ZoneType destinationZone) {
|
||||
List<CardView> choices;
|
||||
mayLookAt.addAll(cards);
|
||||
switch (destinationZone) {
|
||||
case Library:
|
||||
return SGuiChoose.order(getGui(), "Choose order of cards to put into the library", "Closest to top", cards, null);
|
||||
choices = SGuiChoose.order(getGui(), "Choose order of cards to put into the library", "Closest to top", getCardViews(cards), null);
|
||||
break;
|
||||
case Battlefield:
|
||||
return SGuiChoose.order(getGui(), "Choose order of cards to put onto the battlefield", "Put first", cards, null);
|
||||
choices = SGuiChoose.order(getGui(), "Choose order of cards to put onto the battlefield", "Put first", getCardViews(cards), null);
|
||||
break;
|
||||
case Graveyard:
|
||||
return SGuiChoose.order(getGui(), "Choose order of cards to put into the graveyard", "Closest to bottom", cards, null);
|
||||
choices = SGuiChoose.order(getGui(), "Choose order of cards to put into the graveyard", "Closest to bottom", getCardViews(cards), null);
|
||||
break;
|
||||
case PlanarDeck:
|
||||
return SGuiChoose.order(getGui(), "Choose order of cards to put into the planar deck", "Closest to top", cards, null);
|
||||
choices = SGuiChoose.order(getGui(), "Choose order of cards to put into the planar deck", "Closest to top", getCardViews(cards), null);
|
||||
break;
|
||||
case SchemeDeck:
|
||||
return SGuiChoose.order(getGui(), "Choose order of cards to put into the scheme deck", "Closest to top", cards, null);
|
||||
choices = SGuiChoose.order(getGui(), "Choose order of cards to put into the scheme deck", "Closest to top", getCardViews(cards), null);
|
||||
break;
|
||||
case Stack:
|
||||
return SGuiChoose.order(getGui(), "Choose order of copies to cast", "Put first", cards, null);
|
||||
choices = SGuiChoose.order(getGui(), "Choose order of copies to cast", "Put first", getCardViews(cards), null);
|
||||
break;
|
||||
default:
|
||||
System.out.println("ZoneType " + destinationZone + " - Not Ordered");
|
||||
break;
|
||||
mayLookAt.clear();
|
||||
return cards;
|
||||
}
|
||||
return cards;
|
||||
mayLookAt.clear();
|
||||
return getCards(choices);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -38,7 +38,6 @@ public class CardView extends GameEntityView {
|
||||
private boolean isCloned, isFaceDown, isFlipCard, isFlipped, isSplitCard, isTransformed;
|
||||
private String setCode;
|
||||
private CardRarity rarity;
|
||||
private long timestamp;
|
||||
private boolean isAttacking, isBlocking, isPhasedOut, isSick, isTapped, isToken;
|
||||
private Map<CounterType, Integer> counters;
|
||||
private int damage, assignedDamage, regenerationShields, preventNextDamage;
|
||||
@@ -80,7 +79,6 @@ public class CardView extends GameEntityView {
|
||||
this.isTransformed = false;
|
||||
this.setCode = StringUtils.EMPTY;
|
||||
this.rarity = CardRarity.Unknown;
|
||||
this.timestamp = 0L;
|
||||
this.isAttacking = this.isBlocking = this.isPhasedOut = this.isSick = this.isTapped = false;
|
||||
this.counters = ImmutableMap.of();
|
||||
this.damage = this.assignedDamage = this.regenerationShields = this.preventNextDamage = 0;
|
||||
@@ -318,20 +316,6 @@ public class CardView extends GameEntityView {
|
||||
this.rarity = rarity;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the timestamp
|
||||
*/
|
||||
public long getTimestamp() {
|
||||
return timestamp;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param timestamp the timestamp to set
|
||||
*/
|
||||
public void setTimestamp(long timestamp) {
|
||||
this.timestamp = timestamp;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the isAttacking
|
||||
*/
|
||||
|
||||
@@ -40,7 +40,6 @@ public final class ViewUtil {
|
||||
view.setTransformed(c.getCurState().equals(CardCharacteristicName.Transformed));
|
||||
view.setSetCode(c.getCurSetCode());
|
||||
view.setRarity(c.getRarity());
|
||||
view.setTimestamp(c.getTimestamp());
|
||||
view.setPhasedOut(c.isPhasedOut());
|
||||
view.setSick(c.isInPlay() && c.isSick());
|
||||
view.setTapped(c.isTapped());
|
||||
|
||||
@@ -16,9 +16,13 @@ import forge.util.ITriggerEvent;
|
||||
public class WatchLocalGame extends LocalGameView {
|
||||
|
||||
private final InputQueue inputQueue;
|
||||
|
||||
/**
|
||||
* @param game
|
||||
* @param inputQueue
|
||||
* the @{link Game} to attach to.
|
||||
* @param inputQueue
|
||||
* the {@link InputQueue} of the game to enable playback
|
||||
* controls, or {@code null} to disallow them.
|
||||
*/
|
||||
public WatchLocalGame(final Game game, final InputQueue inputQueue) {
|
||||
super(game);
|
||||
@@ -40,6 +44,9 @@ public class WatchLocalGame extends LocalGameView {
|
||||
|
||||
@Override
|
||||
public void selectButtonOk() {
|
||||
if (this.inputQueue == null) {
|
||||
return;
|
||||
}
|
||||
final Input i = inputQueue.getInput();
|
||||
if (i instanceof InputPlaybackControl) {
|
||||
i.selectButtonOK();
|
||||
@@ -48,6 +55,9 @@ public class WatchLocalGame extends LocalGameView {
|
||||
|
||||
@Override
|
||||
public void selectButtonCancel() {
|
||||
if (this.inputQueue == null) {
|
||||
return;
|
||||
}
|
||||
final Input i = inputQueue.getInput();
|
||||
if (i instanceof InputPlaybackControl) {
|
||||
i.selectButtonCancel();
|
||||
|
||||
Reference in New Issue
Block a user