Commit 7bfdfa16 authored by nanahira's avatar nanahira

sync with ritual updates

parent 7211a5b2
......@@ -2470,7 +2470,7 @@ end
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)))
end
function cm.DivideValueMax(f,...)
--[[function cm.DivideValueMax(f,...)
local ext_params={...}
return function(c)
local v=f(c,table.unpack(ext_params))
......@@ -2499,13 +2499,15 @@ function cm.CheckGreaterExactCounterCheck(c,g,f,lv,...)
local res=g:GetSum(cm.DivideValueMin(f,...))>=lv
g:AddCard(c)
return res
end
end]]
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
function cm.CheckRitualMaterial(c,g,tp,lv,f,gt)
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
function cm.SelectRitualMaterial(c,g,tp,lv,f,gt)
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