[RVR] implement booster gen for Ravnica Remastered

includes mana-fixing slot

does not include retro frame details
This commit is contained in:
xenohedron 2023-12-26 16:39:45 -05:00
parent 062a9514fb
commit 451b17c300
2 changed files with 57 additions and 3 deletions

View file

@ -1,8 +1,17 @@
package mage.sets; package mage.sets;
import mage.cards.Card;
import mage.cards.ExpansionSet; import mage.cards.ExpansionSet;
import mage.cards.repository.CardCriteria;
import mage.cards.repository.CardInfo;
import mage.cards.repository.CardRepository;
import mage.constants.CardType;
import mage.constants.Rarity; import mage.constants.Rarity;
import mage.constants.SetType; import mage.constants.SetType;
import mage.util.RandomUtil;
import java.util.ArrayList;
import java.util.List;
/** /**
* @author TheElk801 * @author TheElk801
@ -17,8 +26,15 @@ public class RavnicaRemastered extends ExpansionSet {
private RavnicaRemastered() { private RavnicaRemastered() {
super("Ravnica Remastered", "RVR", ExpansionSet.buildDate(2024, 1, 12), SetType.SUPPLEMENTAL); super("Ravnica Remastered", "RVR", ExpansionSet.buildDate(2024, 1, 12), SetType.SUPPLEMENTAL);
this.hasBoosters = false; // needs booster gen info this.hasBoosters = true;
this.hasBasicLands = false; this.hasBasicLands = false;
this.maxCardNumberInBooster = 291;
this.numBoosterCommon = 10; // Retro frame variants not yet implemented for booster generation
this.numBoosterUncommon = 3;
this.numBoosterRare = 1;
this.ratioBoosterMythic = 7; // 60 rares not including the mana-fixing slot, and 20 mythics
this.numBoosterSpecial = 1; // mana-fixing slot
// reference: https://magic.wizards.com/en/news/feature/collecting-ravnica-remastered
cards.add(new SetCardInfo("Act of Treason", 99, Rarity.COMMON, mage.cards.a.ActOfTreason.class)); cards.add(new SetCardInfo("Act of Treason", 99, Rarity.COMMON, mage.cards.a.ActOfTreason.class));
cards.add(new SetCardInfo("Aetherize", 448, Rarity.UNCOMMON, mage.cards.a.Aetherize.class)); cards.add(new SetCardInfo("Aetherize", 448, Rarity.UNCOMMON, mage.cards.a.Aetherize.class));
@ -489,6 +505,44 @@ public class RavnicaRemastered extends ExpansionSet {
cards.add(new SetCardInfo("Yeva, Nature's Herald", 162, Rarity.RARE, mage.cards.y.YevaNaturesHerald.class)); cards.add(new SetCardInfo("Yeva, Nature's Herald", 162, Rarity.RARE, mage.cards.y.YevaNaturesHerald.class));
} }
@Override
protected List<CardInfo> findSpecialCardsByRarity(Rarity rarity) {
// Guildgates, shocklands, signets, chromatic lantern
List<CardInfo> cardInfos = new ArrayList<>();
cardInfos.addAll(CardRepository.instance.findCards(new CardCriteria()
.setCodes(this.code)
.rarities(rarity)
.types(CardType.LAND) // guildgates + shocklands
.maxCardNumber(maxCardNumberInBooster)));
cardInfos.addAll(CardRepository.instance.findCards(new CardCriteria()
.setCodes(this.code)
.rarities(rarity)
.nameContains("Signet")
.maxCardNumber(maxCardNumberInBooster)));
cardInfos.addAll(CardRepository.instance.findCards(new CardCriteria()
.setCodes(this.code)
.rarities(rarity)
.name("Chromatic Lantern")
.maxCardNumber(maxCardNumberInBooster)));
return cardInfos;
}
@Override
protected void addSpecialCards(List<Card> booster, int number) {
Rarity rarity;
int rarityKey = RandomUtil.nextInt(121);
if (rarityKey <= 11) {
rarity = Rarity.RARE; // shocklands or chromatic lantern each 1/121
} else if (rarityKey <= 11+40) {
rarity = Rarity.UNCOMMON; // signets 40/121
} else {
rarity = Rarity.COMMON; // guildgates 70/121
}
addToBooster(booster, getSpecialCardsByRarity(rarity));
}
// @Override // @Override
// public BoosterCollator createCollator() { // public BoosterCollator createCollator() {
// return new RavnicaRemasteredCollator(); // return new RavnicaRemasteredCollator();

View file

@ -328,11 +328,11 @@ public final class TheLostCavernsOfIxalan extends ExpansionSet {
cards.add(new SetCardInfo("The Belligerent", 225, Rarity.RARE, mage.cards.t.TheBelligerent.class)); cards.add(new SetCardInfo("The Belligerent", 225, Rarity.RARE, mage.cards.t.TheBelligerent.class));
cards.add(new SetCardInfo("The Core", 256, Rarity.RARE, mage.cards.t.TheCore.class)); cards.add(new SetCardInfo("The Core", 256, Rarity.RARE, mage.cards.t.TheCore.class));
cards.add(new SetCardInfo("The Enigma Jewel", 55, Rarity.MYTHIC, mage.cards.t.TheEnigmaJewel.class)); cards.add(new SetCardInfo("The Enigma Jewel", 55, Rarity.MYTHIC, mage.cards.t.TheEnigmaJewel.class));
cards.add(new SetCardInfo("The Everflowing Well", 363, Rarity.RARE, mage.cards.t.TheEverflowingWell.class)); cards.add(new SetCardInfo("The Everflowing Well", 363, Rarity.RARE, mage.cards.t.TheEverflowingWell.class));
cards.add(new SetCardInfo("The Grim Captain", 266, Rarity.RARE, mage.cards.t.TheGrimCaptain.class)); cards.add(new SetCardInfo("The Grim Captain", 266, Rarity.RARE, mage.cards.t.TheGrimCaptain.class));
cards.add(new SetCardInfo("The Millennium Calendar", 257, Rarity.MYTHIC, mage.cards.t.TheMillenniumCalendar.class)); cards.add(new SetCardInfo("The Millennium Calendar", 257, Rarity.MYTHIC, mage.cards.t.TheMillenniumCalendar.class));
cards.add(new SetCardInfo("The Mycotyrant", 235, Rarity.MYTHIC, mage.cards.t.TheMycotyrant.class)); cards.add(new SetCardInfo("The Mycotyrant", 235, Rarity.MYTHIC, mage.cards.t.TheMycotyrant.class));
cards.add(new SetCardInfo("The Myriad Pools", 363, Rarity.RARE, mage.cards.t.TheMyriadPools.class)); cards.add(new SetCardInfo("The Myriad Pools", 363, Rarity.RARE, mage.cards.t.TheMyriadPools.class));
cards.add(new SetCardInfo("The Skullspore Nexus", 212, Rarity.MYTHIC, mage.cards.t.TheSkullsporeNexus.class)); cards.add(new SetCardInfo("The Skullspore Nexus", 212, Rarity.MYTHIC, mage.cards.t.TheSkullsporeNexus.class));
cards.add(new SetCardInfo("The Tomb of Aclazotz", 126, Rarity.RARE, mage.cards.t.TheTombOfAclazotz.class)); cards.add(new SetCardInfo("The Tomb of Aclazotz", 126, Rarity.RARE, mage.cards.t.TheTombOfAclazotz.class));
cards.add(new SetCardInfo("Thousand Moons Crackshot", 37, Rarity.COMMON, mage.cards.t.ThousandMoonsCrackshot.class)); cards.add(new SetCardInfo("Thousand Moons Crackshot", 37, Rarity.COMMON, mage.cards.t.ThousandMoonsCrackshot.class));