diff --git a/Mage.Server.Plugins/Mage.Game.CommanderDuel/src/mage/game/CommanderDuelType.java b/Mage.Server.Plugins/Mage.Game.CommanderDuel/src/mage/game/CommanderDuelType.java index 137bc0c089..e09c720a50 100644 --- a/Mage.Server.Plugins/Mage.Game.CommanderDuel/src/mage/game/CommanderDuelType.java +++ b/Mage.Server.Plugins/Mage.Game.CommanderDuel/src/mage/game/CommanderDuelType.java @@ -43,6 +43,7 @@ public class CommanderDuelType extends MatchType { this.numTeams = 0; this.useAttackOption = false; this.useRange = false; + this.sideboardingAllowed = false; } protected CommanderDuelType(final CommanderDuelType matchType) { diff --git a/Mage.Server.Plugins/Mage.Game.CommanderFreeForAll/src/mage/game/CommanderFreeForAllType.java b/Mage.Server.Plugins/Mage.Game.CommanderFreeForAll/src/mage/game/CommanderFreeForAllType.java index 9c090de691..bad316a901 100644 --- a/Mage.Server.Plugins/Mage.Game.CommanderFreeForAll/src/mage/game/CommanderFreeForAllType.java +++ b/Mage.Server.Plugins/Mage.Game.CommanderFreeForAll/src/mage/game/CommanderFreeForAllType.java @@ -44,6 +44,7 @@ public class CommanderFreeForAllType extends MatchType { this.numTeams = 0; this.useAttackOption = true; this.useRange = true; + this.sideboardingAllowed = false; } protected CommanderFreeForAllType(final CommanderFreeForAllType matchType) { diff --git a/Mage.Server.Plugins/Mage.Game.FreeForAll/src/mage/game/FreeForAllType.java b/Mage.Server.Plugins/Mage.Game.FreeForAll/src/mage/game/FreeForAllType.java index bb73023f86..2687e32747 100644 --- a/Mage.Server.Plugins/Mage.Game.FreeForAll/src/mage/game/FreeForAllType.java +++ b/Mage.Server.Plugins/Mage.Game.FreeForAll/src/mage/game/FreeForAllType.java @@ -43,6 +43,7 @@ public class FreeForAllType extends MatchType { this.numTeams = 0; this.useAttackOption = true; this.useRange = true; + this.sideboardingAllowed = true; } protected FreeForAllType(final FreeForAllType matchType) { diff --git a/Mage.Server.Plugins/Mage.Game.TwoPlayerDuel/src/mage/game/TwoPlayerDuelType.java b/Mage.Server.Plugins/Mage.Game.TwoPlayerDuel/src/mage/game/TwoPlayerDuelType.java index cf607daf5f..57dfbe0de7 100644 --- a/Mage.Server.Plugins/Mage.Game.TwoPlayerDuel/src/mage/game/TwoPlayerDuelType.java +++ b/Mage.Server.Plugins/Mage.Game.TwoPlayerDuel/src/mage/game/TwoPlayerDuelType.java @@ -43,6 +43,7 @@ public class TwoPlayerDuelType extends MatchType { this.numTeams = 0; this.useAttackOption = false; this.useRange = false; + this.sideboardingAllowed = true; } protected TwoPlayerDuelType(final TwoPlayerDuelType matchType) { diff --git a/Mage.Server/src/main/java/mage/server/TableController.java b/Mage.Server/src/main/java/mage/server/TableController.java index 6e950d9dc3..69dab317e5 100644 --- a/Mage.Server/src/main/java/mage/server/TableController.java +++ b/Mage.Server/src/main/java/mage/server/TableController.java @@ -735,7 +735,9 @@ public class TableController { GameManager.getInstance().removeGame(game.getId()); try { if (!match.hasEnded()) { - sideboard(); + if (match.getGame().getGameType().isSideboardingAllowed()) { + sideboard(); + } if (!match.hasEnded()) { startGame(choosingPlayerId); } else { diff --git a/Mage/src/mage/game/match/MatchType.java b/Mage/src/mage/game/match/MatchType.java index 6dbb83f248..ce3a05347f 100644 --- a/Mage/src/mage/game/match/MatchType.java +++ b/Mage/src/mage/game/match/MatchType.java @@ -43,6 +43,7 @@ public abstract class MatchType implements Serializable { protected int playersPerTeam; protected boolean useRange; protected boolean useAttackOption; + protected boolean sideboardingAllowed; protected MatchType() {} @@ -54,6 +55,7 @@ public abstract class MatchType implements Serializable { this.playersPerTeam = matchType.playersPerTeam; this.useRange = matchType.useRange; this.useAttackOption = matchType.useAttackOption; + this.sideboardingAllowed = matchType.sideboardingAllowed; } public abstract MatchType copy(); @@ -91,4 +93,8 @@ public abstract class MatchType implements Serializable { return useAttackOption; } + public boolean isSideboardingAllowed() { + return sideboardingAllowed; + } + }