foul-magics/Mage/src/main/java/mage/game/mulligan/VancouverMulligan.java
2020-02-05 02:17:00 +04:00

36 lines
1.1 KiB
Java
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

package mage.game.mulligan;
import mage.game.Game;
import mage.players.Player;
import java.util.UUID;
public class VancouverMulligan extends ParisMulligan {
public VancouverMulligan(int freeMulligans) {
super(freeMulligans);
}
@Override
public void executeMulliganPhase(Game game, int startingHandSize) {
super.executeMulliganPhase(game, startingHandSize);
/*
* 103.4 (scry rule) - After all players have kept an opening hand, each player in
* turn order whose hand contains fewer cards than that players starting hand size
* may look at the top card of their library. If a player does, that player may put
* that card on the bottom of their library.
*/
for (UUID playerId : game.getState().getPlayerList(game.getStartingPlayerId())) {
Player player = game.getPlayer(playerId);
if (player != null && player.getHand().size() < startingHandSize) {
player.scry(1, null, game);
}
}
}
@Override
public VancouverMulligan copy() {
return new VancouverMulligan(getFreeMulligans());
}
}