mage/Mage.Server.Plugins/Mage.Game.MomirGame/src/mage/game/MomirFreeForAllMatch.java
Susucre f14479c53c
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
2023-10-06 23:22:48 -04:00

35 lines
1 KiB
Java

package mage.game;
import mage.game.match.MatchImpl;
import mage.game.match.MatchOptions;
import mage.game.mulligan.Mulligan;
/**
* @author nigelzor
*/
public class MomirFreeForAllMatch extends MatchImpl {
public MomirFreeForAllMatch(MatchOptions options) {
super(options);
}
@Override
public void startGame() throws GameException {
// Momir Vig, Simic Visionary gives +4 starting life
int startLife = 24;
Mulligan mulligan = options.getMulliganType().getMulligan(options.getFreeMulligans());
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);
games.add(game);
}
}