-- as of 2025 May, there is no card can add LOCATION_MZONE base on material group. So we can just check pre_select_mat_location.
-- as of 2025 May, there is no card can add LOCATION_MZONE base on material group. So we can just check pre_select_mat_location.
e1:SetLabel(0xff,LOCATION_MZONE)--- only avaliable when pre_select_mat_location contains LOCATION_MZONE, 1st number is limitaion of count materials, set 0xff as a placeholder
e1:SetLabel(0,LOCATION_MZONE)--- only avaliable when pre_select_mat_location contains LOCATION_MZONE, 1st number is limitaion of count materials, set 0 as infinity
@@ -2397,7 +2397,7 @@ function FusionSpell.CreateSummonEffect(c,opts)
...
@@ -2397,7 +2397,7 @@ function FusionSpell.CreateSummonEffect(c,opts)
mat_operation_code_map,
mat_operation_code_map,
post_select_mat_location,
post_select_mat_location,
additional_fcheck,
additional_fcheck,
additional_gcheck,
additional_fgoalcheck,
fuslocation,
fuslocation,
sumtype,
sumtype,
sumpos,
sumpos,
...
@@ -2412,7 +2412,7 @@ function FusionSpell.CreateSummonEffect(c,opts)
...
@@ -2412,7 +2412,7 @@ function FusionSpell.CreateSummonEffect(c,opts)
mat_operation_code_map,
mat_operation_code_map,
post_select_mat_location,
post_select_mat_location,
additional_fcheck,
additional_fcheck,
additional_gcheck,
additional_fgoalcheck,
fuslocation,
fuslocation,
sumtype,
sumtype,
sumpos,
sumpos,
...
@@ -2429,8 +2429,8 @@ end
...
@@ -2429,8 +2429,8 @@ end
---@param pre_select_mat_location integer|FUSION_SPELL_PRE_SELECT_MAT_LOCATION_FUNCTION location where to find the materials before known the materials
---@param pre_select_mat_location integer|FUSION_SPELL_PRE_SELECT_MAT_LOCATION_FUNCTION location where to find the materials before known the materials
---@param mat_operation_code_map {[integer]:FUSION_OPERATION_CODE}[] operation code to do for the materials, it will be check in order
---@param mat_operation_code_map {[integer]:FUSION_OPERATION_CODE}[] operation code to do for the materials, it will be check in order
---@param post_select_mat_location integer? location where to find the materials after known the materials
---@param post_select_mat_location integer? location where to find the materials after known the materials
---@param additional_fcheck FUSION_FGCHECK_FUNCTION function to check the final material group fits the requirement
---@param additional_fcheck FUSION_FGCHECK_FUNCTION function to check the partial material group fits the requirement
---@param additional_gcheck FUSION_FGCHECK_FUNCTION function to check the part of potiential material group fits the requirement to improve performance
---@param additional_fgoalcheck FUSION_FGCHECK_FUNCTION function to check the final material group fits the requirement
---@param fuslocation integer location where to summon fusion monsters from (default LOCATION_EXTRA), use it on Clock Lizard
---@param fuslocation integer location where to summon fusion monsters from (default LOCATION_EXTRA), use it on Clock Lizard
---@param sumtype integer summon type
---@param sumtype integer summon type
---@param sumpos integer summon position
---@param sumpos integer summon position
...
@@ -2444,7 +2444,7 @@ function FusionSpell.GetSummonTarget(
...
@@ -2444,7 +2444,7 @@ function FusionSpell.GetSummonTarget(
mat_operation_code_map,
mat_operation_code_map,
post_select_mat_location,
post_select_mat_location,
additional_fcheck,
additional_fcheck,
additional_gcheck,
additional_fgoalcheck,
fuslocation,
fuslocation,
sumtype,
sumtype,
sumpos,
sumpos,
...
@@ -2460,13 +2460,13 @@ function FusionSpell.GetSummonTarget(
...
@@ -2460,13 +2460,13 @@ function FusionSpell.GetSummonTarget(
---@param pre_select_mat_location integer|FUSION_SPELL_PRE_SELECT_MAT_LOCATION_FUNCTION location where to find the materials before known the materials
---@param pre_select_mat_location integer|FUSION_SPELL_PRE_SELECT_MAT_LOCATION_FUNCTION location where to find the materials before known the materials
---@param mat_operation_code_map {[integer]:FUSION_OPERATION_CODE}[] operation code to do for the materials, it will be check in order
---@param mat_operation_code_map {[integer]:FUSION_OPERATION_CODE}[] operation code to do for the materials, it will be check in order
---@param post_select_mat_location integer? location where to find the materials after known the materials
---@param post_select_mat_location integer? location where to find the materials after known the materials
---@param additional_fcheck function function to check the final material group fits the requirement
---@param additional_fcheck FUSION_FGCHECK_FUNCTION function to check the partial material group fits the requirement
---@param additional_gcheck function function to check the part of potiential material group fits the requirement to improve performance
---@param additional_fgoalcheck FUSION_FGCHECK_FUNCTION function to check the final material group fits the requirement
---@param fuslocation integer location where to summon fusion monsters from, use it on Clock Lizard
---@param fuslocation integer location where to summon fusion monsters from, use it on Clock Lizard
---@param sumtype integer summon type
---@param sumtype integer summon type
---@param sumpos integer summon position
---@param sumpos integer summon position
...
@@ -2498,7 +2498,7 @@ function FusionSpell.GetSummonOperation(
...
@@ -2498,7 +2498,7 @@ function FusionSpell.GetSummonOperation(
mat_operation_code_map,
mat_operation_code_map,
post_select_mat_location,
post_select_mat_location,
additional_fcheck,
additional_fcheck,
additional_gcheck,
additional_fgoalcheck,
fuslocation,
fuslocation,
sumtype,
sumtype,
sumpos,
sumpos,
...
@@ -2510,12 +2510,12 @@ function FusionSpell.GetSummonOperation(
...
@@ -2510,12 +2510,12 @@ function FusionSpell.GetSummonOperation(
---@param pre_select_mat_location integer|function location where to find the materials before known the materials (default LOCATION_HAND|LOCATION_MZONE)
---@param pre_select_mat_location integer|function location where to find the materials before known the materials (default LOCATION_HAND|LOCATION_MZONE)
---@param pre_select_mat_opponent_location integer|FUSION_SPELL_PRE_SELECT_MAT_LOCATION_FUNCTION location where to find the materials before known the materials on opponent location
---@param pre_select_mat_opponent_location integer|FUSION_SPELL_PRE_SELECT_MAT_LOCATION_FUNCTION location where to find the materials before known the materials on opponent location
--- filter out materials that does not necessary come from fusion spell and pass to the gcheck of fusion spell
--- filter out materials that does not necessary come from fusion spell and pass to the gcheck of fusion spell
--- for each extra material effect, check the maximuim size is not exceeded.
--- for each extra material effect, check the maximuim size is not exceeded.
--As of 2025 May, if a material could be used as extra material, it must be able to be used as fusion spell material. The code below is based on this assumption.
--- As of 2025 May, if a material could (but not forced) be used as extra material, it must be able to be used as fusion spell material. The code below is based on this assumption.
-- If we have Aiラブ融合 + 影牢の呪縛 or 多層融合 + アマゾネスの秘術 in same archetype, is code would fail in some scenario.
--- If we have Aiラブ融合 + 影牢の呪縛 or 多層融合 + アマゾネスの秘術 in same archetype, is code would fail in some scenario.
---@param pre_select_mat_location integer|function location where to find the materials before known the materials (default LOCATION_HAND|LOCATION_MZONE)