mirror of
https://github.com/correl/mage.git
synced 2024-11-15 11:09:30 +00:00
* Tooth and Nail - Fixed that the searched cards were not revealed and not shown in the log.
This commit is contained in:
parent
21c8b0e01c
commit
3da92fad26
1 changed files with 8 additions and 8 deletions
|
@ -85,18 +85,18 @@ public class SearchLibraryPutInHandEffect extends SearchEffect {
|
|||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player player = game.getPlayer(source.getControllerId());
|
||||
if (player == null) {
|
||||
Player controller = game.getPlayer(source.getControllerId());
|
||||
if (controller == null) {
|
||||
return false;
|
||||
}
|
||||
target.clearChosen();
|
||||
if (player.searchLibrary(target, game)) {
|
||||
if (controller.searchLibrary(target, game)) {
|
||||
if (target.getTargets().size() > 0) {
|
||||
Cards cards = new CardsImpl();
|
||||
for (UUID cardId: target.getTargets()) {
|
||||
Card card = player.getLibrary().remove(cardId, game);
|
||||
Card card = controller.getLibrary().remove(cardId, game);
|
||||
if (card != null){
|
||||
card.moveToZone(Zone.HAND, source.getSourceId(), game, false);
|
||||
controller.moveCardToHandWithInfo(card, source.getSourceId(), game, Zone.LIBRARY, revealCards);
|
||||
if (revealCards) {
|
||||
cards.add(card);
|
||||
}
|
||||
|
@ -108,14 +108,14 @@ public class SearchLibraryPutInHandEffect extends SearchEffect {
|
|||
if (sourceCard != null) {
|
||||
name = sourceCard.getName();
|
||||
}
|
||||
player.revealCards(name, cards, game);
|
||||
controller.revealCards(name, cards, game);
|
||||
}
|
||||
}
|
||||
player.shuffleLibrary(game);
|
||||
controller.shuffleLibrary(game);
|
||||
return true;
|
||||
}
|
||||
if (forceShuffle) {
|
||||
player.shuffleLibrary(game);
|
||||
controller.shuffleLibrary(game);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue