Added lookAtCards for hand and library for Shimian Specter

This commit is contained in:
North 2012-08-15 16:19:33 +03:00
parent f86c9e01f9
commit 20c1a2e36b

View file

@ -99,21 +99,21 @@ class ShimianSpecterEffect extends OneShotEffect<ShimianSpecterEffect> {
@Override @Override
public boolean apply(Game game, Ability source) { public boolean apply(Game game, Ability source) {
Player damagedPlayer = game.getPlayer(targetPointer.getFirst(game, source)); Player damagedPlayer = game.getPlayer(targetPointer.getFirst(game, source));
if (damagedPlayer != null) {
damagedPlayer.revealCards("Shimian Specter", damagedPlayer.getHand(), game);
Player you = game.getPlayer(source.getControllerId()); Player you = game.getPlayer(source.getControllerId());
if (you != null) { if (damagedPlayer != null && you != null) {
damagedPlayer.revealCards("Shimian Specter", damagedPlayer.getHand(), game);
TargetCard target = new TargetCard(Constants.Zone.PICK, filter); TargetCard target = new TargetCard(Constants.Zone.PICK, filter);
target.setRequired(true); target.setRequired(true);
target.setNotTarget(true); target.setNotTarget(true);
if (you.choose(Constants.Outcome.Benefit, damagedPlayer.getHand(), target, game)) { if (you.choose(Constants.Outcome.Benefit, damagedPlayer.getHand(), target, game)) {
Card chosenCard = damagedPlayer.getHand().get(target.getFirstTarget(), game); Card chosenCard = damagedPlayer.getHand().get(target.getFirstTarget(), game);
if (chosenCard != null) { if (chosenCard != null && damagedPlayer != null) {
if (damagedPlayer != null) {
//cards in Library //cards in Library
Cards cardsInLibrary = new CardsImpl(Constants.Zone.LIBRARY); Cards cardsInLibrary = new CardsImpl(Constants.Zone.LIBRARY);
cardsInLibrary.addAll(damagedPlayer.getLibrary().getCards(game)); cardsInLibrary.addAll(damagedPlayer.getLibrary().getCards(game));
you.lookAtCards(damagedPlayer.getName() + ": cards in library", cardsInLibrary, game);
// cards in Graveyard // cards in Graveyard
Cards cardsInGraveyard = new CardsImpl(Constants.Zone.GRAVEYARD); Cards cardsInGraveyard = new CardsImpl(Constants.Zone.GRAVEYARD);
@ -122,6 +122,7 @@ class ShimianSpecterEffect extends OneShotEffect<ShimianSpecterEffect> {
// cards in Hand // cards in Hand
Cards cardsInHand = new CardsImpl(Constants.Zone.HAND); Cards cardsInHand = new CardsImpl(Constants.Zone.HAND);
cardsInHand.addAll(damagedPlayer.getHand()); cardsInHand.addAll(damagedPlayer.getHand());
you.lookAtCards(damagedPlayer.getName() + ": cards in hand", cardsInHand, game);
// exile same named cards from zones // exile same named cards from zones
for (Card checkCard : cardsInLibrary.getCards(game)) { for (Card checkCard : cardsInLibrary.getCards(game)) {
@ -146,8 +147,6 @@ class ShimianSpecterEffect extends OneShotEffect<ShimianSpecterEffect> {
} }
} }
} }
}
}
return false; return false;
} }