Commit 2f1d33c0 authored by Nemo Ma's avatar Nemo Ma

fix

parent 36e69a12
...@@ -35,7 +35,7 @@ function cm.thfilter(c) ...@@ -35,7 +35,7 @@ function cm.thfilter(c)
end end
function cm.tg(e,tp,eg,ep,ev,re,r,rp,chk) function cm.tg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
local b1=Duel.IsExistingMatchingCard(Card.IsFaceup,tp,LOCATION_REMOVED,0,1,nil) and Duel.IsExistingMatchingCard(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) local b1=Duel.IsExistingMatchingCard(nil,tp,LOCATION_REMOVED,0,1,nil) and Duel.IsExistingMatchingCard(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil)
local g1=Duel.GetMatchingGroup(cm.thfilter,tp,LOCATION_GRAVE,0,nil) local g1=Duel.GetMatchingGroup(cm.thfilter,tp,LOCATION_GRAVE,0,nil)
local g2=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_ONFIELD,0,nil) local g2=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_ONFIELD,0,nil)
local b2=#g1>0 and #g2>0 local b2=#g1>0 and #g2>0
...@@ -51,7 +51,7 @@ function cm.tg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -51,7 +51,7 @@ function cm.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if op==0 then if op==0 then
e:SetDescription(aux.Stringid(m,2)) e:SetDescription(aux.Stringid(m,2))
e:SetCategory(CATEGORY_DESTROY) e:SetCategory(CATEGORY_DESTROY)
local g3=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_REMOVED,0,nil) local g3=Duel.GetMatchingGroup(nil,tp,LOCATION_REMOVED,0,nil)
local g4=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil) local g4=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g3,1,tp,LOCATION_REMOVED) Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g3,1,tp,LOCATION_REMOVED)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g4,1,0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g4,1,0,0)
...@@ -66,7 +66,7 @@ function cm.op(e,tp,eg,ep,ev,re,r,rp) ...@@ -66,7 +66,7 @@ function cm.op(e,tp,eg,ep,ev,re,r,rp)
local ct,op=e:GetLabel() local ct,op=e:GetLabel()
if op==0 then if op==0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local rg=Duel.SelectMatchingCard(tp,Card.IsFaceup,tp,LOCATION_REMOVED,LOCATION_REMOVED,1,ct,nil) local rg=Duel.SelectMatchingCard(tp,nil,tp,LOCATION_REMOVED,LOCATION_REMOVED,1,ct,nil)
if #rg>0 and Duel.SendtoGrave(rg,REASON_EFFECT+REASON_RETURN)~=0 then if #rg>0 and Duel.SendtoGrave(rg,REASON_EFFECT+REASON_RETURN)~=0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local dg=Duel.SelectMatchingCard(tp,aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,ct,nil) local dg=Duel.SelectMatchingCard(tp,aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,ct,nil)
......
...@@ -9,6 +9,7 @@ function c33310210.initial_effect(c) ...@@ -9,6 +9,7 @@ function c33310210.initial_effect(c)
e0:SetCode(EFFECT_SPSUMMON_PROC) e0:SetCode(EFFECT_SPSUMMON_PROC)
e0:SetProperty(EFFECT_FLAG_UNCOPYABLE) e0:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e0:SetRange(LOCATION_EXTRA) e0:SetRange(LOCATION_EXTRA)
e0:SetCountLimit(1,33311211)
e0:SetCondition(c33310210.sprcon) e0:SetCondition(c33310210.sprcon)
e0:SetOperation(c33310210.sprop) e0:SetOperation(c33310210.sprop)
c:RegisterEffect(e0) c:RegisterEffect(e0)
...@@ -26,7 +27,7 @@ function c33310210.initial_effect(c) ...@@ -26,7 +27,7 @@ function c33310210.initial_effect(c)
e1:SetDescription(aux.Stringid(33310210,0)) e1:SetDescription(aux.Stringid(33310210,0))
e1:SetCategory(CATEGORY_TOHAND) e1:SetCategory(CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SPSUMMON_SUCCESS) e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetTarget(c33310210.thtg) e1:SetTarget(c33310210.thtg)
e1:SetOperation(c33310210.thop) e1:SetOperation(c33310210.thop)
......
...@@ -26,6 +26,7 @@ function s.initial_effect(c) ...@@ -26,6 +26,7 @@ function s.initial_effect(c)
e2:SetType(EFFECT_TYPE_SINGLE + EFFECT_TYPE_CONTINUOUS) e2:SetType(EFFECT_TYPE_SINGLE + EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_SPSUMMON_SUCCESS) e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP + EFFECT_FLAG_DELAY) e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP + EFFECT_FLAG_DELAY)
e2:SetCondition(function(e) return e:GetHandler():GetFlagEffect(id)>0 end)
e2:SetOperation(s.negop) e2:SetOperation(s.negop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--special summon other --special summon other
...@@ -77,7 +78,7 @@ function s.spop(e, tp, eg, ep, ev, re, r, rp) ...@@ -77,7 +78,7 @@ function s.spop(e, tp, eg, ep, ev, re, r, rp)
local c = e:GetHandler() local c = e:GetHandler()
if c:IsRelateToEffect(e) and Duel.GetLocationCountFromEx(tp)>0 and Duel.SpecialSummon(c, 1, tp, tp, true, true, POS_FACEUP) ~= 0 then if c:IsRelateToEffect(e) and Duel.GetLocationCountFromEx(tp)>0 and Duel.SpecialSummon(c, 1, tp, tp, true, true, POS_FACEUP) ~= 0 then
c:CompleteProcedure() c:CompleteProcedure()
-- c:RegisterFlagEffect(id, RESET_EVENT + RESETS_STANDARD, 0, 0) c:RegisterFlagEffect(id, RESET_EVENT + RESETS_STANDARD, 0, 0)
end end
end end
function s.negop(e, tp, eg, ep, ev, re, r, rp) function s.negop(e, tp, eg, ep, ev, re, r, rp)
......
...@@ -38,7 +38,7 @@ function Color_Song.AddCount(c) ...@@ -38,7 +38,7 @@ function Color_Song.AddCount(c)
extraCount = {4,4} extraCount = {4,4}
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e1:SetCode(EVENT_PHASE+PHASE_END) e1:SetCode(EVENT_PHASE_START+PHASE_DRAW)
e1:SetCountLimit(1) e1:SetCountLimit(1)
e1:SetOperation(Color_Song.AddCount_Op) e1:SetOperation(Color_Song.AddCount_Op)
Duel.RegisterEffect(e1,0) Duel.RegisterEffect(e1,0)
...@@ -48,6 +48,8 @@ end ...@@ -48,6 +48,8 @@ end
function Color_Song.AddCount_Op(e,tp,eg,ep,ev,re,r,rp) function Color_Song.AddCount_Op(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetFlagEffect(tp,m-1)>=4 then Color_Song.AddC(tp) end if Duel.GetFlagEffect(tp,m-1)>=4 then Color_Song.AddC(tp) end
if Duel.GetFlagEffect(1-tp,m-1)>=4 then Color_Song.AddC(1-tp) end if Duel.GetFlagEffect(1-tp,m-1)>=4 then Color_Song.AddC(1-tp) end
Duel.ResetFlagEffect(tp,m-1)
Duel.ResetFlagEffect(1-tp,m-1)
end end
function Color_Song.AddC(tp) function Color_Song.AddC(tp)
if not Color_Song.AddCount_check then return end if not Color_Song.AddCount_check then return end
...@@ -185,7 +187,7 @@ function Color_Song.UseEffect(e,tp) ...@@ -185,7 +187,7 @@ function Color_Song.UseEffect(e,tp)
Color_Song.Hunter_Op(e,tp) Color_Song.Hunter_Op(e,tp)
end end
Duel.RegisterFlagEffect(tp,m+opval[op]-1,RESET_PHASE+PHASE_END,0,1) Duel.RegisterFlagEffect(tp,m+opval[op]-1,RESET_PHASE+PHASE_END,0,1)
Duel.RegisterFlagEffect(tp,m-1,RESET_PHASE+PHASE_END,0,1) Duel.RegisterFlagEffect(tp,m-1,RESET_PHASE+PHASE_DRAW,0,1)
end end
end end
--Orange --Orange
......
...@@ -23,28 +23,14 @@ end ...@@ -23,28 +23,14 @@ end
function c9910215.activate(e,tp,eg,ep,ev,re,r,rp) function c9910215.activate(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_CHAINING) e1:SetCode(EVENT_CHAIN_SOLVED)
e1:SetReset(RESET_PHASE+PHASE_END) e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetOperation(c9910215.chop) e1:SetOperation(c9910215.operation)
e1:SetLabel(0)
Duel.RegisterEffect(e1,tp) Duel.RegisterEffect(e1,tp)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_CHAIN_END)
e2:SetReset(RESET_PHASE+PHASE_END)
e2:SetOperation(c9910215.operation)
e2:SetLabelObject(e1)
Duel.RegisterEffect(e2,tp)
end
function c9910215.chop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetCurrentChain()==2 and re then
if rp==tp then e:SetLabel(1) else e:SetLabel(2) end
end
end end
function c9910215.operation(e,tp,eg,ep,ev,re,r,rp) function c9910215.operation(e,tp,eg,ep,ev,re,r,rp)
local lab=e:GetLabelObject():GetLabel() if Duel.GetCurrentChain()~=2 then return end
e:GetLabelObject():SetLabel(0) if rp==tp then
if lab==1 then
local dg=Duel.GetFieldGroup(tp,0,LOCATION_ONFIELD) local dg=Duel.GetFieldGroup(tp,0,LOCATION_ONFIELD)
if Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil,REASON_EFFECT) if Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil,REASON_EFFECT)
and dg:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(9910215,0)) then and dg:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(9910215,0)) then
...@@ -57,7 +43,7 @@ function c9910215.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -57,7 +43,7 @@ function c9910215.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.Destroy(sg,REASON_EFFECT) Duel.Destroy(sg,REASON_EFFECT)
end end
end end
if lab==2 and Duel.GetFlagEffect(tp,9910215)<3 then if rp~=tp and Duel.GetFlagEffect(tp,9910215)<3 then
Duel.Hint(HINT_CARD,0,9910215) Duel.Hint(HINT_CARD,0,9910215)
Duel.Draw(tp,1,REASON_EFFECT) Duel.Draw(tp,1,REASON_EFFECT)
Duel.RegisterFlagEffect(tp,9910215,RESET_PHASE+PHASE_END,0,1) Duel.RegisterFlagEffect(tp,9910215,RESET_PHASE+PHASE_END,0,1)
......
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