mirror of
https://github.com/correl/mage.git
synced 2024-11-15 19:19:33 +00:00
* Reviving Vapors - Fixed that the chosen card did not go to hand.
This commit is contained in:
parent
df98b4e0af
commit
d9013346b3
1 changed files with 4 additions and 13 deletions
|
@ -83,21 +83,12 @@ class RevivingVaporsEffect extends OneShotEffect {
|
|||
public boolean apply(Game game, Ability source) {
|
||||
Player controller = game.getPlayer(source.getControllerId());
|
||||
MageObject sourceObject = game.getObject(source.getSourceId());
|
||||
if (controller == null || sourceObject == null) {
|
||||
if (controller == null || sourceObject == null) {
|
||||
return false;
|
||||
}
|
||||
|
||||
Cards cards = new CardsImpl();
|
||||
int count = Math.min(controller.getLibrary().size(), 3);
|
||||
for (int i = 0; i < count; i++) {
|
||||
Card card = controller.getLibrary().removeFromTop(game);
|
||||
if (card != null) {
|
||||
cards.add(card);
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
cards.addAll(controller.getLibrary().getTopCards(game, 3));
|
||||
if (!cards.isEmpty()) {
|
||||
controller.revealCards(sourceObject.getName(), cards, game);
|
||||
Card card = null;
|
||||
|
@ -112,9 +103,9 @@ class RevivingVaporsEffect extends OneShotEffect {
|
|||
}
|
||||
if (card != null) {
|
||||
cards.remove(card);
|
||||
controller.moveCards(card, Zone.LIBRARY, Zone.GRAVEYARD, source, game);
|
||||
controller.moveCards(card, Zone.HAND, source, game);
|
||||
}
|
||||
controller.moveCards(cards, Zone.LIBRARY, Zone.GRAVEYARD, source, game);
|
||||
controller.moveCards(cards, Zone.GRAVEYARD, source, game);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue