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
|
|
@ -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