Update and cleanup the Xyz procedure #1130
Open
+735
−1,086
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.)