-
Notifications
You must be signed in to change notification settings - Fork 846
Rework transforming DFCs in a more gradual manner #13882
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
base: master
Are you sure you want to change the base?
Conversation
|
Can you please write out an explanation of what you are actually aiming to accomplish here and how? |
|
Yeah, totally. I realize this might be hard to follow without some explanation. |
|
alright, I've rewritten the main post |
|
Would it be too much to refactor if instead, there is a Additionally, cards that can Meld are (by mtg rules) also DFCs and can potentially use much of the same code as DFCs. Though they would require a ton more work to refactor, and have their own separate issues. |
|
yeah, that's already the plan but it can't be done within the scope of this PR |
|
Will be superseded by #14061 |
When I first started on #10385, my goal was to have transforming double-faced cards work more like modal double-faced cards, where the card would be a single class representing both faces. I got pretty far into it, and I think a lot of what I did is still good, but I ultimately ran into issues that I couldn't figure out how to fix.
Unfortunately, the nature of the project meant that all TDFCs had to be refactored first, so every time new ones were released they would have to be implemented the old way on the main branch and then the PR would be have to be updated as well. The branch got outdated fast and I never got back to it.
I still think this undertaking is worthwhile, but in the meantime I realized that we can refactor the cards while still using the old method under the hood. This means that we don't have to have a PR that's constantly being updated on the side but the cards are ready to go when the engine is finally reworked. I've converted Cloistered Youth to the new format and added tests to make sure it still works as it should.
A few things are still necessary, like
secondSideCardClazzandnightCard, plus new methods likefinalizeDFC, but those are easy to remove all at once. Additionally, the back half of the card will still need to exist for now.I'm very open to feedback on this, but I think this is essentially the right way forward for now.