Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MKM] Murders at Karlov Manor Collation #12978

Open
wants to merge 22 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 12 additions & 9 deletions Mage.Sets/src/mage/sets/MurdersAtKarlovManor.java
Original file line number Diff line number Diff line change
Expand Up @@ -484,15 +484,18 @@ private MurdersAtKarlovManor() {
cards.add(new SetCardInfo("Yarus, Roar of the Old Gods", 375, Rarity.RARE, mage.cards.y.YarusRoarOfTheOldGods.class, NON_FULL_USE_VARIOUS));
}

// @Override
// protected void generateBoosterMap() {
// super.generateBoosterMap();
// CardRepository
// .instance
// .findCards(new CardCriteria().setCodes("SPG"))
// .stream()
// .forEach(cardInfo -> inBoosterMap.put("SPG_" + cardInfo.getCardNumber(), cardInfo));
// }
@Override
protected void generateBoosterMap() {
super.generateBoosterMap();
for( let cn = 19 ; cn < 29 ; cn++ ){
inBoosterMap.put("SPG_" + cn, CardRepository.instance.findCard("SPG", "" + cn));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Must check findCard result and save only non nullable values. inBoosterMap allow only good objects. Also on null values you can raise error about unknown card (it will help to find typo or non-implemented cards in booster settings).

IMG_0900

}
String[] lstCards = {"XLN_91", "DKA_4", "MH2_191", "HOU_149", "RAV_277", "ARB_68", "DIS_173", "ISD_183", "DOM_130", "MH2_46", "RNA_182", "ONS_272", "SOM_96", "VOW_207", "MBS_10", "UMA_138", "DDU_50", "2X2_17", "KLD_221", "M14_213", "UMA_247", "CLB_85", "JOU_153", "APC_117", "STX_220", "SOI_262", "DIS_33", "DKA_143", "ELD_107", "C16_47", "STX_64", "M20_167", "DST_40", "ONS_89", "WAR_54", "MRD_99", "SOM_98", "C21_19", "MH1_21", "RTR_140"};
for( String itm : lstCards ){
int i = itm.indexOf("_");
inBoosterMap.put(itm, CardRepository.instance.findCard(itm.substring(0,i), itm.substring(i+1)));
}
}

@Override
public BoosterCollator createCollator() {
Expand Down
Loading