Possible fix for Issue 372.

This commit is contained in:
magenoxx 2011-11-06 13:10:34 +03:00
parent 1b9f75f29b
commit 0c4783e2cd
2 changed files with 7 additions and 3 deletions

View file

@ -99,12 +99,12 @@ class GhostQuarterEffect extends OneShotEffect<GhostQuarterEffect> {
Permanent permanent = (Permanent) game.getLastKnownInformation(source.getFirstTarget(), Zone.BATTLEFIELD); Permanent permanent = (Permanent) game.getLastKnownInformation(source.getFirstTarget(), Zone.BATTLEFIELD);
if (permanent != null) { if (permanent != null) {
Player player = game.getPlayer(permanent.getControllerId()); Player player = game.getPlayer(permanent.getControllerId());
if (player.chooseUse(Outcome.PutLandInPlay, "Do you wish to search for a basic land, put it onto the battlefied and then shuffle your library?", game)) { if (player.chooseUse(Outcome.PutLandInPlay, "Do you wish to search for a basic land, put it onto the battlefield and then shuffle your library?", game)) {
TargetCardInLibrary target = new TargetCardInLibrary(new FilterBasicLandCard()); TargetCardInLibrary target = new TargetCardInLibrary(new FilterBasicLandCard());
if (player.searchLibrary(target, game)) { if (player.searchLibrary(target, game)) {
Card card = player.getLibrary().remove(target.getFirstTarget(), game); Card card = player.getLibrary().remove(target.getFirstTarget(), game);
if (card != null) { if (card != null) {
card.putOntoBattlefield(game, Zone.HAND, source.getId(), permanent.getControllerId()); card.putOntoBattlefield(game, Zone.HAND, source.getId(), player.getId());
} }
} }
player.shuffleLibrary(game); player.shuffleLibrary(game);

View file

@ -1169,7 +1169,11 @@ public abstract class GameImpl<T extends GameImpl<T>> implements Game, Serializa
/*if (!lki.containsKey(objectId)) { /*if (!lki.containsKey(objectId)) {
return getCard(objectId); return getCard(objectId);
}*/ }*/
return lki.get(objectId); Card card = lki.get(objectId);
if (card != null) {
return card.copy();
}
return null;
} }
/** /**