* Added "Duel Commander" format (fixes #436).

This commit is contained in:
LevelX2 2014-11-08 01:33:29 +01:00
parent 6f8de373ac
commit d7f100b24b
21 changed files with 280 additions and 167 deletions

View file

@ -34,8 +34,8 @@ import mage.game.match.MatchType;
public class CommanderDuel extends GameCommanderImpl {
public CommanderDuel(MultiplayerAttackOption attackOption, RangeOfInfluence range, int freeMulligans) {
super(attackOption, range, freeMulligans);
public CommanderDuel(MultiplayerAttackOption attackOption, RangeOfInfluence range, int freeMulligans, int startLife) {
super(attackOption, range, freeMulligans, startLife);
}
public CommanderDuel(final CommanderDuel game) {

View file

@ -43,8 +43,16 @@ public class CommanderDuelMatch extends MatchImpl {
@Override
public void startGame() throws GameException {
CommanderDuel game = new CommanderDuel(options.getAttackOption(), options.getRange(), options.getFreeMulligans());
int startLife = 40;
boolean alsoLibrary = false;
// Don't like it to compare but seems like it's complicated to do it in another way
if (options.getDeckType().equals("Variant Magic - Duel Commander")) {
startLife = 30;
alsoLibrary = true;
}
CommanderDuel game = new CommanderDuel(options.getAttackOption(), options.getRange(), options.getFreeMulligans(), startLife);
game.setStartMessage(this.createGameStartMessage());
game.setAlsoLibrary(alsoLibrary);
initGame(game);
games.add(game);
}