Skip to content

context.discard_from_play and context.draw_individual#931

Open
the-Astra wants to merge 4 commits intoSteamodded:mainfrom
the-Astra:feature/individual_draw_discard_from_play_contexts
Open

context.discard_from_play and context.draw_individual#931
the-Astra wants to merge 4 commits intoSteamodded:mainfrom
the-Astra:feature/individual_draw_discard_from_play_contexts

Conversation

@the-Astra
Copy link
Contributor

@the-Astra the-Astra commented Aug 28, 2025

Adds two new contexts:

  • context.discard_from_play: Runs for each card discarded after being played
  • context.draw_individual: Runs for each card drawn from deck to hand

Both contexts also run with context.card, the card being drawn/discarded, and num_drawn/discarded, the number of cards (including the current one) that have been drawn/discarded out of the group of cards to be drawn/discarded. context.draw_individual has a unique argument to_booster, which is a boolean that indicates if the card is being drawn as a result of a booster being opened.

Returning stay_flipped as a boolean will dictate whether or not a card will stay flipped on draw/discard, and returning cardarea as a string (i.e. 'discard') will change what area the card will be drawn/discarded to. The cardarea argument gets ignored when to_booster is true.

Additional Info:

  • I didn't modify api's or I've made a PR to the wiki repo.
  • I didn't modify api's or I've updated lsp definitions.
  • I didn't make new lovely files or all new lovely files have appropriate priority.

@english5040
Copy link
Collaborator

Yeah sounds like a good idea; will code review

Copy link
Collaborator

@english5040 english5040 left a comment

Choose a reason for hiding this comment

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

This generally seems good

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants