Commit 004176df authored by Huangnan's avatar Huangnan

fix

parent d8e3177e
......@@ -92,15 +92,19 @@ function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return rg:CheckSubGroup(aux.mzctcheckrel,3,3,tp,REASON_EFFECT) end
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local rg=Duel.GetReleaseGroup(tp,false,REASON_SPSUMMON)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local sg=rg:SelectSubGroup(tp,aux.mzctcheckrel,true,3,3,tp,REASON_EFFECT)
local num=0
for tc in aux.Next(sg) do
if tc:GetCounter(0x62a)~=0 then num=num+tc:GetCounter(0x62a) end
end
if sg:GetCount()==0 and Duel.Release(sg,REASON_EFFECT)~=0 then
e:GetHandler():AddCounter(0x62a,num)
if rg:GetCount()>=3 then
local sg=rg:SelectSubGroup(tp,aux.mzctcheckrel,true,3,3,tp,REASON_EFFECT)
local num=0
for tc in aux.Next(sg) do
if tc:GetCounter(0x62a)~=0 then num=num+tc:GetCounter(0x62a) end
end
if Duel.Release(sg,REASON_EFFECT)==3 then
Duel.SpecialSummon(c,nil,tp,tp,false,false,POS_FACEUP)
c:AddCounter(0x62a,num)
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