-
-
Notifications
You must be signed in to change notification settings - Fork 63
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
Update and cleanup the Xyz procedure #1130
Open
edo9300
wants to merge
29
commits into
master
Choose a base branch
from
xyz-proc-cleanup
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
It was used when the xyz had an extra filter function on its materials while parsing EFFECT_SPELL_XYZ_MAT, being it a random generic token with properties this check is redoundant and most of the times it won't work, as if a card has a filter then it requires specific properties from the monster, now EFFECT_SPELL_XYZ_MAT will only be applied if the xyz has no filter function
Remove repeated checks for GetCardEffect, also properly short circuit the recursive function if a valid material set is found
Add more early returns and avoid extra recursions
Use the same function to check for a valid summonable xyz
If a must material group is passed to the xyz proc, and the min and max values match the size of that group, then if those materials are valid within the material group, the selection will be skipped
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Do a major cleanup of the xyz procedure removing various redoundancies and trying to make the code less convoluted.
All the various effects affecting the xyz procedure have been assigned a proper constant to make them more easily usable by other cards
The behaviour for the "automatic material selection" has been also changed to make it less bug prone, now if
must_use
is provided toDuel.XyzSummon
and ifminc
andmaxc
both correspond to the size of themust_use
group, then no user selection will be performed (Advanced Heraldry Art, Shining Hope Road, etc.). This changes the current behaviour, so that if onlymg
is provided toDuel.XyzSummon
, the player will still be able to select the cards, making so cards that summon using a specific material pool (Galaxy Tyranno, Goblin Biker Grand Stampede, etc.) no longer have to passmaxc
andminc
to not break things. Cards got updated accordingly.Another minor thing that got changed, is the addition of the new "constant"
Xyz.InfiniteMats
, to be used inXyz.AddProcedure
instead of passing the magic value99
, to abstract away the logic from the user. (In future it will then be declared as a sentinel value making people no longer able to pass99
to indicate infinite materials.)