Add support for MLP promo cards
This commit is contained in:
parent
e9e5ffdada
commit
0e2c613375
2 changed files with 15 additions and 0 deletions
10
mlp/card.go
10
mlp/card.go
|
@ -50,9 +50,19 @@ func LoadCardList(list []string, fetch bool) (out []Card, err error) {
|
||||||
err = ErrInvalidCardID
|
err = ErrInvalidCardID
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get Set ID
|
// Get Set ID
|
||||||
setid := SetID(strings.ToUpper(card[:2]))
|
setid := SetID(strings.ToUpper(card[:2]))
|
||||||
|
|
||||||
|
// Check for promo card
|
||||||
|
for _, promoid := range promoIDs {
|
||||||
|
if strings.ToLower(card) == promoid {
|
||||||
|
card = strings.ToLower(card)
|
||||||
|
setid = "promo"
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Get set
|
// Get set
|
||||||
var set *Set
|
var set *Set
|
||||||
if fetch {
|
if fetch {
|
||||||
|
|
5
mlp/promo.go
Normal file
5
mlp/promo.go
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
package mlp
|
||||||
|
|
||||||
|
var promoIDs = []string{
|
||||||
|
"prpf1", "prpf2", "prpf3", "prpf4", "prpf6", "cnpf3", "cnpf5", "cnpf7", "cnpf9", "cnpf11", "cnpf13", "cgpf4", "cgpf6", "cgpf8", "cgpf11", "cgpf12", "cgpf14", "gf1", "gf4", "gf5", "gf7", "gf9",
|
||||||
|
}
|
Loading…
Reference in a new issue