Commit b60fe110 authored by Nemo Ma's avatar Nemo Ma

fix

parent e9bbda34
--幻旅传说·逃亡
--traveler saga outrun
--21.04.10
local m=11451401
local cm=_G["c"..m]
......@@ -63,5 +63,7 @@ function cm.thcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(cm.thfilter,1,nil)
end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
local g=eg:Filter(cm.thfilter,nil)
Duel.ConfirmCards(1-tp,g)
Duel.ShuffleHand(tp)
end
\ No newline at end of file
......@@ -43,8 +43,9 @@ function cm.initial_effect(c)
cm[1]=0
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_RELEASE)
ge1:SetOperation(cm.check)
ge1:SetCode(EFFECT_SEND_REPLACE)
ge1:SetTarget(cm.check)
ge1:SetValue(aux.FALSE)
Duel.RegisterEffect(ge1,0)
local ge2=Effect.CreateEffect(c)
ge2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
......@@ -59,13 +60,15 @@ end
function cm.filter(c,tp)
return c:IsControler(tp) and c:IsSetCard(0x6978) and c:IsFaceup()
end
function cm.check(e,tp,eg,ep,ev,re,r,rp)
function cm.check(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
for tc in aux.Next(eg) do
if (tc:IsPreviousLocation(LOCATION_MZONE) or (tc:GetPreviousLocation()&LOCATION_ONFIELD==0 and tc:GetOriginalType()&0x1>0)) and tc:IsSetCard(0x6978) then
if (tc:IsLocation(LOCATION_MZONE) or (not tc:IsOnField() and tc:GetOriginalType()&0x1>0)) and tc:IsSetCard(0x6978) and tc:IsReason(REASON_RELEASE) then
local p=tc:GetReasonPlayer()
cm[p]=cm[p]+1
end
end
return false
end
function cm.clear(e,tp,eg,ep,ev,re,r,rp)
cm[0]=0
......
......@@ -155,6 +155,16 @@ end
function cm.retfilter2(c,p,loc)
return c:IsPreviousControler(p) and c:IsPreviousLocation(loc)
end
function cm.fselect2(g,pft)
return g:FilterCount(Card.IsPreviousLocation,nil,LOCATION_PZONE)<=pft
end
function cm.returntofield(tc)
if tc:GetPreviousTypeOnField()&TYPE_EQUIP>0 then
Duel.SendtoGrave(tc,REASON_RULE+REASON_RETURN)
else
Duel.ReturnToField(tc)
end
end
function cm.retcon(e,tp,eg,ep,ev,re,r,rp)
local g=e:GetLabelObject()
if not g:IsExists(cm.filter6,1,nil,e) then
......@@ -167,26 +177,51 @@ function cm.retop(e,tp,eg,ep,ev,re,r,rp)
local g=e:GetLabelObject()
local sg=g:Filter(cm.filter6,nil,e)
g:DeleteGroup()
local ft,mg={},{}
local ft,mg,pft,pmg={},{},{},{}
ft[1]=Duel.GetLocationCount(tp,LOCATION_MZONE)
ft[2]=Duel.GetLocationCount(1-tp,LOCATION_MZONE)
ft[3]=Duel.GetLocationCount(tp,LOCATION_SZONE)
ft[4]=Duel.GetLocationCount(1-tp,LOCATION_SZONE)
pft[3],pft[4]=0,0
if Duel.CheckLocation(tp,LOCATION_PZONE,0) then pft[3]=pft[3]+1 end
if Duel.CheckLocation(tp,LOCATION_PZONE,1) then pft[3]=pft[3]+1 end
if Duel.CheckLocation(1-tp,LOCATION_PZONE,0) then pft[4]=pft[4]+1 end
if Duel.CheckLocation(1-tp,LOCATION_PZONE,1) then pft[4]=pft[4]+1 end
mg[1]=sg:Filter(cm.retfilter2,nil,tp,LOCATION_MZONE)
mg[2]=sg:Filter(cm.retfilter2,nil,1-tp,LOCATION_MZONE)
mg[3]=sg:Filter(cm.retfilter2,nil,tp,LOCATION_SZONE)
mg[4]=sg:Filter(cm.retfilter2,nil,1-tp,LOCATION_SZONE)
for i=1,4 do
pmg[3]=sg:Filter(cm.retfilter2,nil,tp,LOCATION_PZONE)
pmg[4]=sg:Filter(cm.retfilter2,nil,1-tp,LOCATION_PZONE)
for i=1,2 do
if #mg[i]>ft[i] then
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(m,2))
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(11451461,7))
local tg=mg[i]:Select(tp,ft[i],ft[i],nil)
for tc in aux.Next(tg) do Duel.ReturnToField(tc) end
for tc in aux.Next(tg) do cm.returntofield(tc) end
sg:Sub(tg)
end
end
for i=3,4 do
if #mg[i]>ft[i] then
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(11451461,7))
local ct=math.min(#(mg[i]-pmg[i])+pft[i],ft[i])
local tg=mg[i]:SelectSubGroup(tp,cm.fselect2,false,ct,ct,nil,pft[i])
local ptg=tg:Filter(Card.IsPreviousLocation,nil,LOCATION_PZONE)
for tc in aux.Next(ptg) do cm.returntofield(tc) end
for tc in aux.Next(tg-ptg) do cm.returntofield(tc) end
sg:Sub(tg)
elseif #pmg[i]>pft[i] then
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(11451461,7))
local tg=pmg[i]:Select(tp,pft[i],pft[i],nil)
for tc in aux.Next(tg) do cm.returntofield(tc) end
sg:Sub(tg)
end
end
for tc in aux.Next(sg) do
local psg=sg:Filter(Card.IsPreviousLocation,nil,LOCATION_PZONE)
for tc in aux.Next(psg) do cm.returntofield(tc) end
for tc in aux.Next(sg-psg) do
if tc:GetPreviousLocation()&LOCATION_ONFIELD>0 then
Duel.ReturnToField(tc)
cm.returntofield(tc)
elseif tc:IsPreviousLocation(LOCATION_HAND) then
Duel.SendtoHand(tc,tc:GetPreviousControler(),REASON_EFFECT)
end
......
......@@ -159,6 +159,16 @@ end
function cm.retfilter2(c,p,loc)
return c:IsPreviousControler(p) and c:IsPreviousLocation(loc)
end
function cm.fselect2(g,pft)
return g:FilterCount(Card.IsPreviousLocation,nil,LOCATION_PZONE)<=pft
end
function cm.returntofield(tc)
if tc:GetPreviousTypeOnField()&TYPE_EQUIP>0 then
Duel.SendtoGrave(tc,REASON_RULE+REASON_RETURN)
else
Duel.ReturnToField(tc)
end
end
function cm.retcon(e,tp,eg,ep,ev,re,r,rp)
local g=e:GetLabelObject()
if not g:IsExists(cm.filter6,1,nil,e) then
......@@ -171,26 +181,51 @@ function cm.retop(e,tp,eg,ep,ev,re,r,rp)
local g=e:GetLabelObject()
local sg=g:Filter(cm.filter6,nil,e)
g:DeleteGroup()
local ft,mg={},{}
local ft,mg,pft,pmg={},{},{},{}
ft[1]=Duel.GetLocationCount(tp,LOCATION_MZONE)
ft[2]=Duel.GetLocationCount(1-tp,LOCATION_MZONE)
ft[3]=Duel.GetLocationCount(tp,LOCATION_SZONE)
ft[4]=Duel.GetLocationCount(1-tp,LOCATION_SZONE)
pft[3],pft[4]=0,0
if Duel.CheckLocation(tp,LOCATION_PZONE,0) then pft[3]=pft[3]+1 end
if Duel.CheckLocation(tp,LOCATION_PZONE,1) then pft[3]=pft[3]+1 end
if Duel.CheckLocation(1-tp,LOCATION_PZONE,0) then pft[4]=pft[4]+1 end
if Duel.CheckLocation(1-tp,LOCATION_PZONE,1) then pft[4]=pft[4]+1 end
mg[1]=sg:Filter(cm.retfilter2,nil,tp,LOCATION_MZONE)
mg[2]=sg:Filter(cm.retfilter2,nil,1-tp,LOCATION_MZONE)
mg[3]=sg:Filter(cm.retfilter2,nil,tp,LOCATION_SZONE)
mg[4]=sg:Filter(cm.retfilter2,nil,1-tp,LOCATION_SZONE)
for i=1,4 do
pmg[3]=sg:Filter(cm.retfilter2,nil,tp,LOCATION_PZONE)
pmg[4]=sg:Filter(cm.retfilter2,nil,1-tp,LOCATION_PZONE)
for i=1,2 do
if #mg[i]>ft[i] then
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(m,2))
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(11451461,7))
local tg=mg[i]:Select(tp,ft[i],ft[i],nil)
for tc in aux.Next(tg) do Duel.ReturnToField(tc) end
for tc in aux.Next(tg) do cm.returntofield(tc) end
sg:Sub(tg)
end
end
for i=3,4 do
if #mg[i]>ft[i] then
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(11451461,7))
local ct=math.min(#(mg[i]-pmg[i])+pft[i],ft[i])
local tg=mg[i]:SelectSubGroup(tp,cm.fselect2,false,ct,ct,nil,pft[i])
local ptg=tg:Filter(Card.IsPreviousLocation,nil,LOCATION_PZONE)
for tc in aux.Next(ptg) do cm.returntofield(tc) end
for tc in aux.Next(tg-ptg) do cm.returntofield(tc) end
sg:Sub(tg)
elseif #pmg[i]>pft[i] then
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(11451461,7))
local tg=pmg[i]:Select(tp,pft[i],pft[i],nil)
for tc in aux.Next(tg) do cm.returntofield(tc) end
sg:Sub(tg)
end
end
for tc in aux.Next(sg) do
local psg=sg:Filter(Card.IsPreviousLocation,nil,LOCATION_PZONE)
for tc in aux.Next(psg) do cm.returntofield(tc) end
for tc in aux.Next(sg-psg) do
if tc:GetPreviousLocation()&LOCATION_ONFIELD>0 then
Duel.ReturnToField(tc)
cm.returntofield(tc)
elseif tc:IsPreviousLocation(LOCATION_HAND) then
Duel.SendtoHand(tc,tc:GetPreviousControler(),REASON_EFFECT)
end
......
......@@ -215,6 +215,16 @@ end
function cm.retfilter2(c,p,loc)
return c:IsPreviousControler(p) and c:IsPreviousLocation(loc)
end
function cm.fselect2(g,pft)
return g:FilterCount(Card.IsPreviousLocation,nil,LOCATION_PZONE)<=pft
end
function cm.returntofield(tc)
if tc:GetPreviousTypeOnField()&TYPE_EQUIP>0 then
Duel.SendtoGrave(tc,REASON_RULE+REASON_RETURN)
else
Duel.ReturnToField(tc)
end
end
function cm.retcon(e,tp,eg,ep,ev,re,r,rp)
local g=e:GetLabelObject()
if not g:IsExists(cm.filter6,1,nil,e) then
......@@ -227,26 +237,51 @@ function cm.retop(e,tp,eg,ep,ev,re,r,rp)
local g=e:GetLabelObject()
local sg=g:Filter(cm.filter6,nil,e)
g:DeleteGroup()
local ft,mg={},{}
local ft,mg,pft,pmg={},{},{},{}
ft[1]=Duel.GetLocationCount(tp,LOCATION_MZONE)
ft[2]=Duel.GetLocationCount(1-tp,LOCATION_MZONE)
ft[3]=Duel.GetLocationCount(tp,LOCATION_SZONE)
ft[4]=Duel.GetLocationCount(1-tp,LOCATION_SZONE)
pft[3],pft[4]=0,0
if Duel.CheckLocation(tp,LOCATION_PZONE,0) then pft[3]=pft[3]+1 end
if Duel.CheckLocation(tp,LOCATION_PZONE,1) then pft[3]=pft[3]+1 end
if Duel.CheckLocation(1-tp,LOCATION_PZONE,0) then pft[4]=pft[4]+1 end
if Duel.CheckLocation(1-tp,LOCATION_PZONE,1) then pft[4]=pft[4]+1 end
mg[1]=sg:Filter(cm.retfilter2,nil,tp,LOCATION_MZONE)
mg[2]=sg:Filter(cm.retfilter2,nil,1-tp,LOCATION_MZONE)
mg[3]=sg:Filter(cm.retfilter2,nil,tp,LOCATION_SZONE)
mg[4]=sg:Filter(cm.retfilter2,nil,1-tp,LOCATION_SZONE)
for i=1,4 do
pmg[3]=sg:Filter(cm.retfilter2,nil,tp,LOCATION_PZONE)
pmg[4]=sg:Filter(cm.retfilter2,nil,1-tp,LOCATION_PZONE)
for i=1,2 do
if #mg[i]>ft[i] then
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(m,2))
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(11451461,7))
local tg=mg[i]:Select(tp,ft[i],ft[i],nil)
for tc in aux.Next(tg) do Duel.ReturnToField(tc) end
for tc in aux.Next(tg) do cm.returntofield(tc) end
sg:Sub(tg)
end
end
for i=3,4 do
if #mg[i]>ft[i] then
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(11451461,7))
local ct=math.min(#(mg[i]-pmg[i])+pft[i],ft[i])
local tg=mg[i]:SelectSubGroup(tp,cm.fselect2,false,ct,ct,nil,pft[i])
local ptg=tg:Filter(Card.IsPreviousLocation,nil,LOCATION_PZONE)
for tc in aux.Next(ptg) do cm.returntofield(tc) end
for tc in aux.Next(tg-ptg) do cm.returntofield(tc) end
sg:Sub(tg)
elseif #pmg[i]>pft[i] then
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(11451461,7))
local tg=pmg[i]:Select(tp,pft[i],pft[i],nil)
for tc in aux.Next(tg) do cm.returntofield(tc) end
sg:Sub(tg)
end
end
for tc in aux.Next(sg) do
local psg=sg:Filter(Card.IsPreviousLocation,nil,LOCATION_PZONE)
for tc in aux.Next(psg) do cm.returntofield(tc) end
for tc in aux.Next(sg-psg) do
if tc:GetPreviousLocation()&LOCATION_ONFIELD>0 then
Duel.ReturnToField(tc)
cm.returntofield(tc)
elseif tc:IsPreviousLocation(LOCATION_HAND) then
Duel.SendtoHand(tc,tc:GetPreviousControler(),REASON_EFFECT)
end
......
......@@ -193,6 +193,16 @@ end
function cm.retfilter2(c,p,loc)
return c:IsPreviousControler(p) and c:IsPreviousLocation(loc)
end
function cm.fselect2(g,pft)
return g:FilterCount(Card.IsPreviousLocation,nil,LOCATION_PZONE)<=pft
end
function cm.returntofield(tc)
if tc:GetPreviousTypeOnField()&TYPE_EQUIP>0 then
Duel.SendtoGrave(tc,REASON_RULE+REASON_RETURN)
else
Duel.ReturnToField(tc)
end
end
function cm.retcon(e,tp,eg,ep,ev,re,r,rp)
local g=e:GetLabelObject()
if not g:IsExists(cm.filter6,1,nil,e) then
......@@ -205,26 +215,51 @@ function cm.retop(e,tp,eg,ep,ev,re,r,rp)
local g=e:GetLabelObject()
local sg=g:Filter(cm.filter6,nil,e)
g:DeleteGroup()
local ft,mg={},{}
local ft,mg,pft,pmg={},{},{},{}
ft[1]=Duel.GetLocationCount(tp,LOCATION_MZONE)
ft[2]=Duel.GetLocationCount(1-tp,LOCATION_MZONE)
ft[3]=Duel.GetLocationCount(tp,LOCATION_SZONE)
ft[4]=Duel.GetLocationCount(1-tp,LOCATION_SZONE)
pft[3],pft[4]=0,0
if Duel.CheckLocation(tp,LOCATION_PZONE,0) then pft[3]=pft[3]+1 end
if Duel.CheckLocation(tp,LOCATION_PZONE,1) then pft[3]=pft[3]+1 end
if Duel.CheckLocation(1-tp,LOCATION_PZONE,0) then pft[4]=pft[4]+1 end
if Duel.CheckLocation(1-tp,LOCATION_PZONE,1) then pft[4]=pft[4]+1 end
mg[1]=sg:Filter(cm.retfilter2,nil,tp,LOCATION_MZONE)
mg[2]=sg:Filter(cm.retfilter2,nil,1-tp,LOCATION_MZONE)
mg[3]=sg:Filter(cm.retfilter2,nil,tp,LOCATION_SZONE)
mg[4]=sg:Filter(cm.retfilter2,nil,1-tp,LOCATION_SZONE)
for i=1,4 do
pmg[3]=sg:Filter(cm.retfilter2,nil,tp,LOCATION_PZONE)
pmg[4]=sg:Filter(cm.retfilter2,nil,1-tp,LOCATION_PZONE)
for i=1,2 do
if #mg[i]>ft[i] then
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(m,2))
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(11451461,7))
local tg=mg[i]:Select(tp,ft[i],ft[i],nil)
for tc in aux.Next(tg) do Duel.ReturnToField(tc) end
for tc in aux.Next(tg) do cm.returntofield(tc) end
sg:Sub(tg)
end
end
for i=3,4 do
if #mg[i]>ft[i] then
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(11451461,7))
local ct=math.min(#(mg[i]-pmg[i])+pft[i],ft[i])
local tg=mg[i]:SelectSubGroup(tp,cm.fselect2,false,ct,ct,nil,pft[i])
local ptg=tg:Filter(Card.IsPreviousLocation,nil,LOCATION_PZONE)
for tc in aux.Next(ptg) do cm.returntofield(tc) end
for tc in aux.Next(tg-ptg) do cm.returntofield(tc) end
sg:Sub(tg)
elseif #pmg[i]>pft[i] then
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(11451461,7))
local tg=pmg[i]:Select(tp,pft[i],pft[i],nil)
for tc in aux.Next(tg) do cm.returntofield(tc) end
sg:Sub(tg)
end
end
for tc in aux.Next(sg) do
local psg=sg:Filter(Card.IsPreviousLocation,nil,LOCATION_PZONE)
for tc in aux.Next(psg) do cm.returntofield(tc) end
for tc in aux.Next(sg-psg) do
if tc:GetPreviousLocation()&LOCATION_ONFIELD>0 then
Duel.ReturnToField(tc)
cm.returntofield(tc)
elseif tc:IsPreviousLocation(LOCATION_HAND) then
Duel.SendtoHand(tc,tc:GetPreviousControler(),REASON_EFFECT)
end
......
......@@ -214,6 +214,16 @@ end
function cm.retfilter2(c,p,loc)
return c:IsPreviousControler(p) and c:IsPreviousLocation(loc)
end
function cm.fselect2(g,pft)
return g:FilterCount(Card.IsPreviousLocation,nil,LOCATION_PZONE)<=pft
end
function cm.returntofield(tc)
if tc:GetPreviousTypeOnField()&TYPE_EQUIP>0 then
Duel.SendtoGrave(tc,REASON_RULE+REASON_RETURN)
else
Duel.ReturnToField(tc)
end
end
function cm.retcon(e,tp,eg,ep,ev,re,r,rp)
local g=e:GetLabelObject()
if not g:IsExists(cm.filter6,1,nil,e) then
......@@ -226,26 +236,51 @@ function cm.retop(e,tp,eg,ep,ev,re,r,rp)
local g=e:GetLabelObject()
local sg=g:Filter(cm.filter6,nil,e)
g:DeleteGroup()
local ft,mg={},{}
local ft,mg,pft,pmg={},{},{},{}
ft[1]=Duel.GetLocationCount(tp,LOCATION_MZONE)
ft[2]=Duel.GetLocationCount(1-tp,LOCATION_MZONE)
ft[3]=Duel.GetLocationCount(tp,LOCATION_SZONE)
ft[4]=Duel.GetLocationCount(1-tp,LOCATION_SZONE)
pft[3],pft[4]=0,0
if Duel.CheckLocation(tp,LOCATION_PZONE,0) then pft[3]=pft[3]+1 end
if Duel.CheckLocation(tp,LOCATION_PZONE,1) then pft[3]=pft[3]+1 end
if Duel.CheckLocation(1-tp,LOCATION_PZONE,0) then pft[4]=pft[4]+1 end
if Duel.CheckLocation(1-tp,LOCATION_PZONE,1) then pft[4]=pft[4]+1 end
mg[1]=sg:Filter(cm.retfilter2,nil,tp,LOCATION_MZONE)
mg[2]=sg:Filter(cm.retfilter2,nil,1-tp,LOCATION_MZONE)
mg[3]=sg:Filter(cm.retfilter2,nil,tp,LOCATION_SZONE)
mg[4]=sg:Filter(cm.retfilter2,nil,1-tp,LOCATION_SZONE)
for i=1,4 do
pmg[3]=sg:Filter(cm.retfilter2,nil,tp,LOCATION_PZONE)
pmg[4]=sg:Filter(cm.retfilter2,nil,1-tp,LOCATION_PZONE)
for i=1,2 do
if #mg[i]>ft[i] then
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(m,2))
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(11451461,7))
local tg=mg[i]:Select(tp,ft[i],ft[i],nil)
for tc in aux.Next(tg) do Duel.ReturnToField(tc) end
for tc in aux.Next(tg) do cm.returntofield(tc) end
sg:Sub(tg)
end
end
for i=3,4 do
if #mg[i]>ft[i] then
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(11451461,7))
local ct=math.min(#(mg[i]-pmg[i])+pft[i],ft[i])
local tg=mg[i]:SelectSubGroup(tp,cm.fselect2,false,ct,ct,nil,pft[i])
local ptg=tg:Filter(Card.IsPreviousLocation,nil,LOCATION_PZONE)
for tc in aux.Next(ptg) do cm.returntofield(tc) end
for tc in aux.Next(tg-ptg) do cm.returntofield(tc) end
sg:Sub(tg)
elseif #pmg[i]>pft[i] then
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(11451461,7))
local tg=pmg[i]:Select(tp,pft[i],pft[i],nil)
for tc in aux.Next(tg) do cm.returntofield(tc) end
sg:Sub(tg)
end
end
for tc in aux.Next(sg) do
local psg=sg:Filter(Card.IsPreviousLocation,nil,LOCATION_PZONE)
for tc in aux.Next(psg) do cm.returntofield(tc) end
for tc in aux.Next(sg-psg) do
if tc:GetPreviousLocation()&LOCATION_ONFIELD>0 then
Duel.ReturnToField(tc)
cm.returntofield(tc)
elseif tc:IsPreviousLocation(LOCATION_HAND) then
Duel.SendtoHand(tc,tc:GetPreviousControler(),REASON_EFFECT)
end
......
......@@ -243,6 +243,16 @@ end
function cm.retfilter2(c,p,loc)
return c:IsPreviousControler(p) and c:IsPreviousLocation(loc)
end
function cm.fselect2(g,pft)
return g:FilterCount(Card.IsPreviousLocation,nil,LOCATION_PZONE)<=pft
end
function cm.returntofield(tc)
if tc:GetPreviousTypeOnField()&TYPE_EQUIP>0 then
Duel.SendtoGrave(tc,REASON_RULE+REASON_RETURN)
else
Duel.ReturnToField(tc)
end
end
function cm.retcon(e,tp,eg,ep,ev,re,r,rp)
local g=e:GetLabelObject()
if not g:IsExists(cm.filter6,1,nil,e) then
......@@ -255,26 +265,51 @@ function cm.retop(e,tp,eg,ep,ev,re,r,rp)
local g=e:GetLabelObject()
local sg=g:Filter(cm.filter6,nil,e)
g:DeleteGroup()
local ft,mg={},{}
local ft,mg,pft,pmg={},{},{},{}
ft[1]=Duel.GetLocationCount(tp,LOCATION_MZONE)
ft[2]=Duel.GetLocationCount(1-tp,LOCATION_MZONE)
ft[3]=Duel.GetLocationCount(tp,LOCATION_SZONE)
ft[4]=Duel.GetLocationCount(1-tp,LOCATION_SZONE)
pft[3],pft[4]=0,0
if Duel.CheckLocation(tp,LOCATION_PZONE,0) then pft[3]=pft[3]+1 end
if Duel.CheckLocation(tp,LOCATION_PZONE,1) then pft[3]=pft[3]+1 end
if Duel.CheckLocation(1-tp,LOCATION_PZONE,0) then pft[4]=pft[4]+1 end
if Duel.CheckLocation(1-tp,LOCATION_PZONE,1) then pft[4]=pft[4]+1 end
mg[1]=sg:Filter(cm.retfilter2,nil,tp,LOCATION_MZONE)
mg[2]=sg:Filter(cm.retfilter2,nil,1-tp,LOCATION_MZONE)
mg[3]=sg:Filter(cm.retfilter2,nil,tp,LOCATION_SZONE)
mg[4]=sg:Filter(cm.retfilter2,nil,1-tp,LOCATION_SZONE)
for i=1,4 do
pmg[3]=sg:Filter(cm.retfilter2,nil,tp,LOCATION_PZONE)
pmg[4]=sg:Filter(cm.retfilter2,nil,1-tp,LOCATION_PZONE)
for i=1,2 do
if #mg[i]>ft[i] then
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(m,2))
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(11451461,7))
local tg=mg[i]:Select(tp,ft[i],ft[i],nil)
for tc in aux.Next(tg) do Duel.ReturnToField(tc) end
for tc in aux.Next(tg) do cm.returntofield(tc) end
sg:Sub(tg)
end
end
for i=3,4 do
if #mg[i]>ft[i] then
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(11451461,7))
local ct=math.min(#(mg[i]-pmg[i])+pft[i],ft[i])
local tg=mg[i]:SelectSubGroup(tp,cm.fselect2,false,ct,ct,nil,pft[i])
local ptg=tg:Filter(Card.IsPreviousLocation,nil,LOCATION_PZONE)
for tc in aux.Next(ptg) do cm.returntofield(tc) end
for tc in aux.Next(tg-ptg) do cm.returntofield(tc) end
sg:Sub(tg)
elseif #pmg[i]>pft[i] then
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(11451461,7))
local tg=pmg[i]:Select(tp,pft[i],pft[i],nil)
for tc in aux.Next(tg) do cm.returntofield(tc) end
sg:Sub(tg)
end
end
for tc in aux.Next(sg) do
local psg=sg:Filter(Card.IsPreviousLocation,nil,LOCATION_PZONE)
for tc in aux.Next(psg) do cm.returntofield(tc) end
for tc in aux.Next(sg-psg) do
if tc:GetPreviousLocation()&LOCATION_ONFIELD>0 then
Duel.ReturnToField(tc)
cm.returntofield(tc)
elseif tc:IsPreviousLocation(LOCATION_HAND) then
Duel.SendtoHand(tc,tc:GetPreviousControler(),REASON_EFFECT)
end
......
......@@ -48,7 +48,7 @@ function cm.spfilter(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToGraveAsCost()
end
function cm.thfilter(c)
return c:IsRace(RACE_INSECT)
return c:IsRace(RACE_INSECT) and c:GetOriginalType()&0x1==0x1
end
function cm.spcon(e,c)
if c==nil then return true end
......@@ -85,7 +85,7 @@ function cm.op(e,tp,eg,ep,ev,re,r,rp)
end
function cm.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(1-tp) and chkc:IsType(TYPE_MONSTER) end
if chk==0 then return Duel.IsExistingTarget(Card.IsType,tp,0,LOCATION_GRAVE,1,nil,TYPE_MONSTER) end
if chk==0 then return Duel.GetMatchingGroupCount(aux.NOT(Card.IsPublic),tp,0,LOCATION_HAND,nil)>0 and Duel.IsExistingTarget(Card.IsType,tp,0,LOCATION_GRAVE,1,nil,TYPE_MONSTER) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g=Duel.SelectTarget(tp,Card.IsType,tp,0,LOCATION_GRAVE,1,1,nil,TYPE_MONSTER)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,nil,1,0,0)
......
......@@ -17,7 +17,6 @@ function cm.initial_effect(c)
c:RegisterEffect(e0)
--effect1
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_MZONE)
......@@ -128,8 +127,13 @@ function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL)
local g1=Duel.SelectTarget(tp,cm.filter,tp,LOCATION_ONFIELD+LOCATION_GRAVE,LOCATION_ONFIELD+LOCATION_GRAVE,2-op,2-op,e:GetHandler(),e)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g1,1,0,0)
if op==0 then Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,g1,1,0,0) end
if op==0 then
e:SetCategory(CATEGORY_TOHAND)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g1,1,0,0)
else
e:SetCategory(0)
end
if g1:IsExists(Card.IsLocation,1,nil,LOCATION_GRAVE) then Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,g1,1,0,0) end
end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
......
......@@ -105,6 +105,8 @@ function cm.thcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(cm.thfilter,1,nil)
end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
local g=eg:Filter(cm.thfilter,nil)
Duel.ConfirmCards(1-tp,g)
Duel.ShuffleHand(tp)
end
function cm.rscon(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -24,14 +24,25 @@ end
function cm.spfilter(c,e,tp,mg)
if bit.band(c:GetType(),0x81)~=0x81 or c.mat_filter or c.mat_group_check or not (c:IsAttribute(ATTRIBUTE_WIND) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_RITUAL,tp,false,true)) then return false end
local ct=math.max(1,c:GetLevel()//3)
return #mg>0 and mg:CheckSubGroup(cm.fselect,ct,ct,c,tp)
if c.mat_filter then
local g=mg:Filter(cm.mfilter2,nil,c)
if c.mat_group_check then return #g>0 and g:CheckSubGroup(cm.fselect2,ct,ct,tp,rc) end
return #g>0 and g:CheckSubGroup(cm.fselect,ct,ct,tp)
end
return #mg>0 and mg:CheckSubGroup(cm.fselect,ct,ct,tp)
end
function cm.fselect(g,c,tp)
function cm.fselect(g,tp)
return Duel.GetMZoneCount(tp,g)>0
end
function cm.fselect2(g,tp)
return Duel.GetMZoneCount(tp,g)>0 and rc.mat_group_check(g)
end
function cm.mfilter(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToGrave()
end
function cm.mfilter2(c,rc)
return c:IsType(TYPE_MONSTER) and rc.mat_filter(c)
end
function cm.filter1(c,e)
return not c:IsImmuneToEffect(e)
end
......@@ -50,7 +61,7 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.ConfirmCards(1-tp,tc)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local ct=math.max(1,tc:GetLevel()//3)
local mat=mg:SelectSubGroup(tp,cm.fselect,false,ct,ct,c,tp)
local mat=mg:SelectSubGroup(tp,cm.fselect,false,ct,ct,tp)
if not mat or #mat==0 then return end
tc:SetMaterial(mat)
Duel.SendtoGrave(mat,REASON_EFFECT+REASON_MATERIAL+REASON_RITUAL)
......
......@@ -82,10 +82,11 @@ function cm.disop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetFieldGroup(tp,0,LOCATION_DECK)
if g:GetCount()>0 then
Duel.BreakEffect()
Duel.ConfirmCards(1-tp,g)
Duel.ConfirmCards(tp,g)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=g:Select(tp,1,1,nil)
Duel.SendtoHand(sg,tp,REASON_EFFECT)
Duel.ConfirmCards(1-tp,sg)
Duel.ShuffleDeck(1-tp)
end
end
......
......@@ -59,6 +59,7 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp)
e6:SetCode(EFFECT_CANNOT_ACTIVATE)
e6:SetTargetRange(1,0)
e6:SetValue(cm.aclimit)
e6:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e6,tp)
end
function cm.filter(c,sp)
......
......@@ -40,6 +40,9 @@ function c188811.initial_effect(c)
e4:SetOperation(c188811.xeqop)
c:RegisterEffect(e4)
end
function c188811.eqlimit(e,c)
return (c:IsRace(RACE_MACHINE) and c:IsAttribute(ATTRIBUTE_LIGHT)) or e:GetHandler():GetEquipTarget()==c
end
function c188811.filter(c)
local ct1,ct2=c:GetUnionCount()
return c:IsFaceup() and c:IsRace(RACE_MACHINE) and c:IsAttribute(ATTRIBUTE_WATER) and ct2==0
......@@ -109,7 +112,7 @@ function c188811.xeqop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsFaceup() and tc:IsRelateToEffect(e) and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local g=Duel.SelectMatchingCard(tp,c188811.unfil2,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,tp,tc)
local g=Duel.SelectMatchingCard(tp,c188811.unfil2,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,tp,tc)
local ec=g:GetFirst()
if ec and aux.CheckUnionEquip(ec,tc) and Duel.Equip(tp,ec,tc) then
aux.SetUnionState(ec)
......
......@@ -6,7 +6,7 @@ function c188813.initial_effect(c)
aux.EnableUnionAttribute(c,c188813.eqlimit)
--equip
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(188813,0))
e1:SetDescription(aux.Stringid(188811,0))
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCategory(CATEGORY_EQUIP)
e1:SetType(EFFECT_TYPE_IGNITION)
......@@ -25,7 +25,9 @@ function c188813.initial_effect(c)
c:RegisterEffect(e2)
--ac
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_EQUIP)
e3:SetRange(LOCATION_SZONE)
e3:SetCountLimit(1,188813)
e3:SetCondition(c188813.accon)
......@@ -33,6 +35,9 @@ function c188813.initial_effect(c)
e3:SetOperation(c188813.acop)
c:RegisterEffect(e3)
end
function c188813.eqlimit(e,c)
return (c:IsRace(RACE_MACHINE) and c:IsAttribute(ATTRIBUTE_LIGHT)) or e:GetHandler():GetEquipTarget()==c
end
function c188813.matfilter(c)
return c:IsType(TYPE_UNION) and not c:IsCode(188813)
end
......@@ -80,6 +85,9 @@ end
function c188813.acfilter(c,tp)
return c:IsCode(188812) and c:GetActivateEffect():IsActivatable(tp)
end
function c188813.accon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsContains(e:GetHandler())
end
function c188813.actg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c188813.acfilter,tp,LOCATION_DECK,0,1,nil,tp) end
end
......
--超硼素巨神 杰克南瓜
function c188815.initial_effect(c)
c:SetUniqueOnField(1,0,188815)
c:EnableReviveLimit()
--splimit
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetCode(EFFECT_SPSUMMON_CONDITION)
c:RegisterEffect(e0)
--spsummon1
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_GRAVE)
e1:SetCountLimit(1,188815)
e1:SetCost(c188815.spcost1)
e1:SetTarget(c188815.sptg1)
e1:SetOperation(c188815.spop1)
c:RegisterEffect(e1)
--spsummon2
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(188815,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_REMOVE)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_MZONE)
e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END)
e2:SetCountLimit(1,088815)
e2:SetCondition(c188815.spcon2)
e2:SetTarget(c188815.sptg2)
e2:SetOperation(c188815.spop2)
c:RegisterEffect(e2)
end
function c188815.spfilter1(c)
return c:IsRace(RACE_ZOMBIE) and c:IsAbleToGraveAsCost() and (Duel.GetMZoneCount(tp,c)>0 or c:IsLocation(LOCATION_HAND))
end
function c188815.fcheck(c,g)
return g:IsExists(Card.IsOriginalCodeRule,1,c,c:GetOriginalCodeRule())
end
function c188815.fselect(g)
return not g:IsExists(c188815.fcheck,1,nil,g)
end
function c188815.spcost1(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(c188815.ctfil,tp,LOCATION_HAND+LOCATION_ONFIELD,0,2,nil)
if chk==0 then return g:CheckSubGroup(c188815.fselect,2,99) end
local sg=g:SelectSubGroup(tp,c188815.fselect,false,2,99,g)
Duel.SendtoGrave(g,REASON_COST)
end
function c188815.sptg1(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
end
function c188815.spop1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
end
function c188815.spcon2(e,tp,eg,ep,ev,re,r,rp)
return (Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2)
end
function c188815.spfilter2(c,e,tp)
local code=c:GetCode()
return c:IsRace(RACE_ZOMBIE) and c:IsAbleToRemoveAsCost() and Duel.IsExistingMatchingCard(c188815.spfilter3,tp,LOCATION_DECK,0,1,nil,e,tp,code)
end
function c188815.spfilter2(c,e,tp,code)
return c:IsRace(RACE_ZOMBIE) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and not c:IsCode(code)
end
function c188815.sptg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c188815.spfilter2,tp,LOCATION_GRAVE,0,1,nil,e,tp) and c:IsAbleToRemove() end
local tc=Duel.SelectTarget(tp,c188815.spfilter2,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_MZONE)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,c,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,tc,1,0,0)
end
function c188815.spop2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)~=0 then
local code=tc:GetCode()
local g=Duel.GetMatchingGroup(c188815.spfilter3,tp,LOCATION_DECK,0,nil,e,tp,code)
if g:GetCount()<=0 then return end
local sc=g:Select(tp,1,1,nil):GetFirst()
if Duel.SpecialSummon(sc,0,tp,tp,false,false,POS_FACEUP) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_REDIRECT)
e1:SetValue(LOCATION_REMOVED)
sc:RegisterEffect(e1,true)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_TRIGGER)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
sc:RegisterEffect(e1)
if c:IsFaceup() and c:IsRelateToEffect(e) and c:IsAbleToRemove() then
Duel.BreakEffect()
if Duel.Remove(c,POS_FACEUP,REASON_EFFECT+REASON_TEMPORARY)~=0 then
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_PHASE+PHASE_END)
e2:SetReset(RESET_PHASE+PHASE_END)
e2:SetLabelObject(c)
e2:SetCountLimit(1)
e2:SetOperation(c188815.retop)
Duel.RegisterEffect(e2,tp)
end
end
end
end
end
function c188815.retop(e,tp,eg,ep,ev,re,r,rp)
Duel.ReturnToField(e:GetLabelObject())
end
......@@ -153,7 +153,7 @@ end
-- re:GetHandler():RegisterFlagEffect(m,RESET_CHAIN,0,1)
--end
function cm.chcon2(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetLP(e:GetHandlerPlayer())>=12000
return ep==1-tp and Duel.GetLP(e:GetHandlerPlayer())>=12000
end
function cm.chop2(e,tp,eg,ep,ev,re,r,rp)
local g=Group.CreateGroup()
......@@ -162,7 +162,7 @@ function cm.chop2(e,tp,eg,ep,ev,re,r,rp)
end
function cm.repop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,m)
Duel.Damage(tp-1,2000,REASON_EFFECT)
Duel.Damage(1-tp,2000,REASON_EFFECT)
Duel.Recover(tp,2000,REASON_EFFECT)
end
function cm.sumlimit(e,c,sump,sumtype,sumpos,targetp)
......
--守护天使 急诊天马
local m=m
local m=40009101
local cm=_G["c"..m]
cm.named_with_ProtectorSpirit=1
function cm.initial_effect(c)
......
......@@ -16,7 +16,6 @@ function cm.initial_effect(c)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCondition(cm.effcon)
e1:SetOperation(cm.effop)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
......@@ -51,15 +50,13 @@ end
-- Duel.Hint(HINT_CARD,0,m)
-- Duel.Destroy(e:GetHandler(),REASON_EFFECT)
--end
function cm.effcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_XYZ)
end
function cm.effop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsSummonType(SUMMON_TYPE_XYZ) then return end
local mg=c:GetMaterial()
for tc in aux.Next(mg) do
local code=tc:GetOriginalCode()
if code>53722000 and code<53722008 and c:GetFlagEffect(code)==0 and ((not g) or (not g:IsExists(cm.tgfil,1,nil,tp))) then
if code>53722000 and code<53722008 and c:GetFlagEffect(code)==0 then
c:CopyEffect(code,RESET_EVENT+RESETS_STANDARD,1)
c:RegisterFlagEffect(code,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(m,code-53722000))
end
......
......@@ -19,6 +19,7 @@ function cm.initial_effect(c)
e2:SetOperation(cm.imop)
c:RegisterEffect(e2)
end
cm.has_text_type=TYPE_DUAL
function cm.spfilter(c,e,tp)
return c:IsType(TYPE_DUAL) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
......
......@@ -88,16 +88,17 @@ function c67200415.desop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.SelectMatchingCard(tp,aux.TRUE,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
if g:GetCount()>0 then
Duel.HintSelection(g)
Duel.Destroy(g,REASON_EFFECT)
local ct=g:GetFirst():GetLevel()
if ct>0 and Duel.GetMatchingGroupCount(Card.IsCanAddCounter,tp,LOCATION_ONFIELD,0,nil,0x1,1)>0
and Duel.SelectYesNo(tp,aux.Stringid(67200415,4)) then
while ct>0 do
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_COUNTER)
local ttc=Duel.SelectMatchingCard(tp,Card.IsCanAddCounter,tp,LOCATION_ONFIELD,0,1,1,nil,0x1,1):GetFirst()
if not ttc then break end
ttc:AddCounter(0x1,1)
ct=ct-1
if Duel.Destroy(g,REASON_EFFECT)~=0 then
local ct=g:GetFirst():GetLevel()
if ct>0 and Duel.GetMatchingGroupCount(Card.IsCanAddCounter,tp,LOCATION_ONFIELD,0,nil,0x1,1)>0
and Duel.SelectYesNo(tp,aux.Stringid(67200415,4)) then
while ct>0 do
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_COUNTER)
local ttc=Duel.SelectMatchingCard(tp,Card.IsCanAddCounter,tp,LOCATION_ONFIELD,0,1,1,nil,0x1,1):GetFirst()
if not ttc then break end
ttc:AddCounter(0x1,1)
ct=ct-1
end
end
end
end
......
--术结天缘 古洛夫拉菲
function c67200433.initial_effect(c)
--c:EnableReviveLimit()
c:EnableReviveLimit()
aux.EnablePendulumAttribute(c,false)
aux.AddXyzProcedure(c,aux.FilterBoolFunction(Card.IsSetCard,0x5671),5,2)
--Activate
......
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