Add a function to simplify revealing cards #7739
Merged
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.
Closes #7729
Essentially, I added a
reveal-loud
function,reveal-loud [state side eid card args & targets]
, which stratifies the cards and prints them out nicely for you.You can optionally pass in
and-then
as an arg, to format it like "[x] reveals ([y] from [z], ..) [and then]". Additionally, theand-then
part of the argument matches the pattern ([it]|[them]) and inserts the correct form depending on if there are one or multiple cards being revealed - because I found this quite awkward to do in code, and I found a few places where I would need to do it (ie revealing 1 card with gatekeeper/adjustment vs. revealing 2).I cleaned up all the cards which were cumbersome and ugly looking. I also updated
name-zone
to refer tostack, heap, grip
asthe stack, the heap, the grip
, and updated the exactly one part of the code-base where that was relevant. This means functions relying on name-zone don't need to double-check what they enter to see if they need to add an article to it.For example, Gatekeeper (I also made it print out that it's shuffling when you say no). The only difference in terms of player experience is that this will correctly say "it" instead of "them" when there is one card shuffled in.
Before:
After (the msg key is cut entirely because it's not needed anymore):
The other two big cleanups were bring them home and attitude adjustment. Angel Arena also didn't reveal before (probably done before revealing was an event), it does now.