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

Refactor: type choice dialogs must be improved same way as ChoiceCreatureType #13114

Open
JayDi85 opened this issue Dec 4, 2024 · 0 comments
Labels
refactoring Developers topics about code and programming

Comments

@JayDi85
Copy link
Member

JayDi85 commented Dec 4, 2024

ChoiceCreatureType was improved to use helper data about player/opponents types (#8478) -- it's require to use keys choices instead string choices. There are some choice dialogs with old logic and string result -- it can lead to typos like #13106 (fix e3a94c8). All usages of ChoiceCreatureType are fine now.

So all that choice dialogs must be refactored same way:

  • use key/values instead string;
  • enrich choice data with player/opponent stats (mark choice options as my/opponent);
  • manual replace all usages of refactored dialogs from xxx.getChoice() to xxx.getChoiceKey()

Dialogs to refactor:

  • ChoiceBasicLandType
  • ChoiceCardType
  • ChoiceLandType
  • ChoiceColor and ChoiceColorOrArtifact -- if possible
@JayDi85 JayDi85 added the refactoring Developers topics about code and programming label Dec 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
refactoring Developers topics about code and programming
Projects
None yet
Development

No branches or pull requests

1 participant