refactor: improved usage of one time turn modifications (skip step, extra turn, etc)

This commit is contained in:
Oleg Agafonov 2023-07-31 20:16:28 +04:00
parent 4554fbc408
commit 8d938926b6
46 changed files with 222 additions and 190 deletions

View file

@ -29,6 +29,8 @@ public abstract class GameCommanderImpl extends GameImpl {
protected boolean alsoHand = true; // replace commander going to hand
protected boolean alsoLibrary = true; // replace commander going to library
// 103.7a In a two-player game, the player who plays first skips the draw step
// (see rule 504, "Draw Step") of his or her first turn.
protected boolean startingPlayerSkipsDraw = true;
public GameCommanderImpl(MultiplayerAttackOption attackOption, RangeOfInfluence range, Mulligan mulligan, int startingLife, int minimumDeckSize) {
@ -127,7 +129,7 @@ public abstract class GameCommanderImpl extends GameImpl {
super.init(choosingPlayerId);
if (startingPlayerSkipsDraw) {
state.getTurnMods().add(new TurnMod(startingPlayerId, PhaseStep.DRAW));
state.getTurnMods().add(new TurnMod(startingPlayerId).withSkipStep(PhaseStep.DRAW));
}
}