Commit 326d3315 authored by jwyxym's avatar jwyxym Committed by GitHub

Add files via upload

parent daa730cf
...@@ -97,6 +97,16 @@ function VgF.ReturnCard(g) ...@@ -97,6 +97,16 @@ function VgF.ReturnCard(g)
end end
return tc return tc
end end
function VgF.GetCardsFromGroup(g,num)
if VgF.GetValueType(g)=="Group" then
local sg=Group.CreateGroup()
for tc in VgF.Next(g) do
if sg:GetCount()>=num then break end
sg:AddCard(tc)
end
return sg
end
end
bit={} bit={}
function bit.band(a,b) function bit.band(a,b)
return a&b return a&b
...@@ -293,7 +303,8 @@ function VgF.EnegyCost(num) ...@@ -293,7 +303,8 @@ function VgF.EnegyCost(num)
if chk==0 then if chk==0 then
return Duel.IsExistingMatchingCard(Card.IsCode,tp,LOCATION_EMBLEM,0,num,nil,10800730) return Duel.IsExistingMatchingCard(Card.IsCode,tp,LOCATION_EMBLEM,0,num,nil,10800730)
end end
local g=Duel.SelectMatchingCard(tp,Card.IsCode,tp,LOCATION_EMBLEM,0,num,num,nil,10800730) local sg=Duel.GetMatchingGroup(tp,Card.IsCode,tp,LOCATION_EMBLEM,0,nil,10800730)
local g=VgF.GetCardsFromGroup(sg,num)
Duel.Sendto(g,tp,0,POS_FACEUP,REASON_COST) Duel.Sendto(g,tp,0,POS_FACEUP,REASON_COST)
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