Skip to content

Conversation

@edo9300
Copy link
Member

@edo9300 edo9300 commented Apr 9, 2024

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

EFFECT_XYZ_MAT_FROM_GRAVE           = 511002793
EFFECT_SPELL_XYZ_MAT                = 511000189 --Solid Overlay and similar cards
EFFECT_EQUIP_SPELL_XYZ_MAT          = 511001175
EFFECT_ORICHALCUM_CHAIN             = 511002116
EFFECT_DOUBLE_XYZ_MATERIAL          = 511001225
EFFECT_SATELLARKNIGHT_CAPELLA       = 86466163
EFFECT_STAR_SERAPH_SOVEREIGNTY      = 91110378

The behaviour for the "automatic material selection" has been also changed to make it less bug prone, now if must_use is provided to Duel.XyzSummon and if minc and maxc both correspond to the size of the must_use group, then no user selection will be performed (Advanced Heraldry Art, Shining Hope Road, etc.). This changes the current behaviour, so that if only mg is provided to Duel.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 pass maxc and minc 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 in Xyz.AddProcedure instead of passing the magic value 99, 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 pass 99 to indicate infinite materials.)

@edo9300 edo9300 requested review from larry126 and pyrQ as code owners April 9, 2024 14:17
@edo9300 edo9300 force-pushed the xyz-proc-cleanup branch from 9f7a162 to acfcbae Compare May 19, 2024 09:27
@edo9300 edo9300 force-pushed the xyz-proc-cleanup branch 7 times, most recently from 0d5ba9c to 8c22c61 Compare January 14, 2025 22:31
edo9300 added 17 commits April 19, 2025 10:32
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
The value for now is set to '99', but will be updated to an unique token value in future
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
Use the parameters according to the new way required by the xyz proc
Halfway to Forever
Gazer Shark
Galaxy Tyranno
Geargia Change
Artifacts Unleashed
Advanced Heraldry Art
Shining Hope Road
Destiny overlay
Dimension Xyz
The Phantom Knights' Twin Medals
D/D/D Xyz
Salamangreat Zebroid X (Anime)
@edo9300 edo9300 merged commit 125f7ab into master Apr 19, 2025
1 check passed
@edo9300 edo9300 deleted the xyz-proc-cleanup branch April 19, 2025 09:30
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.

1 participant