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
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue