Page 1 of 1

Extension allowing formats to be constrained by card rarity

PostPosted: 04 Dec 2017, 21:36
by lukegothic
Some people were requesting to be able to filter Pauper legal cards while building their Pauper decks, so I extended the format reader and it is now able to understand a new parameter on the format definitions called Rarities. You can put there any combination of valid rarities separated by commas, for instance:
Code: Select all
Rarities: Common, Uncommon
So, to support Pauper format, you would put this in either res/blockdata/formats.txt or your customformats.txt:
Code: Select all
[Pauper]
Banned:Cloud of Faeries; Cloudpost; Cranial Plating; Empty the Warrens; Frantic Search; Grapeshot; Invigorate; Peregrine Drake; Temporal Fissure; Treasure Cruise; Goblin Grenade; High Tide; Hymn to Tourach; Sinkhole
Rarities:Common
Code-wise, the patch just throws some code into the class GameFormat so it can use this new information, and while filtering cards, if the Rarities parameter is present it adds a new predicate to the filtering function checking for card rarity.

Included patch: