More UX improvements.
This commit is contained in:
+10
-6
@@ -901,13 +901,17 @@ func (g *Game) buildShopDecks() {
|
||||
}
|
||||
}
|
||||
|
||||
// Catalog returns one representative card for every pet and food in the game,
|
||||
// tier by tier, for the debug "buy any card" panel. IDs are name-based
|
||||
// Catalog returns the default pack's representative cards.
|
||||
func Catalog() []Card { return CatalogForPack(DefaultPack) }
|
||||
|
||||
// CatalogForPack returns one representative card for every pet and food in a
|
||||
// pack, tier by tier, for the debug "buy any card" panel. IDs are name-based
|
||||
// placeholders (not real instances); pets use their first printed suit.
|
||||
func Catalog() []Card {
|
||||
func CatalogForPack(pack string) []Card {
|
||||
pets, foods := packTiers(pack)
|
||||
var cards []Card
|
||||
for tierIdx := range petTiers {
|
||||
for _, t := range petTiers[tierIdx] {
|
||||
for tierIdx := range pets {
|
||||
for _, t := range pets[tierIdx] {
|
||||
suit := SuitRed
|
||||
if len(t.Suits) > 0 {
|
||||
suit = t.Suits[0]
|
||||
@@ -917,7 +921,7 @@ func Catalog() []Card {
|
||||
Power: t.Power, Suit: suit, Effects: t.Effects, EffectText: t.EffectText,
|
||||
})
|
||||
}
|
||||
for _, f := range foodTiers[tierIdx] {
|
||||
for _, f := range foods[tierIdx] {
|
||||
cards = append(cards, Card{
|
||||
ID: "food-" + f.Name, Kind: KindFood, Name: f.Name, Tier: tierIdx + 1,
|
||||
Food: f.Food, Perk: f.Perk, Effects: f.Effects, EffectText: f.EffectText,
|
||||
|
||||
Reference in New Issue
Block a user