Skip to content

Commit

Permalink
mtgmatcher/mtgjson: Support doublerainbow promo, simplify SLD parsing…
Browse files Browse the repository at this point in the history
… code
  • Loading branch information
kodawah committed Dec 20, 2023
1 parent 5efc039 commit 4579c63
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 10 deletions.
15 changes: 5 additions & 10 deletions mtgmatcher/callbacks.go
Original file line number Diff line number Diff line change
Expand Up @@ -694,16 +694,11 @@ func sldVariant(inCard *Card, card *mtgjson.Card) bool {
if inCard.isStepAndCompleat() {
result = !result
}
case "Goblin Lackey",
"Goblin Matron",
"Goblin Recruiter",
"Muxus, Goblin Grandee",
"Shattergang Brothers",
"Aminatou, the Fateshifter",
"Chandra, Flame's Catalyst",
"Daretti, Ingenious Iconoclast",
"Karn, Scion of Urza",
"Venser, the Sojourner":
}
// All the DoubleRainbow SLD cards not serialized are tagged as two different entries
// ie Goblin Lackey or Aminatou, the Fateshifter
if hasPrinting(card.Name, "promo_type", mtgjson.PromoTypeDoubleRainbow, "SLD") &&
!hasPrinting(card.Name, "promo_type", mtgjson.PromoTypeSerialized, "SLD") {
result = strings.HasSuffix(card.Number, mtgjson.SuffixSpecial)
if inCard.Foil {
result = !result
Expand Down
2 changes: 2 additions & 0 deletions mtgmatcher/mtgjson/mtgjson.go
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,7 @@ const (
PromoTypeOilSlick = "oilslick"
PromoTypeConcept = "concept"
PromoTypeConfettiFoil = "confettifoil"
PromoTypeDoubleRainbow = "doublerainbow"

PromoTypeThickDisplay = "thick"
PromoTypeJudgeGift = "judgegift"
Expand Down Expand Up @@ -217,6 +218,7 @@ var AllPromoTypes = []string{
PromoTypeBuyABox,
PromoTypeConcept,
PromoTypeConfettiFoil,
PromoTypeDoubleRainbow,
PromoTypeDracula,
PromoTypeDraftWeekend,
PromoTypeEmbossed,
Expand Down

0 comments on commit 4579c63

Please sign in to comment.