mirror of
https://github.com/correl/mage.git
synced 2025-01-12 19:25:44 +00:00
Merge pull request #9152 from sprangg/LimitedFix
Improvements to constructed matches with limited decks
This commit is contained in:
commit
72ec981508
3 changed files with 6 additions and 6 deletions
|
@ -604,7 +604,7 @@ public class NewTableDialog extends MageDialog {
|
|||
options.getPlayerTypes().add(player.getPlayerType());
|
||||
}
|
||||
options.setDeckType((String) this.cbDeckType.getSelectedItem());
|
||||
options.setLimited(false);
|
||||
options.setLimited(options.getDeckType().startsWith("Limited"));
|
||||
options.setMatchTimeLimit((MatchTimeLimit) this.cbTimeLimit.getSelectedItem());
|
||||
options.setAttackOption((MultiplayerAttackOption) this.cbAttackOption.getSelectedItem());
|
||||
options.setSkillLevel((SkillLevel) this.cbSkillLevel.getSelectedItem());
|
||||
|
|
|
@ -1314,7 +1314,7 @@ public class NewTournamentDialog extends MageDialog {
|
|||
tOptions.getLimitedOptions().setDraftCubeName("");
|
||||
tOptions.getMatchOptions().setDeckType((String) this.cbDeckType.getSelectedItem());
|
||||
tOptions.getMatchOptions().setGameType(((GameTypeView) this.cbGameType.getSelectedItem()).getName());
|
||||
tOptions.getMatchOptions().setLimited(false);
|
||||
tOptions.getMatchOptions().setLimited(tOptions.getMatchOptions().getDeckType().startsWith("Limited"));
|
||||
}
|
||||
|
||||
String serverAddress = SessionHandler.getSession().getServerHostname().orElse("");
|
||||
|
|
|
@ -425,7 +425,7 @@ public class TablesPanel extends javax.swing.JPanel {
|
|||
UUID tableId = (UUID) tableModel.getValueAt(modelRow, TablesTableModel.ACTION_COLUMN + 3);
|
||||
UUID gameId = (UUID) tableModel.getValueAt(modelRow, TablesTableModel.ACTION_COLUMN + 2);
|
||||
String action = (String) tableModel.getValueAt(modelRow, TablesTableModel.ACTION_COLUMN);
|
||||
String deckType = (String) tableModel.getValueAt(modelRow, TablesTableModel.COLUMN_DECK_TYPE);
|
||||
String gameType = (String) tableModel.getValueAt(modelRow, TablesTableModel.COLUMN_GAME_TYPE);
|
||||
boolean isTournament = (Boolean) tableModel.getValueAt(modelRow, TablesTableModel.ACTION_COLUMN + 1);
|
||||
String owner = (String) tableModel.getValueAt(modelRow, TablesTableModel.COLUMN_OWNER);
|
||||
String pwdColumn = (String) tableModel.getValueAt(modelRow, TablesTableModel.COLUMN_PASSWORD);
|
||||
|
@ -454,14 +454,14 @@ public class TablesPanel extends javax.swing.JPanel {
|
|||
}
|
||||
if (isTournament) {
|
||||
LOGGER.info("Joining tournament " + tableId);
|
||||
if (deckType.startsWith("Limited")) {
|
||||
if (!gameType.startsWith("Constructed")) {
|
||||
if (TablesTableModel.PASSWORD_VALUE_YES.equals(pwdColumn)) {
|
||||
joinTableDialog.showDialog(roomId, tableId, true, deckType.startsWith("Limited"));
|
||||
joinTableDialog.showDialog(roomId, tableId, true, !gameType.startsWith("Constructed"));
|
||||
} else {
|
||||
SessionHandler.joinTournamentTable(roomId, tableId, SessionHandler.getUserName(), PlayerType.HUMAN, 1, null, "");
|
||||
}
|
||||
} else {
|
||||
joinTableDialog.showDialog(roomId, tableId, true, deckType.startsWith("Limited"));
|
||||
joinTableDialog.showDialog(roomId, tableId, true, !gameType.startsWith("Constructed"));
|
||||
}
|
||||
} else {
|
||||
LOGGER.info("Joining table " + tableId);
|
||||
|
|
Loading…
Reference in a new issue