1
0
Fork 0
mirror of https://github.com/correl/mage.git synced 2025-03-29 17:00:07 -09:00

Removed dispay of card ID for looked at cards to prevent unfair use of card identity.

This commit is contained in:
LevelX2 2015-06-22 15:31:15 +02:00
parent c6528b9d73
commit 78188d6f24
5 changed files with 19 additions and 5 deletions
Mage.Common/src/mage/view
Mage.Tests/src/test/java/org/mage/test/player
Mage/src/mage

View file

@ -46,7 +46,7 @@ public class LookedAtView implements Serializable {
public LookedAtView(String name, Cards cards, Game game) {
this.name = name;
for (Card card: cards.getCards(game)) {
this.cards.put(card.getId(), new CardView(card, game, card.getId()));
this.cards.put(card.getId(), new SimpleCardView(card.getId(), card.getExpansionSetCode(), card.getCardNumber(), card.getUsesVariousArt(), card.getTokenSetCode()));
}
}

View file

@ -1127,7 +1127,12 @@ public class TestPlayer implements Player {
public void lookAtCards(String name, Cards cards, Game game) {
computerPlayer.lookAtCards(name, cards, game);
}
@Override
public void lookAtCards(String name, Card card, Game game) {
computerPlayer.lookAtCards(name, card, game);
}
@Override
public void phasing(Game game) {
computerPlayer.phasing(game);

View file

@ -52,13 +52,14 @@ public class LookedAt extends HashMap<String, Cards> implements Serializable, Co
}
}
public void add(String name, Card card) {
this.get(name).add(card);
public void add(String name, Card card) {
this.createLookedAt(name).add(card);
}
public void add(String name, Cards cards) {
if (!this.containsKey(name))
if (!this.containsKey(name)) {
createLookedAt(name);
}
this.put(name, cards.copy());
}

View file

@ -293,6 +293,7 @@ public interface Player extends MageItem, Copyable<Player> {
void revealCards(String name, Cards cards, Game game);
void revealCards(String name, Cards cards, Game game, boolean postToLog);
void lookAtCards(String name, Card card, Game game);
void lookAtCards(String name, Cards cards, Game game);
@Override
@ -488,6 +489,7 @@ public interface Player extends MageItem, Copyable<Player> {
* @param sourceId
* @param game
* @param fromZone if null, this info isn't postet
* @param withName
* @return
*/
boolean moveCardToExileWithInfo(Card card, UUID exileId, String exileName, UUID sourceId, Game game, Zone fromZone, boolean withName);

View file

@ -1332,6 +1332,12 @@ public abstract class PlayerImpl implements Player, Serializable {
}
}
@Override
public void lookAtCards(String name, Card card, Game game) {
game.getState().getLookedAt(this.playerId).add(name, card);
game.fireUpdatePlayersEvent();
}
@Override
public void lookAtCards(String name, Cards cards, Game game) {
game.getState().getLookedAt(this.playerId).add(name, cards);