From 360bbc86b584eb43190b84c75cd30c9e80baaaad Mon Sep 17 00:00:00 2001 From: BetaSteward Date: Mon, 24 Jan 2011 22:51:45 -0500 Subject: [PATCH] modifed revealed cards --- .../mage/client/dialog/ShowCardsDialog.java | 11 +++ .../main/java/mage/client/game/GamePanel.java | 33 ++++++- Mage.Common/src/mage/view/GameView.java | 9 ++ Mage.Common/src/mage/view/RevealedView.java | 59 ++++++++++++ Mage.Sets/src/mage/sets/magic2010/Duress.java | 2 +- .../mage/sets/magic2011/ConundrumSphinx.java | 2 +- .../src/mage/sets/magic2011/Cultivate.java | 2 +- .../src/mage/sets/magic2011/DarkTutelage.java | 2 +- .../mage/sets/magic2011/MassPolymorph.java | 2 +- .../src/mage/sets/magic2011/MerfolkSpy.java | 2 +- .../mage/sets/magic2011/WildEvocation.java | 2 +- .../sets/riseoftheeldrazi/SarkhantheMad.java | 2 +- .../src/mage/sets/zendikar/GoblinGuide.java | 2 +- .../SearchLibraryRevealPutInHandEffect.java | 2 +- Mage/src/mage/game/Game.java | 2 +- Mage/src/mage/game/GameImpl.java | 9 +- Mage/src/mage/game/GameState.java | 6 ++ Mage/src/mage/game/Revealed.java | 92 +++++++++++++++++++ Mage/src/mage/players/Player.java | 4 +- Mage/src/mage/players/PlayerImpl.java | 17 +++- 20 files changed, 237 insertions(+), 25 deletions(-) create mode 100644 Mage.Common/src/mage/view/RevealedView.java create mode 100644 Mage/src/mage/game/Revealed.java diff --git a/Mage.Client/src/main/java/mage/client/dialog/ShowCardsDialog.java b/Mage.Client/src/main/java/mage/client/dialog/ShowCardsDialog.java index 385ba9dc92c..a633f9e1c9d 100644 --- a/Mage.Client/src/main/java/mage/client/dialog/ShowCardsDialog.java +++ b/Mage.Client/src/main/java/mage/client/dialog/ShowCardsDialog.java @@ -58,6 +58,8 @@ import mage.view.CardsView; */ public class ShowCardsDialog extends MageDialog implements MouseListener { + private boolean reloaded = false; + /** Creates new form ShowCardsDialog */ public ShowCardsDialog() { initComponents(); @@ -65,6 +67,7 @@ public class ShowCardsDialog extends MageDialog implements MouseListener { } public void loadCards(String name, CardsView showCards, BigCard bigCard, CardDimensions dimension, UUID gameId, boolean modal) { + this.reloaded = true; this.title = name; cardArea.removeAll(); if (showCards != null && showCards.size() < 10) @@ -129,6 +132,14 @@ public class ShowCardsDialog extends MageDialog implements MouseListener { cardArea.setPreferredSize(new Dimension(Config.dimensions.frameWidth * columns, Config.dimensions.frameHeight + 400)); } + public boolean isReloaded() { + return this.reloaded; + } + + public void clearReloaded() { + this.reloaded = false; + } + /** This method is called from within the constructor to * initialize the form. * WARNING: Do NOT modify this code. The content of this method is diff --git a/Mage.Client/src/main/java/mage/client/game/GamePanel.java b/Mage.Client/src/main/java/mage/client/game/GamePanel.java index 04093bf1dad..479e6bf926f 100644 --- a/Mage.Client/src/main/java/mage/client/game/GamePanel.java +++ b/Mage.Client/src/main/java/mage/client/game/GamePanel.java @@ -38,7 +38,9 @@ import java.awt.*; import java.awt.event.ComponentAdapter; import java.awt.event.ComponentEvent; import java.util.HashMap; +import java.util.Iterator; import java.util.Map; +import java.util.Map.Entry; import java.util.Set; import java.util.UUID; import java.util.logging.Level; @@ -51,6 +53,7 @@ import javax.swing.border.LineBorder; import mage.client.MageFrame; import mage.client.cards.Cards; +import mage.client.deckeditor.collection.viewer.MageBook; import mage.client.dialog.ExileZoneDialog; import mage.client.dialog.PickChoiceDialog; import mage.client.dialog.ShowCardsDialog; @@ -60,12 +63,14 @@ import mage.client.remote.Session; import mage.client.util.Config; import mage.client.util.GameManager; import mage.client.util.PhaseManager; +import mage.client.util.gui.ArrowBuilder; import mage.util.Logging; import mage.view.AbilityPickerView; import mage.view.CardsView; import mage.view.ExileView; import mage.view.GameView; import mage.view.PlayerView; +import mage.view.RevealedView; /** * @@ -77,6 +82,7 @@ public class GamePanel extends javax.swing.JPanel { private Map players = new HashMap(); private Map exiles = new HashMap(); + private Map revealed = new HashMap(); private UUID gameId; private UUID playerId; private Session session; @@ -136,6 +142,9 @@ public class GamePanel extends javax.swing.JPanel { for (ExileZoneDialog exile: exiles.values()) { exile.hide(); } + for (ShowCardsDialog reveal: revealed.values()) { + reveal.hide(); + } } public synchronized void showGame(UUID gameId, UUID playerId) { @@ -321,6 +330,7 @@ public class GamePanel extends javax.swing.JPanel { } exiles.get(exile.getId()).loadCards(exile, bigCard, gameId); } + showRevealed(game); if (game.getCombat().size() > 0) { MageFrame.getCombatDialog().showDialog(game.getCombat()); } @@ -331,6 +341,19 @@ public class GamePanel extends javax.swing.JPanel { this.repaint(); } + private void showRevealed(GameView game) { + for (ShowCardsDialog reveal: revealed.values()) { + reveal.clearReloaded(); + } + for (RevealedView reveal: game.getRevealed()) { + if (!revealed.containsKey(reveal.getName())) { + ShowCardsDialog newReveal = new ShowCardsDialog(); + revealed.put(reveal.getName(), newReveal); + } + revealed.get(reveal.getName()).loadCards("Revealed " + reveal.getName(), reveal.getCards(), bigCard, Config.dimensions, gameId, false); + } + } + public void ask(String question, GameView gameView) { updateGame(gameView); this.feedbackPanel.getFeedback(FeedbackMode.QUESTION, question, true, false); @@ -387,11 +410,11 @@ public class GamePanel extends javax.swing.JPanel { this.abilityPicker.show(choices, MageFrame.getDesktop().getMousePosition()); } - public void revealCards(String name, CardsView cards) { - ShowCardsDialog showCards = new ShowCardsDialog(); - showCards.loadCards(name, cards, bigCard, Config.dimensions, gameId, false); - } - +// public void revealCards(String name, CardsView cards) { +// ShowCardsDialog showCards = new ShowCardsDialog(); +// showCards.loadCards(name, cards, bigCard, Config.dimensions, gameId, false); +// } +// private void showCards(String title, CardsView cards, boolean required) { ShowCardsDialog showCards = new ShowCardsDialog(); showCards.loadCards(title, cards, bigCard, Config.dimensions, gameId, required); diff --git a/Mage.Common/src/mage/view/GameView.java b/Mage.Common/src/mage/view/GameView.java index 6f43af86b97..0360e51ad87 100644 --- a/Mage.Common/src/mage/view/GameView.java +++ b/Mage.Common/src/mage/view/GameView.java @@ -36,6 +36,7 @@ import mage.MageObject; import mage.Constants.PhaseStep; import mage.Constants.TurnPhase; import mage.cards.Card; +import mage.cards.Cards; import mage.game.ExileZone; import mage.game.Game; import mage.game.GameState; @@ -56,6 +57,7 @@ public class GameView implements Serializable { private CardsView hand; private CardsView stack = new CardsView(); private List exiles = new ArrayList(); + private List revealed = new ArrayList(); private List combat = new ArrayList(); private TurnPhase phase; private PhaseStep step; @@ -84,6 +86,9 @@ public class GameView implements Serializable { for (ExileZone exileZone: state.getExile().getExileZones()) { exiles.add(new ExileView(exileZone, game)); } + for (String name: state.getRevealed().keySet()) { + revealed.add(new RevealedView(name, state.getRevealed().get(name), game)); + } this.phase = state.getTurn().getPhaseType(); this.step = state.getTurn().getStepType(); this.turn = state.getTurnNum(); @@ -129,6 +134,10 @@ public class GameView implements Serializable { return exiles; } + public List getRevealed() { + return revealed; + } + public List getCombat() { return combat; } diff --git a/Mage.Common/src/mage/view/RevealedView.java b/Mage.Common/src/mage/view/RevealedView.java new file mode 100644 index 00000000000..15670c94c0f --- /dev/null +++ b/Mage.Common/src/mage/view/RevealedView.java @@ -0,0 +1,59 @@ +/* + * Copyright 2011 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ + +package mage.view; + +import java.io.Serializable; +import mage.cards.Card; +import mage.cards.Cards; +import mage.game.Game; + +/** + * + * @author BetaSteward_at_googlemail.com + */ +public class RevealedView implements Serializable { + + private String name; + private CardsView cards = new CardsView(); + + public RevealedView(String name, Cards cards, Game game) { + this.name = name; + for (Card card: cards.getCards(game)) { + this.cards.put(card.getId(), new CardView(card)); + } + } + + public String getName() { + return name; + } + + public CardsView getCards() { + return cards; + } +} diff --git a/Mage.Sets/src/mage/sets/magic2010/Duress.java b/Mage.Sets/src/mage/sets/magic2010/Duress.java index 6d10a930a9d..25023693db0 100644 --- a/Mage.Sets/src/mage/sets/magic2010/Duress.java +++ b/Mage.Sets/src/mage/sets/magic2010/Duress.java @@ -96,7 +96,7 @@ class DuressEffect extends OneShotEffect { public boolean apply(Game game, Ability source) { Player player = game.getPlayer(source.getFirstTarget()); if (player != null) { - player.revealCards(player.getHand(), game); + player.revealCards("Duress", player.getHand(), game); Player you = game.getPlayer(source.getControllerId()); if (you != null) { TargetCard target = new TargetCard(Zone.PICK, filter); diff --git a/Mage.Sets/src/mage/sets/magic2011/ConundrumSphinx.java b/Mage.Sets/src/mage/sets/magic2011/ConundrumSphinx.java index 203df70bc9c..b5da12f062c 100644 --- a/Mage.Sets/src/mage/sets/magic2011/ConundrumSphinx.java +++ b/Mage.Sets/src/mage/sets/magic2011/ConundrumSphinx.java @@ -104,7 +104,7 @@ class ConundrumSphinxEffect extends OneShotEffect { Card card = player.getLibrary().removeFromTop(game); Cards cards = new CardsImpl(); cards.add(card); - player.revealCards(cards, game); + player.revealCards("Conundrum Sphinx", cards, game); if (card.getName().equals(cardChoice.getChoice())) { card.moveToZone(Zone.HAND, source.getId(), game, true); } diff --git a/Mage.Sets/src/mage/sets/magic2011/Cultivate.java b/Mage.Sets/src/mage/sets/magic2011/Cultivate.java index 63da3742d14..531460ab0e4 100644 --- a/Mage.Sets/src/mage/sets/magic2011/Cultivate.java +++ b/Mage.Sets/src/mage/sets/magic2011/Cultivate.java @@ -106,7 +106,7 @@ class CultivateEffect extends OneShotEffect { Card card = player.getLibrary().remove(cardId, game); revealed.add(card); } - player.revealCards(revealed, game); + player.revealCards("Cultivate", revealed, game); if (target.getTargets().size() == 2) { TargetCard target2 = new TargetCard(Zone.PICK, filter); target2.setRequired(true); diff --git a/Mage.Sets/src/mage/sets/magic2011/DarkTutelage.java b/Mage.Sets/src/mage/sets/magic2011/DarkTutelage.java index c43301ec716..0f7e116196a 100644 --- a/Mage.Sets/src/mage/sets/magic2011/DarkTutelage.java +++ b/Mage.Sets/src/mage/sets/magic2011/DarkTutelage.java @@ -92,7 +92,7 @@ class DarkTutelageEffect extends OneShotEffect { player.loseLife(card.getManaCost().convertedManaCost(), game); Cards cards = new CardsImpl(); cards.add(card); - player.revealCards(cards, game); + player.revealCards("Dark Tutelage", cards, game); return true; } return false; diff --git a/Mage.Sets/src/mage/sets/magic2011/MassPolymorph.java b/Mage.Sets/src/mage/sets/magic2011/MassPolymorph.java index fdc69e5f256..23d2f91c982 100644 --- a/Mage.Sets/src/mage/sets/magic2011/MassPolymorph.java +++ b/Mage.Sets/src/mage/sets/magic2011/MassPolymorph.java @@ -103,7 +103,7 @@ class MassPolymorphEffect extends OneShotEffect { else nonCreatureCards.add(card); } - player.revealCards(revealed, game); + player.revealCards("Mass Polymorph", revealed, game); for (Card creatureCard: creatureCards.getCards(game)) { creatureCard.putOntoBattlefield(game, Zone.LIBRARY, source.getId(), source.getControllerId()); } diff --git a/Mage.Sets/src/mage/sets/magic2011/MerfolkSpy.java b/Mage.Sets/src/mage/sets/magic2011/MerfolkSpy.java index ac8a9161808..52c5b1f0ee0 100644 --- a/Mage.Sets/src/mage/sets/magic2011/MerfolkSpy.java +++ b/Mage.Sets/src/mage/sets/magic2011/MerfolkSpy.java @@ -94,7 +94,7 @@ class MerfolkSpyEffect extends OneShotEffect { if (player != null && player.getHand().size() > 0) { Cards revealed = new CardsImpl(); revealed.add(player.getHand().getRandom(game)); - player.revealCards(revealed, game); + player.revealCards("Merfolk Spy", revealed, game); return true; } return false; diff --git a/Mage.Sets/src/mage/sets/magic2011/WildEvocation.java b/Mage.Sets/src/mage/sets/magic2011/WildEvocation.java index 54528b82643..5182c7f7932 100644 --- a/Mage.Sets/src/mage/sets/magic2011/WildEvocation.java +++ b/Mage.Sets/src/mage/sets/magic2011/WildEvocation.java @@ -124,7 +124,7 @@ class WildEvocationEffect extends OneShotEffect { Card card = player.getHand().getRandom(game); Cards cards = new CardsImpl(); cards.add(card); - player.revealCards(cards, game); + player.revealCards("Wild Evocation", cards, game); if (card.getCardType().contains(CardType.LAND)) { card.putOntoBattlefield(game, Zone.HAND, source.getId(), player.getId()); } diff --git a/Mage.Sets/src/mage/sets/riseoftheeldrazi/SarkhantheMad.java b/Mage.Sets/src/mage/sets/riseoftheeldrazi/SarkhantheMad.java index cd9ca05b1c1..3d4f3dc0ea2 100644 --- a/Mage.Sets/src/mage/sets/riseoftheeldrazi/SarkhantheMad.java +++ b/Mage.Sets/src/mage/sets/riseoftheeldrazi/SarkhantheMad.java @@ -107,7 +107,7 @@ class SarkhantheMadRevealAndDrawEffect extends OneShotEffect { Card card = defender.getLibrary().getFromTop(game); if (card != null) { cards.add(card); - defender.revealCards(cards, game); + defender.revealCards("Goblin Guide", cards, game); if (card.getCardType().contains(CardType.LAND)) { defender.getLibrary().removeFromTop(game); card.moveToZone(Zone.HAND, source.getId(), game, true); diff --git a/Mage/src/mage/abilities/effects/common/SearchLibraryRevealPutInHandEffect.java b/Mage/src/mage/abilities/effects/common/SearchLibraryRevealPutInHandEffect.java index b767e167eb1..0cfb37a98c2 100644 --- a/Mage/src/mage/abilities/effects/common/SearchLibraryRevealPutInHandEffect.java +++ b/Mage/src/mage/abilities/effects/common/SearchLibraryRevealPutInHandEffect.java @@ -74,7 +74,7 @@ public class SearchLibraryRevealPutInHandEffect extends SearchEffect targets, boolean required); public void fireSelectTargetEvent(UUID playerId, String message, Cards cards, boolean required); public void fireSelectTargetEvent(UUID playerId, String message, TriggeredAbilities abilities, boolean required); - public void fireRevealCardsEvent(String message, Cards cards); +// public void fireRevealCardsEvent(String message, Cards cards); public void fireSelectEvent(UUID playerId, String message); public void fireLookAtCardsEvent(UUID playerId, String message, Cards cards); public void firePriorityEvent(UUID playerId); diff --git a/Mage/src/mage/game/GameImpl.java b/Mage/src/mage/game/GameImpl.java index f5bd9e3d6fb..35d505a561f 100644 --- a/Mage/src/mage/game/GameImpl.java +++ b/Mage/src/mage/game/GameImpl.java @@ -497,6 +497,7 @@ public abstract class GameImpl> implements Game, Serializa applyEffects(); state.getPlayers().resetPassed(); fireUpdatePlayersEvent(); + state.getRevealed().reset(); break; } else return; @@ -772,10 +773,10 @@ public abstract class GameImpl> implements Game, Serializa playerQueryEventSource.target(playerId, message, abilities, required); } - @Override - public void fireRevealCardsEvent(String message, Cards cards) { - tableEventSource.fireTableEvent(EventType.REVEAL, message, cards, this); - } +// @Override +// public void fireRevealCardsEvent(String message, Cards cards) { +// tableEventSource.fireTableEvent(EventType.REVEAL, message, cards, this); +// } @Override public void fireLookAtCardsEvent(UUID playerId, String message, Cards cards) { diff --git a/Mage/src/mage/game/GameState.java b/Mage/src/mage/game/GameState.java index 16531d4f4cb..4bcc90317f9 100644 --- a/Mage/src/mage/game/GameState.java +++ b/Mage/src/mage/game/GameState.java @@ -77,6 +77,7 @@ public class GameState implements Serializable, Copyable { private Turn turn; private SpellStack stack; private Exile exile; + private Revealed revealed; private Battlefield battlefield; private int turnNum; private boolean gameOver; @@ -97,6 +98,7 @@ public class GameState implements Serializable, Copyable { turn = new Turn(); stack = new SpellStack(); exile = new Exile(); + revealed = new Revealed(); battlefield = new Battlefield(); effects = new ContinuousEffects(); triggers = new TriggeredAbilities(); @@ -200,6 +202,10 @@ public class GameState implements Serializable, Copyable { return exile; } + public Revealed getRevealed() { + return revealed; + } + public Turn getTurn() { return turn; } diff --git a/Mage/src/mage/game/Revealed.java b/Mage/src/mage/game/Revealed.java new file mode 100644 index 00000000000..08c992fcf1b --- /dev/null +++ b/Mage/src/mage/game/Revealed.java @@ -0,0 +1,92 @@ +/* + * Copyright 2011 BetaSteward_at_googlemail.com. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of BetaSteward_at_googlemail.com. + */ + +package mage.game; + +import java.io.Serializable; +import java.util.Collection; +import java.util.HashMap; +import java.util.Map; +import java.util.UUID; +import mage.cards.Card; +import mage.cards.Cards; +import mage.cards.CardsImpl; +import mage.util.Copyable; + +/** + * + * @author BetaSteward_at_googlemail.com + */ +public class Revealed extends HashMap implements Serializable, Copyable { + + public Revealed() { } + + public Revealed(final Revealed revealed) { + for (String key: revealed.keySet()) { + this.put(key, revealed.get(key).copy()); + } + } + + public void add(String name, Card card) { + this.get(name).add(card); + } + + public void add(String name, Cards cards) { + if (!this.containsKey(name)) + createRevealed(name); + this.put(name, cards.copy()); + } + + public Cards createRevealed(String name) { + if (!this.containsKey(name)) { + this.put(name, new CardsImpl()); + } + return this.get(name); + } + + public Cards getRevealed(String name) { + return this.get(name); + } + + public void reset() { + this.clear(); + } + + public Card getCard(UUID cardId, Game game) { + for (Cards cards: this.values()) { + if (cards.contains(cardId)) + return game.getCard(cardId); + } + return null; + } + + @Override + public Revealed copy() { + return new Revealed(this); + } +} diff --git a/Mage/src/mage/players/Player.java b/Mage/src/mage/players/Player.java index 4b3afac31dd..3953faf2018 100644 --- a/Mage/src/mage/players/Player.java +++ b/Mage/src/mage/players/Player.java @@ -80,6 +80,8 @@ public interface Player extends MageItem, Copyable { public int damage(int damage, UUID sourceId, Game game, boolean combatDamage, boolean preventable); public Cards getHand(); public int getLandsPlayed(); + public int getLandsPerTurn(); + public void setLandsPerTurn(int landsPerTurn); public boolean isPassed(); public boolean isEmptyDraw(); public void pass(); @@ -119,7 +121,7 @@ public interface Player extends MageItem, Copyable { public void concede(Game game); public void abort(); - public void revealCards(Cards cards, Game game); + public void revealCards(String name, Cards cards, Game game); public void lookAtCards(Cards cards, Game game); @Override diff --git a/Mage/src/mage/players/PlayerImpl.java b/Mage/src/mage/players/PlayerImpl.java index 3cd63bcc3cb..517b27f68d9 100644 --- a/Mage/src/mage/players/PlayerImpl.java +++ b/Mage/src/mage/players/PlayerImpl.java @@ -98,7 +98,6 @@ public abstract class PlayerImpl> implements Player, Ser protected boolean left; protected RangeOfInfluence range; protected Set inRange = new HashSet(); -// protected Deck deck; @Override public abstract T copy(); @@ -107,7 +106,6 @@ public abstract class PlayerImpl> implements Player, Ser this(UUID.randomUUID()); this.name = name; this.range = range; -// this.deck = deck; hand = new CardsImpl(Zone.HAND); graveyard = new CardsImpl(Zone.GRAVEYARD); abilities = new AbilitiesImpl(); @@ -529,8 +527,9 @@ public abstract class PlayerImpl> implements Player, Ser } @Override - public void revealCards(Cards cards, Game game) { - game.fireRevealCardsEvent(this.name + " revealed", cards); + public void revealCards(String name, Cards cards, Game game) { + game.getState().getRevealed().add(name, cards); +// game.fireRevealCardsEvent(this.name + " revealed", cards); } @Override @@ -665,6 +664,16 @@ public abstract class PlayerImpl> implements Player, Ser return this.abilities; } + @Override + public int getLandsPerTurn() { + return this.landsPerTurn; + } + + @Override + public void setLandsPerTurn(int landsPerTurn) { + this.landsPerTurn = landsPerTurn; + } + @Override public void setResponseString(String responseString) {}