Commit 5e817ef2 authored by nanahira's avatar nanahira

fusion subgroup part 2

parent 3b735681
...@@ -993,7 +993,7 @@ function Auxiliary.FConditionMix(insf,sub,...) ...@@ -993,7 +993,7 @@ function Auxiliary.FConditionMix(insf,sub,...)
if not mg:IsContains(gc) then return false end if not mg:IsContains(gc) then return false end
Duel.SetSelectedCard(Group.FromCards(gc)) Duel.SetSelectedCard(Group.FromCards(gc))
end end
return mg:CheckSubGroup(Auxiliary.FCheckMixGoal,#funs,#funs,tp,fc,sub,chkf,...) return mg:CheckSubGroup(Auxiliary.FCheckMixGoal,#funs,#funs,tp,c,sub,chkf,table.unpack(funs))
end end
end end
function Auxiliary.FOperationMix(insf,sub,...) function Auxiliary.FOperationMix(insf,sub,...)
...@@ -1007,7 +1007,7 @@ function Auxiliary.FOperationMix(insf,sub,...) ...@@ -1007,7 +1007,7 @@ function Auxiliary.FOperationMix(insf,sub,...)
local mg=eg:Filter(Auxiliary.FConditionFilterMix,c,c,sub,table.unpack(funs)) local mg=eg:Filter(Auxiliary.FConditionFilterMix,c,c,sub,table.unpack(funs))
if gc then Duel.SetSelectedCard(Group.FromCards(gc)) end if gc then Duel.SetSelectedCard(Group.FromCards(gc)) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FMATERIAL) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FMATERIAL)
local sg=mg:CheckSubGroup(tp,Auxiliary.FCheckMixGoal,false,#funs,#funs,tp,fc,sub,chkf,...) local sg=mg:SelectSubGroup(tp,Auxiliary.FCheckMixGoal,false,#funs,#funs,tp,c,sub,chkf,table.unpack(funs))
Duel.SetFusionMaterial(sg) Duel.SetFusionMaterial(sg)
end end
end end
...@@ -1102,14 +1102,17 @@ function Auxiliary.FOperationMixRep(insf,sub,fun1,minc,maxc,...) ...@@ -1102,14 +1102,17 @@ function Auxiliary.FOperationMixRep(insf,sub,fun1,minc,maxc,...)
while sg:GetCount()<maxc+#funs do while sg:GetCount()<maxc+#funs do
local cg=mg:Filter(Auxiliary.FSelectMixRep,sg,tp,mg,sg,c,sub,chkf,fun1,minc,maxc,table.unpack(funs)) local cg=mg:Filter(Auxiliary.FSelectMixRep,sg,tp,mg,sg,c,sub,chkf,fun1,minc,maxc,table.unpack(funs))
if cg:GetCount()==0 then break end if cg:GetCount()==0 then break end
local minct=1 local finish=Auxiliary.FCheckMixRepGoal(tp,sg,c,sub,chkf,fun1,minc,maxc,table.unpack(funs))
if Auxiliary.FCheckMixRepGoal(tp,sg,c,sub,chkf,fun1,minc,maxc,table.unpack(funs)) then local cancel_group=sg:Clone()
minct=0 if gc then cancel_group:RemoveCard(gc) end
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FMATERIAL) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FMATERIAL)
local g=cg:Select(tp,minct,1,nil) local tc=cg:SelectUnselect(cancel_group,tp,finish,false,minc+#funs,maxc+#funs)
if g:GetCount()==0 then break end if not tc then break end
sg:Merge(g) if sg:IsContains(tc) then
sg:RemoveCard(tc)
else
sg:AddCard(tc)
end
end end
Duel.SetFusionMaterial(sg) Duel.SetFusionMaterial(sg)
end end
......
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