[AKH] Fixed Harvest Season when cast with no tapped creatures (fixes #8396)

This commit is contained in:
Daniel Bomar 2021-10-19 18:09:30 -05:00
parent 5c76228e74
commit 90aa65168b
No known key found for this signature in database
GPG key ID: C86C8658F4023918

View file

@ -71,9 +71,12 @@ class HarvestSeasonEffect extends OneShotEffect {
public boolean apply(Game game, Ability source) { public boolean apply(Game game, Ability source) {
Player controller = game.getPlayer(source.getControllerId()); Player controller = game.getPlayer(source.getControllerId());
if (controller != null) { if (controller != null) {
TargetCardInLibrary target = new TargetCardInLibrary(0, new PermanentsOnBattlefieldCount(filter).calculate(game, source, this), StaticFilters.FILTER_CARD_BASIC_LAND); int tappedCreatures = new PermanentsOnBattlefieldCount(filter).calculate(game, source, this);
if (controller.searchLibrary(target, source, game)) { if (tappedCreatures > 0) {
controller.moveCards(new CardsImpl(target.getTargets()).getCards(game), Zone.BATTLEFIELD, source, game, true, false, false, null); 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); controller.shuffleLibrary(source, game);
return true; return true;