-
Notifications
You must be signed in to change notification settings - Fork 787
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
136 additions
and
0 deletions.
There are no files selected for viewing
30 changes: 30 additions & 0 deletions
30
...ins/Mage.Tournament.BoosterDraft/src/mage/tournament/RichManCubeDraftSwissTournament.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
package mage.tournament; | ||
|
||
import mage.constants.TournamentPlayerState; | ||
import mage.game.draft.DraftOptions; | ||
import mage.game.draft.RichManCubeBoosterDraft; | ||
import mage.game.events.TableEvent; | ||
import mage.game.tournament.TournamentOptions; | ||
import mage.game.tournament.TournamentPlayer; | ||
|
||
/** | ||
* | ||
* @author glee- | ||
*/ | ||
public class RichManCubeDraftSwissTournament extends BoosterDraftSwissTournament { | ||
|
||
public RichManCubeDraftSwissTournament(TournamentOptions options) { | ||
super(options); | ||
} | ||
|
||
@Override | ||
protected void draft() { | ||
draft = new RichManCubeBoosterDraft((DraftOptions) options.getLimitedOptions(), getSets()); | ||
for (TournamentPlayer player : players.values()) { | ||
draft.addPlayer(player.getPlayer()); | ||
player.setState(TournamentPlayerState.DRAFTING); | ||
} | ||
tableEventSource.fireTableEvent(TableEvent.EventType.START_DRAFT, null, draft); | ||
} | ||
|
||
} |
22 changes: 22 additions & 0 deletions
22
...Mage.Tournament.BoosterDraft/src/mage/tournament/RichManCubeDraftSwissTournamentType.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
package mage.tournament; | ||
|
||
import mage.game.tournament.TournamentType; | ||
|
||
/** | ||
* | ||
* @author glee- | ||
*/ | ||
public class RichManCubeDraftSwissTournamentType extends TournamentType { | ||
|
||
public RichManCubeDraftSwissTournamentType() { | ||
this.name = "Booster Draft Swiss (Rich Man Cube)"; | ||
this.maxPlayers = 16; | ||
this.minPlayers = 2; | ||
this.numBoosters = 1; | ||
this.draft = true; | ||
this.limited = true; | ||
this.cubeBooster = true; | ||
this.elimination = false; | ||
} | ||
|
||
} |
54 changes: 54 additions & 0 deletions
54
...Plugins/Mage.Tournament.BoosterDraft/src/mage/tournament/RichManDraftSwissTournament.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
package mage.tournament; | ||
|
||
import mage.constants.TournamentPlayerState; | ||
import mage.game.draft.DraftOptions; | ||
import mage.game.draft.RichManBoosterDraft; | ||
import mage.game.events.TableEvent; | ||
import mage.game.tournament.TournamentOptions; | ||
import mage.game.tournament.TournamentPlayer; | ||
|
||
/** | ||
* | ||
* @author glee- | ||
*/ | ||
public class RichManDraftSwissTournament extends BoosterDraftSwissTournament { | ||
public RichManDraftSwissTournament(TournamentOptions options) { | ||
super(options); | ||
} | ||
|
||
@Override | ||
protected void draft() { | ||
draft = new RichManBoosterDraft((DraftOptions) options.getLimitedOptions(), getSets()); | ||
for (TournamentPlayer player : players.values()) { | ||
draft.addPlayer(player.getPlayer()); | ||
player.setState(TournamentPlayerState.DRAFTING); | ||
} | ||
tableEventSource.fireTableEvent(TableEvent.EventType.START_DRAFT, null, draft); | ||
} | ||
|
||
@Override | ||
public void nextStep() { | ||
if (isAbort()) { | ||
currentStep = TournamentStep.COMPETE; | ||
} | ||
switch (currentStep) { | ||
case START: | ||
currentStep = TournamentStep.DRAFT; | ||
draft(); | ||
break; | ||
case DRAFT: | ||
currentStep = TournamentStep.CONSTRUCT; | ||
construct(); | ||
break; | ||
case CONSTRUCT: | ||
currentStep = TournamentStep.COMPETE; | ||
runTournament(); | ||
break; | ||
case COMPETE: | ||
currentStep = TournamentStep.WINNERS; | ||
winners(); | ||
end(); | ||
break; | ||
} | ||
} | ||
} |
24 changes: 24 additions & 0 deletions
24
...ins/Mage.Tournament.BoosterDraft/src/mage/tournament/RichManDraftSwissTournamentType.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
package mage.tournament; | ||
|
||
import mage.game.tournament.TournamentType; | ||
|
||
/** | ||
* | ||
* @author glee- | ||
*/ | ||
public class RichManDraftSwissTournamentType extends TournamentType { | ||
|
||
public RichManDraftSwissTournamentType() { | ||
this.name = "Booster Draft Swiss (Rich Man)"; | ||
this.maxPlayers = 16; | ||
this.minPlayers = 2; | ||
this.numBoosters = 1; | ||
this.draft = true; | ||
this.limited = true; | ||
this.cubeBooster = false; | ||
this.elimination = false; | ||
this.isRandom = false; | ||
this.isRichMan = true; | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters