Commit 9ed38dcc authored by POLYMER's avatar POLYMER

fix

parent 5bb5681e
...@@ -217,7 +217,7 @@ function cm.chop2(e,tp,eg,ep,ev,re,r,rp) ...@@ -217,7 +217,7 @@ function cm.chop2(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetDescription(aux.Stringid(11451461,5)) e1:SetDescription(aux.Stringid(11451461,5))
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CLIENT_HINT) e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CLIENT_HINT+EFFECT_FLAG_SET_AVAILABLE+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_ADD_CODE) e1:SetCode(EFFECT_ADD_CODE)
e1:SetRange(0xff) e1:SetRange(0xff)
e1:SetReset(RESET_PHASE+PHASE_END) e1:SetReset(RESET_PHASE+PHASE_END)
......
...@@ -52,6 +52,8 @@ function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -52,6 +52,8 @@ function cm.thtg(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
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK,0,1,nil) and (sa or sb) and Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,LOCATION_ONFIELD+LOCATION_HAND,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK,0,1,nil) and (sa or sb) and Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,LOCATION_ONFIELD+LOCATION_HAND,0,1,nil) end
Duel.Hint(HINT_OPSELECTED,tp,e:GetDescription())
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
if c:IsLocation(LOCATION_HAND) then if c:IsLocation(LOCATION_HAND) then
Duel.RegisterFlagEffect(tp,m+1,RESET_PHASE+PHASE_END,0,1) Duel.RegisterFlagEffect(tp,m+1,RESET_PHASE+PHASE_END,0,1)
elseif c:IsLocation(LOCATION_REMOVED) then elseif c:IsLocation(LOCATION_REMOVED) then
...@@ -91,6 +93,8 @@ function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -91,6 +93,8 @@ 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
if chk==0 then return c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,0,LOCATION_HAND,1,nil) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and (sa or sb) end if chk==0 then return c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,0,LOCATION_HAND,1,nil) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 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 if c:IsLocation(LOCATION_HAND) then
Duel.RegisterFlagEffect(tp,m+1,RESET_PHASE+PHASE_END,0,1) Duel.RegisterFlagEffect(tp,m+1,RESET_PHASE+PHASE_END,0,1)
elseif c:IsLocation(LOCATION_REMOVED) then elseif c:IsLocation(LOCATION_REMOVED) then
......
...@@ -48,6 +48,8 @@ function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -48,6 +48,8 @@ function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
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 c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.IsExistingTarget(cm.thfilter,tp,LOCATION_ONFIELD,0,1,nil,tp) and (sa or sb) end if chk==0 then return c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.IsExistingTarget(cm.thfilter,tp,LOCATION_ONFIELD,0,1,nil,tp) 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 if c:IsLocation(LOCATION_HAND) then
Duel.RegisterFlagEffect(tp,m+1,RESET_PHASE+PHASE_END,0,1) Duel.RegisterFlagEffect(tp,m+1,RESET_PHASE+PHASE_END,0,1)
elseif c:IsLocation(LOCATION_REMOVED) then elseif c:IsLocation(LOCATION_REMOVED) then
...@@ -83,6 +85,8 @@ function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -83,6 +85,8 @@ function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
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 c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.IsExistingTarget(cm.refilter,tp,0,LOCATION_ONFIELD,1,nil) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and (sa or sb) end if chk==0 then return c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.IsExistingTarget(cm.refilter,tp,0,LOCATION_ONFIELD,1,nil) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 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 if c:IsLocation(LOCATION_HAND) then
Duel.RegisterFlagEffect(tp,m+1,RESET_PHASE+PHASE_END,0,1) Duel.RegisterFlagEffect(tp,m+1,RESET_PHASE+PHASE_END,0,1)
elseif c:IsLocation(LOCATION_REMOVED) then elseif c:IsLocation(LOCATION_REMOVED) then
......
...@@ -53,6 +53,8 @@ function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -53,6 +53,8 @@ function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
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.GetMatchingGroup(cm.costfilter,tp,LOCATION_HAND,0,c) local rg=Duel.GetMatchingGroup(cm.costfilter,tp,LOCATION_HAND,0,c)
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK,0,1,nil) and (sa or sb) and Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,LOCATION_ONFIELD+LOCATION_HAND,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK,0,1,nil) and (sa or sb) and Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,LOCATION_ONFIELD+LOCATION_HAND,0,1,nil) end
Duel.Hint(HINT_OPSELECTED,tp,e:GetDescription())
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
if c:IsLocation(LOCATION_HAND) then if c:IsLocation(LOCATION_HAND) then
Duel.RegisterFlagEffect(tp,m+1,RESET_PHASE+PHASE_END,0,1) Duel.RegisterFlagEffect(tp,m+1,RESET_PHASE+PHASE_END,0,1)
elseif c:IsLocation(LOCATION_REMOVED) then elseif c:IsLocation(LOCATION_REMOVED) then
...@@ -95,6 +97,8 @@ function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -95,6 +97,8 @@ 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
if chk==0 then return c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and (sa or sb) end if chk==0 then return c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 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 if c:IsLocation(LOCATION_HAND) then
Duel.RegisterFlagEffect(tp,m+1,RESET_PHASE+PHASE_END,0,1) Duel.RegisterFlagEffect(tp,m+1,RESET_PHASE+PHASE_END,0,1)
elseif c:IsLocation(LOCATION_REMOVED) then elseif c:IsLocation(LOCATION_REMOVED) then
......
...@@ -49,6 +49,8 @@ function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -49,6 +49,8 @@ function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
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 c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.IsExistingTarget(cm.thfilter,tp,LOCATION_ONFIELD,0,1,nil,tp) and (sa or sb) end if chk==0 then return c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.IsExistingTarget(cm.thfilter,tp,LOCATION_ONFIELD,0,1,nil,tp) 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 if c:IsLocation(LOCATION_HAND) then
Duel.RegisterFlagEffect(tp,m+1,RESET_PHASE+PHASE_END,0,1) Duel.RegisterFlagEffect(tp,m+1,RESET_PHASE+PHASE_END,0,1)
elseif c:IsLocation(LOCATION_REMOVED) then elseif c:IsLocation(LOCATION_REMOVED) then
...@@ -92,6 +94,8 @@ function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -92,6 +94,8 @@ 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
if chk==0 then return c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.IsExistingMatchingCard(cm.thfilter2,tp,LOCATION_DECK,0,1,nil) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and (sa or sb) end if chk==0 then return c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.IsExistingMatchingCard(cm.thfilter2,tp,LOCATION_DECK,0,1,nil) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 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 if c:IsLocation(LOCATION_HAND) then
Duel.RegisterFlagEffect(tp,m+1,RESET_PHASE+PHASE_END,0,1) Duel.RegisterFlagEffect(tp,m+1,RESET_PHASE+PHASE_END,0,1)
elseif c:IsLocation(LOCATION_REMOVED) then elseif c:IsLocation(LOCATION_REMOVED) then
......
...@@ -52,6 +52,8 @@ function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -52,6 +52,8 @@ function cm.thtg(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
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK,0,1,nil) and (sa or sb) and Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,LOCATION_ONFIELD+LOCATION_HAND,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK,0,1,nil) and (sa or sb) and Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,LOCATION_ONFIELD+LOCATION_HAND,0,1,nil) end
Duel.Hint(HINT_OPSELECTED,tp,e:GetDescription())
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
if c:IsLocation(LOCATION_HAND) then if c:IsLocation(LOCATION_HAND) then
Duel.RegisterFlagEffect(tp,m+1,RESET_PHASE+PHASE_END,0,1) Duel.RegisterFlagEffect(tp,m+1,RESET_PHASE+PHASE_END,0,1)
elseif c:IsLocation(LOCATION_REMOVED) then elseif c:IsLocation(LOCATION_REMOVED) then
...@@ -92,6 +94,8 @@ function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -92,6 +94,8 @@ function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
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 c:IsCanBeSpecialSummoned(e,0,tp,false,false) and rg:FilterCount(Card.IsAbleToRemove,nil)==2 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and (sa or sb) end if chk==0 then return c:IsCanBeSpecialSummoned(e,0,tp,false,false) and rg:FilterCount(Card.IsAbleToRemove,nil)==2 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 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 if c:IsLocation(LOCATION_HAND) then
Duel.RegisterFlagEffect(tp,m+1,RESET_PHASE+PHASE_END,0,1) Duel.RegisterFlagEffect(tp,m+1,RESET_PHASE+PHASE_END,0,1)
elseif c:IsLocation(LOCATION_REMOVED) then elseif c:IsLocation(LOCATION_REMOVED) then
......
...@@ -49,6 +49,8 @@ function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -49,6 +49,8 @@ function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
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 c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.IsExistingTarget(cm.thfilter,tp,LOCATION_ONFIELD,0,1,nil,tp) and (sa or sb) end if chk==0 then return c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.IsExistingTarget(cm.thfilter,tp,LOCATION_ONFIELD,0,1,nil,tp) 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 if c:IsLocation(LOCATION_HAND) then
Duel.RegisterFlagEffect(tp,m+1,RESET_PHASE+PHASE_END,0,1) Duel.RegisterFlagEffect(tp,m+1,RESET_PHASE+PHASE_END,0,1)
elseif c:IsLocation(LOCATION_REMOVED) then elseif c:IsLocation(LOCATION_REMOVED) then
...@@ -89,6 +91,8 @@ function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -89,6 +91,8 @@ 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
if chk==0 then return c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.IsPlayerCanDraw(tp,1) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and (sa or sb) end if chk==0 then return c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.IsPlayerCanDraw(tp,1) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 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 if c:IsLocation(LOCATION_HAND) then
Duel.RegisterFlagEffect(tp,m+1,RESET_PHASE+PHASE_END,0,1) Duel.RegisterFlagEffect(tp,m+1,RESET_PHASE+PHASE_END,0,1)
elseif c:IsLocation(LOCATION_REMOVED) then elseif c:IsLocation(LOCATION_REMOVED) then
......
...@@ -46,6 +46,8 @@ function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -46,6 +46,8 @@ function cm.thtg(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)==0 local sb=c:IsLocation(LOCATION_REMOVED) and Duel.GetFlagEffect(tp,m)==0
if chk==0 then return sa or sb end if chk==0 then return 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 if c:IsLocation(LOCATION_HAND) then
Duel.RegisterFlagEffect(tp,m-1,RESET_PHASE+PHASE_END,0,1) Duel.RegisterFlagEffect(tp,m-1,RESET_PHASE+PHASE_END,0,1)
elseif c:IsLocation(LOCATION_REMOVED) then elseif c:IsLocation(LOCATION_REMOVED) then
...@@ -93,6 +95,8 @@ function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -93,6 +95,8 @@ 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)==0 local sb=c:IsLocation(LOCATION_REMOVED) and Duel.GetFlagEffect(tp,m)==0
if chk==0 then return c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.IsExistingMatchingCard(cm.setfilter,tp,LOCATION_REMOVED,0,1,c,e,tp) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and (sa or sb) end if chk==0 then return c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.IsExistingMatchingCard(cm.setfilter,tp,LOCATION_REMOVED,0,1,c,e,tp) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 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 if c:IsLocation(LOCATION_HAND) then
Duel.RegisterFlagEffect(tp,m-1,RESET_PHASE+PHASE_END,0,1) Duel.RegisterFlagEffect(tp,m-1,RESET_PHASE+PHASE_END,0,1)
elseif c:IsLocation(LOCATION_REMOVED) then elseif c:IsLocation(LOCATION_REMOVED) then
......
...@@ -111,15 +111,35 @@ function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -111,15 +111,35 @@ function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local e3=Effect.CreateEffect(e:GetHandler()) local e3=Effect.CreateEffect(e:GetHandler())
e3:SetType(EFFECT_TYPE_FIELD) e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_CHANGE_CODE) e3:SetCode(EFFECT_CHANGE_CODE)
e3:SetProperty(EFFECT_FLAG_OATH) e3:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_IGNORE_IMMUNE+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_REPEAT+EFFECT_FLAG_DELAY+EFFECT_FLAG_SET_AVAILABLE+EFFECT_FLAG_OATH)
e3:SetTargetRange(0xff,0xff) e3:SetTargetRange(0xff,0xff)
e3:SetTarget(function(e,c) return Duel.IsExistingMatchingCard(Card.IsOriginalCodeRule,0,LOCATION_GRAVE,LOCATION_GRAVE,1,c,table.unpack({c:GetOriginalCodeRule()})) end) e3:SetTarget(function(e,c) return Duel.IsExistingMatchingCard(Card.IsOriginalCodeRule,0,LOCATION_GRAVE,LOCATION_GRAVE,1,c,table.unpack({c:GetOriginalCodeRule()})) end)
e3:SetValue(function(e,c) return c:GetOriginalCode()+0xffffff+c:GetFieldID() end) e3:SetValue(function(e,c) return c:GetOriginalCode()+0x527+c:GetFieldID() end)
e3:SetReset(RESET_PHASE+PHASE_END) e3:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e3,tp) Duel.RegisterEffect(e3,tp)
end end
Duel.RegisterFlagEffect(1,11451901,RESET_PHASE+PHASE_END,EFFECT_FLAG_OATH,1) Duel.RegisterFlagEffect(1,11451901,RESET_PHASE+PHASE_END,EFFECT_FLAG_OATH,1)
end end
function cm.nmfilter(c)
return c:GetFlagEffect(11451908)==0 and Duel.IsExistingMatchingCard(Card.IsOriginalCodeRule,0,LOCATION_GRAVE,LOCATION_GRAVE,1,c,table.unpack({c:GetOriginalCodeRule()}))
end
function cm.chop2(e,tp,eg,ep,ev,re,r,rp)
local nmg=Duel.GetMatchingGroup(cm.nmfilter,tp,0xff,0xff,nil)
if #nmg>0 then
for sc in aux.Next(nmg) do
sc:RegisterFlagEffect(11451908,0,0,0)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_IGNORE_IMMUNE+EFFECT_FLAG_SET_AVAILABLE+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_CHANGE_CODE)
e1:SetRange(0xff)
--e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetCondition(function(e) local c=e:GetHandler() return Duel.GetFlagEffect(1,11451901)>0 and Duel.IsExistingMatchingCard(Card.IsOriginalCodeRule,0,LOCATION_GRAVE,LOCATION_GRAVE,1,c,table.unpack({c:GetOriginalCodeRule()})) end)
e1:SetValue(function(e) local c=e:GetHandler() return c:GetOriginalCode()+0xffffff+c:GetFieldID() end)
sc:RegisterEffect(e1,true)
end
end
end
function cm.actarget(e,te,tp) function cm.actarget(e,te,tp)
e:SetLabelObject(te) e:SetLabelObject(te)
return te:GetHandler()==e:GetHandler() and te:IsHasType(EFFECT_TYPE_ACTIVATE) return te:GetHandler()==e:GetHandler() and te:IsHasType(EFFECT_TYPE_ACTIVATE)
...@@ -135,7 +155,7 @@ function cm.costop(e,tp,eg,ep,ev,re,r,rp) ...@@ -135,7 +155,7 @@ function cm.costop(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetCode(EVENT_CHAIN_SOLVING) e1:SetCode(EVENT_CHAIN_SOLVED)
e1:SetCountLimit(1) e1:SetCountLimit(1)
e1:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return ev==ev0 end) e1:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return ev==ev0 end)
e1:SetOperation(cm.rsop) e1:SetOperation(cm.rsop)
...@@ -147,7 +167,7 @@ function cm.costop(e,tp,eg,ep,ev,re,r,rp) ...@@ -147,7 +167,7 @@ function cm.costop(e,tp,eg,ep,ev,re,r,rp)
end end
function cm.rsop(e,tp,eg,ep,ev,re,r,rp) function cm.rsop(e,tp,eg,ep,ev,re,r,rp)
local rc=re:GetHandler() local rc=re:GetHandler()
if e:GetCode()==EVENT_CHAIN_SOLVING and rc:IsRelateToEffect(re) then if e:GetCode()==EVENT_CHAIN_SOLVED and rc:IsRelateToEffect(re) then
rc:SetStatus(STATUS_EFFECT_ENABLED,true) rc:SetStatus(STATUS_EFFECT_ENABLED,true)
end end
if e:GetCode()==EVENT_CHAIN_NEGATED and rc:IsRelateToEffect(re) and not (rc:IsOnField() and rc:IsFacedown()) then if e:GetCode()==EVENT_CHAIN_NEGATED and rc:IsRelateToEffect(re) and not (rc:IsOnField() and rc:IsFacedown()) then
......
...@@ -178,15 +178,35 @@ function cm.cpcost2(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -178,15 +178,35 @@ function cm.cpcost2(e,tp,eg,ep,ev,re,r,rp,chk)
local e3=Effect.CreateEffect(e:GetHandler()) local e3=Effect.CreateEffect(e:GetHandler())
e3:SetType(EFFECT_TYPE_FIELD) e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_CHANGE_CODE) e3:SetCode(EFFECT_CHANGE_CODE)
e3:SetProperty(EFFECT_FLAG_OATH) e3:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_IGNORE_IMMUNE+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_REPEAT+EFFECT_FLAG_DELAY+EFFECT_FLAG_SET_AVAILABLE+EFFECT_FLAG_OATH)
e3:SetTargetRange(0xff,0xff) e3:SetTargetRange(0xff,0xff)
e3:SetTarget(function(e,c) return Duel.IsExistingMatchingCard(Card.IsOriginalCodeRule,0,LOCATION_GRAVE,LOCATION_GRAVE,1,c,table.unpack({c:GetOriginalCodeRule()})) end) e3:SetTarget(function(e,c) return Duel.IsExistingMatchingCard(Card.IsOriginalCodeRule,0,LOCATION_GRAVE,LOCATION_GRAVE,1,c,table.unpack({c:GetOriginalCodeRule()})) end)
e3:SetValue(function(e,c) return c:GetOriginalCode()+0xffffff+c:GetFieldID() end) e3:SetValue(function(e,c) return c:GetOriginalCode()+0x527+c:GetFieldID() end)
e3:SetReset(RESET_PHASE+PHASE_END) e3:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e3,tp) Duel.RegisterEffect(e3,tp)
end end
Duel.RegisterFlagEffect(1,11451901,RESET_PHASE+PHASE_END,EFFECT_FLAG_OATH,1) Duel.RegisterFlagEffect(1,11451901,RESET_PHASE+PHASE_END,EFFECT_FLAG_OATH,1)
end end
function cm.nmfilter(c)
return c:GetFlagEffect(11451908)==0 and Duel.IsExistingMatchingCard(Card.IsOriginalCodeRule,0,LOCATION_GRAVE,LOCATION_GRAVE,1,c,table.unpack({c:GetOriginalCodeRule()}))
end
function cm.chop2(e,tp,eg,ep,ev,re,r,rp)
local nmg=Duel.GetMatchingGroup(cm.nmfilter,tp,0xff,0xff,nil)
if #nmg>0 then
for sc in aux.Next(nmg) do
sc:RegisterFlagEffect(11451908,0,0,0)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_IGNORE_IMMUNE+EFFECT_FLAG_SET_AVAILABLE+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_CHANGE_CODE)
e1:SetRange(0xff)
--e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetCondition(function(e) local c=e:GetHandler() return Duel.GetFlagEffect(1,11451901)>0 and Duel.IsExistingMatchingCard(Card.IsOriginalCodeRule,0,LOCATION_GRAVE,LOCATION_GRAVE,1,c,table.unpack({c:GetOriginalCodeRule()})) end)
e1:SetValue(function(e) local c=e:GetHandler() return c:GetOriginalCode()+0xffffff+c:GetFieldID() end)
sc:RegisterEffect(e1,true)
end
end
end
function cm.actarget(e,te,tp) function cm.actarget(e,te,tp)
e:SetLabelObject(te) e:SetLabelObject(te)
return te:GetHandler()==e:GetHandler() and te:IsHasType(EFFECT_TYPE_ACTIVATE) return te:GetHandler()==e:GetHandler() and te:IsHasType(EFFECT_TYPE_ACTIVATE)
...@@ -202,7 +222,7 @@ function cm.costop(e,tp,eg,ep,ev,re,r,rp) ...@@ -202,7 +222,7 @@ function cm.costop(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetCode(EVENT_CHAIN_SOLVING) e1:SetCode(EVENT_CHAIN_SOLVED)
e1:SetCountLimit(1) e1:SetCountLimit(1)
e1:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return ev==ev0 end) e1:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return ev==ev0 end)
e1:SetOperation(cm.rsop) e1:SetOperation(cm.rsop)
...@@ -214,7 +234,7 @@ function cm.costop(e,tp,eg,ep,ev,re,r,rp) ...@@ -214,7 +234,7 @@ function cm.costop(e,tp,eg,ep,ev,re,r,rp)
end end
function cm.rsop(e,tp,eg,ep,ev,re,r,rp) function cm.rsop(e,tp,eg,ep,ev,re,r,rp)
local rc=re:GetHandler() local rc=re:GetHandler()
if e:GetCode()==EVENT_CHAIN_SOLVING and rc:IsRelateToEffect(re) then if e:GetCode()==EVENT_CHAIN_SOLVED and rc:IsRelateToEffect(re) then
rc:SetStatus(STATUS_EFFECT_ENABLED,true) rc:SetStatus(STATUS_EFFECT_ENABLED,true)
end end
if e:GetCode()==EVENT_CHAIN_NEGATED and rc:IsRelateToEffect(re) and not (rc:IsOnField() and rc:IsFacedown()) then if e:GetCode()==EVENT_CHAIN_NEGATED and rc:IsRelateToEffect(re) and not (rc:IsOnField() and rc:IsFacedown()) then
......
...@@ -80,15 +80,35 @@ function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -80,15 +80,35 @@ function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local e3=Effect.CreateEffect(e:GetHandler()) local e3=Effect.CreateEffect(e:GetHandler())
e3:SetType(EFFECT_TYPE_FIELD) e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_CHANGE_CODE) e3:SetCode(EFFECT_CHANGE_CODE)
e3:SetProperty(EFFECT_FLAG_OATH) e3:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_IGNORE_IMMUNE+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_REPEAT+EFFECT_FLAG_DELAY+EFFECT_FLAG_SET_AVAILABLE+EFFECT_FLAG_OATH)
e3:SetTargetRange(0xff,0xff) e3:SetTargetRange(0xff,0xff)
e3:SetTarget(function(e,c) return Duel.IsExistingMatchingCard(Card.IsOriginalCodeRule,0,LOCATION_GRAVE,LOCATION_GRAVE,1,c,table.unpack({c:GetOriginalCodeRule()})) end) e3:SetTarget(function(e,c) return Duel.IsExistingMatchingCard(Card.IsOriginalCodeRule,0,LOCATION_GRAVE,LOCATION_GRAVE,1,c,table.unpack({c:GetOriginalCodeRule()})) end)
e3:SetValue(function(e,c) return c:GetOriginalCode()+0xffffff+c:GetFieldID() end) e3:SetValue(function(e,c) return c:GetOriginalCode()+0x527+c:GetFieldID() end)
e3:SetReset(RESET_PHASE+PHASE_END) e3:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e3,tp) Duel.RegisterEffect(e3,tp)
end end
Duel.RegisterFlagEffect(1,11451901,RESET_PHASE+PHASE_END,EFFECT_FLAG_OATH,1) Duel.RegisterFlagEffect(1,11451901,RESET_PHASE+PHASE_END,EFFECT_FLAG_OATH,1)
end end
function cm.nmfilter(c)
return c:GetFlagEffect(11451908)==0 and Duel.IsExistingMatchingCard(Card.IsOriginalCodeRule,0,LOCATION_GRAVE,LOCATION_GRAVE,1,c,table.unpack({c:GetOriginalCodeRule()}))
end
function cm.chop2(e,tp,eg,ep,ev,re,r,rp)
local nmg=Duel.GetMatchingGroup(cm.nmfilter,tp,0xff,0xff,nil)
if #nmg>0 then
for sc in aux.Next(nmg) do
sc:RegisterFlagEffect(11451908,0,0,0)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_IGNORE_IMMUNE+EFFECT_FLAG_SET_AVAILABLE+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_CHANGE_CODE)
e1:SetRange(0xff)
--e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetCondition(function(e) local c=e:GetHandler() return Duel.GetFlagEffect(1,11451901)>0 and Duel.IsExistingMatchingCard(Card.IsOriginalCodeRule,0,LOCATION_GRAVE,LOCATION_GRAVE,1,c,table.unpack({c:GetOriginalCodeRule()})) end)
e1:SetValue(function(e) local c=e:GetHandler() return c:GetOriginalCode()+0xffffff+c:GetFieldID() end)
sc:RegisterEffect(e1,true)
end
end
end
function cm.actarget(e,te,tp) function cm.actarget(e,te,tp)
e:SetLabelObject(te) e:SetLabelObject(te)
return te:GetHandler()==e:GetHandler() and te:IsHasType(EFFECT_TYPE_ACTIVATE) return te:GetHandler()==e:GetHandler() and te:IsHasType(EFFECT_TYPE_ACTIVATE)
...@@ -104,7 +124,7 @@ function cm.costop(e,tp,eg,ep,ev,re,r,rp) ...@@ -104,7 +124,7 @@ function cm.costop(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetCode(EVENT_CHAIN_SOLVING) e1:SetCode(EVENT_CHAIN_SOLVED)
e1:SetCountLimit(1) e1:SetCountLimit(1)
e1:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return ev==ev0 end) e1:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return ev==ev0 end)
e1:SetOperation(cm.rsop) e1:SetOperation(cm.rsop)
...@@ -116,7 +136,7 @@ function cm.costop(e,tp,eg,ep,ev,re,r,rp) ...@@ -116,7 +136,7 @@ function cm.costop(e,tp,eg,ep,ev,re,r,rp)
end end
function cm.rsop(e,tp,eg,ep,ev,re,r,rp) function cm.rsop(e,tp,eg,ep,ev,re,r,rp)
local rc=re:GetHandler() local rc=re:GetHandler()
if e:GetCode()==EVENT_CHAIN_SOLVING and rc:IsRelateToEffect(re) then if e:GetCode()==EVENT_CHAIN_SOLVED and rc:IsRelateToEffect(re) then
rc:SetStatus(STATUS_EFFECT_ENABLED,true) rc:SetStatus(STATUS_EFFECT_ENABLED,true)
end end
if e:GetCode()==EVENT_CHAIN_NEGATED and rc:IsRelateToEffect(re) and not (rc:IsOnField() and rc:IsFacedown()) then if e:GetCode()==EVENT_CHAIN_NEGATED and rc:IsRelateToEffect(re) and not (rc:IsOnField() and rc:IsFacedown()) then
...@@ -128,7 +148,7 @@ function cm.tdfilter(c) ...@@ -128,7 +148,7 @@ function cm.tdfilter(c)
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 if chk==0 then
return Duel.IsExistingMatchingCard(Card.IsAbleToDeck,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,nil) and Duel.IsExistingMatchingCard(cm.tdfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) and Duel.IsPlayerCanDraw(tp,1) and e:GetHandler():GetFlagEffect(m)==0 return Duel.IsExistingMatchingCard(Card.IsAbleToDeck,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,nil) and Duel.IsExistingMatchingCard(cm.tdfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) and Duel.IsPlayerCanDraw(tp,1)
end end
end end
function cm.activate(e,tp,eg,ep,ev,re,r,rp) function cm.activate(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -109,23 +109,20 @@ end ...@@ -109,23 +109,20 @@ end
function c60152905.e2tg(e,tp,eg,ep,ev,re,r,rp,chk) function c60152905.e2tg(e,tp,eg,ep,ev,re,r,rp,chk)
local p=PLAYER_ALL local p=PLAYER_ALL
if chk==0 then return true end if chk==0 then return true end
Duel.SetTargetPlayer(p)
Duel.SetTargetParam(1000)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,p,1000)
local ng=Group.CreateGroup() local ng=Group.CreateGroup()
local dg=Group.CreateGroup() local dg=Group.CreateGroup()
for i=1,ev do for i=1,ev do
local te,tgp=Duel.GetChainInfo(i,CHAININFO_TRIGGERING_EFFECT,CHAININFO_TRIGGERING_PLAYER) local te,tgp=Duel.GetChainInfo(i,CHAININFO_TRIGGERING_EFFECT,CHAININFO_TRIGGERING_PLAYER)
if tgp~=tp and (te:IsActiveType(TYPE_MONSTER) or te:IsHasType(EFFECT_TYPE_ACTIVATE)) and Duel.IsChainNegatable(i) then if tgp~=tp and Duel.IsChainNegatable(i) then
local tc=te:GetHandler() local tc=te:GetHandler()
ng:AddCard(tc) ng:AddCard(tc)
if tc:IsOnField() and tc:IsRelateToEffect(te) and tc:IsAbleToDeck() then
dg:AddCard(tc)
end
end end
end end
Duel.SetTargetCard(dg) Duel.SetTargetCard(dg)
Duel.SetTargetPlayer(p)
Duel.SetTargetParam(1000)
Duel.SetOperationInfo(0,CATEGORY_NEGATE,ng,ng:GetCount(),0,0) Duel.SetOperationInfo(0,CATEGORY_NEGATE,ng,ng:GetCount(),0,0)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,p,1000)
end end
function c60152905.e2op(e,tp,eg,ep,ev,re,r,rp) function c60152905.e2op(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
...@@ -137,7 +134,7 @@ function c60152905.e2op(e,tp,eg,ep,ev,re,r,rp) ...@@ -137,7 +134,7 @@ function c60152905.e2op(e,tp,eg,ep,ev,re,r,rp)
local dg=Group.CreateGroup() local dg=Group.CreateGroup()
for i=1,ev do for i=1,ev do
local te,tgp=Duel.GetChainInfo(i,CHAININFO_TRIGGERING_EFFECT,CHAININFO_TRIGGERING_PLAYER) local te,tgp=Duel.GetChainInfo(i,CHAININFO_TRIGGERING_EFFECT,CHAININFO_TRIGGERING_PLAYER)
if tgp~=tp and (te:IsActiveType(TYPE_MONSTER) or te:IsHasType(EFFECT_TYPE_ACTIVATE)) and Duel.NegateActivation(i) then if tgp~=tp and Duel.NegateActivation(i) then
local tc=te:GetHandler() local tc=te:GetHandler()
if tc:IsRelateToEffect(e) and tc:IsRelateToEffect(te) and tc:IsAbleToDeck() then if tc:IsRelateToEffect(e) and tc:IsRelateToEffect(te) and tc:IsAbleToDeck() then
dg:AddCard(tc) dg:AddCard(tc)
......
...@@ -28,7 +28,103 @@ function c60152913.initial_effect(c) ...@@ -28,7 +28,103 @@ function c60152913.initial_effect(c)
e9:SetCondition(c60152913.e3con) e9:SetCondition(c60152913.e3con)
e9:SetOperation(c60152913.e3op) e9:SetOperation(c60152913.e3op)
c:RegisterEffect(e9) c:RegisterEffect(e9)
if not c60152901.global_check then
c60152901.global_check=true
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_TO_HAND)
ge1:SetOperation(c60152901.regop)
Duel.RegisterEffect(ge1,0)
end
if not c60152902.global_check then
c60152902.global_check=true
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_SUMMON_SUCCESS)
ge1:SetOperation(c60152902.checkop)
Duel.RegisterEffect(ge1,0)
local ge2=ge1:Clone()
ge2:SetCode(EVENT_SPSUMMON_SUCCESS)
Duel.RegisterEffect(ge2,0)
local ge3=ge1:Clone()
ge3:SetCode(EVENT_FLIP_SUMMON_SUCCESS)
Duel.RegisterEffect(ge3,0)
end
if not c60152903.global_check then
c60152903.global_check=true
local ge1=Effect.GlobalEffect()
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_BATTLED)
ge1:SetOperation(c60152903.checkop)
Duel.RegisterEffect(ge1,0)
end
if not c60152904.global_check then
c60152904.global_check=true
local ge1=Effect.GlobalEffect()
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_TO_GRAVE)
ge1:SetOperation(c60152904.checkop)
Duel.RegisterEffect(ge1,0)
end
Duel.AddCustomActivityCounter(60152905,ACTIVITY_CHAIN,aux.FALSE)
end
function c60152901.regop(e,tp,eg,ep,ev,re,r,rp)
local g=eg:Filter(Card.IsPreviousLocation,nil,LOCATION_DECK)
local tc=g:GetFirst()
while tc do
if not (Duel.GetCurrentPhase()==PHASE_DRAW or Duel.GetCurrentPhase()==0) and Duel.GetFlagEffect(tc:GetControler(),60152901)==0 then
Duel.RegisterFlagEffect(tc:GetControler(),60152901,RESET_PHASE+PHASE_END,0,1)
end
if Duel.GetFlagEffect(0,60152901)>0 and Duel.GetFlagEffect(1,60152901)>0 then
break
end
tc=g:GetNext()
end
end
function c60152902.checkop(e,tp,eg,ep,ev,re,r,rp)
local tc=eg:GetFirst()
while tc do
Duel.RegisterFlagEffect(tc:GetSummonPlayer(),60152902,RESET_PHASE+PHASE_END,0,1)
tc=eg:GetNext()
end
end
function c60152903.check(c)
return c
end
function c60152903.checkop(e,tp,eg,ep,ev,re,r,rp)
if c60152903.check(Duel.GetAttacker()) and c60152903.check(Duel.GetAttackTarget()) then
Duel.RegisterFlagEffect(tp,60152903,RESET_PHASE+PHASE_END,0,1)
Duel.RegisterFlagEffect(1-tp,60152903,RESET_PHASE+PHASE_END,0,1)
end
end
function c60152904.checkop(e,tp,eg,ep,ev,re,r,rp)
local g=eg:Filter(Card.IsType,nil,TYPE_MONSTER)
local tc=g:GetFirst()
while tc do
if Duel.GetFlagEffect(tc:GetControler(),60152904)==0 then
Duel.RegisterFlagEffect(tc:GetControler(),60152904,RESET_PHASE+PHASE_END,0,1)
end
if Duel.GetFlagEffect(0,60152904)>0 and Duel.GetFlagEffect(1,60152904)>0 then
break
end
tc=g:GetNext()
end
end end
function c60152913.e1tg(e,c) function c60152913.e1tg(e,c)
return c:IsSetCard(0x3b29) return c:IsSetCard(0x3b29)
end end
...@@ -183,7 +279,7 @@ function c60152913.e22902opf(c) ...@@ -183,7 +279,7 @@ function c60152913.e22902opf(c)
end end
function c60152913.e22902tg(e,tp,eg,ep,ev,re,r,rp,chk) function c60152913.e22902tg(e,tp,eg,ep,ev,re,r,rp,chk)
local p=PLAYER_ALL local p=PLAYER_ALL
if chk==0 then return not Duel.GetFlagEffect(1-tp,60152902)==0 end if chk==0 then return Duel.GetFlagEffect(1-tp,60152902)>0 end
Duel.SetTargetPlayer(p) Duel.SetTargetPlayer(p)
Duel.SetTargetParam(1000) Duel.SetTargetParam(1000)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,p,1000) Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,p,1000)
...@@ -221,7 +317,7 @@ function c60152913.e22902op(e,tp,eg,ep,ev,re,r,rp) ...@@ -221,7 +317,7 @@ function c60152913.e22902op(e,tp,eg,ep,ev,re,r,rp)
end end
function c60152913.e22903tg(e,tp,eg,ep,ev,re,r,rp,chk) function c60152913.e22903tg(e,tp,eg,ep,ev,re,r,rp,chk)
local p=PLAYER_ALL local p=PLAYER_ALL
if chk==0 then return not Duel.GetFlagEffect(tp,60152903)==0 and Duel.GetMatchingGroupCount(aux.NOT(Card.IsPublic),tp,0,LOCATION_HAND,nil)>0 end if chk==0 then return Duel.GetFlagEffect(tp,60152903)>0 and Duel.GetMatchingGroupCount(aux.NOT(Card.IsPublic),tp,0,LOCATION_HAND,nil)>0 end
Duel.SetTargetPlayer(p) Duel.SetTargetPlayer(p)
Duel.SetTargetParam(1000) Duel.SetTargetParam(1000)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,p,1000) Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,p,1000)
...@@ -303,7 +399,7 @@ function c60152913.e22905tg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -303,7 +399,7 @@ function c60152913.e22905tg(e,tp,eg,ep,ev,re,r,rp,chk)
local dg=Group.CreateGroup() local dg=Group.CreateGroup()
for i=1,ev do for i=1,ev do
local te,tgp=Duel.GetChainInfo(i,CHAININFO_TRIGGERING_EFFECT,CHAININFO_TRIGGERING_PLAYER) local te,tgp=Duel.GetChainInfo(i,CHAININFO_TRIGGERING_EFFECT,CHAININFO_TRIGGERING_PLAYER)
if tgp~=tp and (te:IsActiveType(TYPE_MONSTER) or te:IsHasType(EFFECT_TYPE_ACTIVATE)) and Duel.IsChainNegatable(i) then if tgp~=tp and Duel.IsChainNegatable(i) then
local tc=te:GetHandler() local tc=te:GetHandler()
ng:AddCard(tc) ng:AddCard(tc)
if tc:IsOnField() and tc:IsRelateToEffect(te) and tc:IsAbleToDeck() then if tc:IsOnField() and tc:IsRelateToEffect(te) and tc:IsAbleToDeck() then
...@@ -324,7 +420,7 @@ function c60152913.e22905op(e,tp,eg,ep,ev,re,r,rp) ...@@ -324,7 +420,7 @@ function c60152913.e22905op(e,tp,eg,ep,ev,re,r,rp)
local dg=Group.CreateGroup() local dg=Group.CreateGroup()
for i=1,ev do for i=1,ev do
local te,tgp=Duel.GetChainInfo(i,CHAININFO_TRIGGERING_EFFECT,CHAININFO_TRIGGERING_PLAYER) local te,tgp=Duel.GetChainInfo(i,CHAININFO_TRIGGERING_EFFECT,CHAININFO_TRIGGERING_PLAYER)
if tgp~=tp and (te:IsActiveType(TYPE_MONSTER) or te:IsHasType(EFFECT_TYPE_ACTIVATE)) and Duel.NegateActivation(i) then if tgp~=tp and Duel.NegateActivation(i) then
local tc=te:GetHandler() local tc=te:GetHandler()
if tc:IsRelateToEffect(e) and tc:IsRelateToEffect(te) and tc:IsAbleToDeck() then if tc:IsRelateToEffect(e) and tc:IsRelateToEffect(te) and tc:IsAbleToDeck() then
dg:AddCard(tc) dg:AddCard(tc)
......
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