mirror of
https://github.com/correl/mage.git
synced 2024-12-26 11:09:27 +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,10 +71,13 @@ 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 (tappedCreatures > 0) {
|
||||||
|
TargetCardInLibrary target = new TargetCardInLibrary(0, tappedCreatures, StaticFilters.FILTER_CARD_BASIC_LAND);
|
||||||
if (controller.searchLibrary(target, source, game)) {
|
if (controller.searchLibrary(target, source, game)) {
|
||||||
controller.moveCards(new CardsImpl(target.getTargets()).getCards(game), Zone.BATTLEFIELD, source, game, true, false, false, null);
|
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;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue