+
Skip to content

Conversation

AlexNisnevich
Copy link
Member

@AlexNisnevich AlexNisnevich commented Oct 20, 2022

Rarities for cards in sets (close #1532):

  • Sets can optionally define rarities (common, uncommon, rare) for cards in that set. Either all cards or no cards in a given set can have rarities.
  • Rarities affect only the Set Draft format – they determine how often cards come up (on avg: 3 rare cards, 7 uncommon cards, 20 common cards per drafted deck of 30)
  • Cards display their rarities only when viewing/editing a set with rarities or drafting/playing in the Set Draft format
  • Corresponding documentation and validation (sets with card rarities enabled must have ≥4 cards of each rarity)

Bug fixes unrelated to card rarities:

const numCommonGroups = totalNumGroups - numUncommonGroups - numRareGroups;

return shuffle([
...new Array(numRareGroups).fill('rare'),
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: constants for rare, uncommon, common

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Better yet a const enum

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

eh, the typechecker already kind of makes sure things are fine here

@AlexNisnevich AlexNisnevich merged commit da58fec into main Oct 21, 2022
@AlexNisnevich AlexNisnevich deleted the an-set-rarities branch October 21, 2022 03:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载