forked from External/mage
* Sidisi, Brood Tyrant - Fixed that the second ability did wrongly trigger, if Sidisi left battlefield before first ability did resolve.
This commit is contained in:
parent
4785ebd5f8
commit
9aa02f3d6f
14 changed files with 119 additions and 32 deletions
|
|
@ -66,13 +66,7 @@ public class PutTopCardOfLibraryIntoGraveControllerEffect extends OneShotEffect
|
|||
public boolean apply(Game game, Ability source) {
|
||||
Player controller = game.getPlayer(source.getControllerId());
|
||||
if (controller != null) {
|
||||
int cardsCount = Math.min(numberCards, controller.getLibrary().size());
|
||||
for (int i = 0; i < cardsCount; i++) {
|
||||
Card card = controller.getLibrary().removeFromTop(game);
|
||||
if (card != null) {
|
||||
controller.moveCardToGraveyardWithInfo(card, source.getSourceId(), game, Zone.LIBRARY);
|
||||
}
|
||||
}
|
||||
controller.moveCardsToGraveyardWithInfo(controller.getLibrary().getTopCards(game, numberCards), source, game, Zone.LIBRARY);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue