mirror of
https://github.com/correl/mage.git
synced 2025-04-13 09:11:06 -09:00
[UI] Exile dialog
This commit is contained in:
parent
10840840ac
commit
53453243dc
5 changed files with 161 additions and 61 deletions
Mage.Client/src/main
java/mage/client
resources/info
Mage.Common/src/mage/view
|
@ -97,6 +97,16 @@ public class DialogContainer extends JPanel {
|
||||||
dlg.setLocation(X_OFFSET + 10, Y_OFFSET + 10);
|
dlg.setLocation(X_OFFSET + 10, Y_OFFSET + 10);
|
||||||
dlg.updateSize(params.rect.width - 80, params.rect.height - 80);
|
dlg.updateSize(params.rect.width - 80, params.rect.height - 80);
|
||||||
|
|
||||||
|
} else if (dialogType == DialogManager.MTGDialogs.ExileDialog) {
|
||||||
|
|
||||||
|
backgroundColor = new Color(250, 250, 250, 50);
|
||||||
|
|
||||||
|
alpha = 0;
|
||||||
|
ChoiceDialog dlg = new ChoiceDialog(params, "Exile");
|
||||||
|
add(dlg);
|
||||||
|
dlg.setLocation(X_OFFSET + 10, Y_OFFSET + 10);
|
||||||
|
dlg.updateSize(params.rect.width - 80, params.rect.height - 80);
|
||||||
|
|
||||||
} else if (dialogType == DialogManager.MTGDialogs.EmblemsDialog) {
|
} else if (dialogType == DialogManager.MTGDialogs.EmblemsDialog) {
|
||||||
|
|
||||||
backgroundColor = new Color(0, 0, 50, 110);
|
backgroundColor = new Color(0, 0, 50, 110);
|
||||||
|
|
|
@ -1,7 +1,11 @@
|
||||||
package mage.client.components.ext.dlg;
|
package mage.client.components.ext.dlg;
|
||||||
|
|
||||||
import java.awt.Component;
|
import mage.client.cards.BigCard;
|
||||||
import java.awt.Rectangle;
|
import mage.client.game.FeedbackPanel;
|
||||||
|
import mage.view.CardsView;
|
||||||
|
|
||||||
|
import javax.swing.*;
|
||||||
|
import java.awt.*;
|
||||||
import java.awt.event.MouseEvent;
|
import java.awt.event.MouseEvent;
|
||||||
import java.awt.event.MouseListener;
|
import java.awt.event.MouseListener;
|
||||||
import java.awt.event.MouseMotionListener;
|
import java.awt.event.MouseMotionListener;
|
||||||
|
@ -9,10 +13,6 @@ import java.awt.event.MouseWheelEvent;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
import javax.swing.JComponent;
|
|
||||||
import mage.client.cards.BigCard;
|
|
||||||
import mage.client.game.FeedbackPanel;
|
|
||||||
import mage.view.CardsView;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author mw, noxx
|
* @author mw, noxx
|
||||||
|
@ -40,7 +40,7 @@ public class DialogManager extends JComponent implements MouseListener,
|
||||||
|
|
||||||
public enum MTGDialogs {
|
public enum MTGDialogs {
|
||||||
none, AboutDialog, MessageDialog, StackDialog, AssignDamageDialog, ManaChoiceDialog, ChoiceDialog, EmblemsDialog, GraveDialog, DialogContainer, CombatDialog,
|
none, AboutDialog, MessageDialog, StackDialog, AssignDamageDialog, ManaChoiceDialog, ChoiceDialog, EmblemsDialog, GraveDialog, DialogContainer, CombatDialog,
|
||||||
ChooseDeckDialog, ChooseCommonDialog, RevealDialog
|
ChooseDeckDialog, ChooseCommonDialog, RevealDialog, ExileDialog
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -176,6 +176,35 @@ public class DialogManager extends JComponent implements MouseListener,
|
||||||
setVisible(true);
|
setVisible(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void showExileDialog(CardsView cards, BigCard bigCard, UUID gameId) {
|
||||||
|
|
||||||
|
int w = 720;
|
||||||
|
int h = 550;
|
||||||
|
|
||||||
|
int height = getHeight();
|
||||||
|
int width = getWidth();
|
||||||
|
|
||||||
|
int x = ((width - w) / 2);
|
||||||
|
int y = ((height - h) / 2);
|
||||||
|
|
||||||
|
DlgParams params = new DlgParams();
|
||||||
|
params.rect = new Rectangle(x, y, w, h);
|
||||||
|
params.bigCard = bigCard;
|
||||||
|
params.gameId = gameId;
|
||||||
|
params.setCards(cards);
|
||||||
|
dialogContainer = new DialogContainer(MTGDialogs.ExileDialog, params);
|
||||||
|
dialogContainer.setVisible(true);
|
||||||
|
add(dialogContainer);
|
||||||
|
|
||||||
|
this.currentDialog = MTGDialogs.DialogContainer;
|
||||||
|
|
||||||
|
setDlgBounds(new Rectangle(x, y, w, h));
|
||||||
|
|
||||||
|
dialogContainer.showDialog(true);
|
||||||
|
|
||||||
|
setVisible(true);
|
||||||
|
}
|
||||||
|
|
||||||
public void showEmblemsDialog(CardsView cards, BigCard bigCard, UUID gameId) {
|
public void showEmblemsDialog(CardsView cards, BigCard bigCard, UUID gameId) {
|
||||||
|
|
||||||
int w = 720;
|
int w = 720;
|
||||||
|
|
|
@ -34,28 +34,6 @@
|
||||||
|
|
||||||
package mage.client.game;
|
package mage.client.game;
|
||||||
|
|
||||||
import java.awt.Color;
|
|
||||||
import java.awt.Dimension;
|
|
||||||
import java.awt.Font;
|
|
||||||
import java.awt.Image;
|
|
||||||
import java.awt.Rectangle;
|
|
||||||
import java.awt.event.ActionEvent;
|
|
||||||
import java.awt.event.ActionListener;
|
|
||||||
import java.awt.image.BufferedImage;
|
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.Map;
|
|
||||||
import java.util.UUID;
|
|
||||||
import javax.swing.BorderFactory;
|
|
||||||
import javax.swing.GroupLayout;
|
|
||||||
import javax.swing.GroupLayout.Alignment;
|
|
||||||
import javax.swing.ImageIcon;
|
|
||||||
import javax.swing.JButton;
|
|
||||||
import javax.swing.JLabel;
|
|
||||||
import javax.swing.JPanel;
|
|
||||||
import javax.swing.LayoutStyle.ComponentPlacement;
|
|
||||||
import javax.swing.SwingConstants;
|
|
||||||
import javax.swing.border.Border;
|
|
||||||
import javax.swing.border.LineBorder;
|
|
||||||
import mage.MageException;
|
import mage.MageException;
|
||||||
import mage.cards.MageCard;
|
import mage.cards.MageCard;
|
||||||
import mage.cards.action.ActionCallback;
|
import mage.cards.action.ActionCallback;
|
||||||
|
@ -82,6 +60,19 @@ import mage.view.ManaPoolView;
|
||||||
import mage.view.PlayerView;
|
import mage.view.PlayerView;
|
||||||
import org.mage.card.arcane.ManaSymbols;
|
import org.mage.card.arcane.ManaSymbols;
|
||||||
|
|
||||||
|
import javax.swing.*;
|
||||||
|
import javax.swing.GroupLayout.Alignment;
|
||||||
|
import javax.swing.LayoutStyle.ComponentPlacement;
|
||||||
|
import javax.swing.border.Border;
|
||||||
|
import javax.swing.border.LineBorder;
|
||||||
|
import java.awt.*;
|
||||||
|
import java.awt.event.ActionEvent;
|
||||||
|
import java.awt.event.ActionListener;
|
||||||
|
import java.awt.image.BufferedImage;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Enhanced player pane.
|
* Enhanced player pane.
|
||||||
*
|
*
|
||||||
|
@ -94,7 +85,6 @@ public class PlayerPanelExt extends javax.swing.JPanel {
|
||||||
private Session session;
|
private Session session;
|
||||||
private PlayerView player;
|
private PlayerView player;
|
||||||
|
|
||||||
//private ShowCardsDialog graveyard;
|
|
||||||
private BigCard bigCard;
|
private BigCard bigCard;
|
||||||
|
|
||||||
private static final int AVATAR_COUNT = 77;
|
private static final int AVATAR_COUNT = 77;
|
||||||
|
@ -193,10 +183,12 @@ public class PlayerPanelExt extends javax.swing.JPanel {
|
||||||
|
|
||||||
int graveCards = player.getGraveyard().size();
|
int graveCards = player.getGraveyard().size();
|
||||||
if (graveCards > 99) {
|
if (graveCards > 99) {
|
||||||
|
if (!changedFontGrave) {
|
||||||
Font font = graveLabel.getFont();
|
Font font = graveLabel.getFont();
|
||||||
font = font.deriveFont(9f);
|
font = font.deriveFont(9f);
|
||||||
graveLabel.setFont(font);
|
graveLabel.setFont(font);
|
||||||
changedFontGrave = true;
|
changedFontGrave = true;
|
||||||
|
}
|
||||||
} else if (changedFontGrave) {
|
} else if (changedFontGrave) {
|
||||||
Font font = lifeLabel.getFont();
|
Font font = lifeLabel.getFont();
|
||||||
font = font.deriveFont(12f);
|
font = font.deriveFont(12f);
|
||||||
|
@ -205,6 +197,22 @@ public class PlayerPanelExt extends javax.swing.JPanel {
|
||||||
}
|
}
|
||||||
graveLabel.setText(Integer.toString(graveCards));
|
graveLabel.setText(Integer.toString(graveCards));
|
||||||
|
|
||||||
|
int exileCards = player.getExile().size();
|
||||||
|
if (exileCards > 99) {
|
||||||
|
if (!changedFontExile) {
|
||||||
|
Font font = exileLabel.getFont();
|
||||||
|
font = font.deriveFont(9f);
|
||||||
|
exileLabel.setFont(font);
|
||||||
|
changedFontExile = true;
|
||||||
|
}
|
||||||
|
} else if (changedFontExile) {
|
||||||
|
Font font = lifeLabel.getFont();
|
||||||
|
font = font.deriveFont(12f);
|
||||||
|
exileLabel.setFont(font);
|
||||||
|
changedFontExile = false;
|
||||||
|
}
|
||||||
|
exileLabel.setText(Integer.toString(exileCards));
|
||||||
|
|
||||||
if (!MageFrame.isLite()) {
|
if (!MageFrame.isLite()) {
|
||||||
int id = player.getUserData().getAvatarId();
|
int id = player.getUserData().getAvatarId();
|
||||||
if (id <= 0) {
|
if (id <= 0) {
|
||||||
|
@ -395,6 +403,22 @@ public class PlayerPanelExt extends javax.swing.JPanel {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
exileLabel = new JLabel();
|
||||||
|
exileLabel.setToolTipText("Exile");
|
||||||
|
image = ImageHelper.getImageFromResources("/info/exile.png");
|
||||||
|
r = new Rectangle(21, 21);
|
||||||
|
resized = ImageHelper.getResizedImage(BufferedImageBuilder.bufferImage(image, BufferedImage.TYPE_INT_ARGB), r);
|
||||||
|
exileZone = new HoverButton(null, resized, resized, resized, r);
|
||||||
|
exileZone.setToolTipText("Exile");
|
||||||
|
exileZone.setOpaque(false);
|
||||||
|
exileZone.setObserver(new Command() {
|
||||||
|
@Override
|
||||||
|
public void execute() {
|
||||||
|
btnExileZoneActionPerformed(null);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
exileZone.setBounds(25, 0, 21, 21);
|
||||||
|
|
||||||
// Cheat button
|
// Cheat button
|
||||||
r = new Rectangle(25, 21);
|
r = new Rectangle(25, 21);
|
||||||
image = ImageHelper.getImageFromResources("/info/cheat.png");
|
image = ImageHelper.getImageFromResources("/info/cheat.png");
|
||||||
|
@ -426,9 +450,12 @@ public class PlayerPanelExt extends javax.swing.JPanel {
|
||||||
btnCommandZoneActionPerformed(null);
|
btnCommandZoneActionPerformed(null);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
commandZone.setBounds(0, 0, 21, 21);
|
commandZone.setBounds(5, 0, 21, 21);
|
||||||
zonesPanel.add(commandZone);
|
zonesPanel.add(commandZone);
|
||||||
|
|
||||||
|
cheat.setBounds(28, 0, 25, 21);
|
||||||
|
zonesPanel.add(cheat);
|
||||||
|
|
||||||
btnPlayer = new JButton();
|
btnPlayer = new JButton();
|
||||||
btnPlayer.setText("Player");
|
btnPlayer.setText("Player");
|
||||||
btnPlayer.setVisible(false);
|
btnPlayer.setVisible(false);
|
||||||
|
@ -601,12 +628,19 @@ public class PlayerPanelExt extends javax.swing.JPanel {
|
||||||
.addGroup(gl_panelBackground.createSequentialGroup()
|
.addGroup(gl_panelBackground.createSequentialGroup()
|
||||||
.addGap(40)
|
.addGap(40)
|
||||||
.addComponent(libraryLabel, GroupLayout.PREFERRED_SIZE, 25, GroupLayout.PREFERRED_SIZE))
|
.addComponent(libraryLabel, GroupLayout.PREFERRED_SIZE, 25, GroupLayout.PREFERRED_SIZE))
|
||||||
|
/*.addGroup(gl_panelBackground.createSequentialGroup()
|
||||||
|
.addGap(18)
|
||||||
|
.addComponent(cheat, GroupLayout.PREFERRED_SIZE, 25, GroupLayout.PREFERRED_SIZE))*/
|
||||||
.addGroup(gl_panelBackground.createSequentialGroup()
|
.addGroup(gl_panelBackground.createSequentialGroup()
|
||||||
.addGap(18)
|
.addGap(18)
|
||||||
.addComponent(cheat, GroupLayout.PREFERRED_SIZE, 25, GroupLayout.PREFERRED_SIZE))
|
.addComponent(exileZone, GroupLayout.PREFERRED_SIZE, 25, GroupLayout.PREFERRED_SIZE)
|
||||||
|
)
|
||||||
.addGroup(gl_panelBackground.createSequentialGroup()
|
.addGroup(gl_panelBackground.createSequentialGroup()
|
||||||
.addGap(5)
|
.addGap(5)
|
||||||
.addComponent(graveLabel, GroupLayout.PREFERRED_SIZE, 25, GroupLayout.PREFERRED_SIZE))
|
.addComponent(graveLabel, GroupLayout.PREFERRED_SIZE, 25, GroupLayout.PREFERRED_SIZE))
|
||||||
|
.addGroup(gl_panelBackground.createSequentialGroup()
|
||||||
|
.addGap(40)
|
||||||
|
.addComponent(exileLabel, GroupLayout.PREFERRED_SIZE, 25, GroupLayout.PREFERRED_SIZE))
|
||||||
.addGroup(gl_panelBackground.createSequentialGroup()
|
.addGroup(gl_panelBackground.createSequentialGroup()
|
||||||
.addGap(1)
|
.addGap(1)
|
||||||
.addComponent(manaCountLabelU, GroupLayout.PREFERRED_SIZE, 30, GroupLayout.PREFERRED_SIZE))))
|
.addComponent(manaCountLabelU, GroupLayout.PREFERRED_SIZE, 30, GroupLayout.PREFERRED_SIZE))))
|
||||||
|
@ -685,12 +719,19 @@ public class PlayerPanelExt extends javax.swing.JPanel {
|
||||||
.addGap(31)
|
.addGap(31)
|
||||||
.addComponent(manaCountLabelG, GroupLayout.PREFERRED_SIZE, 30, GroupLayout.PREFERRED_SIZE))
|
.addComponent(manaCountLabelG, GroupLayout.PREFERRED_SIZE, 30, GroupLayout.PREFERRED_SIZE))
|
||||||
.addComponent(libraryLabel, GroupLayout.PREFERRED_SIZE, 20, GroupLayout.PREFERRED_SIZE)
|
.addComponent(libraryLabel, GroupLayout.PREFERRED_SIZE, 20, GroupLayout.PREFERRED_SIZE)
|
||||||
|
/*.addGroup(gl_panelBackground.createSequentialGroup()
|
||||||
|
.addGap(76)
|
||||||
|
.addComponent(cheat, GroupLayout.PREFERRED_SIZE, 21, GroupLayout.PREFERRED_SIZE))*/
|
||||||
.addGroup(gl_panelBackground.createSequentialGroup()
|
.addGroup(gl_panelBackground.createSequentialGroup()
|
||||||
.addGap(76)
|
.addGap(76)
|
||||||
.addComponent(cheat, GroupLayout.PREFERRED_SIZE, 21, GroupLayout.PREFERRED_SIZE))
|
.addComponent(exileZone, GroupLayout.PREFERRED_SIZE, 21, GroupLayout.PREFERRED_SIZE)
|
||||||
|
)
|
||||||
.addGroup(gl_panelBackground.createSequentialGroup()
|
.addGroup(gl_panelBackground.createSequentialGroup()
|
||||||
.addGap(76)
|
.addGap(76)
|
||||||
.addComponent(graveLabel, GroupLayout.PREFERRED_SIZE, 21, GroupLayout.PREFERRED_SIZE))
|
.addComponent(graveLabel, GroupLayout.PREFERRED_SIZE, 21, GroupLayout.PREFERRED_SIZE))
|
||||||
|
.addGroup(gl_panelBackground.createSequentialGroup()
|
||||||
|
.addGap(76)
|
||||||
|
.addComponent(exileLabel, GroupLayout.PREFERRED_SIZE, 21, GroupLayout.PREFERRED_SIZE))
|
||||||
.addGroup(gl_panelBackground.createSequentialGroup()
|
.addGroup(gl_panelBackground.createSequentialGroup()
|
||||||
.addGap(31)
|
.addGap(31)
|
||||||
.addComponent(manaCountLabelU, GroupLayout.PREFERRED_SIZE, 30, GroupLayout.PREFERRED_SIZE)
|
.addComponent(manaCountLabelU, GroupLayout.PREFERRED_SIZE, 30, GroupLayout.PREFERRED_SIZE)
|
||||||
|
@ -749,6 +790,10 @@ public class PlayerPanelExt extends javax.swing.JPanel {
|
||||||
DialogManager.getManager(gameId).showEmblemsDialog(CardsViewUtil.convertCommandObject(player.getCommadObjectList()), bigCard, gameId);
|
DialogManager.getManager(gameId).showEmblemsDialog(CardsViewUtil.convertCommandObject(player.getCommadObjectList()), bigCard, gameId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void btnExileZoneActionPerformed(java.awt.event.ActionEvent evt) {
|
||||||
|
DialogManager.getManager(gameId).showExileDialog(CardsViewUtil.convertSimple(player.getExile(), MageFrame.getGame(gameId).getLoadedCards()), bigCard, gameId);
|
||||||
|
}
|
||||||
|
|
||||||
private void btnCheatActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnCheatActionPerformed
|
private void btnCheatActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnCheatActionPerformed
|
||||||
DckDeckImporter deckImporter = new DckDeckImporter();
|
DckDeckImporter deckImporter = new DckDeckImporter();
|
||||||
session.cheat(gameId, playerId, deckImporter.importDeck("cheat.dck"));
|
session.cheat(gameId, playerId, deckImporter.importDeck("cheat.dck"));
|
||||||
|
@ -776,9 +821,11 @@ public class PlayerPanelExt extends javax.swing.JPanel {
|
||||||
private JLabel libraryLabel;
|
private JLabel libraryLabel;
|
||||||
private JLabel poisonLabel;
|
private JLabel poisonLabel;
|
||||||
private JLabel graveLabel;
|
private JLabel graveLabel;
|
||||||
|
private JLabel exileLabel;
|
||||||
private boolean changedFontLibrary;
|
private boolean changedFontLibrary;
|
||||||
private boolean changedFontLife;
|
private boolean changedFontLife;
|
||||||
private boolean changedFontGrave;
|
private boolean changedFontGrave;
|
||||||
|
private boolean changedFontExile;
|
||||||
|
|
||||||
private JPanel zonesPanel;
|
private JPanel zonesPanel;
|
||||||
private HoverButton exileZone;
|
private HoverButton exileZone;
|
||||||
|
|
BIN
Mage.Client/src/main/resources/info/exile.png
Normal file
BIN
Mage.Client/src/main/resources/info/exile.png
Normal file
Binary file not shown.
After ![]() (image error) Size: 19 KiB |
|
@ -30,16 +30,17 @@ package mage.view;
|
||||||
|
|
||||||
import mage.cards.Card;
|
import mage.cards.Card;
|
||||||
import mage.counters.CounterType;
|
import mage.counters.CounterType;
|
||||||
|
import mage.game.ExileZone;
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
import mage.game.GameState;
|
import mage.game.GameState;
|
||||||
import mage.game.command.CommandObject;
|
import mage.game.command.CommandObject;
|
||||||
|
import mage.game.command.Commander;
|
||||||
import mage.game.command.Emblem;
|
import mage.game.command.Emblem;
|
||||||
import mage.game.permanent.Permanent;
|
import mage.game.permanent.Permanent;
|
||||||
import mage.players.Player;
|
import mage.players.Player;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
import mage.game.command.Commander;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
|
@ -59,6 +60,7 @@ public class PlayerView implements Serializable {
|
||||||
private final boolean hasLeft;
|
private final boolean hasLeft;
|
||||||
private final ManaPoolView manaPool;
|
private final ManaPoolView manaPool;
|
||||||
private final SimpleCardsView graveyard = new SimpleCardsView();
|
private final SimpleCardsView graveyard = new SimpleCardsView();
|
||||||
|
private final SimpleCardsView exile = new SimpleCardsView();
|
||||||
private final Map<UUID, PermanentView> battlefield = new LinkedHashMap<>();
|
private final Map<UUID, PermanentView> battlefield = new LinkedHashMap<>();
|
||||||
private final CardView topCard;
|
private final CardView topCard;
|
||||||
private final UserDataView userDataView;
|
private final UserDataView userDataView;
|
||||||
|
@ -81,6 +83,14 @@ public class PlayerView implements Serializable {
|
||||||
for (Card card: player.getGraveyard().getCards(game)) {
|
for (Card card: player.getGraveyard().getCards(game)) {
|
||||||
graveyard.put(card.getId(), new SimpleCardView(card.getId(), card.getExpansionSetCode(), card.getCardNumber(), card.getUsesVariousArt(), card.isFaceDown(), card.getTokenSetCode()));
|
graveyard.put(card.getId(), new SimpleCardView(card.getId(), card.getExpansionSetCode(), card.getCardNumber(), card.getUsesVariousArt(), card.isFaceDown(), card.getTokenSetCode()));
|
||||||
}
|
}
|
||||||
|
for (ExileZone exileZone : game.getExile().getExileZones()) {
|
||||||
|
for (Card card : exileZone.getCards(game)) {
|
||||||
|
if (!player.getId().equals(card.getOwnerId())) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
exile.put(card.getId(), new SimpleCardView(card.getId(), card.getExpansionSetCode(), card.getCardNumber(), card.getUsesVariousArt(), card.isFaceDown(), card.getTokenSetCode()));
|
||||||
|
}
|
||||||
|
}
|
||||||
for (Permanent permanent: state.getBattlefield().getAllPermanents()) {
|
for (Permanent permanent: state.getBattlefield().getAllPermanents()) {
|
||||||
if (showInBattlefield(permanent, state)) {
|
if (showInBattlefield(permanent, state)) {
|
||||||
PermanentView view = new PermanentView(permanent, game.getCard(permanent.getId()), createdForPlayerId, game);
|
PermanentView view = new PermanentView(permanent, game.getCard(permanent.getId()), createdForPlayerId, game);
|
||||||
|
@ -165,6 +175,10 @@ public class PlayerView implements Serializable {
|
||||||
return this.graveyard;
|
return this.graveyard;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public SimpleCardsView getExile() {
|
||||||
|
return exile;
|
||||||
|
}
|
||||||
|
|
||||||
public Map<UUID, PermanentView> getBattlefield() {
|
public Map<UUID, PermanentView> getBattlefield() {
|
||||||
return this.battlefield;
|
return this.battlefield;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue