Commit f4491d56 authored by Tachibana's avatar Tachibana

eme

parent 1a79311a
Pipeline #5850 passed with stages
in 27 minutes and 2 seconds
expansions/pics/9310002.jpg

178 KB | W: | H:

expansions/pics/9310002.jpg

178 KB | W: | H:

expansions/pics/9310002.jpg
expansions/pics/9310002.jpg
expansions/pics/9310002.jpg
expansions/pics/9310002.jpg
  • 2-up
  • Swipe
  • Onion skin
...@@ -166,12 +166,12 @@ function cm.initial_effect(c) ...@@ -166,12 +166,12 @@ function cm.initial_effect(c)
e:GetHandler():RemoveOverlayCard(tp,4,4,REASON_COST) e:GetHandler():RemoveOverlayCard(tp,4,4,REASON_COST)
end) end)
e20:SetTarget(function(e,tp,eg,ep,ev,re,r,rp,chk) e20:SetTarget(function(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(nil,tp,0,LOCATION_ONFIELD,1,nil) end
local g=Duel.GetMatchingGroup(nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil) local g=Duel.GetMatchingGroup(nil,tp,0,LOCATION_ONFIELD,nil)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0)
end) end)
e20:SetOperation(function(e,tp,eg,ep,ev,re,r,rp) e20:SetOperation(function(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil) local g=Duel.GetMatchingGroup(nil,tp,0,LOCATION_ONFIELD,nil)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local sg=g:Select(tp,1,1,nil) local sg=g:Select(tp,1,1,nil)
......
...@@ -23,7 +23,7 @@ function c66915004.initial_effect(c) ...@@ -23,7 +23,7 @@ function c66915004.initial_effect(c)
e55:SetTargetRange(LOCATION_MZONE,0) e55:SetTargetRange(LOCATION_MZONE,0)
e55:SetTarget(c66915004.eftg) e55:SetTarget(c66915004.eftg)
e55:SetLabelObject(e22) e55:SetLabelObject(e22)
c:RegisterEffect(e555) c:RegisterEffect(e55)
--spsummon limit --spsummon limit
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD) e2:SetType(EFFECT_TYPE_FIELD)
......
...@@ -11,7 +11,7 @@ function cm.initial_effect(c) ...@@ -11,7 +11,7 @@ function cm.initial_effect(c)
e1:SetProperty(EFFECT_FLAG_DELAY) e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,m-13) e1:SetCountLimit(1,m-13)
e1:SetTarget(function(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetTarget(function(e,tp,eg,ep,ev,re,r,rp,chk)
local g=cm[tp] local g=Duel.GetFlagEffect(tp,m)
if chk==0 then return g<=3 and Duel.IsPlayerCanDraw(tp,2) end if chk==0 then return g<=3 and Duel.IsPlayerCanDraw(tp,2) end
Duel.SetTargetPlayer(tp) Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(2) Duel.SetTargetParam(2)
...@@ -29,7 +29,7 @@ function cm.initial_effect(c) ...@@ -29,7 +29,7 @@ function cm.initial_effect(c)
e1:SetProperty(EFFECT_FLAG_DELAY) e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,m) e1:SetCountLimit(1,m)
e1:SetTarget(function(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetTarget(function(e,tp,eg,ep,ev,re,r,rp,chk)
local g=cm[tp] local g=Duel.GetFlagEffect(tp,m)
if chk==0 then return g>=4 and Duel.GetLocationCount(tp,LOCATION_MZONE)>1 if chk==0 then return g>=4 and Duel.GetLocationCount(tp,LOCATION_MZONE)>1
and Duel.IsExistingMatchingCard(cm.t1,tp,LOCATION_GRAVE,0,1,nil,e,tp) end and Duel.IsExistingMatchingCard(cm.t1,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0)
...@@ -44,38 +44,22 @@ function cm.initial_effect(c) ...@@ -44,38 +44,22 @@ function cm.initial_effect(c)
end) end)
c:RegisterEffect(e1) c:RegisterEffect(e1)
if cm.counter==nil then if not cm.global_check then
cm.counter=true cm.global_check=true
cm[0]=0 local ge1=Effect.CreateEffect(c)
cm[1]=0 ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
local e2=Effect.CreateEffect(c) ge1:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD) ge1:SetOperation(function(e,tp,eg,ep,ev,re,r,rp)
e2:SetCode(EVENT_PHASE_START+PHASE_DRAW) local tc=eg:GetFirst()
e2:SetOperation(function(e,tp,eg,ep,ev,re,r,rp) while tc do
cm[0]=0 Duel.RegisterFlagEffect(tc:GetSummonPlayer(),m,RESET_PHASE+PHASE_END,0,1)
cm[1]=0 tc=eg:GetNext()
end
end) end)
Duel.RegisterEffect(e2,0) Duel.RegisterEffect(ge1,0)
local e3=Effect.CreateEffect(c) local ge2=ge1:Clone()
e3:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD) ge2:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetCode(EVENT_SUMMON_SUCCESS) Duel.RegisterEffect(ge2,0)
e3:SetOperation(cm.addcount)
Duel.RegisterEffect(e3,0)
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e4:SetCode(EVENT_SPSUMMON_SUCCESS)
e4:SetOperation(cm.addcount)
Duel.RegisterEffect(e4,0)
end
end
function cm.addcount(e,tp,eg,ep,ev,re,r,rp)
local tc=eg:GetFirst()
while tc do
if tc:GetPreviousControler()==tp then
local p=tc:GetPreviousControler()
cm[p]=cm[p]+1
end
tc=eg:GetNext()
end end
end end
function cm.t1(c,e,tp) function cm.t1(c,e,tp)
......
...@@ -14,7 +14,7 @@ function cm.initial_effect(c) ...@@ -14,7 +14,7 @@ function cm.initial_effect(c)
if chk==0 then return true end if chk==0 then return true end
local g=Duel.GetMatchingGroup(nil,tp,0,LOCATION_MZONE,nil) local g=Duel.GetMatchingGroup(nil,tp,0,LOCATION_MZONE,nil)
Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,g:GetCount(),0,0) Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,g:GetCount(),0,0)
local g=cm[tp] local g=Duel.GetFlagEffect(tp,m)
e:SetLabel(g) e:SetLabel(g)
end) end)
e1:SetOperation(function(e,tp,eg,ep,ev,re,r,rp) e1:SetOperation(function(e,tp,eg,ep,ev,re,r,rp)
...@@ -73,37 +73,21 @@ function cm.initial_effect(c) ...@@ -73,37 +73,21 @@ function cm.initial_effect(c)
end) end)
c:RegisterEffect(e2) c:RegisterEffect(e2)
if cm.counter==nil then if not cm.global_check then
cm.counter=true cm.global_check=true
cm[0]=0 local ge1=Effect.CreateEffect(c)
cm[1]=0 ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
local e2=Effect.CreateEffect(c) ge1:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD) ge1:SetOperation(function(e,tp,eg,ep,ev,re,r,rp)
e2:SetCode(EVENT_PHASE_START+PHASE_DRAW) local tc=eg:GetFirst()
e2:SetOperation(function(e,tp,eg,ep,ev,re,r,rp) while tc do
cm[0]=0 Duel.RegisterFlagEffect(tc:GetSummonPlayer(),m,RESET_PHASE+PHASE_END,0,1)
cm[1]=0 tc=eg:GetNext()
end
end) end)
Duel.RegisterEffect(e2,0) Duel.RegisterEffect(ge1,0)
local e3=Effect.CreateEffect(c) local ge2=ge1:Clone()
e3:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD) ge2:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetCode(EVENT_SUMMON_SUCCESS) Duel.RegisterEffect(ge2,0)
e3:SetOperation(cm.addcount)
Duel.RegisterEffect(e3,0)
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e4:SetCode(EVENT_SPSUMMON_SUCCESS)
e4:SetOperation(cm.addcount)
Duel.RegisterEffect(e4,0)
end
end
function cm.addcount(e,tp,eg,ep,ev,re,r,rp)
local tc=eg:GetFirst()
while tc do
if tc:GetPreviousControler()==tp then
local p=tc:GetPreviousControler()
cm[p]=cm[p]+1
end
tc=eg:GetNext()
end end
end end
\ No newline at end of file
...@@ -13,7 +13,7 @@ function cm.initial_effect(c) ...@@ -13,7 +13,7 @@ function cm.initial_effect(c)
local sg=Duel.GetMatchingGroup(Card.IsType,tp,0,LOCATION_ONFIELD,nil,TYPE_SPELL+TYPE_TRAP) local sg=Duel.GetMatchingGroup(Card.IsType,tp,0,LOCATION_ONFIELD,nil,TYPE_SPELL+TYPE_TRAP)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,sg,sg:GetCount(),0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,sg,sg:GetCount(),0,0)
Duel.SetChainLimit(function(e,ep,tp)return tp==ep or not c:IsType(TYPE_SPELL+TYPE_TRAP) end) Duel.SetChainLimit(function(e,ep,tp)return tp==ep or not c:IsType(TYPE_SPELL+TYPE_TRAP) end)
local c=cm[tp] local c=Duel.GetFlagEffect(tp,m)
if c>=3 then if c>=3 then
e:SetCategory(CATEGORY_DAMAGE) e:SetCategory(CATEGORY_DAMAGE)
e:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
...@@ -33,37 +33,21 @@ function cm.initial_effect(c) ...@@ -33,37 +33,21 @@ function cm.initial_effect(c)
end) end)
c:RegisterEffect(e1) c:RegisterEffect(e1)
if cm.counter==nil then if not cm.global_check then
cm.counter=true cm.global_check=true
cm[0]=0 local ge1=Effect.CreateEffect(c)
cm[1]=0 ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
local e2=Effect.CreateEffect(c) ge1:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD) ge1:SetOperation(function(e,tp,eg,ep,ev,re,r,rp)
e2:SetCode(EVENT_PHASE_START+PHASE_DRAW) local tc=eg:GetFirst()
e2:SetOperation(function(e,tp,eg,ep,ev,re,r,rp) while tc do
cm[0]=0 Duel.RegisterFlagEffect(tc:GetSummonPlayer(),m,RESET_PHASE+PHASE_END,0,1)
cm[1]=0 tc=eg:GetNext()
end
end) end)
Duel.RegisterEffect(e2,0) Duel.RegisterEffect(ge1,0)
local e3=Effect.CreateEffect(c) local ge2=ge1:Clone()
e3:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD) ge2:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetCode(EVENT_SUMMON_SUCCESS) Duel.RegisterEffect(ge2,0)
e3:SetOperation(cm.addcount)
Duel.RegisterEffect(e3,0)
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e4:SetCode(EVENT_SPSUMMON_SUCCESS)
e4:SetOperation(cm.addcount)
Duel.RegisterEffect(e4,0)
end
end
function cm.addcount(e,tp,eg,ep,ev,re,r,rp)
local tc=eg:GetFirst()
while tc do
if tc:GetPreviousControler()==tp then
local p=tc:GetPreviousControler()
cm[p]=cm[p]+1
end
tc=eg:GetNext()
end end
end end
\ No newline at end of file
...@@ -9,8 +9,7 @@ function cm.initial_effect(c) ...@@ -9,8 +9,7 @@ function cm.initial_effect(c)
e1:SetCode(EVENT_SPSUMMON_SUCCESS) e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY) e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetTarget(function(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetTarget(function(e,tp,eg,ep,ev,re,r,rp,chk)
local c=cm[tp] if chk==0 then return Duel.GetFlagEffect(tp,m)>=2 end
if chk==0 then return c>=2 end
end) end)
e1:SetOperation(function(e,tp,eg,ep,ev,re,r,rp) e1:SetOperation(function(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
...@@ -52,37 +51,22 @@ function cm.initial_effect(c) ...@@ -52,37 +51,22 @@ function cm.initial_effect(c)
e8:SetValue(aux.tgoval) e8:SetValue(aux.tgoval)
e8:SetRange(LOCATION_MZONE) e8:SetRange(LOCATION_MZONE)
c:RegisterEffect(e8) c:RegisterEffect(e8)
if cm.counter==nil then
cm.counter=true if not cm.global_check then
cm[0]=0 cm.global_check=true
cm[1]=0 local ge1=Effect.CreateEffect(c)
local e2=Effect.CreateEffect(c) ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD) ge1:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetCode(EVENT_PHASE_START+PHASE_DRAW) ge1:SetOperation(function(e,tp,eg,ep,ev,re,r,rp)
e2:SetOperation(function(e,tp,eg,ep,ev,re,r,rp) local tc=eg:GetFirst()
cm[0]=0 while tc do
cm[1]=0 Duel.RegisterFlagEffect(tc:GetSummonPlayer(),m,RESET_PHASE+PHASE_END,0,1)
tc=eg:GetNext()
end
end) end)
Duel.RegisterEffect(e2,0) Duel.RegisterEffect(ge1,0)
local e3=Effect.CreateEffect(c) local ge2=ge1:Clone()
e3:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD) ge2:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetCode(EVENT_SUMMON_SUCCESS) Duel.RegisterEffect(ge2,0)
e3:SetOperation(cm.addcount)
Duel.RegisterEffect(e3,0)
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e4:SetCode(EVENT_SPSUMMON_SUCCESS)
e4:SetOperation(cm.addcount)
Duel.RegisterEffect(e4,0)
end end
end end
function cm.addcount(e,tp,eg,ep,ev,re,r,rp) \ No newline at end of file
local tc=eg:GetFirst()
while tc do
if tc:GetPreviousControler()==tp then
local p=tc:GetPreviousControler()
cm[p]=cm[p]+1
end
tc=eg:GetNext()
end
end
...@@ -13,25 +13,25 @@ function cm.initial_effect(c) ...@@ -13,25 +13,25 @@ function cm.initial_effect(c)
e4:SetCode(EFFECT_CHANGE_BATTLE_DAMAGE) e4:SetCode(EFFECT_CHANGE_BATTLE_DAMAGE)
e4:SetValue(aux.ChangeBattleDamage(1,DOUBLE_DAMAGE)) e4:SetValue(aux.ChangeBattleDamage(1,DOUBLE_DAMAGE))
c:RegisterEffect(e4) c:RegisterEffect(e4)
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE) local e5=Effect.CreateEffect(c)
e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e5:SetType(EFFECT_TYPE_SINGLE)
e4:SetCode(EFFECT_IMMUNE_EFFECT) e5:SetCode(EFFECT_IMMUNE_EFFECT)
e4:SetRange(LOCATION_MZONE) e5:SetRange(LOCATION_MZONE)
e4:SetValue(function(e,re) e5:SetValue(function(e,re)
return e:GetOwnerPlayer()~=re:GetOwnerPlayer() return e:GetOwnerPlayer()~=re:GetOwnerPlayer()
end) end)
e4:SetOwnerPlayer(tp) e5:SetCondition(function(e)
e4:SetCondition(function(e) return e:GetHandler():GetFlagEffect(m)==0
return c:GetFlagEffect(m)==0
end) end)
c:RegisterEffect(e4) c:RegisterEffect(e5)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) local e6=Effect.CreateEffect(c)
e2:SetCode(EVENT_BATTLE_DESTROYING) e6:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e2:SetCondition(aux.bdocon) e6:SetCode(EVENT_BATTLE_DESTROYING)
e2:SetOperation(function(e,tp,eg,ep,ev,re,r,rp) e6:SetCondition(aux.bdocon)
e6:SetOperation(function(e,tp,eg,ep,ev,re,r,rp)
e:GetHandler():RegisterFlagEffect(m,RESETS_STANDARD,0,1) e:GetHandler():RegisterFlagEffect(m,RESETS_STANDARD,0,1)
end) end)
c:RegisterEffect(e2) c:RegisterEffect(e6)
end end
...@@ -5,15 +5,22 @@ function cm.initial_effect(c) ...@@ -5,15 +5,22 @@ function cm.initial_effect(c)
aux.AddSynchroProcedure(c,nil,aux.NonTuner(nil),1) aux.AddSynchroProcedure(c,nil,aux.NonTuner(nil),1)
c:EnableReviveLimit() c:EnableReviveLimit()
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EFFECT_IMMUNE_EFFECT) e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) e1:SetOperation(function(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO) and e:GetLabel()==1 local c=e:GetHandler()
end) if e:GetLabel()==1 then
e1:SetValue(function(e,re) local e4=Effect.CreateEffect(c)
return e:GetOwnerPlayer()~=re:GetOwnerPlayer() e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetCode(EFFECT_IMMUNE_EFFECT)
e4:SetValue(function(e,re)
return e:GetOwnerPlayer()~=re:GetOwnerPlayer()
end)
e4:SetOwnerPlayer(tp)
e4:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e4)
end
end) end)
e1:SetOwnerPlayer(tp)
c:RegisterEffect(e1) c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE) e2:SetType(EFFECT_TYPE_SINGLE)
......
...@@ -7,7 +7,7 @@ function cm.initial_effect(c) ...@@ -7,7 +7,7 @@ function cm.initial_effect(c)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,m) e1:SetCountLimit(1,m)
e1:SetTarget(function(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetTarget(function(e,tp,eg,ep,ev,re,r,rp,chk)
local g=cm[tp] local g=Duel.GetFlagEffect(tp,m)
if chk==0 then if chk==0 then
if g<=1 then if g<=1 then
return Duel.IsExistingMatchingCard(cm.t1,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,e,tp) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 return Duel.IsExistingMatchingCard(cm.t1,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,e,tp) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
...@@ -64,38 +64,22 @@ function cm.initial_effect(c) ...@@ -64,38 +64,22 @@ function cm.initial_effect(c)
end) end)
c:RegisterEffect(e1) c:RegisterEffect(e1)
if cm.counter==nil then if not cm.global_check then
cm.counter=true cm.global_check=true
cm[0]=0 local ge1=Effect.CreateEffect(c)
cm[1]=0 ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
local e2=Effect.CreateEffect(c) ge1:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD) ge1:SetOperation(function(e,tp,eg,ep,ev,re,r,rp)
e2:SetCode(EVENT_PHASE_START+PHASE_DRAW) local tc=eg:GetFirst()
e2:SetOperation(function(e,tp,eg,ep,ev,re,r,rp) while tc do
cm[0]=0 Duel.RegisterFlagEffect(tc:GetSummonPlayer(),m,RESET_PHASE+PHASE_END,0,1)
cm[1]=0 tc=eg:GetNext()
end
end) end)
Duel.RegisterEffect(e2,0) Duel.RegisterEffect(ge1,0)
local e3=Effect.CreateEffect(c) local ge2=ge1:Clone()
e3:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD) ge2:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetCode(EVENT_SUMMON_SUCCESS) Duel.RegisterEffect(ge2,0)
e3:SetOperation(cm.addcount)
Duel.RegisterEffect(e3,0)
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e4:SetCode(EVENT_SPSUMMON_SUCCESS)
e4:SetOperation(cm.addcount)
Duel.RegisterEffect(e4,0)
end
end
function cm.addcount(e,tp,eg,ep,ev,re,r,rp)
local tc=eg:GetFirst()
while tc do
if tc:GetPreviousControler()==tp then
local p=tc:GetPreviousControler()
cm[p]=cm[p]+1
end
tc=eg:GetNext()
end end
end end
function cm.t1(c,e,tp) function cm.t1(c,e,tp)
......
...@@ -7,7 +7,7 @@ function cm.initial_effect(c) ...@@ -7,7 +7,7 @@ function cm.initial_effect(c)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,m) e1:SetCountLimit(1,m)
e1:SetTarget(function(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetTarget(function(e,tp,eg,ep,ev,re,r,rp,chk)
local g=cm[tp] local g=Duel.GetFlagEffect(tp,m)
if chk==0 then if chk==0 then
if g<=2 then if g<=2 then
return Duel.IsExistingMatchingCard(cm.t1,tp,LOCATION_GRAVE,0,1,nil,e,tp) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 return Duel.IsExistingMatchingCard(cm.t1,tp,LOCATION_GRAVE,0,1,nil,e,tp) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
...@@ -69,38 +69,22 @@ function cm.initial_effect(c) ...@@ -69,38 +69,22 @@ function cm.initial_effect(c)
end) end)
c:RegisterEffect(e1) c:RegisterEffect(e1)
if cm.counter==nil then if not cm.global_check then
cm.counter=true cm.global_check=true
cm[0]=0 local ge1=Effect.CreateEffect(c)
cm[1]=0 ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
local e2=Effect.CreateEffect(c) ge1:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD) ge1:SetOperation(function(e,tp,eg,ep,ev,re,r,rp)
e2:SetCode(EVENT_PHASE_START+PHASE_DRAW) local tc=eg:GetFirst()
e2:SetOperation(function(e,tp,eg,ep,ev,re,r,rp) while tc do
cm[0]=0 Duel.RegisterFlagEffect(tc:GetSummonPlayer(),m,RESET_PHASE+PHASE_END,0,1)
cm[1]=0 tc=eg:GetNext()
end
end) end)
Duel.RegisterEffect(e2,0) Duel.RegisterEffect(ge1,0)
local e3=Effect.CreateEffect(c) local ge2=ge1:Clone()
e3:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD) ge2:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetCode(EVENT_SUMMON_SUCCESS) Duel.RegisterEffect(ge2,0)
e3:SetOperation(cm.addcount)
Duel.RegisterEffect(e3,0)
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e4:SetCode(EVENT_SPSUMMON_SUCCESS)
e4:SetOperation(cm.addcount)
Duel.RegisterEffect(e4,0)
end
end
function cm.addcount(e,tp,eg,ep,ev,re,r,rp)
local tc=eg:GetFirst()
while tc do
if tc:GetPreviousControler()==tp then
local p=tc:GetPreviousControler()
cm[p]=cm[p]+1
end
tc=eg:GetNext()
end end
end end
......
...@@ -7,18 +7,19 @@ function cm.initial_effect(c) ...@@ -7,18 +7,19 @@ function cm.initial_effect(c)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,m) e1:SetCountLimit(1,m)
e1:SetTarget(function(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetTarget(function(e,tp,eg,ep,ev,re,r,rp,chk)
local b=Duel.GetFlagEffect(tp,m)
if chk==0 then if chk==0 then
if cm[tp]<=4 then if b<=4 then
return Duel.IsExistingMatchingCard(cm.t1,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,e,tp) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 return Duel.IsExistingMatchingCard(cm.t1,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,e,tp) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
elseif cm[tp]>=5 then elseif b>=5 then
return Duel.IsExistingMatchingCard(cm.t2,tp,LOCATION_HAND,0,1,nil) return Duel.IsExistingMatchingCard(cm.t2,tp,LOCATION_HAND,0,1,nil)
end end
end end
if cm[tp]<=4 then if b<=4 then
e:SetCategory(CATEGORY_SPECIAL_SUMMON) e:SetCategory(CATEGORY_SPECIAL_SUMMON)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK)
end end
e:SetLabel(cm[tp]) e:SetLabel(b)
end) end)
e1:SetOperation(function(e,tp,eg,ep,ev,re,r,rp) e1:SetOperation(function(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
...@@ -62,38 +63,22 @@ function cm.initial_effect(c) ...@@ -62,38 +63,22 @@ function cm.initial_effect(c)
end) end)
c:RegisterEffect(e1) c:RegisterEffect(e1)
if cm.counter==nil then if not cm.global_check then
cm.counter=true cm.global_check=true
cm[0]=0 local ge1=Effect.CreateEffect(c)
cm[1]=0 ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
local e2=Effect.CreateEffect(c) ge1:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD) ge1:SetOperation(function(e,tp,eg,ep,ev,re,r,rp)
e2:SetCode(EVENT_PHASE_START+PHASE_DRAW) local tc=eg:GetFirst()
e2:SetOperation(function(e,tp,eg,ep,ev,re,r,rp) while tc do
cm[0]=0 Duel.RegisterFlagEffect(tc:GetSummonPlayer(),m,RESET_PHASE+PHASE_END,0,1)
cm[1]=0 tc=eg:GetNext()
end
end) end)
Duel.RegisterEffect(e2,0) Duel.RegisterEffect(ge1,0)
local e3=Effect.CreateEffect(c) local ge2=ge1:Clone()
e3:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD) ge2:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetCode(EVENT_SUMMON_SUCCESS) Duel.RegisterEffect(ge2,0)
e3:SetOperation(cm.addcount)
Duel.RegisterEffect(e3,0)
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e4:SetCode(EVENT_SPSUMMON_SUCCESS)
e4:SetOperation(cm.addcount)
Duel.RegisterEffect(e4,0)
end
end
function cm.addcount(e,tp,eg,ep,ev,re,r,rp)
local tc=eg:GetFirst()
while tc do
if tc:GetPreviousControler()==tp then
local p=tc:GetPreviousControler()
cm[p]=cm[p]+1
end
tc=eg:GetNext()
end end
end end
function cm.t1(c,e,tp) function cm.t1(c,e,tp)
......
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