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:
Susucre 2023-10-07 05:22:48 +02:00 committed by GitHub
parent 3e6097b70e
commit f14479c53c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
76 changed files with 1230 additions and 929 deletions

View file

@ -101,12 +101,18 @@ public class TableView implements Serializable {
addInfo.append("Wins:").append(table.getMatch().getWinsNeeded());
addInfo.append(" Time: ").append(table.getMatch().getOptions().getMatchTimeLimit().toString());
addInfo.append(" Buffer: ").append(table.getMatch().getOptions().getMatchBufferTime().toString());
if (table.getMatch().getOptions().getMulliganType() != MulliganType.GAME_DEFAULT){
if (table.getMatch().getOptions().getMulliganType() != MulliganType.GAME_DEFAULT) {
addInfo.append(" Mulligan: \"").append(table.getMatch().getOptions().getMulliganType().toString()).append("\"");
}
if (table.getMatch().getFreeMulligans() > 0) {
addInfo.append(" FM: ").append(table.getMatch().getFreeMulligans());
}
if (table.getMatch().getOptions().isCustomStartLifeEnabled()) {
addInfo.append(" StartLife: ").append(table.getMatch().getOptions().getCustomStartLife());
}
if (table.getMatch().getOptions().isCustomStartHandSizeEnabled()) {
addInfo.append(" StartHandSize: ").append(table.getMatch().getOptions().getCustomStartHandSize());
}
} else {
addInfo.append("Wins:").append(table.getMatch().getWinsNeeded());
addInfo.append(sbScore.toString());
@ -118,7 +124,7 @@ public class TableView implements Serializable {
addInfo.append(" PC");
}
if (!(table.getMatch().getOptions().getPerPlayerEmblemCards().isEmpty())
|| !(table.getMatch().getOptions().getGlobalEmblemCards().isEmpty())) {
|| !(table.getMatch().getOptions().getGlobalEmblemCards().isEmpty())) {
addInfo.append(" EC");
}
if (table.getMatch().getOptions().isSpectatorsAllowed()) {
@ -162,12 +168,18 @@ public class TableView implements Serializable {
MatchOptions tourneyMatchOptions = table.getTournament().getOptions().getMatchOptions();
infoText.append(" Time: ").append(tourneyMatchOptions.getMatchTimeLimit().toString());
infoText.append(" Buffer: ").append(tourneyMatchOptions.getMatchBufferTime().toString());
if (tourneyMatchOptions.getMulliganType() != MulliganType.GAME_DEFAULT){
if (tourneyMatchOptions.getMulliganType() != MulliganType.GAME_DEFAULT) {
infoText.append(" Mulligan: \"").append(tourneyMatchOptions.getMulliganType().toString()).append("\"");
}
if (tourneyMatchOptions.getFreeMulligans() > 0) {
infoText.append(" FM: ").append(tourneyMatchOptions.getFreeMulligans());
}
if (table.getMatch().getOptions().isCustomStartLifeEnabled()) {
infoText.append(" StartLife: ").append(table.getMatch().getOptions().getCustomStartLife());
}
if (table.getMatch().getOptions().isCustomStartHandSizeEnabled()) {
infoText.append(" StartHandSize: ").append(table.getMatch().getOptions().getCustomStartHandSize());
}
if (table.getTournament().getTournamentType().isLimited()) {
infoText.append(" Constr.: ").append(table.getTournament().getOptions().getLimitedOptions().getConstructionTime() / 60).append(" Min.");
}
@ -188,7 +200,7 @@ public class TableView implements Serializable {
if (table.getTournament().getOptions().isWatchingAllowed()) {
infoText.append(" SP");
}
break;
case DUELING:
stateText.append(" Round: ").append(table.getTournament().getRounds().size());