mirror of
https://github.com/magefree/mage.git
synced 2025-12-20 02:30:08 -08:00
Add custom options for starting life total and starting hand size (#11259)
* add startHandSize / startLife to the custom option panel * use the custom startLife/startHandsize in all Game Modes
This commit is contained in:
parent
3e6097b70e
commit
f14479c53c
76 changed files with 1230 additions and 929 deletions
|
|
@ -8,9 +8,9 @@ import mage.game.match.MatchType;
|
|||
import mage.game.mulligan.Mulligan;
|
||||
|
||||
public class BrawlDuel extends GameCommanderImpl {
|
||||
|
||||
public BrawlDuel(MultiplayerAttackOption attackOption, RangeOfInfluence range, Mulligan mulligan, int startLife) {
|
||||
super(attackOption, range, mulligan, startLife, 60);
|
||||
|
||||
public BrawlDuel(MultiplayerAttackOption attackOption, RangeOfInfluence range, Mulligan mulligan, int startLife, int startHandSize) {
|
||||
super(attackOption, range, mulligan, 60, startLife, startHandSize);
|
||||
}
|
||||
|
||||
public BrawlDuel(final BrawlDuel game) {
|
||||
|
|
|
|||
|
|
@ -17,7 +17,12 @@ public class BrawlDuelMatch extends MatchImpl {
|
|||
public void startGame() throws GameException {
|
||||
int startLife = 25;
|
||||
Mulligan mulligan = options.getMulliganType().getMulligan(options.getFreeMulligans());
|
||||
BrawlDuel game = new BrawlDuel(options.getAttackOption(), options.getRange(), mulligan, startLife);
|
||||
startLife = options.isCustomStartLifeEnabled() ? options.getCustomStartLife() : startLife;
|
||||
int startHandSize = options.isCustomStartHandSizeEnabled() ? options.getCustomStartHandSize() : 7;
|
||||
BrawlDuel game = new BrawlDuel(
|
||||
options.getAttackOption(), options.getRange(),
|
||||
mulligan, startLife, startHandSize
|
||||
);
|
||||
game.setCheckCommanderDamage(false);
|
||||
game.setStartMessage(this.createGameStartMessage());
|
||||
initGame(game);
|
||||
|
|
|
|||
|
|
@ -2,22 +2,22 @@
|
|||
|
||||
package mage.game;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.constants.MultiplayerAttackOption;
|
||||
import mage.constants.RangeOfInfluence;
|
||||
import mage.game.match.MatchType;
|
||||
import mage.game.mulligan.Mulligan;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author spjspj
|
||||
*/
|
||||
public class BrawlFreeForAll extends GameCommanderImpl {
|
||||
|
||||
private int numPlayers;
|
||||
|
||||
public BrawlFreeForAll(MultiplayerAttackOption attackOption, RangeOfInfluence range, Mulligan mulligan, int startLife) {
|
||||
super(attackOption, range, mulligan, startLife, 60);
|
||||
public BrawlFreeForAll(MultiplayerAttackOption attackOption, RangeOfInfluence range, Mulligan mulligan, int startLife, int startHandSize) {
|
||||
super(attackOption, range, mulligan, 60, startLife, startHandSize);
|
||||
}
|
||||
|
||||
public BrawlFreeForAll(final BrawlFreeForAll game) {
|
||||
|
|
@ -28,7 +28,7 @@ public class BrawlFreeForAll extends GameCommanderImpl {
|
|||
@Override
|
||||
protected void init(UUID choosingPlayerId) {
|
||||
startingPlayerSkipsDraw = false;
|
||||
super.init(choosingPlayerId);
|
||||
super.init(choosingPlayerId);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
|
|
@ -17,7 +17,12 @@ public class BrawlFreeForAllMatch extends MatchImpl {
|
|||
public void startGame() throws GameException {
|
||||
int startLife = 30;
|
||||
Mulligan mulligan = options.getMulliganType().getMulligan(options.getFreeMulligans());
|
||||
BrawlFreeForAll game = new BrawlFreeForAll(options.getAttackOption(), options.getRange(), mulligan, startLife);
|
||||
startLife = options.isCustomStartLifeEnabled() ? options.getCustomStartLife() : startLife;
|
||||
int startHandSize = options.isCustomStartHandSizeEnabled() ? options.getCustomStartHandSize() : 7;
|
||||
BrawlFreeForAll game = new BrawlFreeForAll(
|
||||
options.getAttackOption(), options.getRange(),
|
||||
mulligan, startLife, startHandSize
|
||||
);
|
||||
game.setStartMessage(this.createGameStartMessage());
|
||||
game.setCheckCommanderDamage(false);
|
||||
initGame(game);
|
||||
|
|
|
|||
|
|
@ -8,9 +8,9 @@ import mage.game.match.MatchType;
|
|||
import mage.game.mulligan.Mulligan;
|
||||
|
||||
public class CanadianHighlanderDuel extends GameCanadianHighlanderImpl {
|
||||
|
||||
public CanadianHighlanderDuel(MultiplayerAttackOption attackOption, RangeOfInfluence range, Mulligan mulligan, int startLife) {
|
||||
super(attackOption, range, mulligan, startLife);
|
||||
|
||||
public CanadianHighlanderDuel(MultiplayerAttackOption attackOption, RangeOfInfluence range, Mulligan mulligan, int startLife, int startHandSize) {
|
||||
super(attackOption, range, mulligan, startLife, startHandSize);
|
||||
}
|
||||
|
||||
public CanadianHighlanderDuel(final CanadianHighlanderDuel game) {
|
||||
|
|
|
|||
|
|
@ -7,7 +7,6 @@ import mage.game.mulligan.Mulligan;
|
|||
import mage.game.mulligan.MulliganType;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author spjspj
|
||||
*/
|
||||
public class CanadianHighlanderDuelMatch extends MatchImpl {
|
||||
|
|
@ -20,7 +19,12 @@ public class CanadianHighlanderDuelMatch extends MatchImpl {
|
|||
public void startGame() throws GameException {
|
||||
int startLife = 20;
|
||||
Mulligan mulligan = options.getMulliganType().orDefault(MulliganType.CANADIAN_HIGHLANDER).getMulligan(options.getFreeMulligans());
|
||||
CanadianHighlanderDuel game = new CanadianHighlanderDuel(options.getAttackOption(), options.getRange(), mulligan, startLife);
|
||||
startLife = options.isCustomStartLifeEnabled() ? options.getCustomStartLife() : startLife;
|
||||
int startHandSize = options.isCustomStartHandSizeEnabled() ? options.getCustomStartHandSize() : 7;
|
||||
CanadianHighlanderDuel game = new CanadianHighlanderDuel(
|
||||
options.getAttackOption(), options.getRange(),
|
||||
mulligan, startLife, startHandSize
|
||||
);
|
||||
game.setStartMessage(this.createGameStartMessage());
|
||||
initGame(game);
|
||||
games.add(game);
|
||||
|
|
|
|||
|
|
@ -8,9 +8,9 @@ import mage.game.match.MatchType;
|
|||
import mage.game.mulligan.Mulligan;
|
||||
|
||||
public class CommanderDuel extends GameCommanderImpl {
|
||||
|
||||
public CommanderDuel(MultiplayerAttackOption attackOption, RangeOfInfluence range, Mulligan mulligan, int startLife) {
|
||||
super(attackOption, range, mulligan, startLife, 100);
|
||||
|
||||
public CommanderDuel(MultiplayerAttackOption attackOption, RangeOfInfluence range, Mulligan mulligan, int startLife, int startHandSize) {
|
||||
super(attackOption, range, mulligan, 100, startLife, startHandSize);
|
||||
}
|
||||
|
||||
public CommanderDuel(final CommanderDuel game) {
|
||||
|
|
|
|||
|
|
@ -29,7 +29,12 @@ public class CommanderDuelMatch extends MatchImpl {
|
|||
startLife = 25;
|
||||
}
|
||||
Mulligan mulligan = options.getMulliganType().getMulligan(options.getFreeMulligans());
|
||||
CommanderDuel game = new CommanderDuel(options.getAttackOption(), options.getRange(), mulligan, startLife);
|
||||
startLife = options.isCustomStartLifeEnabled() ? options.getCustomStartLife() : startLife;
|
||||
int startHandSize = options.isCustomStartHandSizeEnabled() ? options.getCustomStartHandSize() : 7;
|
||||
CommanderDuel game = new CommanderDuel(
|
||||
options.getAttackOption(), options.getRange(),
|
||||
mulligan, startLife, startHandSize
|
||||
);
|
||||
game.setCheckCommanderDamage(checkCommanderDamage);
|
||||
game.setStartMessage(this.createGameStartMessage());
|
||||
initGame(game);
|
||||
|
|
|
|||
|
|
@ -16,8 +16,8 @@ public class CommanderFreeForAll extends GameCommanderImpl {
|
|||
|
||||
private int numPlayers;
|
||||
|
||||
public CommanderFreeForAll(MultiplayerAttackOption attackOption, RangeOfInfluence range, Mulligan mulligan, int startLife) {
|
||||
super(attackOption, range, mulligan, startLife, 100);
|
||||
public CommanderFreeForAll(MultiplayerAttackOption attackOption, RangeOfInfluence range, Mulligan mulligan, int startLife, int startHandSize) {
|
||||
super(attackOption, range, mulligan, 100, startLife, startHandSize);
|
||||
}
|
||||
|
||||
public CommanderFreeForAll(final CommanderFreeForAll game) {
|
||||
|
|
|
|||
|
|
@ -20,7 +20,12 @@ public class CommanderFreeForAllMatch extends MatchImpl {
|
|||
startLife = 30;
|
||||
}
|
||||
Mulligan mulligan = options.getMulliganType().getMulligan(options.getFreeMulligans());
|
||||
CommanderFreeForAll game = new CommanderFreeForAll(options.getAttackOption(), options.getRange(), mulligan, startLife);
|
||||
startLife = options.isCustomStartLifeEnabled() ? options.getCustomStartLife() : startLife;
|
||||
int startHandSize = options.isCustomStartHandSizeEnabled() ? options.getCustomStartHandSize() : 7;
|
||||
CommanderFreeForAll game = new CommanderFreeForAll(
|
||||
options.getAttackOption(), options.getRange(),
|
||||
mulligan, startLife, startHandSize
|
||||
);
|
||||
game.setStartMessage(this.createGameStartMessage());
|
||||
initGame(game);
|
||||
games.add(game);
|
||||
|
|
|
|||
|
|
@ -49,8 +49,8 @@ import java.util.UUID;
|
|||
*/
|
||||
public class CustomPillarOfTheParunsDuel extends GameImpl {
|
||||
|
||||
public CustomPillarOfTheParunsDuel(MultiplayerAttackOption attackOption, RangeOfInfluence range, Mulligan mulligan) {
|
||||
super(attackOption, range, mulligan, 25, 40, 6);
|
||||
public CustomPillarOfTheParunsDuel(MultiplayerAttackOption attackOption, RangeOfInfluence range, Mulligan mulligan, int startLife, int startHandSize) {
|
||||
super(attackOption, range, mulligan, 40, startLife, startHandSize);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
@ -58,10 +58,10 @@ public class CustomPillarOfTheParunsDuel extends GameImpl {
|
|||
super.init(choosingPlayerId);
|
||||
|
||||
getPlayers().forEach((playerId, p) -> {
|
||||
addDelayedTriggeredAbility(
|
||||
new AtTheBeginOfPlayerFirstMainPhase(playerId, "C-Pillar of the Paruns"),
|
||||
null // TODO: Not sure how to mock something to be displayed instead.
|
||||
);
|
||||
addDelayedTriggeredAbility(
|
||||
new AtTheBeginOfPlayerFirstMainPhase(playerId, "C-Pillar of the Paruns"),
|
||||
null // TODO: Not sure how to mock something to be displayed instead.
|
||||
);
|
||||
});
|
||||
|
||||
state.getTurnMods().add(new TurnMod(startingPlayerId).withSkipStep(PhaseStep.DRAW));
|
||||
|
|
|
|||
|
|
@ -16,7 +16,12 @@ public class CustomPillarOfTheParunsDuelMatch extends MatchImpl {
|
|||
@Override
|
||||
public void startGame() throws GameException {
|
||||
Mulligan mulligan = options.getMulliganType().getMulligan(options.getFreeMulligans());
|
||||
CustomPillarOfTheParunsDuel game = new CustomPillarOfTheParunsDuel(options.getAttackOption(), options.getRange(), mulligan);
|
||||
int startLife = options.isCustomStartLifeEnabled() ? options.getCustomStartLife() : 25;
|
||||
int startHandSize = options.isCustomStartHandSizeEnabled() ? options.getCustomStartHandSize() : 6;
|
||||
CustomPillarOfTheParunsDuel game = new CustomPillarOfTheParunsDuel(
|
||||
options.getAttackOption(), options.getRange(),
|
||||
mulligan, startLife, startHandSize
|
||||
);
|
||||
game.setStartMessage(this.createGameStartMessage());
|
||||
initGame(game);
|
||||
|
||||
|
|
|
|||
|
|
@ -7,15 +7,15 @@ import mage.game.match.MatchType;
|
|||
import mage.game.mulligan.Mulligan;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author BetaSteward_at_googlemail.com
|
||||
*/
|
||||
public class FreeForAll extends GameImpl {
|
||||
|
||||
private int numPlayers;
|
||||
|
||||
public FreeForAll(MultiplayerAttackOption attackOption, RangeOfInfluence range, Mulligan mulligan, int startLife) {
|
||||
super(attackOption, range, mulligan, startLife, 60, 7);
|
||||
public FreeForAll(MultiplayerAttackOption attackOption, RangeOfInfluence range,
|
||||
Mulligan mulligan, int startLife, int startHandSize) {
|
||||
super(attackOption, range, mulligan, 60, startLife, startHandSize);
|
||||
}
|
||||
|
||||
public FreeForAll(final FreeForAll game) {
|
||||
|
|
|
|||
|
|
@ -7,7 +7,6 @@ import mage.game.match.MatchOptions;
|
|||
import mage.game.mulligan.Mulligan;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author BetaSteward_at_googlemail.com
|
||||
*/
|
||||
public class FreeForAllMatch extends MatchImpl {
|
||||
|
|
@ -19,7 +18,12 @@ public class FreeForAllMatch extends MatchImpl {
|
|||
@Override
|
||||
public void startGame() throws GameException {
|
||||
Mulligan mulligan = options.getMulliganType().getMulligan(options.getFreeMulligans());
|
||||
FreeForAll game = new FreeForAll(options.getAttackOption(), options.getRange(), mulligan, 20);
|
||||
int startLife = options.isCustomStartLifeEnabled() ? options.getCustomStartLife() : 20;
|
||||
int startHandSize = options.isCustomStartHandSizeEnabled() ? options.getCustomStartHandSize() : 7;
|
||||
FreeForAll game = new FreeForAll(
|
||||
options.getAttackOption(), options.getRange(),
|
||||
mulligan, startLife, startHandSize
|
||||
);
|
||||
game.setStartMessage(this.createGameStartMessage());
|
||||
initGame(game);
|
||||
games.add(game);
|
||||
|
|
|
|||
|
|
@ -10,8 +10,9 @@ import mage.game.mulligan.Mulligan;
|
|||
*/
|
||||
public class FreeformCommanderDuel extends GameCommanderImpl {
|
||||
|
||||
public FreeformCommanderDuel(MultiplayerAttackOption attackOption, RangeOfInfluence range, Mulligan mulligan, int startLife) {
|
||||
super(attackOption, range, mulligan, startLife, 60);
|
||||
public FreeformCommanderDuel(MultiplayerAttackOption attackOption, RangeOfInfluence range,
|
||||
Mulligan mulligan, int startLife, int startHandSize) {
|
||||
super(attackOption, range, mulligan, 60, startLife, startHandSize);
|
||||
}
|
||||
|
||||
public FreeformCommanderDuel(final FreeformCommanderDuel game) {
|
||||
|
|
|
|||
|
|
@ -18,7 +18,12 @@ public class FreeformCommanderDuelMatch extends MatchImpl {
|
|||
int startLife = 40;
|
||||
|
||||
Mulligan mulligan = options.getMulliganType().getMulligan(options.getFreeMulligans());
|
||||
FreeformCommanderDuel game = new FreeformCommanderDuel(options.getAttackOption(), options.getRange(), mulligan, startLife);
|
||||
startLife = options.isCustomStartLifeEnabled() ? options.getCustomStartLife() : startLife;
|
||||
int startHandSize = options.isCustomStartHandSizeEnabled() ? options.getCustomStartHandSize() : 7;
|
||||
FreeformCommanderDuel game = new FreeformCommanderDuel(
|
||||
options.getAttackOption(), options.getRange(),
|
||||
mulligan, startLife, startHandSize
|
||||
);
|
||||
game.setCheckCommanderDamage(true);
|
||||
game.setStartMessage(this.createGameStartMessage());
|
||||
initGame(game);
|
||||
|
|
|
|||
|
|
@ -2,22 +2,23 @@
|
|||
|
||||
package mage.game;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.constants.MultiplayerAttackOption;
|
||||
import mage.constants.RangeOfInfluence;
|
||||
import mage.game.match.MatchType;
|
||||
import mage.game.mulligan.Mulligan;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author spjspj
|
||||
*/
|
||||
public class FreeformCommanderFreeForAll extends GameCommanderImpl {
|
||||
|
||||
private int numPlayers;
|
||||
|
||||
public FreeformCommanderFreeForAll(MultiplayerAttackOption attackOption, RangeOfInfluence range, Mulligan mulligan, int startLife) {
|
||||
super(attackOption, range, mulligan, startLife, 60);
|
||||
public FreeformCommanderFreeForAll(MultiplayerAttackOption attackOption, RangeOfInfluence range,
|
||||
Mulligan mulligan, int startLife, int startHandSize) {
|
||||
super(attackOption, range, mulligan, 60, startLife, startHandSize);
|
||||
}
|
||||
|
||||
public FreeformCommanderFreeForAll(final FreeformCommanderFreeForAll game) {
|
||||
|
|
@ -28,7 +29,7 @@ public class FreeformCommanderFreeForAll extends GameCommanderImpl {
|
|||
@Override
|
||||
protected void init(UUID choosingPlayerId) {
|
||||
startingPlayerSkipsDraw = false;
|
||||
super.init(choosingPlayerId);
|
||||
super.init(choosingPlayerId);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
|
|
@ -17,7 +17,12 @@ public class FreeformCommanderFreeForAllMatch extends MatchImpl {
|
|||
public void startGame() throws GameException {
|
||||
int startLife = 40;
|
||||
Mulligan mulligan = options.getMulliganType().getMulligan(options.getFreeMulligans());
|
||||
FreeformCommanderFreeForAll game = new FreeformCommanderFreeForAll(options.getAttackOption(), options.getRange(), mulligan, startLife);
|
||||
startLife = options.isCustomStartLifeEnabled() ? options.getCustomStartLife() : startLife;
|
||||
int startHandSize = options.isCustomStartHandSizeEnabled() ? options.getCustomStartHandSize() : 7;
|
||||
FreeformCommanderFreeForAll game = new FreeformCommanderFreeForAll(
|
||||
options.getAttackOption(), options.getRange(),
|
||||
mulligan, startLife, startHandSize
|
||||
);
|
||||
game.setStartMessage(this.createGameStartMessage());
|
||||
initGame(game);
|
||||
games.add(game);
|
||||
|
|
|
|||
|
|
@ -1,18 +1,20 @@
|
|||
|
||||
package mage.game;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.constants.MultiplayerAttackOption;
|
||||
import mage.constants.RangeOfInfluence;
|
||||
import mage.game.match.MatchType;
|
||||
import mage.game.mulligan.Mulligan;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
public class FreeformUnlimitedCommander extends GameCommanderImpl {
|
||||
|
||||
private int numPlayers;
|
||||
|
||||
public FreeformUnlimitedCommander(MultiplayerAttackOption attackOption, RangeOfInfluence range, Mulligan mulligan, int startLife) {
|
||||
super(attackOption, range, mulligan, startLife, 60);
|
||||
public FreeformUnlimitedCommander(MultiplayerAttackOption attackOption, RangeOfInfluence range,
|
||||
Mulligan mulligan, int startLife, int startHandSize) {
|
||||
super(attackOption, range, mulligan, 60, startLife, startHandSize);
|
||||
}
|
||||
|
||||
public FreeformUnlimitedCommander(final FreeformUnlimitedCommander game) {
|
||||
|
|
@ -25,7 +27,7 @@ public class FreeformUnlimitedCommander extends GameCommanderImpl {
|
|||
if (state.getPlayerList().size() > 2) {
|
||||
startingPlayerSkipsDraw = false;
|
||||
}
|
||||
super.init(choosingPlayerId);
|
||||
super.init(choosingPlayerId);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
|
|
@ -14,7 +14,12 @@ public class FreeformUnlimitedCommanderMatch extends MatchImpl {
|
|||
public void startGame() throws GameException {
|
||||
int startLife = 40;
|
||||
Mulligan mulligan = options.getMulliganType().getMulligan(options.getFreeMulligans());
|
||||
FreeformUnlimitedCommander game = new FreeformUnlimitedCommander(options.getAttackOption(), options.getRange(), mulligan, startLife);
|
||||
startLife = options.isCustomStartLifeEnabled() ? options.getCustomStartLife() : startLife;
|
||||
int startHandSize = options.isCustomStartHandSizeEnabled() ? options.getCustomStartHandSize() : 7;
|
||||
FreeformUnlimitedCommander game = new FreeformUnlimitedCommander(
|
||||
options.getAttackOption(), options.getRange(),
|
||||
mulligan, startLife, startHandSize
|
||||
);
|
||||
game.setStartMessage(this.createGameStartMessage());
|
||||
initGame(game);
|
||||
games.add(game);
|
||||
|
|
|
|||
|
|
@ -19,13 +19,13 @@ import mage.players.Player;
|
|||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author nigelzor
|
||||
*/
|
||||
public class MomirDuel extends GameImpl {
|
||||
|
||||
public MomirDuel(MultiplayerAttackOption attackOption, RangeOfInfluence range, Mulligan mulligan, int startLife) {
|
||||
super(attackOption, range, mulligan, startLife, 60, 7);
|
||||
public MomirDuel(MultiplayerAttackOption attackOption, RangeOfInfluence range,
|
||||
Mulligan mulligan, int startLife, int startHandSize) {
|
||||
super(attackOption, range, mulligan, 60, startLife, startHandSize);
|
||||
}
|
||||
|
||||
public MomirDuel(final MomirDuel game) {
|
||||
|
|
|
|||
|
|
@ -6,7 +6,6 @@ import mage.game.match.MatchOptions;
|
|||
import mage.game.mulligan.Mulligan;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author nigelzor
|
||||
*/
|
||||
public class MomirDuelMatch extends MatchImpl {
|
||||
|
|
@ -21,7 +20,12 @@ public class MomirDuelMatch extends MatchImpl {
|
|||
int startLife = 24;
|
||||
|
||||
Mulligan mulligan = options.getMulliganType().getMulligan(options.getFreeMulligans());
|
||||
MomirDuel game = new MomirDuel(options.getAttackOption(), options.getRange(), mulligan, startLife);
|
||||
startLife = options.isCustomStartLifeEnabled() ? options.getCustomStartLife() : startLife;
|
||||
int startHandSize = options.isCustomStartHandSizeEnabled() ? options.getCustomStartHandSize() : 7;
|
||||
MomirDuel game = new MomirDuel(
|
||||
options.getAttackOption(), options.getRange(),
|
||||
mulligan, startLife, startHandSize
|
||||
);
|
||||
game.setStartMessage(this.createGameStartMessage());
|
||||
|
||||
this.initGame(game);
|
||||
|
|
|
|||
|
|
@ -6,7 +6,6 @@ import mage.game.match.MatchOptions;
|
|||
import mage.game.mulligan.Mulligan;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author nigelzor
|
||||
*/
|
||||
public class MomirFreeForAllMatch extends MatchImpl {
|
||||
|
|
@ -21,7 +20,12 @@ public class MomirFreeForAllMatch extends MatchImpl {
|
|||
int startLife = 24;
|
||||
|
||||
Mulligan mulligan = options.getMulliganType().getMulligan(options.getFreeMulligans());
|
||||
MomirGame game = new MomirGame(options.getAttackOption(), options.getRange(), mulligan, startLife);
|
||||
startLife = options.isCustomStartLifeEnabled() ? options.getCustomStartLife() : startLife;
|
||||
int startHandSize = options.isCustomStartHandSizeEnabled() ? options.getCustomStartHandSize() : 7;
|
||||
MomirGame game = new MomirGame(
|
||||
options.getAttackOption(), options.getRange(),
|
||||
mulligan, startLife, startHandSize
|
||||
);
|
||||
game.setStartMessage(this.createGameStartMessage());
|
||||
|
||||
this.initGame(game);
|
||||
|
|
|
|||
|
|
@ -19,15 +19,15 @@ import mage.players.Player;
|
|||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author nigelzor
|
||||
*/
|
||||
public class MomirGame extends GameImpl {
|
||||
|
||||
private int numPlayers;
|
||||
|
||||
public MomirGame(MultiplayerAttackOption attackOption, RangeOfInfluence range, Mulligan mulligan, int startLife) {
|
||||
super(attackOption, range, mulligan, startLife, 60, 7);
|
||||
public MomirGame(MultiplayerAttackOption attackOption, RangeOfInfluence range,
|
||||
Mulligan mulligan, int startLife, int startHandSize) {
|
||||
super(attackOption, range, mulligan, 60, startLife, startHandSize);
|
||||
}
|
||||
|
||||
public MomirGame(final MomirGame game) {
|
||||
|
|
|
|||
|
|
@ -12,8 +12,8 @@ import java.util.UUID;
|
|||
*/
|
||||
public class OathbreakerDuel extends OathbreakerFreeForAll {
|
||||
|
||||
public OathbreakerDuel(MultiplayerAttackOption attackOption, RangeOfInfluence range, Mulligan mulligan, int startLife) {
|
||||
super(attackOption, range, mulligan, startLife);
|
||||
public OathbreakerDuel(MultiplayerAttackOption attackOption, RangeOfInfluence range, Mulligan mulligan, int startLife, int startHandSize) {
|
||||
super(attackOption, range, mulligan, startLife, startHandSize);
|
||||
this.startingPlayerSkipsDraw = true;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -15,9 +15,13 @@ public class OathbreakerDuelMatch extends MatchImpl {
|
|||
|
||||
@Override
|
||||
public void startGame() throws GameException {
|
||||
int startLife = 20;
|
||||
Mulligan mulligan = options.getMulliganType().getMulligan(options.getFreeMulligans());
|
||||
OathbreakerDuel game = new OathbreakerDuel(options.getAttackOption(), options.getRange(), mulligan, startLife);
|
||||
int startLife = options.isCustomStartLifeEnabled() ? options.getCustomStartLife() : 20;
|
||||
int startHandSize = options.isCustomStartHandSizeEnabled() ? options.getCustomStartHandSize() : 7;
|
||||
OathbreakerDuel game = new OathbreakerDuel(
|
||||
options.getAttackOption(), options.getRange(),
|
||||
mulligan, startLife, startHandSize
|
||||
);
|
||||
game.setCheckCommanderDamage(false);
|
||||
game.setStartMessage(this.createGameStartMessage());
|
||||
initGame(game);
|
||||
|
|
|
|||
|
|
@ -31,8 +31,9 @@ public class OathbreakerFreeForAll extends GameCommanderImpl {
|
|||
private static final String COMMANDER_NAME_OATHBREAKER = "Oathbreaker";
|
||||
private static final String COMMANDER_NAME_SIGNATURE_SPELL = "Signature Spell";
|
||||
|
||||
public OathbreakerFreeForAll(MultiplayerAttackOption attackOption, RangeOfInfluence range, Mulligan mulligan, int startLife) {
|
||||
super(attackOption, range, mulligan, startLife, 100);
|
||||
public OathbreakerFreeForAll(MultiplayerAttackOption attackOption, RangeOfInfluence range,
|
||||
Mulligan mulligan, int startLife, int startHandSize) {
|
||||
super(attackOption, range, mulligan, 100, startLife, startHandSize);
|
||||
this.startingPlayerSkipsDraw = false;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -15,9 +15,13 @@ public class OathbreakerFreeForAllMatch extends MatchImpl {
|
|||
|
||||
@Override
|
||||
public void startGame() throws GameException {
|
||||
int startLife = 20;
|
||||
Mulligan mulligan = options.getMulliganType().getMulligan(options.getFreeMulligans());
|
||||
OathbreakerFreeForAll game = new OathbreakerFreeForAll(options.getAttackOption(), options.getRange(), mulligan, startLife);
|
||||
int startLife = options.isCustomStartLifeEnabled() ? options.getCustomStartLife() : 20;
|
||||
int startHandSize = options.isCustomStartHandSizeEnabled() ? options.getCustomStartHandSize() : 7;
|
||||
OathbreakerFreeForAll game = new OathbreakerFreeForAll(
|
||||
options.getAttackOption(), options.getRange(),
|
||||
mulligan, startLife, startHandSize
|
||||
);
|
||||
game.setCheckCommanderDamage(false);
|
||||
game.setStartMessage(this.createGameStartMessage());
|
||||
initGame(game);
|
||||
|
|
|
|||
|
|
@ -2,22 +2,22 @@
|
|||
|
||||
package mage.game;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.constants.MultiplayerAttackOption;
|
||||
import mage.constants.RangeOfInfluence;
|
||||
import mage.game.match.MatchType;
|
||||
import mage.game.mulligan.Mulligan;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author spjspj
|
||||
*/
|
||||
public class PennyDreadfulCommanderFreeForAll extends GameCommanderImpl {
|
||||
|
||||
private int numPlayers;
|
||||
|
||||
public PennyDreadfulCommanderFreeForAll(MultiplayerAttackOption attackOption, RangeOfInfluence range, Mulligan mulligan, int startLife) {
|
||||
super(attackOption, range, mulligan, startLife, 60);
|
||||
public PennyDreadfulCommanderFreeForAll(MultiplayerAttackOption attackOption, RangeOfInfluence range, Mulligan mulligan, int startLife, int startHandSize) {
|
||||
super(attackOption, range, mulligan, 60, startLife, startHandSize);
|
||||
}
|
||||
|
||||
public PennyDreadfulCommanderFreeForAll(final PennyDreadfulCommanderFreeForAll game) {
|
||||
|
|
@ -28,7 +28,7 @@ public class PennyDreadfulCommanderFreeForAll extends GameCommanderImpl {
|
|||
@Override
|
||||
protected void init(UUID choosingPlayerId) {
|
||||
startingPlayerSkipsDraw = false;
|
||||
super.init(choosingPlayerId);
|
||||
super.init(choosingPlayerId);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
|
|
@ -20,7 +20,12 @@ public class PennyDreadfulCommanderFreeForAllMatch extends MatchImpl {
|
|||
startLife = 30;
|
||||
}
|
||||
Mulligan mulligan = options.getMulliganType().getMulligan(options.getFreeMulligans());
|
||||
PennyDreadfulCommanderFreeForAll game = new PennyDreadfulCommanderFreeForAll(options.getAttackOption(), options.getRange(), mulligan, startLife);
|
||||
startLife = options.isCustomStartLifeEnabled() ? options.getCustomStartLife() : startLife;
|
||||
int startHandSize = options.isCustomStartHandSizeEnabled() ? options.getCustomStartHandSize() : 7;
|
||||
PennyDreadfulCommanderFreeForAll game = new PennyDreadfulCommanderFreeForAll(
|
||||
options.getAttackOption(), options.getRange(),
|
||||
mulligan, startLife, startHandSize
|
||||
);
|
||||
game.setStartMessage(this.createGameStartMessage());
|
||||
initGame(game);
|
||||
games.add(game);
|
||||
|
|
|
|||
|
|
@ -8,13 +8,13 @@ import mage.game.match.MatchType;
|
|||
import mage.game.mulligan.Mulligan;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author JRHerlehy
|
||||
*/
|
||||
public class TinyLeadersDuel extends GameTinyLeadersImpl {
|
||||
|
||||
public TinyLeadersDuel(MultiplayerAttackOption attackOption, RangeOfInfluence range, Mulligan mulligan, int startLife) {
|
||||
super(attackOption, range, mulligan, startLife);
|
||||
public TinyLeadersDuel(MultiplayerAttackOption attackOption, RangeOfInfluence range,
|
||||
Mulligan mulligan, int startLife, int startHandSize) {
|
||||
super(attackOption, range, mulligan, startLife, startHandSize);
|
||||
}
|
||||
|
||||
public TinyLeadersDuel(final TinyLeadersDuel game) {
|
||||
|
|
|
|||
|
|
@ -7,7 +7,6 @@ import mage.game.match.MatchOptions;
|
|||
import mage.game.mulligan.Mulligan;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author JRHerlehy
|
||||
*/
|
||||
public class TinyLeadersDuelMatch extends MatchImpl {
|
||||
|
|
@ -22,9 +21,14 @@ public class TinyLeadersDuelMatch extends MatchImpl {
|
|||
int startLife = 25;
|
||||
|
||||
Mulligan mulligan = options.getMulliganType().getMulligan(options.getFreeMulligans());
|
||||
TinyLeadersDuel game = new TinyLeadersDuel(options.getAttackOption(), options.getRange(), mulligan, startLife);
|
||||
startLife = options.isCustomStartLifeEnabled() ? options.getCustomStartLife() : startLife;
|
||||
int startHandSize = options.isCustomStartHandSizeEnabled() ? options.getCustomStartHandSize() : 7;
|
||||
TinyLeadersDuel game = new TinyLeadersDuel(
|
||||
options.getAttackOption(), options.getRange(),
|
||||
mulligan, startLife, startHandSize
|
||||
);
|
||||
game.setStartMessage(this.createGameStartMessage());
|
||||
|
||||
|
||||
//Tucking a Tiny Leader is legal
|
||||
game.setAlsoHand(false);
|
||||
game.setAlsoLibrary(false);
|
||||
|
|
|
|||
|
|
@ -11,16 +11,9 @@ import java.util.UUID;
|
|||
|
||||
public class TwoPlayerDuel extends GameImpl {
|
||||
|
||||
public TwoPlayerDuel(MultiplayerAttackOption attackOption, RangeOfInfluence range, Mulligan mulligan, int startLife) {
|
||||
this(attackOption, range, mulligan, startLife, 60);
|
||||
}
|
||||
|
||||
public TwoPlayerDuel(MultiplayerAttackOption attackOption, RangeOfInfluence range, Mulligan mulligan, int startingLife, int minimumDeckSize) {
|
||||
this(attackOption, range, mulligan, startingLife, minimumDeckSize, 7);
|
||||
}
|
||||
|
||||
public TwoPlayerDuel(MultiplayerAttackOption attackOption, RangeOfInfluence range, Mulligan mulligan, int startingLife, int minimumDeckSize, int startingHandSize) {
|
||||
super(attackOption, range, mulligan, startingLife, minimumDeckSize, startingHandSize);
|
||||
public TwoPlayerDuel(MultiplayerAttackOption attackOption, RangeOfInfluence range, Mulligan mulligan,
|
||||
int minimumDeckSize, int startLife, int startHandSize) {
|
||||
super(attackOption, range, mulligan, minimumDeckSize, startLife, startHandSize);
|
||||
}
|
||||
|
||||
public TwoPlayerDuel(final TwoPlayerDuel game) {
|
||||
|
|
|
|||
|
|
@ -21,7 +21,12 @@ public class TwoPlayerMatch extends MatchImpl {
|
|||
// see comments from https://github.com/magefree/mage/commit/4874ad31c199ea573187ea2790268be3a4d4c95a
|
||||
boolean isLimitedDeck = options.isLimited() || "Limited".equals(options.getDeckType());
|
||||
|
||||
TwoPlayerDuel game = new TwoPlayerDuel(options.getAttackOption(), options.getRange(), mulligan, 20, isLimitedDeck ? 40 : 60);
|
||||
int startLife = options.isCustomStartLifeEnabled() ? options.getCustomStartLife() : 20;
|
||||
int startHandSize = options.isCustomStartHandSizeEnabled() ? options.getCustomStartHandSize() : 7;
|
||||
TwoPlayerDuel game = new TwoPlayerDuel(
|
||||
options.getAttackOption(), options.getRange(), mulligan,
|
||||
isLimitedDeck ? 40 : 60, startLife, startHandSize
|
||||
);
|
||||
// Sets a start message about the match score
|
||||
game.setStartMessage(this.createGameStartMessage());
|
||||
initGame(game);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue