New feature: "Chaos Remixed" booster draft (#10328)

* Fix error in draft pick logger that was failing on chaos drafts with fewer than 3 sets

* Implement Remixed Booster Draft

* Add debug test

* minor cleanup

* Cleanup unnecessary checks

* Fix elimination tournament type

* Add note for future improvement
This commit is contained in:
xenohedron 2023-05-12 10:12:23 -04:00 committed by GitHub
parent 6d4e353867
commit 4cc9329b15
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
20 changed files with 437 additions and 47 deletions

View file

@ -0,0 +1,28 @@
package mage.game.draft;
import mage.cards.ExpansionSet;
import java.util.List;
public class RemixedBoosterDraft extends BoosterDraft {
final RemixedSet remixedSet;
public RemixedBoosterDraft(DraftOptions options, List<ExpansionSet> sets) {
super(options, sets);
if (sets.isEmpty()){
throw new RuntimeException("At least one set must be selected for remixed booster draft");
}
remixedSet = new RemixedSet(sets, 10, 3, 1);
}
@Override
protected void openBooster() {
if (boosterNum <= numberBoosters) {
for (DraftPlayer player: players.values()) {
player.setBooster(remixedSet.createBooster());
}
}
}
}