mirror of
https://github.com/correl/mage.git
synced 2025-03-30 01:03:57 -09:00
* Multiplayer Commander - Fixed that the starting player wrongly skipped his draw step.
This commit is contained in:
parent
8fadaf9a59
commit
b2586a653f
2 changed files with 14 additions and 2 deletions
Mage.Server.Plugins/Mage.Game.CommanderFreeForAll/src/mage/game
Mage/src/mage/game
|
@ -28,6 +28,7 @@
|
|||
|
||||
package mage.game;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.constants.MultiplayerAttackOption;
|
||||
import mage.constants.RangeOfInfluence;
|
||||
import mage.game.match.MatchType;
|
||||
|
@ -49,6 +50,12 @@ public class CommanderFreeForAll extends GameCommanderImpl {
|
|||
this.numPlayers = game.numPlayers;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void init(UUID choosingPlayerId, GameOptions gameOptions) {
|
||||
startingPlayerSkipsDraw = false;
|
||||
super.init(choosingPlayerId, gameOptions);
|
||||
}
|
||||
|
||||
@Override
|
||||
public MatchType getGameType() {
|
||||
return new CommanderFreeForAllType();
|
||||
|
|
|
@ -61,6 +61,7 @@ public abstract class GameCommanderImpl extends GameImpl {
|
|||
private final Set<CommanderCombatDamageWatcher> commanderCombatWatcher = new HashSet<>();
|
||||
|
||||
protected boolean alsoLibrary; // replace also commander going to library
|
||||
protected boolean startingPlayerSkipsDraw = true;
|
||||
|
||||
public GameCommanderImpl(MultiplayerAttackOption attackOption, RangeOfInfluence range, int freeMulligans, int startLife) {
|
||||
super(attackOption, range, freeMulligans, startLife);
|
||||
|
@ -68,6 +69,8 @@ public abstract class GameCommanderImpl extends GameImpl {
|
|||
|
||||
public GameCommanderImpl(final GameCommanderImpl game) {
|
||||
super(game);
|
||||
this.alsoLibrary = game.alsoLibrary;
|
||||
this.startingPlayerSkipsDraw = game.startingPlayerSkipsDraw;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -104,9 +107,11 @@ public abstract class GameCommanderImpl extends GameImpl {
|
|||
|
||||
}
|
||||
this.getState().addAbility(ability, this.getId(), null);
|
||||
state.getTurnMods().add(new TurnMod(startingPlayerId, PhaseStep.DRAW));
|
||||
if (startingPlayerSkipsDraw) {
|
||||
state.getTurnMods().add(new TurnMod(startingPlayerId, PhaseStep.DRAW));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
//20130711
|
||||
/*903.8. The Commander variant uses an alternate mulligan rule.
|
||||
|
|
Loading…
Add table
Reference in a new issue