Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rewrite Trashing, Trash Effects #4558

Merged
merged 6 commits into from Oct 16, 2019

Conversation

NoahTheDuke
Copy link
Collaborator

Right now, we are not rules accurate with regards to trashing. There aren't formal rules in the CR just yet, but the process very much follows the other systems, and we currently don't adhere to it.

The way we have it now is:

  1. Take in a list of cards (or 1 card for trash and make it a list)
  2. Async step over every single card and check for prevention
  3. Call trigger-event-sync :X-trash on all of the cards
  4. Whatever hasn't been prevented we now step over one-by-one, move it to the discard, and then where appropriate call :trash-effect on.

The way it should work is:

  1. Take in the list of cards or single cards and make a list
  2. Async step over every single card and check for prevention (will change to be simultaneous in the future, when I redo prevention)
  3. Move all cards to the trash
  4. Gather all :trash-effects that apply
  5. Call trigger-event-simult :X-trash and pass all of the :trash-effects in as :card-abilities, so that they can be properly ordered

This requires rewriting the core/rules logic to adhere to the new steps and rewriting/cleaning up all of the card implementations that rely on the previous incorrect ideas.

@NoahTheDuke NoahTheDuke merged commit 23a2b85 into mtgred:master Oct 16, 2019
@NoahTheDuke NoahTheDuke deleted the nb/rewrite-trash-effects branch October 16, 2019 02:12
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.

None yet

1 participant