[DFT] Implement Riverchurn Monument (#13405)

* fix MillCardsTargetEffect to work with multiple targets
This commit is contained in:
Jmlundeen 2025-03-08 11:38:26 -06:00 committed by GitHub
parent f9aa8c1527
commit f22755d44d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 99 additions and 5 deletions

View file

@ -10,6 +10,8 @@ import mage.game.Game;
import mage.players.Player;
import mage.util.CardUtil;
import java.util.UUID;
/**
* @author LevelX2
*/
@ -38,12 +40,13 @@ public class MillCardsTargetEffect extends OneShotEffect {
@Override
public boolean apply(Game game, Ability source) {
Player player = game.getPlayer(getTargetPointer().getFirst(game, source));
if (player != null) {
player.millCards(numberCards.calculate(game, source, this), source, game);
return true;
for (UUID playerId : getTargetPointer().getTargets(game, source)) {
Player player = game.getPlayer(playerId);
if (player != null) {
player.millCards(numberCards.calculate(game, source, this), source, game);
}
}
return false;
return true;
}
@Override