mirror of
https://github.com/correl/mage.git
synced 2024-12-26 03:00:11 +00:00
* Gather the Pack - Fixed that the cards were not revealed.
This commit is contained in:
parent
6cac559fcf
commit
14d79588e6
1 changed files with 4 additions and 1 deletions
|
@ -28,6 +28,7 @@
|
|||
package mage.sets.magicorigins;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageObject;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.condition.common.SpellMasteryCondition;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
|
@ -83,12 +84,14 @@ class GatherThePackEffect extends OneShotEffect {
|
|||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player controller = game.getPlayer(source.getControllerId());
|
||||
if (controller == null) {
|
||||
MageObject sourceObject = source.getSourceObject(game);
|
||||
if (controller == null || sourceObject == null) {
|
||||
return false;
|
||||
}
|
||||
Cards cards = new CardsImpl(Zone.LIBRARY);
|
||||
cards.addAll(controller.getLibrary().getTopCards(game, 5));
|
||||
if (!cards.isEmpty()) {
|
||||
controller.revealCards(sourceObject.getIdName(), cards, game);
|
||||
int creatures = cards.count(new FilterCreatureCard(), source.getSourceId(), source.getControllerId(), game);
|
||||
if (creatures > 0) {
|
||||
int max = 1;
|
||||
|
|
Loading…
Reference in a new issue