Suit shades#1403
Open
MetaNite64 wants to merge 2 commits into
Open
Conversation
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.
This is a small feature that allows SMODS.Suit objects to be classified into "shades". By default, Diamonds and Hearts count as "light" suits while Clubs and Spades are "dark" suits. This is mainly just a way to centralize and formalize the light and dark suit classifications that many mods use already (e.g. Paperback, Madcap, Bunco, UNIK's mod, even POLTERWORX).
Important additions:
SMODS.Suitdefinitions may now specifyshade = "something", where the shade can be any string at all."dark"and"light"are used in the vanilla suit definitions. If no shade is provided, it's just left asnil.card.base.shadeis the same string (or nil) as specified in the suit definition.Card:is_suit_shade(shade, bypass_debuff)is a new function that works very similarly toCard:is_suit. You pass a string for the shade, and the function checks if the relevant card counts as at least one suit that matches that shade.Food for thought:
It may be interesting to make Smeared Joker make every suit of the same shade count as each other, instead of just explicitly laying out the 4 vanilla suits. However, that would require a description change, and is probably not suited for SMODS itself.
Allowing wild cards (and other stuff that counts as any suit) to count as any shade, even if there are no suits in-game that actually match that shade?
I know y'all want to put new util functions in separate files in the new utils folder, but
Card:is_suit_shadewas so small I figured it wouldn't be out of place in the main utils.lua file until that gets fully split up. I can certainly move it if desiredAdditional Info: