Weight modifier cards so they're dealt more often#120
Open
turkosaurus wants to merge 2 commits into
Open
Conversation
GameCardsInitGeneric numbered rows with ROW_NUMBER() before the random LIMIT, so the dealt subset carried scattered slot numbers and could leave a slot under-filled (or empty). Select the dealt cards in a CTE first, then number them in the outer query, restoring the even "3 deep per slot" spread while keeping the weighted modifiers always dealt.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Makes the modifier cards (flip, shred, clone, transfer) show up more often than other generic cards.
Changes
weightcolumn tocards(default 1), and set it to 2 for the four modifier cards.GameCardsInitGenericexpands each card intoweightcopies viagenerate_series, orders by weight so the modifiers are always dealt, then fills the rest of the deck at random.LIMIT.The
weightcolumn is added both in theCREATE TABLEand viaALTER TABLE ... ADD COLUMN IF NOT EXISTS, so fresh and existing databases both pick it up on startup.