ProjectIgnis / CardScripts

Project Ignis card script libraries and canonical card scripts for EDOPro. Send bug reports through Discord only!
86 stars 59 forks source link

Update and cleanup the Xyz procedure #1130

Open edo9300 opened 3 months ago

edo9300 commented 3 months ago

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.)