Commit 6adef3e8 authored by 聖園ミカ's avatar 聖園ミカ 🐟

byd

parent 033a3981
No preview for this file type
...@@ -34,6 +34,10 @@ function cm.initial_effect(c) ...@@ -34,6 +34,10 @@ 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)
...@@ -92,7 +96,7 @@ function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -92,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 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 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
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
...@@ -101,12 +105,21 @@ function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -101,12 +105,21 @@ 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)
if Duel.GetCurrentChain()==1 then Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
e:SetCategory(CATEGORY_REMOVE) end
else function cm.sptg2(e,tp,eg,ep,ev,re,r,rp,chk)
e:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_REMOVE) local c=e:GetHandler()
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,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
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,6 +35,10 @@ function cm.initial_effect(c) ...@@ -35,6 +35,10 @@ 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()
...@@ -84,7 +88,7 @@ function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -84,7 +88,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 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 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
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
...@@ -95,12 +99,24 @@ function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -95,12 +99,24 @@ 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)
if Duel.GetCurrentChain()==1 then Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
e:SetCategory(CATEGORY_REMOVE) end
else function cm.sptg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
e:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_REMOVE) local c=e:GetHandler()
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,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
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,6 +34,10 @@ function cm.initial_effect(c) ...@@ -34,6 +34,10 @@ 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)
...@@ -96,7 +100,7 @@ function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -96,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 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 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
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,12 +109,21 @@ function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -105,12 +109,21 @@ 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)
if Duel.GetCurrentChain()==1 then Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
e:SetCategory(CATEGORY_REMOVE+CATEGORY_GRAVE_ACTION) end
else function cm.sptg2(e,tp,eg,ep,ev,re,r,rp,chk)
e:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_REMOVE+CATEGORY_GRAVE_ACTION) local c=e:GetHandler()
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,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
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,6 +36,10 @@ function cm.initial_effect(c) ...@@ -36,6 +36,10 @@ 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()
...@@ -100,7 +104,7 @@ function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -100,7 +104,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 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 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
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,12 +113,21 @@ function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -109,12 +113,21 @@ 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)
if Duel.GetCurrentChain()==1 then Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
e:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) end
else function cm.sptg2(e,tp,eg,ep,ev,re,r,rp,chk)
e:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOHAND+CATEGORY_SEARCH) local c=e:GetHandler()
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,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
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,6 +34,10 @@ function cm.initial_effect(c) ...@@ -34,6 +34,10 @@ 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)
...@@ -93,7 +97,7 @@ function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -93,7 +97,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 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 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
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
...@@ -102,12 +106,22 @@ function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -102,12 +106,22 @@ 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)
if Duel.GetCurrentChain()==1 then Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
e:SetCategory(CATEGORY_REMOVE) end
else function cm.sptg2(e,tp,eg,ep,ev,re,r,rp,chk)
e:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_REMOVE) local c=e:GetHandler()
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,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 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,6 +36,10 @@ function cm.initial_effect(c) ...@@ -36,6 +36,10 @@ 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()
...@@ -97,7 +101,7 @@ function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -97,7 +101,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 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 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
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,12 +110,21 @@ function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -106,12 +110,21 @@ 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)
if Duel.GetCurrentChain()==1 then Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
e:SetCategory(CATEGORY_DRAW) end
else function cm.sptg2(e,tp,eg,ep,ev,re,r,rp,chk)
e:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DRAW) local c=e:GetHandler()
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,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
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,6 +34,14 @@ function cm.initial_effect(c) ...@@ -34,6 +34,14 @@ 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)
...@@ -102,7 +110,7 @@ function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -102,7 +110,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 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) 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)
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())
...@@ -111,8 +119,24 @@ function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -111,8 +119,24 @@ 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
if Duel.GetCurrentChain()>1 then Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0) end
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)
......
...@@ -7,15 +7,15 @@ function cm.initial_effect(c) ...@@ -7,15 +7,15 @@ function cm.initial_effect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_DESTROYED) e1:SetCode(EVENT_DESTROYED)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY) e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e1:SetRange(LOCATION_HAND+LOCATION_MZONE) e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,EFFECT_COUNT_CODE_CHAIN) e1:SetCountLimit(1,EFFECT_COUNT_CODE_CHAIN)
e1:SetCondition(cm.spcon) e1:SetCondition(cm.spcon)
e1:SetTarget(cm.sptg) e1:SetTarget(cm.sptg)
e1:SetOperation(cm.spop) e1:SetOperation(cm.spop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
local e2=e1:Clone() local e2=e1:Clone()
e2:SetCode(EVENT_REMOVE) e2:SetRange(LOCATION_MZONE)
--c:RegisterEffect(e2) c:RegisterEffect(e2)
--to hand --to hand
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,1)) e3:SetDescription(aux.Stringid(m,1))
...@@ -71,8 +71,7 @@ function cm.spcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -71,8 +71,7 @@ function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
end end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
--c:IsCanBeSpecialSummoned(e,0,tp,false,false) or if chk==0 then return (not c:IsLocation(LOCATION_HAND) or c:IsCanBeSpecialSummoned(e,0,tp,false,false) or 1==1) and (c:IsSummonable(true,nil) or (c:IsAbleToHand() and c:IsLocation(LOCATION_MZONE))) end
if chk==0 then return (1==1) and (c:IsSummonable(true,nil) or (c:IsAbleToHand() and c:IsLocation(LOCATION_MZONE))) end
if c:IsLocation(LOCATION_HAND) then if c:IsLocation(LOCATION_HAND) then
Duel.SetOperationInfo(0,CATEGORY_SUMMON,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_SUMMON,e:GetHandler(),1,0,0)
elseif c:IsLocation(LOCATION_MZONE) then elseif c:IsLocation(LOCATION_MZONE) then
......
...@@ -41,7 +41,7 @@ function cm.check(g,tp) ...@@ -41,7 +41,7 @@ function cm.check(g,tp)
return Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_DECK+LOCATION_EXTRA+LOCATION_REMOVED,0,1,g) return Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_DECK+LOCATION_EXTRA+LOCATION_REMOVED,0,1,g)
end end
function cm.filter(c) function cm.filter(c)
return c:IsFaceupEx() and c:IsType(TYPE_PENDULUM) and not c:IsForbidden() return c:IsFaceupEx() and c:IsType(TYPE_PENDULUM) and not c:IsForbidden() and c:IsSetCard(0x821)
end end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk) function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return (e:IsCostChecked() if chk==0 then return (e:IsCostChecked()
......
...@@ -7,9 +7,9 @@ function cm.initial_effect(c) ...@@ -7,9 +7,9 @@ function cm.initial_effect(c)
e11:SetDescription(aux.Stringid(m,1)) e11:SetDescription(aux.Stringid(m,1))
e11:SetCategory(CATEGORY_SPECIAL_SUMMON) e11:SetCategory(CATEGORY_SPECIAL_SUMMON)
e11:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e11:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e11:SetRange(LOCATION_HAND+LOCATION_GRAVE)
e11:SetCode(EVENT_SPSUMMON_SUCCESS) e11:SetCode(EVENT_SPSUMMON_SUCCESS)
e11:SetProperty(EFFECT_FLAG_DELAY) e11:SetProperty(EFFECT_FLAG_DELAY)
e11:SetRange(LOCATION_HAND+LOCATION_GRAVE)
e11:SetCountLimit(1,m+10000000) e11:SetCountLimit(1,m+10000000)
e11:SetCondition(cm.spcon) e11:SetCondition(cm.spcon)
e11:SetTarget(cm.sptg) e11:SetTarget(cm.sptg)
...@@ -31,7 +31,7 @@ function cm.cfilter(c,tp) ...@@ -31,7 +31,7 @@ function cm.cfilter(c,tp)
end end
function cm.spcon(e,tp,eg,ep,ev,re,r,rp) function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
return eg:IsExists(cm.cfilter,1,nil,tp) return true
end end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
...@@ -91,8 +91,8 @@ function cm.thop(e,tp,eg,ep,ev,re,r,rp) ...@@ -91,8 +91,8 @@ function cm.thop(e,tp,eg,ep,ev,re,r,rp)
e3:SetRange(LOCATION_MZONE) e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,m+30000000) e3:SetCountLimit(1,m+30000000)
e3:SetCondition(cm.con) e3:SetCondition(cm.con)
e3:SetTarget(cm.sptg) e3:SetTarget(cm.sytg)
e3:SetOperation(cm.spop) e3:SetOperation(cm.syop)
e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE+RESET_PHASE+PHASE_END) e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE+RESET_PHASE+PHASE_END)
c:RegisterEffect(e3) c:RegisterEffect(e3)
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
...@@ -110,7 +110,7 @@ function cm.thop(e,tp,eg,ep,ev,re,r,rp) ...@@ -110,7 +110,7 @@ function cm.thop(e,tp,eg,ep,ev,re,r,rp)
c:RegisterEffect(e3) c:RegisterEffect(e3)
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,3)) e3:SetDescription(aux.Stringid(m,3))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON) e3:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON)
e3:SetType(EFFECT_TYPE_QUICK_O) e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN) e3:SetCode(EVENT_FREE_CHAIN)
e3:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END) e3:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END)
...@@ -144,12 +144,12 @@ function cm.lkop(e,tp,eg,ep,ev,re,r,rp) ...@@ -144,12 +144,12 @@ function cm.lkop(e,tp,eg,ep,ev,re,r,rp)
Duel.LinkSummon(tp,sg:GetFirst(),nil,c) Duel.LinkSummon(tp,sg:GetFirst(),nil,c)
end end
end end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function cm.sytg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not e:GetHandler():IsStatus(STATUS_CHAINING) if chk==0 then return not e:GetHandler():IsStatus(STATUS_CHAINING)
and Duel.IsExistingMatchingCard(Card.IsSynchroSummonable,tp,LOCATION_EXTRA,0,1,nil,e:GetHandler()) end and Duel.IsExistingMatchingCard(Card.IsSynchroSummonable,tp,LOCATION_EXTRA,0,1,nil,e:GetHandler()) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end end
function cm.spop(e,tp,eg,ep,ev,re,r,rp) function cm.syop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if c:IsControler(1-tp) or not c:IsRelateToEffect(e) or c:IsFacedown() then return end if c:IsControler(1-tp) or not c:IsRelateToEffect(e) or c:IsFacedown() then return end
local g=Duel.GetMatchingGroup(Card.IsSynchroSummonable,tp,LOCATION_EXTRA,0,nil,c) local g=Duel.GetMatchingGroup(Card.IsSynchroSummonable,tp,LOCATION_EXTRA,0,nil,c)
......
...@@ -78,5 +78,6 @@ function cm.matfilter(c) ...@@ -78,5 +78,6 @@ function cm.matfilter(c)
return c:IsSummonLocation(LOCATION_EXTRA) and c:IsLocation(LOCATION_MZONE) return c:IsSummonLocation(LOCATION_EXTRA) and c:IsLocation(LOCATION_MZONE)
end end
function cm.ffilter(c) function cm.ffilter(c)
return aux.FilterBoolFunction(aux.IsCodeListed,65700005) and c:IsType(TYPE_MONSTER) return aux.IsCodeListed(c,65700005) and c:IsType(TYPE_MONSTER)
end end
\ No newline at end of file
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