mirror of
https://github.com/correl/mage.git
synced 2024-12-26 03:00:11 +00:00
[AKH] Fixed Harvest Season when cast with no tapped creatures (fixes #8396)
This commit is contained in:
parent
5c76228e74
commit
90aa65168b
1 changed files with 6 additions and 3 deletions
|
@ -71,9 +71,12 @@ class HarvestSeasonEffect extends OneShotEffect {
|
|||
public boolean apply(Game game, Ability source) {
|
||||
Player controller = game.getPlayer(source.getControllerId());
|
||||
if (controller != null) {
|
||||
TargetCardInLibrary target = new TargetCardInLibrary(0, new PermanentsOnBattlefieldCount(filter).calculate(game, source, this), StaticFilters.FILTER_CARD_BASIC_LAND);
|
||||
if (controller.searchLibrary(target, source, game)) {
|
||||
controller.moveCards(new CardsImpl(target.getTargets()).getCards(game), Zone.BATTLEFIELD, source, game, true, false, false, null);
|
||||
int tappedCreatures = new PermanentsOnBattlefieldCount(filter).calculate(game, source, this);
|
||||
if (tappedCreatures > 0) {
|
||||
TargetCardInLibrary target = new TargetCardInLibrary(0, tappedCreatures, StaticFilters.FILTER_CARD_BASIC_LAND);
|
||||
if (controller.searchLibrary(target, source, game)) {
|
||||
controller.moveCards(new CardsImpl(target.getTargets()).getCards(game), Zone.BATTLEFIELD, source, game, true, false, false, null);
|
||||
}
|
||||
}
|
||||
controller.shuffleLibrary(source, game);
|
||||
return true;
|
||||
|
|
Loading…
Reference in a new issue