Skip to content

Commit

Permalink
Added more game mode and deck type combinations for commander;
Browse files Browse the repository at this point in the history
  • Loading branch information
JayDi85 committed Mar 29, 2019
1 parent ff640a9 commit f8b9e3d
Showing 1 changed file with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -631,10 +631,14 @@ private MatchOptions getMatchOptions() {
* @return
*/
private boolean checkMatchOptions(MatchOptions options) {

// deck => game
switch (options.getDeckType()) {
case "Variant Magic - Commander":
case "Variant Magic - Duel Commander":
case "Variant Magic - MTGO 1v1 Commander":
case "Variant Magic - Freeform Commander":
case "Variant Magic - Penny Dreadful Commander":
if (!options.getGameType().startsWith("Commander")) {
JOptionPane.showMessageDialog(MageFrame.getDesktop(), "Deck type Commander needs also a Commander game type", "Error", JOptionPane.ERROR_MESSAGE);
return false;
Expand All @@ -660,12 +664,16 @@ private boolean checkMatchOptions(MatchOptions options) {
}
break;
}

// game => deck
switch (options.getGameType()) {
case "Commander Two Player Duel":
case "Commander Free For All":
if (!options.getDeckType().equals("Variant Magic - Commander")
&& !options.getDeckType().equals("Variant Magic - Duel Commander")
&& !options.getDeckType().equals("Variant Magic - MTGO 1v1 Commander")) {
&& !options.getDeckType().equals("Variant Magic - MTGO 1v1 Commander")
&& !options.getDeckType().equals("Variant Magic - Freeform Commander")
&& !options.getDeckType().equals("Variant Magic - Penny Dreadful Commander")) {
JOptionPane.showMessageDialog(MageFrame.getDesktop(), "Deck type Commander needs also a Commander game type", "Error", JOptionPane.ERROR_MESSAGE);
return false;
}
Expand Down

0 comments on commit f8b9e3d

Please sign in to comment.