Initial pass at Golden Pack.
This commit is contained in:
@@ -60,7 +60,7 @@ func (cx *ctx) unseenPool(tier int) []game.Card {
|
||||
note(c)
|
||||
}
|
||||
var pool []game.Card
|
||||
for _, c := range game.TierContents(tier) {
|
||||
for _, c := range game.TierContentsForPack(cx.v.Pack, tier) {
|
||||
if seen[c.Name] > 0 {
|
||||
seen[c.Name]--
|
||||
continue
|
||||
@@ -78,7 +78,7 @@ func (cx *ctx) sampleOppDeck() []game.Card {
|
||||
deck := append([]game.Card(nil), cx.m.Opp.Known...)
|
||||
for _, h := range cx.m.Opp.Hidden {
|
||||
var c game.Card
|
||||
if t, ok := templateByName(h.Name); ok {
|
||||
if t, ok := templateByName(cx.v.Pack, h.Name); ok {
|
||||
c = t
|
||||
} else if pool := cx.unseenPool(h.Tier); len(pool) > 0 {
|
||||
c = pool[rand.IntN(len(pool))]
|
||||
|
||||
Reference in New Issue
Block a user