Commit efe25187 authored by 聖園ミカ's avatar 聖園ミカ 🐟

byd

parent 51bb0b60
Pipeline #30180 passed with stages
in 38 minutes and 19 seconds
...@@ -34,10 +34,6 @@ function cm.initial_effect(c) ...@@ -34,10 +34,6 @@ function cm.initial_effect(c)
e2:SetTarget(cm.sptg) e2:SetTarget(cm.sptg)
e2:SetOperation(cm.spop) e2:SetOperation(cm.spop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
local e4=e2:Clone()
e4:SetCategory(CATEGORY_REMOVE)
e4:SetTarget(cm.sptg2)
c:RegisterEffect(e4)
end end
function cm.cfilter(c,code) function cm.cfilter(c,code)
return c:IsFaceup() and c:IsCode(code) return c:IsFaceup() and c:IsCode(code)
...@@ -96,7 +92,7 @@ function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -96,7 +92,7 @@ function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
local sa=c:IsLocation(LOCATION_HAND) and Duel.GetFlagEffect(tp,m+1)==0 local sa=c:IsLocation(LOCATION_HAND) and Duel.GetFlagEffect(tp,m+1)==0
local sb=c:IsLocation(LOCATION_REMOVED) and Duel.GetFlagEffect(tp,m+10)==0 local sb=c:IsLocation(LOCATION_REMOVED) and Duel.GetFlagEffect(tp,m+10)==0
if chk==0 then return (Duel.GetCurrentChain()>0 and (c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0)) and Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,0,LOCATION_HAND,1,nil) and (sa or sb) end if chk==0 then return (Duel.GetCurrentChain()==0 or (c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0)) and Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,0,LOCATION_HAND,1,nil) and (sa or sb) end
Duel.Hint(HINT_OPSELECTED,tp,e:GetDescription()) Duel.Hint(HINT_OPSELECTED,tp,e:GetDescription())
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription()) Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
if c:IsLocation(LOCATION_HAND) then if c:IsLocation(LOCATION_HAND) then
...@@ -105,21 +101,12 @@ function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -105,21 +101,12 @@ function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.RegisterFlagEffect(tp,m+10,RESET_PHASE+PHASE_END,0,1) Duel.RegisterFlagEffect(tp,m+10,RESET_PHASE+PHASE_END,0,1)
end end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,1-tp,LOCATION_HAND) Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,1-tp,LOCATION_HAND)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0) if Duel.GetCurrentChain()==1 then
end e:SetCategory(CATEGORY_REMOVE)
function cm.sptg2(e,tp,eg,ep,ev,re,r,rp,chk) else
local c=e:GetHandler() e:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_REMOVE)
local sa=c:IsLocation(LOCATION_HAND) and Duel.GetFlagEffect(tp,m+1)==0 Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
local sb=c:IsLocation(LOCATION_REMOVED) and Duel.GetFlagEffect(tp,m+10)==0
if chk==0 then return Duel.GetCurrentChain()==0 and Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,0,LOCATION_HAND,1,nil) and (sa or sb) end
Duel.Hint(HINT_OPSELECTED,tp,e:GetDescription())
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
if c:IsLocation(LOCATION_HAND) then
Duel.RegisterFlagEffect(tp,m+1,RESET_PHASE+PHASE_END,0,1)
elseif c:IsLocation(LOCATION_REMOVED) then
Duel.RegisterFlagEffect(tp,m+10,RESET_PHASE+PHASE_END,0,1)
end end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,1-tp,LOCATION_HAND)
end end
function cm.spop(e,tp,eg,ep,ev,re,r,rp) function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
......
...@@ -35,10 +35,6 @@ function cm.initial_effect(c) ...@@ -35,10 +35,6 @@ function cm.initial_effect(c)
e2:SetTarget(cm.sptg) e2:SetTarget(cm.sptg)
e2:SetOperation(cm.spop) e2:SetOperation(cm.spop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
local e4=e2:Clone()
e4:SetCategory(CATEGORY_REMOVE)
e4:SetTarget(cm.sptg2)
c:RegisterEffect(e4)
end end
function cm.thfilter(c,tp) function cm.thfilter(c,tp)
return Duel.GetMZoneCount(tp,c)>0 and c:IsAbleToRemove() return Duel.GetMZoneCount(tp,c)>0 and c:IsAbleToRemove()
...@@ -88,7 +84,7 @@ function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -88,7 +84,7 @@ function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local sa=c:IsLocation(LOCATION_HAND) and Duel.GetFlagEffect(tp,m+1)==0 local sa=c:IsLocation(LOCATION_HAND) and Duel.GetFlagEffect(tp,m+1)==0
local sb=c:IsLocation(LOCATION_REMOVED) and Duel.GetFlagEffect(tp,m+10)==0 local sb=c:IsLocation(LOCATION_REMOVED) and Duel.GetFlagEffect(tp,m+10)==0
if chkc then return chkc:IsOnField() and chkc:IsControler(tp) and cm.desfilter(chkc,tp) end if chkc then return chkc:IsOnField() and chkc:IsControler(tp) and cm.desfilter(chkc,tp) end
if chk==0 then return (Duel.GetCurrentChain()>0 and (c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0)) and Duel.IsExistingTarget(cm.refilter,tp,0,LOCATION_ONFIELD,1,nil) and (sa or sb) end if chk==0 then return (Duel.GetCurrentChain()==0 or (c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0)) and Duel.IsExistingTarget(cm.refilter,tp,0,LOCATION_ONFIELD,1,nil) and (sa or sb) end
Duel.Hint(HINT_OPSELECTED,tp,e:GetDescription()) Duel.Hint(HINT_OPSELECTED,tp,e:GetDescription())
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription()) Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
if c:IsLocation(LOCATION_HAND) then if c:IsLocation(LOCATION_HAND) then
...@@ -99,24 +95,12 @@ function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -99,24 +95,12 @@ function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectTarget(tp,cm.refilter,tp,0,LOCATION_ONFIELD,1,1,nil) local g=Duel.SelectTarget(tp,cm.refilter,tp,0,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0) if Duel.GetCurrentChain()==1 then
end e:SetCategory(CATEGORY_REMOVE)
function cm.sptg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc) else
local c=e:GetHandler() e:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_REMOVE)
local sa=c:IsLocation(LOCATION_HAND) and Duel.GetFlagEffect(tp,m+1)==0 Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
local sb=c:IsLocation(LOCATION_REMOVED) and Duel.GetFlagEffect(tp,m+10)==0
if chkc then return chkc:IsOnField() and chkc:IsControler(tp) and cm.desfilter(chkc,tp) end
if chk==0 then return Duel.GetCurrentChain()==0 and Duel.IsExistingTarget(cm.refilter,tp,0,LOCATION_ONFIELD,1,nil) and (sa or sb) end
Duel.Hint(HINT_OPSELECTED,tp,e:GetDescription())
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
if c:IsLocation(LOCATION_HAND) then
Duel.RegisterFlagEffect(tp,m+1,RESET_PHASE+PHASE_END,0,1)
elseif c:IsLocation(LOCATION_REMOVED) then
Duel.RegisterFlagEffect(tp,m+10,RESET_PHASE+PHASE_END,0,1)
end end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectTarget(tp,cm.refilter,tp,0,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0)
end end
function cm.spop(e,tp,eg,ep,ev,re,r,rp) function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
......
...@@ -34,10 +34,6 @@ function cm.initial_effect(c) ...@@ -34,10 +34,6 @@ function cm.initial_effect(c)
e2:SetTarget(cm.sptg) e2:SetTarget(cm.sptg)
e2:SetOperation(cm.spop) e2:SetOperation(cm.spop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
local e4=e2:Clone()
e4:SetCategory(CATEGORY_REMOVE+CATEGORY_GRAVE_ACTION)
e4:SetTarget(cm.sptg2)
c:RegisterEffect(e4)
end end
function cm.cfilter(c,code) function cm.cfilter(c,code)
return c:IsFaceup() and c:IsCode(code) return c:IsFaceup() and c:IsCode(code)
...@@ -100,7 +96,7 @@ function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -100,7 +96,7 @@ function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
local sa=c:IsLocation(LOCATION_HAND) and Duel.GetFlagEffect(tp,m+1)==0 local sa=c:IsLocation(LOCATION_HAND) and Duel.GetFlagEffect(tp,m+1)==0
local sb=c:IsLocation(LOCATION_REMOVED) and Duel.GetFlagEffect(tp,m+10)==0 local sb=c:IsLocation(LOCATION_REMOVED) and Duel.GetFlagEffect(tp,m+10)==0
if chk==0 then return (Duel.GetCurrentChain()>0 and (c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0)) and Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil) and (sa or sb) end if chk==0 then return (Duel.GetCurrentChain()==0 or (c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0)) and Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil) and (sa or sb) end
Duel.Hint(HINT_OPSELECTED,tp,e:GetDescription()) Duel.Hint(HINT_OPSELECTED,tp,e:GetDescription())
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription()) Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
if c:IsLocation(LOCATION_HAND) then if c:IsLocation(LOCATION_HAND) then
...@@ -109,21 +105,12 @@ function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -109,21 +105,12 @@ function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.RegisterFlagEffect(tp,m+10,RESET_PHASE+PHASE_END,0,1) Duel.RegisterFlagEffect(tp,m+10,RESET_PHASE+PHASE_END,0,1)
end end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,PLAYER_ALL,LOCATION_GRAVE) Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,PLAYER_ALL,LOCATION_GRAVE)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0) if Duel.GetCurrentChain()==1 then
end e:SetCategory(CATEGORY_REMOVE+CATEGORY_GRAVE_ACTION)
function cm.sptg2(e,tp,eg,ep,ev,re,r,rp,chk) else
local c=e:GetHandler() e:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_REMOVE+CATEGORY_GRAVE_ACTION)
local sa=c:IsLocation(LOCATION_HAND) and Duel.GetFlagEffect(tp,m+1)==0 Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
local sb=c:IsLocation(LOCATION_REMOVED) and Duel.GetFlagEffect(tp,m+10)==0
if chk==0 then return Duel.GetCurrentChain()==0 and Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil) and (sa or sb) end
Duel.Hint(HINT_OPSELECTED,tp,e:GetDescription())
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
if c:IsLocation(LOCATION_HAND) then
Duel.RegisterFlagEffect(tp,m+1,RESET_PHASE+PHASE_END,0,1)
elseif c:IsLocation(LOCATION_REMOVED) then
Duel.RegisterFlagEffect(tp,m+10,RESET_PHASE+PHASE_END,0,1)
end end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,PLAYER_ALL,LOCATION_GRAVE)
end end
function cm.spop(e,tp,eg,ep,ev,re,r,rp) function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
......
...@@ -36,10 +36,6 @@ function cm.initial_effect(c) ...@@ -36,10 +36,6 @@ function cm.initial_effect(c)
e2:SetTarget(cm.sptg) e2:SetTarget(cm.sptg)
e2:SetOperation(cm.spop) e2:SetOperation(cm.spop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
local e4=e2:Clone()
e4:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e4:SetTarget(cm.sptg2)
c:RegisterEffect(e4)
end end
function cm.thfilter(c,tp) function cm.thfilter(c,tp)
return Duel.GetMZoneCount(tp,c)>0 and c:IsAbleToRemove() return Duel.GetMZoneCount(tp,c)>0 and c:IsAbleToRemove()
...@@ -104,7 +100,7 @@ function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -104,7 +100,7 @@ function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
local sa=c:IsLocation(LOCATION_HAND) and Duel.GetFlagEffect(tp,m+1)==0 local sa=c:IsLocation(LOCATION_HAND) and Duel.GetFlagEffect(tp,m+1)==0
local sb=c:IsLocation(LOCATION_REMOVED) and Duel.GetFlagEffect(tp,m+10)==0 local sb=c:IsLocation(LOCATION_REMOVED) and Duel.GetFlagEffect(tp,m+10)==0
if chk==0 then return (Duel.GetCurrentChain()>0 and (c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0)) and Duel.IsExistingMatchingCard(cm.thfilter2,tp,LOCATION_DECK,0,1,nil) and (sa or sb) end if chk==0 then return (Duel.GetCurrentChain()==0 or (c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0)) and Duel.IsExistingMatchingCard(cm.thfilter2,tp,LOCATION_DECK,0,1,nil) and (sa or sb) end
Duel.Hint(HINT_OPSELECTED,tp,e:GetDescription()) Duel.Hint(HINT_OPSELECTED,tp,e:GetDescription())
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription()) Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
if c:IsLocation(LOCATION_HAND) then if c:IsLocation(LOCATION_HAND) then
...@@ -113,21 +109,12 @@ function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -113,21 +109,12 @@ function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.RegisterFlagEffect(tp,m+10,RESET_PHASE+PHASE_END,0,1) Duel.RegisterFlagEffect(tp,m+10,RESET_PHASE+PHASE_END,0,1)
end end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0) if Duel.GetCurrentChain()==1 then
end e:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
function cm.sptg2(e,tp,eg,ep,ev,re,r,rp,chk) else
local c=e:GetHandler() e:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOHAND+CATEGORY_SEARCH)
local sa=c:IsLocation(LOCATION_HAND) and Duel.GetFlagEffect(tp,m+1)==0 Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
local sb=c:IsLocation(LOCATION_REMOVED) and Duel.GetFlagEffect(tp,m+10)==0
if chk==0 then return Duel.GetCurrentChain()==0 and Duel.IsExistingMatchingCard(cm.thfilter2,tp,LOCATION_DECK,0,1,nil) and (sa or sb) end
Duel.Hint(HINT_OPSELECTED,tp,e:GetDescription())
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
if c:IsLocation(LOCATION_HAND) then
Duel.RegisterFlagEffect(tp,m+1,RESET_PHASE+PHASE_END,0,1)
elseif c:IsLocation(LOCATION_REMOVED) then
Duel.RegisterFlagEffect(tp,m+10,RESET_PHASE+PHASE_END,0,1)
end end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end end
function cm.spop(e,tp,eg,ep,ev,re,r,rp) function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
......
...@@ -34,10 +34,6 @@ function cm.initial_effect(c) ...@@ -34,10 +34,6 @@ function cm.initial_effect(c)
e2:SetTarget(cm.sptg) e2:SetTarget(cm.sptg)
e2:SetOperation(cm.spop) e2:SetOperation(cm.spop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
local e4=e2:Clone()
e4:SetCategory(CATEGORY_REMOVE)
e4:SetTarget(cm.sptg2)
c:RegisterEffect(e4)
end end
function cm.cfilter(c,code) function cm.cfilter(c,code)
return c:IsFaceup() and c:IsCode(code) return c:IsFaceup() and c:IsCode(code)
...@@ -97,7 +93,7 @@ function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -97,7 +93,7 @@ function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local sa=c:IsLocation(LOCATION_HAND) and Duel.GetFlagEffect(tp,m+1)==0 local sa=c:IsLocation(LOCATION_HAND) and Duel.GetFlagEffect(tp,m+1)==0
local sb=c:IsLocation(LOCATION_REMOVED) and Duel.GetFlagEffect(tp,m+10)==0 local sb=c:IsLocation(LOCATION_REMOVED) and Duel.GetFlagEffect(tp,m+10)==0
local rg=Duel.GetDecktopGroup(tp,2) local rg=Duel.GetDecktopGroup(tp,2)
if chk==0 then return (Duel.GetCurrentChain()>0 and (c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0)) and rg:FilterCount(Card.IsAbleToRemove,nil)==2 and (sa or sb) end if chk==0 then return (Duel.GetCurrentChain()==0 or (c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0)) and rg:FilterCount(Card.IsAbleToRemove,nil)==2 and (sa or sb) end
Duel.Hint(HINT_OPSELECTED,tp,e:GetDescription()) Duel.Hint(HINT_OPSELECTED,tp,e:GetDescription())
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription()) Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
if c:IsLocation(LOCATION_HAND) then if c:IsLocation(LOCATION_HAND) then
...@@ -106,22 +102,12 @@ function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -106,22 +102,12 @@ function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.RegisterFlagEffect(tp,m+10,RESET_PHASE+PHASE_END,0,1) Duel.RegisterFlagEffect(tp,m+10,RESET_PHASE+PHASE_END,0,1)
end end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,rg,2,0,0) Duel.SetOperationInfo(0,CATEGORY_REMOVE,rg,2,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0) if Duel.GetCurrentChain()==1 then
end e:SetCategory(CATEGORY_REMOVE)
function cm.sptg2(e,tp,eg,ep,ev,re,r,rp,chk) else
local c=e:GetHandler() e:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_REMOVE)
local sa=c:IsLocation(LOCATION_HAND) and Duel.GetFlagEffect(tp,m+1)==0 Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
local sb=c:IsLocation(LOCATION_REMOVED) and Duel.GetFlagEffect(tp,m+10)==0
local rg=Duel.GetDecktopGroup(tp,2)
if chk==0 then return Duel.GetCurrentChain()==0 and rg:FilterCount(Card.IsAbleToRemove,nil)==2 and (sa or sb) end
Duel.Hint(HINT_OPSELECTED,tp,e:GetDescription())
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
if c:IsLocation(LOCATION_HAND) then
Duel.RegisterFlagEffect(tp,m+1,RESET_PHASE+PHASE_END,0,1)
elseif c:IsLocation(LOCATION_REMOVED) then
Duel.RegisterFlagEffect(tp,m+10,RESET_PHASE+PHASE_END,0,1)
end end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,rg,2,0,0)
end end
function cm.spop(e,tp,eg,ep,ev,re,r,rp) function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
......
...@@ -36,10 +36,6 @@ function cm.initial_effect(c) ...@@ -36,10 +36,6 @@ function cm.initial_effect(c)
e2:SetTarget(cm.sptg) e2:SetTarget(cm.sptg)
e2:SetOperation(cm.spop) e2:SetOperation(cm.spop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
local e4=e2:Clone()
e4:SetCategory(CATEGORY_DRAW)
e4:SetTarget(cm.sptg2)
c:RegisterEffect(e4)
end end
function cm.thfilter(c,tp) function cm.thfilter(c,tp)
return Duel.GetMZoneCount(tp,c)>0 and c:IsAbleToRemove() return Duel.GetMZoneCount(tp,c)>0 and c:IsAbleToRemove()
...@@ -101,7 +97,7 @@ function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -101,7 +97,7 @@ function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
local sa=c:IsLocation(LOCATION_HAND) and Duel.GetFlagEffect(tp,m+1)==0 local sa=c:IsLocation(LOCATION_HAND) and Duel.GetFlagEffect(tp,m+1)==0
local sb=c:IsLocation(LOCATION_REMOVED) and Duel.GetFlagEffect(tp,m+10)==0 local sb=c:IsLocation(LOCATION_REMOVED) and Duel.GetFlagEffect(tp,m+10)==0
if chk==0 then return (Duel.GetCurrentChain()>0 and (c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0)) and Duel.IsPlayerCanDraw(tp,1) and (sa or sb) end if chk==0 then return (Duel.GetCurrentChain()==0 or (c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0)) and Duel.IsPlayerCanDraw(tp,1) and (sa or sb) end
Duel.Hint(HINT_OPSELECTED,tp,e:GetDescription()) Duel.Hint(HINT_OPSELECTED,tp,e:GetDescription())
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription()) Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
if c:IsLocation(LOCATION_HAND) then if c:IsLocation(LOCATION_HAND) then
...@@ -110,21 +106,12 @@ function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -110,21 +106,12 @@ function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.RegisterFlagEffect(tp,m+10,RESET_PHASE+PHASE_END,0,1) Duel.RegisterFlagEffect(tp,m+10,RESET_PHASE+PHASE_END,0,1)
end end
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0) if Duel.GetCurrentChain()==1 then
end e:SetCategory(CATEGORY_DRAW)
function cm.sptg2(e,tp,eg,ep,ev,re,r,rp,chk) else
local c=e:GetHandler() e:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DRAW)
local sa=c:IsLocation(LOCATION_HAND) and Duel.GetFlagEffect(tp,m+1)==0 Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
local sb=c:IsLocation(LOCATION_REMOVED) and Duel.GetFlagEffect(tp,m+10)==0
if chk==0 then return Duel.GetCurrentChain()==0 and Duel.IsPlayerCanDraw(tp,1) and (sa or sb) end
Duel.Hint(HINT_OPSELECTED,tp,e:GetDescription())
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
if c:IsLocation(LOCATION_HAND) then
Duel.RegisterFlagEffect(tp,m+1,RESET_PHASE+PHASE_END,0,1)
elseif c:IsLocation(LOCATION_REMOVED) then
Duel.RegisterFlagEffect(tp,m+10,RESET_PHASE+PHASE_END,0,1)
end end
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end end
function cm.spop(e,tp,eg,ep,ev,re,r,rp) function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
......
...@@ -34,14 +34,6 @@ function cm.initial_effect(c) ...@@ -34,14 +34,6 @@ function cm.initial_effect(c)
e2:SetTarget(cm.sptg) e2:SetTarget(cm.sptg)
e2:SetOperation(cm.spop) e2:SetOperation(cm.spop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
local e4=e2:Clone()
e4:SetCategory(CATEGORY_REMOVE)
e4:SetRange(LOCATION_HAND)
e4:SetTarget(cm.sptg2)
c:RegisterEffect(e4)
local e5=e4:Clone()
e5:SetRange(LOCATION_REMOVED)
c:RegisterEffect(e5)
end end
function cm.thfilter(c,e,tp) function cm.thfilter(c,e,tp)
return c:IsSetCard(0x9977) and c:IsType(TYPE_MONSTER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsSetCard(0x9977) and c:IsType(TYPE_MONSTER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
...@@ -110,7 +102,7 @@ function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -110,7 +102,7 @@ function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local nsp=Duel.GetCurrentChain()==0 local nsp=Duel.GetCurrentChain()==0
local fd=nsp and 0 or 1 local fd=nsp and 0 or 1
local exc=not nsp and c local exc=not nsp and c
return (Duel.GetCurrentChain()>0 and (c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0)) and Duel.IsExistingMatchingCard(cm.setfilter,tp,LOCATION_REMOVED,0,1,exc,e,tp,fd) and (sa or sb) return (Duel.GetCurrentChain()==0 or (c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0)) and Duel.IsExistingMatchingCard(cm.setfilter,tp,LOCATION_REMOVED,0,1,exc,e,tp,fd) and (sa or sb)
end end
Duel.Hint(HINT_OPSELECTED,tp,e:GetDescription()) Duel.Hint(HINT_OPSELECTED,tp,e:GetDescription())
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription()) Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
...@@ -119,24 +111,8 @@ function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -119,24 +111,8 @@ function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
elseif c:IsLocation(LOCATION_REMOVED) then elseif c:IsLocation(LOCATION_REMOVED) then
Duel.RegisterFlagEffect(tp,m,RESET_PHASE+PHASE_END,0,1) Duel.RegisterFlagEffect(tp,m,RESET_PHASE+PHASE_END,0,1)
end end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0) if Duel.GetCurrentChain()>1 then
end Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
function cm.sptg2(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local sa=c:IsLocation(LOCATION_HAND) and Duel.GetFlagEffect(tp,m-1)==0
local sb=c:IsLocation(LOCATION_REMOVED) and Duel.GetFlagEffect(tp,m)==0
if chk==0 then
local nsp=Duel.GetCurrentChain()==0
local fd=nsp and 0 or 1
local exc=not nsp and c
return Duel.GetCurrentChain()==0 and Duel.IsExistingMatchingCard(cm.setfilter,tp,LOCATION_REMOVED,0,1,exc,e,tp,fd) and (sa or sb)
end
Duel.Hint(HINT_OPSELECTED,tp,e:GetDescription())
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
if c:IsLocation(LOCATION_HAND) then
Duel.RegisterFlagEffect(tp,m-1,RESET_PHASE+PHASE_END,0,1)
elseif c:IsLocation(LOCATION_REMOVED) then
Duel.RegisterFlagEffect(tp,m,RESET_PHASE+PHASE_END,0,1)
end end
end end
function cm.spop(e,tp,eg,ep,ev,re,r,rp) function cm.spop(e,tp,eg,ep,ev,re,r,rp)
......
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