--- A helper function to speed to material check. if 2 cards that would contribute same effect to fcheck, the signature should return same thingy (that could be a key of table), used for 煉獄の虚夢
--- @field fcheck_signature? fun(mc:Card):any
--- Add LOCATION_EXTRA and opponent mzone to EFFECT_EXTRA_FUSION_MATERIAL list, remove once core updated
--- Add LOCATION_EXTRA and opponent mzone to EFFECT_EXTRA_FUSION_MATERIAL list, remove once core updated
...
@@ -2337,6 +2339,7 @@ function FusionSpell.CreateSummonEffect(c,opts)
...
@@ -2337,6 +2339,7 @@ function FusionSpell.CreateSummonEffect(c,opts)
@@ -2365,7 +2368,8 @@ function FusionSpell.CreateSummonEffect(c,opts)
...
@@ -2365,7 +2368,8 @@ function FusionSpell.CreateSummonEffect(c,opts)
fusion_spell_matfilter,
fusion_spell_matfilter,
skip_summon_check,
skip_summon_check,
skip_location_count_check,
skip_location_count_check,
locked_codes
locked_codes,
fcheck_signature
))
))
e1:SetOperation(FusionSpell.GetSummonOperation(
e1:SetOperation(FusionSpell.GetSummonOperation(
fusfilter,
fusfilter,
...
@@ -2384,7 +2388,8 @@ function FusionSpell.CreateSummonEffect(c,opts)
...
@@ -2384,7 +2388,8 @@ function FusionSpell.CreateSummonEffect(c,opts)
gc,
gc,
fusion_spell_matfilter,
fusion_spell_matfilter,
skip_summon_check,
skip_summon_check,
locked_codes
locked_codes,
fcheck_signature
))
))
e1:SetDescription(1169)--- 融合召喚
e1:SetDescription(1169)--- 融合召喚
returne1
returne1
...
@@ -2408,6 +2413,7 @@ end
...
@@ -2408,6 +2413,7 @@ end
---@param skip_summon_check boolean whether skip the IsCanBeSpecialSummoned check, for クロック・リザード
---@param skip_summon_check boolean whether skip the IsCanBeSpecialSummoned check, for クロック・リザード
---@param skip_location_count_check boolean Whether skip the location count check, default false, used for 叛逆の堕天使
---@param skip_location_count_check boolean Whether skip the location count check, default false, used for 叛逆の堕天使
---@param locked_codes (integer[]|fun(tc:Card):integer[]) Locked code, material code that can not use substitutes, used for 烙印融合
---@param locked_codes (integer[]|fun(tc:Card):integer[]) Locked code, material code that can not use substitutes, used for 烙印融合
---@param fcheck_signature (fun(mc:Card):any)|nil A helper function to speed to material check. if 2 cards that would contribute same effect to fcheck, the signature should return same thingy (that could be a key of table), used for 煉獄の虚夢
functionFusionSpell.GetSummonTarget(
functionFusionSpell.GetSummonTarget(
fusfilter,
fusfilter,
matfilter,
matfilter,
...
@@ -2426,7 +2432,8 @@ function FusionSpell.GetSummonTarget(
...
@@ -2426,7 +2432,8 @@ function FusionSpell.GetSummonTarget(
fusion_spell_matfilter,
fusion_spell_matfilter,
skip_summon_check,
skip_summon_check,
skip_location_count_check,
skip_location_count_check,
locked_codes
locked_codes,
fcheck_signature
)
)
returnfunction(e,tp,eg,ep,ev,re,r,rp,chk)
returnfunction(e,tp,eg,ep,ev,re,r,rp,chk)
ifchk==0then
ifchk==0then
...
@@ -2452,7 +2459,8 @@ function FusionSpell.GetSummonTarget(
...
@@ -2452,7 +2459,8 @@ function FusionSpell.GetSummonTarget(
fusion_spell_matfilter,
fusion_spell_matfilter,
skip_summon_check,
skip_summon_check,
skip_location_count_check,
skip_location_count_check,
locked_codes)
locked_codes,
fcheck_signature)
end,
end,
tp,fuslocation,0,1,nil)
tp,fuslocation,0,1,nil)
ifsg==truethen
ifsg==truethen
...
@@ -2460,7 +2468,7 @@ function FusionSpell.GetSummonTarget(
...
@@ -2460,7 +2468,7 @@ function FusionSpell.GetSummonTarget(
---@param fusion_spell_matfilter FUSION_SPELL_MATFILTER_FUNCTION a material must pass this to be legal as material come from fusion spell
---@param fusion_spell_matfilter FUSION_SPELL_MATFILTER_FUNCTION a material must pass this to be legal as material come from fusion spell
---@param skip_summon_check boolean whether skip the IsCanBeSpecialSummoned check, for クロック・リザード
---@param skip_summon_check boolean whether skip the IsCanBeSpecialSummoned check, for クロック・リザード
---@param locked_codes (integer[]|fun(tc:Card):integer[]) Locked code, material code that can not use substitutes, used for 烙印融合
---@param locked_codes (integer[]|fun(tc:Card):integer[]) Locked code, material code that can not use substitutes, used for 烙印融合
---@param fcheck_signature (fun(mc:Card):any)|nil A helper function to speed to material check. if 2 cards that would contribute same effect to fcheck, the signature should return same thingy (that could be a key of table), used for 煉獄の虚夢
functionFusionSpell.GetSummonOperation(
functionFusionSpell.GetSummonOperation(
fusfilter,
fusfilter,
matfilter,
matfilter,
...
@@ -2506,7 +2515,8 @@ function FusionSpell.GetSummonOperation(
...
@@ -2506,7 +2515,8 @@ function FusionSpell.GetSummonOperation(
gc,
gc,
fusion_spell_matfilter,
fusion_spell_matfilter,
skip_summon_check,
skip_summon_check,
locked_codes
locked_codes,
fcheck_signature
)
)
returnfunction(e,tp,eg,ep,ev,re,r,rp)
returnfunction(e,tp,eg,ep,ev,re,r,rp)
localtc=nil
localtc=nil
...
@@ -2585,7 +2595,7 @@ function FusionSpell.GetSummonOperation(
...
@@ -2585,7 +2595,7 @@ function FusionSpell.GetSummonOperation(
---@param skip_summon_check boolean whether skip the IsCanBeSpecialSummoned check, for クロック・リザード
---@param skip_summon_check boolean whether skip the IsCanBeSpecialSummoned check, for クロック・リザード
---@param skip_location_count_check boolean Whether skip the location count check, default false, used for 叛逆の堕天使
---@param skip_location_count_check boolean Whether skip the location count check, default false, used for 叛逆の堕天使
---@param locked_codes (integer[]|fun(tc:Card):integer[]) Locked code, material code that can not use substitutes, used for 烙印融合
---@param locked_codes (integer[]|fun(tc:Card):integer[]) Locked code, material code that can not use substitutes, used for 烙印融合
---@param fcheck_signature (fun(mc:Card):any)|nil A helper function to speed to material check. if 2 cards that would contribute same effect to fcheck, the signature should return same thingy (that could be a key of table), used for 煉獄の虚夢
functionFusionSpell.SummonTargetFilter(
functionFusionSpell.SummonTargetFilter(
c,
c,
fusfilter,
fusfilter,
...
@@ -2907,7 +2920,8 @@ function FusionSpell.SummonTargetFilter(
...
@@ -2907,7 +2920,8 @@ function FusionSpell.SummonTargetFilter(
---@param skip_summon_check boolean whether skip the IsCanBeSpecialSummoned check, for クロック・リザード
---@param skip_summon_check boolean whether skip the IsCanBeSpecialSummoned check, for クロック・リザード
---@param skip_location_count_check boolean Whether skip the location count check, default false, used for 叛逆の堕天使
---@param skip_location_count_check boolean Whether skip the location count check, default false, used for 叛逆の堕天使
---@param locked_codes (integer[]|fun(tc:Card):integer[]) Locked code, material code that can not use substitutes, used for 烙印融合
---@param locked_codes (integer[]|fun(tc:Card):integer[]) Locked code, material code that can not use substitutes, used for 烙印融合
---@param fcheck_signature (fun(mc:Card):any)|nil A helper function to speed to material check. if 2 cards that would contribute same effect to fcheck, the signature should return same thingy (that could be a key of table), used for 煉獄の虚夢
---@return boolean res return whether there is a valid target for any chain material effect
---@return boolean res return whether there is a valid target for any chain material effect
---@param skip_summon_check boolean whether skip the IsCanBeSpecialSummoned check, for クロック・リザード
---@param skip_summon_check boolean whether skip the IsCanBeSpecialSummoned check, for クロック・リザード
---@param skip_location_count_check boolean Whether skip the location count check, default false, used for 叛逆の堕天使
---@param skip_location_count_check boolean Whether skip the location count check, default false, used for 叛逆の堕天使
---@param locked_codes (integer[]|fun(tc:Card):integer[]) Locked code, material code that can not use substitutes, used for 烙印融合
---@param locked_codes (integer[]|fun(tc:Card):integer[]) Locked code, material code that can not use substitutes, used for 烙印融合
---@param fcheck_signature (fun(mc:Card):any)|nil A helper function to speed to material check. if 2 cards that would contribute same effect to fcheck, the signature should return same thingy (that could be a key of table), used for 煉獄の虚夢
---@return boolean result Whether c could be fusion summoned by this chain material effect
---@return boolean result Whether c could be fusion summoned by this chain material effect