Commit f1d818e8 authored by nanahira's avatar nanahira

fix

parent e797c960
...@@ -168,10 +168,9 @@ function cm.SelectGroup(tp,desc,g,f,cg,min,max,...) ...@@ -168,10 +168,9 @@ function cm.SelectGroup(tp,desc,g,f,cg,min,max,...)
local ag=g:Filter(cm.CheckGroupRecursive,sg,sg,g,f,min,max,ext_params) local ag=g:Filter(cm.CheckGroupRecursive,sg,sg,g,f,min,max,ext_params)
while #sg<max and #ag>0 do while #sg<max and #ag>0 do
local finish=(#sg>=min and #sg<=max and f(sg,...)) local finish=(#sg>=min and #sg<=max and f(sg,...))
local seg=sg:Clone() local seg=sg-cg
local dmin=#sg local dmin=#seg
local dmax=math.min(max-#cg,#g) local dmax=math.min(max-#cg,#g)
seg:Sub(cg)
Duel.Hint(HINT_SELECTMSG,tp,desc) Duel.Hint(HINT_SELECTMSG,tp,desc)
local tc=ag:SelectUnselect(seg,tp,finish,finish,dmin,dmax) local tc=ag:SelectUnselect(seg,tp,finish,finish,dmin,dmax)
if not tc then break end if not tc then break end
...@@ -195,10 +194,9 @@ function cm.SelectGroupWithCancel(tp,desc,g,f,cg,min,max,...) ...@@ -195,10 +194,9 @@ function cm.SelectGroupWithCancel(tp,desc,g,f,cg,min,max,...)
while #sg<max and #ag>0 do while #sg<max and #ag>0 do
local finish=(#sg>=min and #sg<=max and f(sg,...)) local finish=(#sg>=min and #sg<=max and f(sg,...))
local cancel=finish or #sg==0 local cancel=finish or #sg==0
local seg=sg:Clone() local seg=sg-cg
local dmin=#sg local dmin=#seg
local dmax=math.min(max-#cg,#g) local dmax=math.min(max-#cg,#g)
seg:Sub(cg)
Duel.Hint(HINT_SELECTMSG,tp,desc) Duel.Hint(HINT_SELECTMSG,tp,desc)
local tc=ag:SelectUnselect(seg,tp,finish,cancel,dmin,dmax) local tc=ag:SelectUnselect(seg,tp,finish,cancel,dmin,dmax)
if not tc then if not tc then
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment