Skip to content

Commit

Permalink
mtgmatcher: Do not duplicate P30H any more
Browse files Browse the repository at this point in the history
Downstream all adopted the non-JPN version as main.
  • Loading branch information
kodawah committed Apr 3, 2024
1 parent 5dfb778 commit ac4b8ab
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 24 deletions.
1 change: 0 additions & 1 deletion mtgmatcher/backend.go
Original file line number Diff line number Diff line change
Expand Up @@ -664,7 +664,6 @@ func NewDatastore(ap mtgjson.AllPrintings) {
duplicate(ap.Data, cards, uuids, "Legends Italian", "LEG", "ITA", "1995-09-01")
duplicate(ap.Data, cards, uuids, "The Dark Italian", "DRK", "ITA", "1995-08-01")
duplicate(ap.Data, cards, uuids, "Alternate Fourth Edition", "4ED", "ALT", "1995-04-01")
duplicate(ap.Data, cards, uuids, "30th Anniversary History Japanese Promos", "P30H", "JPN", "2022-09-09")

duplicateCards(ap.Data, cards, uuids, "SLD", "JPN", sldJPNLangDupes)
duplicateCards(ap.Data, cards, uuids, "PURL", "JPN", []string{"1"})
Expand Down
13 changes: 6 additions & 7 deletions mtgmatcher/callbacks.go
Original file line number Diff line number Diff line change
Expand Up @@ -190,13 +190,12 @@ var simpleFilterCallbacks = map[string]cardFilterCallback{

"BOT": shatteredCheck,

"MAT": retroCheck,
"MH2": retroCheck,
"P30H": retroCheck,
"P30HJPN": retroCheck,
"30A": retroCheck,
"PW23": retroCheck,
"RVR": retroCheck,
"MAT": retroCheck,
"MH2": retroCheck,
"P30H": retroCheck,
"30A": retroCheck,
"PW23": retroCheck,
"RVR": retroCheck,

"BRO": babOrBuyaboxRetroCheck,

Expand Down
12 changes: 2 additions & 10 deletions mtgmatcher/filter.go
Original file line number Diff line number Diff line change
Expand Up @@ -486,19 +486,11 @@ func filterPrintings(inCard *Card, editions []string) (printings []string) {

case inCard.Contains("30th"):
switch set.Code {
case "P30A", "P30H":
if inCard.isJPN() && inCard.Name != "Tarmogoyf" {
continue
}
case "P30HJPN":
if !inCard.isJPN() {
continue
}
case "P30A", "P30H", "P30M":
case "P30T":
if inCard.isRetro() {
if inCard.isRetro() || !inCard.isJPN() {
continue
}
case "P30M":
default:
continue
}
Expand Down
11 changes: 5 additions & 6 deletions mtgmatcher/mtgmatcher.go
Original file line number Diff line number Diff line change
Expand Up @@ -1012,14 +1012,13 @@ func adjustEdition(inCard *Card) {
edition = "ignored"
}

// Decouple P30A from P30H and its Japanese version
// Decouple P30A from P30H and P30T
case inCard.Contains("30th Anniversary") && !inCard.Contains("Edition") && !inCard.Contains("Tokyo") && !inCard.Contains("Misc") && len(MatchInSet(inCard.Name, "P30H")) > 0:
edition = backend.Sets["P30H"].Name
if inCard.Contains("Japanese") {
edition = backend.Sets["P30HJPN"].Name
} else if inCard.Name == "Serra Angel" && (!inCard.Contains("History") || ExtractYear(inCard.Variation) != "") {
edition = backend.Sets["P30A"].Name
maybeEdition := backend.Sets["P30H"].Name
if inCard.Name == "Serra Angel" && (!inCard.Contains("History") || ExtractYear(inCard.Variation) != "") {
maybeEdition = backend.Sets["P30A"].Name
}
edition = maybeEdition

// Oilslick lands may not have the bundle tag attached to them
case inCard.isBasicLand() && inCard.isOilSlick() && !inCard.isBundle():
Expand Down

0 comments on commit ac4b8ab

Please sign in to comment.