Commit 2d101774 authored by xiaoye's avatar xiaoye

Update VgFuncLib.lua

parent 2cf52b1a
......@@ -575,17 +575,16 @@ end
---用于多Cost。例如 VgF.CostAnd(vgf.DamageCost(1), vgf.DisCardCost(1))。
function VgF.CostAnd(...)
funcs = {...}
local funcs = {...}
return function (e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
for _, func in ipairs(funcs) do
for _,func in ipairs(funcs) do
if chk==0 then
chk = chk and func(e,tp,eg,ep,ev,re,r,rp,chk)
else
func(e,tp,eg,ep,ev,re,r,rp,chk)
end
return chk
end
for _, func in ipairs(funcs) do
func(e,tp,eg,ep,ev,re,r,rp)
end
return chk
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