mirror of
https://github.com/correl/mage.git
synced 2024-11-15 03:00:16 +00:00
Minor change.
This commit is contained in:
parent
bafd27f5b3
commit
59c50436ac
1 changed files with 5 additions and 5 deletions
|
@ -78,22 +78,22 @@ public class SearchLibraryPutOnLibraryEffect extends SearchEffect {
|
|||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player controller = game.getPlayer(source.getControllerId());
|
||||
MageObject sourceObject = game.getObject(source.getSourceId());
|
||||
MageObject sourceObject = source.getSourceObject(game);
|
||||
if (controller == null || sourceObject == null) {
|
||||
return false;
|
||||
}
|
||||
if (controller.searchLibrary(target, game)) {
|
||||
List<Card> cards = new ArrayList<>();
|
||||
for (UUID cardId: (List<UUID>)target.getTargets()) {
|
||||
for (UUID cardId: target.getTargets()) {
|
||||
Card card = controller.getLibrary().remove(cardId, game);
|
||||
if (card != null) {
|
||||
cards.add(card);
|
||||
}
|
||||
}
|
||||
Cards foundCards = new CardsImpl();
|
||||
foundCards.addAll(cards);
|
||||
foundCards.addAll(target.getTargets());
|
||||
if (reveal) {
|
||||
controller.revealCards(sourceObject.getName(), foundCards, game);
|
||||
controller.revealCards(sourceObject.getIdName(), foundCards, game);
|
||||
}
|
||||
if (forceShuffle) {
|
||||
controller.shuffleLibrary(game);
|
||||
|
@ -117,7 +117,7 @@ public class SearchLibraryPutOnLibraryEffect extends SearchEffect {
|
|||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("Search your library for a ").append(target.getTargetName());
|
||||
if (reveal) {
|
||||
sb.append("and reveal that card. Shuffle");
|
||||
sb.append(" and reveal that card. Shuffle");
|
||||
} else {
|
||||
sb.append(", then shuffle");
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue