forked from External/mage
refactor: rename "remixed" to "reshuffled" (#12755)
This commit is contained in:
parent
d7fa7f673d
commit
54874a59b0
17 changed files with 88 additions and 88 deletions
|
|
@ -1,28 +0,0 @@
|
|||
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());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,28 @@
|
|||
package mage.game.draft;
|
||||
|
||||
import mage.cards.ExpansionSet;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class ReshuffledBoosterDraft extends BoosterDraft {
|
||||
|
||||
final ReshuffledSet reshuffledSet;
|
||||
|
||||
public ReshuffledBoosterDraft(DraftOptions options, List<ExpansionSet> sets) {
|
||||
super(options, sets);
|
||||
if (sets.isEmpty()){
|
||||
throw new IllegalStateException("At least one set must be selected for reshuffled booster draft");
|
||||
}
|
||||
reshuffledSet = new ReshuffledSet(sets, 10, 3, 1);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void openBooster() {
|
||||
if (boosterNum <= numberBoosters) {
|
||||
for (DraftPlayer player: players.values()) {
|
||||
player.setBooster(reshuffledSet.createBooster());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -16,7 +16,7 @@ import java.util.List;
|
|||
import java.util.Set;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
public class RemixedSet implements Serializable {
|
||||
public class ReshuffledSet implements Serializable {
|
||||
|
||||
protected final int numBoosterCommons;
|
||||
protected final int numBoosterUncommons;
|
||||
|
|
@ -29,11 +29,11 @@ public class RemixedSet implements Serializable {
|
|||
protected final List<CardInfo> specials;
|
||||
protected final double chanceMythic;
|
||||
|
||||
public RemixedSet (List<ExpansionSet> sets, int c, int u, int r) {
|
||||
public ReshuffledSet(List<ExpansionSet> sets, int c, int u, int r) {
|
||||
this(sets, c, u, r, 0);
|
||||
}
|
||||
|
||||
public RemixedSet(List<ExpansionSet> sets, int c, int u, int r, int special) {
|
||||
public ReshuffledSet(List<ExpansionSet> sets, int c, int u, int r, int special) {
|
||||
this.numBoosterCommons = c;
|
||||
this.numBoosterUncommons = u;
|
||||
this.numBoosterRares = r;
|
||||
|
|
@ -58,7 +58,7 @@ public class RemixedSet implements Serializable {
|
|||
List<CardInfo> cardInfos = CardRepository.instance.findCards(new CardCriteria()
|
||||
.setCodes(set.getCode())
|
||||
.rarities(rarity)
|
||||
.maxCardNumber(set.getMaxCardNumberInBooster())); // TODO: Make sure this parameter is set appropriately where needed
|
||||
.maxCardNumber(set.getMaxCardNumberInBooster()));
|
||||
|
||||
cardInfos.removeIf(next -> (
|
||||
next.getCardNumber().contains("*")
|
||||
|
|
@ -17,7 +17,7 @@ public class LimitedOptions implements Serializable {
|
|||
protected DraftCube draftCube;
|
||||
protected int numberBoosters;
|
||||
protected boolean isRandom;
|
||||
protected boolean isRemixed;
|
||||
protected boolean isReshuffled;
|
||||
protected boolean isRichMan;
|
||||
protected Deck cubeFromDeck;
|
||||
|
||||
|
|
@ -96,12 +96,12 @@ public class LimitedOptions implements Serializable {
|
|||
this.isRandom = isRandom;
|
||||
}
|
||||
|
||||
public boolean getIsRemixed() {
|
||||
return isRemixed;
|
||||
public boolean getIsReshuffled() {
|
||||
return isReshuffled;
|
||||
}
|
||||
|
||||
public void setIsRemixed(boolean isRemixed) {
|
||||
this.isRemixed = isRemixed;
|
||||
public void setIsReshuffled(boolean isReshuffled) {
|
||||
this.isReshuffled = isReshuffled;
|
||||
}
|
||||
|
||||
public boolean getIsRichMan() {
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ public class TournamentType implements Serializable {
|
|||
protected boolean limited; // else Constructed
|
||||
protected boolean elimination; // else Swiss
|
||||
protected boolean isRandom; // chaos draft
|
||||
protected boolean isRemixed; // boosters generated containing cards from multiple sets
|
||||
protected boolean isReshuffled; // boosters generated containing cards from multiple sets
|
||||
protected boolean isRichMan; // new boosters generated for each pick
|
||||
protected boolean isJumpstart;
|
||||
|
||||
|
|
@ -66,8 +66,8 @@ public class TournamentType implements Serializable {
|
|||
return this.isRandom;
|
||||
}
|
||||
|
||||
public boolean isRemixed() {
|
||||
return this.isRemixed;
|
||||
public boolean isReshuffled() {
|
||||
return this.isReshuffled;
|
||||
}
|
||||
|
||||
public boolean isRichMan() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue