add foul magics set
Some checks failed
/ example-docker-compose (push) Has been cancelled

This commit is contained in:
Failure 2024-11-30 00:56:55 -08:00
parent 2f18bb3787
commit 4d5884c5ba
7 changed files with 67 additions and 1 deletions

View file

@ -68,7 +68,8 @@ public class GathererSets implements Iterable<DownloadJob> {
// "PALP" -- Gatherer does not have the set Asia Pacific Land Program // "PALP" -- Gatherer does not have the set Asia Pacific Land Program
// "ATH" -- has cards from many sets, symbol does not exist on gatherer // "ATH" -- has cards from many sets, symbol does not exist on gatherer
// "CP", "DPA", "PELP", "PGPX", "PGRU", "H17", "JR", "SWS", // need to fix // "CP", "DPA", "PELP", "PGPX", "PGRU", "H17", "JR", "SWS", // need to fix
"H09", "PD2", "PD3", "UNH", "CM1", "V11", "A25", "UST", "IMA", "DD2", "EVG", "DDC", "DDE", "DDD", "CHR", "G18", "GVL", "S00", "S99", "UGL" // ok "H09", "PD2", "PD3", "UNH", "CM1", "V11", "A25", "UST", "IMA", "DD2", "EVG", "DDC", "DDE", "DDD", "CHR", "G18", "GVL", "S00", "S99", "UGL", // ok
"FOUL"
// current testing // current testing
}; };
@ -168,6 +169,8 @@ public class GathererSets implements Iterable<DownloadJob> {
codeReplacements.put("USG", "UZ"); codeReplacements.put("USG", "UZ");
codeReplacements.put("VIS", "VI"); codeReplacements.put("VIS", "VI");
codeReplacements.put("WTH", "WL"); codeReplacements.put("WTH", "WL");
// ??? maybe
codeReplacements.put("FOUL", "FDN");
} }
public GathererSets() { public GathererSets() {

View file

@ -2,6 +2,8 @@ package org.mage.plugins.card.dl.sources;
import org.tritonus.share.ArraySet; import org.tritonus.share.ArraySet;
import mage.sets.FoulMagics;
import java.util.HashMap; import java.util.HashMap;
import java.util.Locale; import java.util.Locale;
import java.util.Map; import java.util.Map;
@ -566,6 +568,7 @@ public class ScryfallImageSupportCards {
add("FDN"); // Foundations add("FDN"); // Foundations
add("J25"); // Foundations Jumpstart add("J25"); // Foundations Jumpstart
add("DFT"); // Aetherdrift add("DFT"); // Aetherdrift
add("FOUL"); // FOUL FUCKING MAGICS
// Custom sets using Scryfall images - must provide a direct link for each card in directDownloadLinks // Custom sets using Scryfall images - must provide a direct link for each card in directDownloadLinks
add("CALC"); // Custom Alchemized versions of existing cards add("CALC"); // Custom Alchemized versions of existing cards

View file

@ -1,5 +1,6 @@
package org.mage.plugins.card.images; package org.mage.plugins.card.images;
import mage.sets.FoulMagics;
import mage.util.CardUtil; import mage.util.CardUtil;
import java.util.Objects; import java.util.Objects;
@ -26,6 +27,7 @@ public class CardDownloadData {
this.collectorId = collectorId; this.collectorId = collectorId;
this.isUsesVariousArt = isUsesVariousArt; this.isUsesVariousArt = isUsesVariousArt;
this.imageNumber = imageNumber; this.imageNumber = imageNumber;
this.seekSet();
} }
public CardDownloadData(final CardDownloadData card) { public CardDownloadData(final CardDownloadData card) {
@ -39,6 +41,18 @@ public class CardDownloadData {
this.isFlippedSide = card.isFlippedSide; this.isFlippedSide = card.isFlippedSide;
this.isSplitCard = card.isSplitCard; this.isSplitCard = card.isSplitCard;
this.isUsesVariousArt = card.isUsesVariousArt; this.isUsesVariousArt = card.isUsesVariousArt;
this.seekSet();
}
public void seekSet() {
// I love hardcoding exceptions
if (this.set.equals("FOUL")) {
System.out.println(this.name);
System.out.println(this.collectorId);
this.set = FoulMagics.getInstance().setMap.get(this.name).get(this.collectorId);
}
} }
@Override @Override

View file

@ -1310,6 +1310,7 @@ public class CardView extends SimpleCardView {
if (expansionSetCode == null) { if (expansionSetCode == null) {
expansionSetCode = ""; expansionSetCode = "";
} }
return expansionSetCode; return expansionSetCode;
} }

View file

@ -0,0 +1,43 @@
package mage.sets;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import mage.cards.ExpansionSet;
import mage.constants.SetType;
/**
* @author Failure
*/
public final class FoulMagics extends ExpansionSet {
public HashMap<String, HashMap<String, String>> setMap = new HashMap<String, HashMap<String, String>>();
private static final FoulMagics instance = new FoulMagics();
public static FoulMagics getInstance() {
return instance;
}
private FoulMagics() {
super("Foul Magics", "FOUL", ExpansionSet.buildDate(2024, 11, 29), SetType.EXPANSION);
this.blockName = "Foul Magics"; // for sorting in GUI
this.hasBasicLands = true;
this.hasBoosters = false; // temporary
List<ExpansionSet> sets = new ArrayList<ExpansionSet>();
sets.add(Foundations.getInstance());
sets.add(GuildsOfRavnica.getInstance());
sets.add(ReturnToRavnica.getInstance());
for (ExpansionSet set : sets) {
for (SetCardInfo card : set.getSetCardInfo()) {
cards.add(card);
setMap.putIfAbsent(card.getName(), new HashMap<String, String>());
setMap.get(card.getName()).put(card.getCardNumber(), set.getCode());
}
}
}
}

View file

@ -97,6 +97,7 @@ Fallen Empires|FallenEmpires|
Fate Reforged|FateReforged| Fate Reforged|FateReforged|
Fifth Dawn|FifthDawn| Fifth Dawn|FifthDawn|
Fifth Edition|FifthEdition| Fifth Edition|FifthEdition|
Foul Magics|FoulMagics|
Foundations|Foundations| Foundations|Foundations|
Foundations Jumpstart|FoundationsJumpstart| Foundations Jumpstart|FoundationsJumpstart|
Fourth Edition|FourthEdition| Fourth Edition|FourthEdition|

View file

@ -113,6 +113,7 @@ Fallen Empires|FEM|
Friday Night Magic|FNMP| Friday Night Magic|FNMP|
Fate Reforged|FRF| Fate Reforged|FRF|
Foundations|FDN| Foundations|FDN|
Foul Magics|FOUL|
Foundations Jumpstar|J25| Foundations Jumpstar|J25|
Future Sight|FUT| Future Sight|FUT|
Global Series: Jiang Yanggu & Mu Yanling|GS1| Global Series: Jiang Yanggu & Mu Yanling|GS1|