Skip to content

Commit 25ec2e0

Browse files
committed
Fix wrong comparison in xyz procedure
1 parent 653c8af commit 25ec2e0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

proc_xyz.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ function Xyz.RecursionChk(c,mg,xyz,tp,min,max,minc,maxc,sg,matg,ct,matct,mustbem
224224
for i,te in ipairs({c:IsHasEffect(EFFECT_DOUBLE_XYZ_MATERIAL,tp)}) do
225225
local tgf=te:GetOperation()
226226
local val=te:GetValue()
227-
if val>0 and not retchknum[val] and (not maxc or xmatct+val<=maxc) and (not tgf or tgf(te,xyz,matg)) then
227+
if val>0 and not retchknum[val] and (not maxc or maxc==infToken or xmatct+val<=maxc) and (not tgf or tgf(te,xyz,matg)) then
228228
retchknum[val]=true
229229
te:UseCountLimit(tp)
230230
local chk=(xct+val>=min and xmatct+val>=minc and Xyz.CheckMaterialSet(matg,xyz,tp,exchk,mustg,lv))
@@ -377,7 +377,7 @@ function Xyz.Target(f,lv,minc,maxc,mustbemat,exchk)
377377
if val>0 and (not tgf or tgf(te,c,matg)) then
378378
local newCount=matct+1+val
379379
te:UseCountLimit(tp)
380-
local chk=(minc<=newCount and newCount<=maxc and sg:Includes(mustg))
380+
local chk=(minc<=newCount and (maxc==infToken or newCount<=maxc) and sg:Includes(mustg))
381381
or mg:IsExists(Xyz.RecursionChk,1,sg,mg,c,tp,min,max,minc,maxc,sg,matg,ct+1,newCount,mustbemat,exchk,f,mustg,lv,eqmg,equips_inverse)
382382
if chk then
383383
if not multi[1+val] then

0 commit comments

Comments
 (0)