Skip to content

Commit acfcbae

Browse files
committed
Reapply 27b135c
1 parent 1da3c90 commit acfcbae

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

proc_xyz.lua

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -106,10 +106,10 @@ function Xyz.SubMatFilter(c,lv,xyz,tp)
106106
end
107107
return true
108108
end
109-
function Xyz.CheckValidMultiXyzMaterial(effs,xyz)
109+
function Xyz.CheckValidMultiXyzMaterial(effs,xyz,matg)
110110
for i,te in ipairs(effs) do
111111
local tgf=te:GetOperation()
112-
if not tgf or tgf(te,xyz) then return true end
112+
if not tgf or tgf(te,xyz,matg) then return true end
113113
end
114114
return false
115115
end
@@ -223,7 +223,7 @@ function Xyz.RecursionChk(c,mg,xyz,tp,min,max,minc,maxc,sg,matg,ct,matct,mustbem
223223
for i,te in ipairs({c:GetCardEffect(EFFECT_DOUBLE_XYZ_MATERIAL)}) do
224224
local tgf=te:GetOperation()
225225
local val=te:GetValue()
226-
if val>0 and not retchknum[val] and (not maxc or xmatct+val<=maxc) and (not tgf or tgf(te,xyz)) then
226+
if val>0 and not retchknum[val] and (not maxc or xmatct+val<=maxc) and (not tgf or tgf(te,xyz,matg)) then
227227
retchknum[val]=true
228228
if (xct+val>=min and xmatct+val>=minc and Xyz.CheckMaterialSet(matg,xyz,tp,exchk,mustg,lv))
229229
or mg:IsExists(Xyz.RecursionChk,1,sg,mg,xyz,tp,min,max,minc,maxc,sg,matg,xct,xmatct+val,mustbemat,exchk,f,mustg,lv,eqmg,equips_inverse) then
@@ -362,7 +362,7 @@ function Xyz.Target(f,lv,minc,maxc,mustbemat,exchk)
362362
mg:Merge(equips_inverse[sc])
363363
end
364364
local multiXyz={sc:GetCardEffect(EFFECT_DOUBLE_XYZ_MATERIAL)}
365-
if #multiXyz>0 and Xyz.CheckValidMultiXyzMaterial(multiXyz,c) and ct<minc then
365+
if #multiXyz>0 and Xyz.CheckValidMultiXyzMaterial(multiXyz,c,matg) and ct<minc then
366366
matg:AddCard(sc)
367367
local multi={}
368368
if mg:IsExists(Xyz.RecursionChk,1,sg,mg,c,tp,min,max,minc,maxc,sg,matg,ct,matct,mustbemat,exchk,f,mustg,lv,eqmg,equips_inverse) then
@@ -373,7 +373,7 @@ function Xyz.Target(f,lv,minc,maxc,mustbemat,exchk)
373373
local te=eff[i]
374374
local tgf=te:GetOperation()
375375
local val=te:GetValue()
376-
if val>0 and (not tgf or tgf(te,c)) then
376+
if val>0 and (not tgf or tgf(te,c,matg)) then
377377
local newCount=matct+1+val
378378
if (minc<=newCount and newCount<=maxc)
379379
or mg:IsExists(Xyz.RecursionChk,1,sg,mg,c,tp,min,max,minc,maxc,sg,matg,ct,newCount,mustbemat,exchk,f,mustg,lv,eqmg,equips_inverse) then

0 commit comments

Comments
 (0)