Commit 981059b4 authored by jwyxym's avatar jwyxym Committed by GitHub

Add files via upload

parent 36e15acb
...@@ -468,7 +468,10 @@ function VgF.OverlayCost(num) ...@@ -468,7 +468,10 @@ function VgF.OverlayCost(num)
Duel.SendtoGrave(g,REASON_COST) Duel.SendtoGrave(g,REASON_COST)
end end
end end
function VgF.OverlayFillCostOrOperation(num) ---用于效果的Cost或Operation。它返回一个执行“【费用】[灵魂填充num]”的函数。
---@param num integer 灵魂填充的数量
---@return function 效果的Cost或Operation函数
function VgF.OverlayFill(num)
return function (e,tp,eg,ep,ev,re,r,rp,chk) return function (e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
local m=c:GetOriginalCode() local m=c:GetOriginalCode()
...@@ -480,12 +483,15 @@ function VgF.OverlayFillCostOrOperation(num) ...@@ -480,12 +483,15 @@ function VgF.OverlayFillCostOrOperation(num)
if chk==0 then if chk==0 then
return Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>=num return Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>=num
end end
local rc=Duel.GetMatchingGroup(VgF.VMonsterFilter,tp,LOCATION_MZONE,0,nil):GetFirst() VgF.OverlayFillOP(num,e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetDecktopGroup(tp,num)
Duel.DisableShuffleCheck()
Duel.Overlay(rc,g)
end end
end end
function VgF.OverlayFillOP(num,e,tp,eg,ep,ev,re,r,rp)
local rc=Duel.GetMatchingGroup(VgF.VMonsterFilter,tp,LOCATION_MZONE,0,nil):GetFirst()
local g=Duel.GetDecktopGroup(tp,num)
Duel.DisableShuffleCheck()
Duel.Overlay(rc,g)
end
---用于效果的Cost。它返回一个执行“【费用】[计数爆发num]”的函数。 ---用于效果的Cost。它返回一个执行“【费用】[计数爆发num]”的函数。
---@param num integer 计数爆发的数量 ---@param num integer 计数爆发的数量
---@return function 效果的Cost函数 ---@return function 效果的Cost函数
......
...@@ -22,6 +22,6 @@ function cm.op(e,tp,eg,ep,ev,re,r,rp) ...@@ -22,6 +22,6 @@ function cm.op(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CALL) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CALL)
local g=Duel.GetMatchingGroup(VgF.VMonsterFilter,tp,LOCATION_MZONE,0,nil):GetFirst():GetOverlayGroup():FilterSelect(tp,Card.IsCanBeSpecialSummoned,1,1,nil,e,0,tp,false,false,POS_FACEUP_ATTACK,0x4) local g=Duel.GetMatchingGroup(VgF.VMonsterFilter,tp,LOCATION_MZONE,0,nil):GetFirst():GetOverlayGroup():FilterSelect(tp,Card.IsCanBeSpecialSummoned,1,1,nil,e,0,tp,false,false,POS_FACEUP_ATTACK,0x4)
if vgf.Call(g,0,tp,0x4)>0 then if vgf.Call(g,0,tp,0x4)>0 then
vgf.OverlayFillCostOrOperation(1) vgf.OverlayFillOP(num,e,tp,eg,ep,ev,re,r,rp)
end end
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