make batchs for milling cards (per player, all)

Rework and test the couple of existing cards triggering on mill.
This commit is contained in:
Susucre 2024-05-01 20:55:50 +02:00
parent 4edb9ce270
commit 7c3bbed8f3
17 changed files with 452 additions and 107 deletions

View file

@ -9,6 +9,7 @@ import mage.constants.Zone;
import mage.filter.FilterCard;
import mage.game.Game;
import mage.game.events.GameEvent;
import mage.game.events.MilledCardEvent;
import java.util.UUID;
@ -58,7 +59,7 @@ public class MillTriggeredAbility extends TriggeredAbilityImpl {
default:
throw new IllegalArgumentException("Wrong code usage. targetController not yet supported: " + targetController);
}
Card card = game.getCard(event.getTargetId());
Card card = ((MilledCardEvent) event).getCard();
return card != null && filter.match(card, getControllerId(), this, game);
}