Commit 7bfdfa16 authored by nanahira's avatar nanahira

sync with ritual updates

parent 7211a5b2
...@@ -2470,7 +2470,7 @@ end ...@@ -2470,7 +2470,7 @@ end
function cm.CheckRitualMaterialGoal(g,c,tp,lv,f,gt) function cm.CheckRitualMaterialGoal(g,c,tp,lv,f,gt)
return cm.CheckSummonLocation(c,tp,g) and (g:CheckWithSumEqual(f,lv,#g,#g,c) or (gt and cm.CheckGreaterExact(g,f,lv,c))) return cm.CheckSummonLocation(c,tp,g) and (g:CheckWithSumEqual(f,lv,#g,#g,c) or (gt and cm.CheckGreaterExact(g,f,lv,c)))
end end
function cm.DivideValueMax(f,...) --[[function cm.DivideValueMax(f,...)
local ext_params={...} local ext_params={...}
return function(c) return function(c)
local v=f(c,table.unpack(ext_params)) local v=f(c,table.unpack(ext_params))
...@@ -2499,13 +2499,15 @@ function cm.CheckGreaterExactCounterCheck(c,g,f,lv,...) ...@@ -2499,13 +2499,15 @@ function cm.CheckGreaterExactCounterCheck(c,g,f,lv,...)
local res=g:GetSum(cm.DivideValueMin(f,...))>=lv local res=g:GetSum(cm.DivideValueMin(f,...))>=lv
g:AddCard(c) g:AddCard(c)
return res return res
end end]]
function cm.CheckGreaterExact(g,f,lv,...) function cm.CheckGreaterExact(g,f,lv,...)
return g:GetSum(cm.DivideValueMax(f,...))>=lv and not g:IsExists(cm.CheckGreaterExactCounterCheck,1,nil,g,f,lv,...) Duel.SetSelectedCard(g)
return g:CheckWithSumGreater(f,lv,...)
end end
function cm.CheckRitualMaterial(c,g,tp,lv,f,gt) function cm.CheckRitualMaterial(c,g,tp,lv,f,gt)
local f=f or Card.GetRitualLevel local f=f or Card.GetRitualLevel
return cm.CheckGroup(g,cm.CheckRitualMaterialGoal,nil,1,lv,c,tp,lv,f,gt) local res=cm.CheckGroup(g,cm.CheckRitualMaterialGoal,nil,1,lv,c,tp,lv,f,gt)
return res
end end
function cm.SelectRitualMaterial(c,g,tp,lv,f,gt) function cm.SelectRitualMaterial(c,g,tp,lv,f,gt)
local f=f or Card.GetRitualLevel local f=f or Card.GetRitualLevel
......
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