Commit bfb506f0 authored by Vury Leo's avatar Vury Leo

tuning インフェルノイド・ティエラ

parent 0a6e176c
...@@ -4477,14 +4477,30 @@ function Fusion.MultiOperation(tc,patterns) ...@@ -4477,14 +4477,30 @@ function Fusion.MultiOperation(tc,patterns)
local finishable=sg:GetCount()>=min_req and strict_cond(e,sg,gc,chkf) local finishable=sg:GetCount()>=min_req and strict_cond(e,sg,gc,chkf)
local addable=Group.CreateGroup() local addable=Group.CreateGroup()
-- check fcheck on the *current* sg
local prev_ok=true
if aux.FCheckAdditional~=nil then
prev_ok=aux.FCheckAdditional(tc:GetOwner(),sg,tc)
end
for _,mc in ipairs(eg_arr) do for _,mc in ipairs(eg_arr) do
if not sg:IsContains(mc) then if not sg:IsContains(mc) then
sg:AddCard(mc) sg:AddCard(mc)
-- completion test against active patterns -- early FCheckAdditional prune: if adding this card would cause fcheck to fail, we can not add it
for _,pat in ipairs(active_patterns) do -- check fcheck again
if Fusion.CanCompleteFromMappings(e,sg,eg,pat.slots,pat.matfilter,pat.fgoalcheck,tc,gc,chkf) then local new_ok=true
addable:AddCard(mc) if aux.FCheckAdditional~=nil then
break new_ok=aux.FCheckAdditional(tc:GetOwner(),sg,tc)
end
-- prune if it was OK before but fails now
if not (prev_ok and not new_ok) then
-- completion test against active patterns
for _,pat in ipairs(active_patterns) do
if Fusion.CanCompleteFromMappings(e,sg,eg,pat.slots,pat.matfilter,pat.fgoalcheck,tc,gc,chkf) then
addable:AddCard(mc)
break
end
end end
end end
sg:RemoveCard(mc) sg:RemoveCard(mc)
......
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