Commit 6faba86a authored by jwyxym's avatar jwyxym Committed by GitHub

Add files via upload

parent fd0ae174
......@@ -513,6 +513,13 @@ end
function VgF.SearchCard(loc,f)
if not loc then return end
return function (e,tp,eg,ep,ev,re,r,rp)
VgF.SearchCardOP(loc,f,e,tp,eg,ep,ev,re,r,rp)
local sg=Duel.GetOperatedGroup()
return sg:GetCount()
end
end
function VgF.SearchCardOP(loc,f,e,tp,eg,ep,ev,re,r,rp)
if not loc then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,function (c)
if VgF.GetValueType(f)=="function" and not f(c) then return false end
......@@ -522,17 +529,21 @@ function VgF.SearchCard(loc,f)
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
local sg=Duel.GetOperatedGroup()
return sg:GetCount()
end
end
---用于效果的Operation。执行“从loc中选取1张满足f的卡,Call到R上。”。
---用于效果的Operation。执行“从loc中选取1张满足f的卡,Call到R上。”。
---@param loc integer 要选取的区域。不填则返回nil,而不是效果的Operation函数。
---@param f function 卡片过滤的条件
---@return function|nil 效果的Operation函数
function VgF.SearchCardSpecialSummon(loc,f)
if not loc then return end
return function (e,tp,eg,ep,ev,re,r,rp)
VgF.SearchCardSpecialSummonOP(loc,f,e,tp,eg,ep,ev,re,r,rp)
local sg=Duel.GetOperatedGroup()
return sg:GetCount()
end
end
function VgF.SearchCardSpecialSummonOP(loc,f,e,tp,eg,ep,ev,re,r,rp)
if not loc then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,function (c)
if VgF.GetValueType(f)=="function" and not f(c) then return false end
......@@ -542,9 +553,6 @@ function VgF.SearchCardSpecialSummon(loc,f)
if loc&LOCATION_DECK+LOCATION_HAND+LOCATION_EXTRA==0 then Duel.HintSelection(g) end
VgF.Call(g,0,tp)
end
local sg=Duel.GetOperatedGroup()
return sg:GetCount()
end
end
function Group.CheckSubGroup(g,f,min,max,...)
min = min or 1
......
......@@ -10,7 +10,7 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.SelectMatchingCard(tp,nil,tp,LOCATION_MZONE,0,1,1,nil)
Duel.HintSelection(g)
VgF.AtkUp(c,g,5000,nil)
vgf.SearchCard(LOCATION_DROP,cm.filter)
vgf.SearchCardOP(LOCATION_DROP,cm.filter,e,tp,eg,ep,ev,re,r,rp)
end
function cm.filter(c)
return c:IsCode(10101006)
......
......@@ -9,7 +9,7 @@ function cm.initial_effect(c)
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
vgf.SearchCard(LOCATION_DECK,cm.fliter)
vgf.SearchCardOP(LOCATION_DECK,cm.fliter,e,tp,eg,ep,ev,re,r,rp)
vgf.AtkUp(c,c,10000,nil)
end
function cm.fliter(c)
......@@ -22,10 +22,9 @@ function cm.condition(e,tp,eg,ep,ev,re,r,rp)
end
function cm.operation2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
vgf.SearchCardSpecialSummon(LOCATION_DROP,cm.fliter2)
vgf.SearchCardSpecialSummonOP(LOCATION_DROP,cm.fliter2,e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetOperatedGroup()
vgf.AtkUp(c,g,10000)
end
function cm.fliter2(c)
return vgf.IsLevel(c,1,2,3)
......
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