Commit f42f8038 authored by TanakaKotoha's avatar TanakaKotoha

naobaijin

parent bdc4ac3e
No preview for this file type
...@@ -14,8 +14,8 @@ function c10909012.initial_effect(c) ...@@ -14,8 +14,8 @@ function c10909012.initial_effect(c)
e1:SetType(EFFECT_TYPE_IGNITION) e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_GRAVE) e1:SetRange(LOCATION_GRAVE)
e1:SetCountLimit(1,10909012) e1:SetCountLimit(1,10909012)
e1:SetTarget(c10909012.target) e1:SetTarget(c10909012.target1)
e1:SetOperation(c10909012.operation) e1:SetOperation(c10909012.operation1)
c:RegisterEffect(e1) c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(10909012,1)) e2:SetDescription(aux.Stringid(10909012,1))
...@@ -26,8 +26,8 @@ function c10909012.initial_effect(c) ...@@ -26,8 +26,8 @@ function c10909012.initial_effect(c)
e2:SetHintTiming(0,TIMING_END_PHASE) e2:SetHintTiming(0,TIMING_END_PHASE)
e2:SetCountLimit(1,109090120) e2:SetCountLimit(1,109090120)
e2:SetCost(c10909012.cost) e2:SetCost(c10909012.cost)
e2:SetTarget(c10909012.target) e2:SetTarget(c10909012.rmtg)
e2:SetOperation(c10909012.operation) e2:SetOperation(c10909012.rmop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
local e4=Effect.CreateEffect(c) local e4=Effect.CreateEffect(c)
e4:SetCategory(CATEGORY_TOHAND) e4:SetCategory(CATEGORY_TOHAND)
...@@ -70,11 +70,11 @@ function c10909012.filter1(c,e) ...@@ -70,11 +70,11 @@ function c10909012.filter1(c,e)
return c:IsType(TYPE_MONSTER) and c:IsCanBeFusionMaterial() and c:IsAbleToRemove() and not c:IsImmuneToEffect(e) return c:IsType(TYPE_MONSTER) and c:IsCanBeFusionMaterial() and c:IsAbleToRemove() and not c:IsImmuneToEffect(e)
end end
function c10909012.filter2(c,e,tp,m,f,gc,chkf) function c10909012.filter2(c,e,tp,m,f,gc,chkf)
return c:IsType(TYPE_FUSION) and c:IsCode(10909012) and (not f or f(c)) return c:IsType(TYPE_FUSION) and c:IsCode(10909003) and (not f or f(c))
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial(m,gc,chkf) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial(m,gc,chkf)
and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0 and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0
end end
function c10909012.target(e,tp,eg,ep,ev,re,r,rp,chk) function c10909012.target1(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
if chk==0 then if chk==0 then
local chkf=tp local chkf=tp
...@@ -94,7 +94,7 @@ function c10909012.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -94,7 +94,7 @@ function c10909012.target(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,c,1,tp,LOCATION_GRAVE) Duel.SetOperationInfo(0,CATEGORY_REMOVE,c,1,tp,LOCATION_GRAVE)
end end
function c10909012.operation(e,tp,eg,ep,ev,re,r,rp) function c10909012.operation1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local chkf=tp local chkf=tp
if not c:IsRelateToEffect(e) or c:IsImmuneToEffect(e) then return end if not c:IsRelateToEffect(e) or c:IsImmuneToEffect(e) then return end
......
...@@ -29,7 +29,7 @@ function c10909013.filter(c,e,tp,eg,ep,ev,re,r,rp) ...@@ -29,7 +29,7 @@ function c10909013.filter(c,e,tp,eg,ep,ev,re,r,rp)
end end
function c10909013.cost(e,tp,eg,ep,ev,re,r,rp,chk) function c10909013.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c10909013.filter,tp,LOCATION_DECK+LOCATION_EXTRA,0,1,nil,e,tp,eg,ep,ev,re,r,rp) end if chk==0 then return Duel.IsExistingMatchingCard(c10909013.filter,tp,LOCATION_DECK+LOCATION_EXTRA,0,1,nil,e,tp,eg,ep,ev,re,r,rp) end
local tc=Duel.SelectMatchingCard(tp,c10909013.filter,tp,LOCATION_REMOVED,0,1,1,nil,e,tp,eg,ep,ev,re,r,rp):GetFirst() local tc=Duel.SelectMatchingCard(tp,c10909013.filter,tp,LOCATION_DECK+LOCATION_EXTRA,0,1,1,nil,e,tp,eg,ep,ev,re,r,rp):GetFirst()
c10909013[Duel.GetCurrentChain()]=GMGlobal["Effects"]["c"..tc:GetCode()] c10909013[Duel.GetCurrentChain()]=GMGlobal["Effects"]["c"..tc:GetCode()]
Duel.SendtoGrave(tc,REASON_EFFECT+REASON_COST) Duel.SendtoGrave(tc,REASON_EFFECT+REASON_COST)
end end
......
...@@ -2,6 +2,7 @@ local m=119007 ...@@ -2,6 +2,7 @@ local m=119007
local cm=_G["c"..m] local cm=_G["c"..m]
cm.name="带来死亡的神" cm.name="带来死亡的神"
function cm.initial_effect(c) function cm.initial_effect(c)
aux.AddCodeList(c,119006)
--Activate --Activate
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_REMOVE) e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_REMOVE)
...@@ -46,7 +47,10 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -46,7 +47,10 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local tp=e:GetHandler():GetControler() local tp=e:GetHandler():GetControler()
local c=e:GetHandler() local c=e:GetHandler()
if not Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_DECK+LOCATION_HAND,0,1,nil,e,tp) then return end if not Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_DECK+LOCATION_HAND,0,1,nil,e,tp) then return end
local g=Duel.GetMatchingGroup(cm.filter,tp,LOCATION_HAND+LOCATION_ONFIELD+LOCATION_GRAVE,0,nil) local ag=Duel.SelectMatchingCard(tp,cm.spfilter,tp,LOCATION_DECK+LOCATION_HAND,0,1,1,nil,e,tp)
if not ag:GetFirst():IsLocation(LOCATION_HAND) then Duel.HintSelection(Group.FromCards(ag:GetFirst())) end
if ag:GetFirst():IsLocation(LOCATION_HAND) then Duel.ConfirmCards(1-tp,ag:GetFirst()) end
local g=Duel.GetMatchingGroup(cm.filter,tp,LOCATION_HAND+LOCATION_ONFIELD+LOCATION_GRAVE,0,ag)
local tc=g:GetFirst() local tc=g:GetFirst()
local x=0 --总 星 级 local x=0 --总 星 级
local y=0 --不 同 名 怪 兽 数 量 local y=0 --不 同 名 怪 兽 数 量
...@@ -70,10 +74,13 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -70,10 +74,13 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp)
lv=lv+ttc:GetLevel() lv=lv+ttc:GetLevel()
g:RemoveCard(ttc) g:RemoveCard(ttc)
sg:AddCard(ttc) sg:AddCard(ttc)
if not ttc:IsLocation(LOCATION_HAND) then Duel.HintSelection(Group.FromCards(ttc)) end
if ttc:IsLocation(LOCATION_HAND) then Duel.ConfirmCards(1-tp,ttc) end
ttc=tg:GetNext() ttc=tg:GetNext()
end end
local count2=0 local count2=0
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(m,1)) Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(m,1))
sg:Merge(ag)
local ttg=Duel.SelectMatchingCard(tp,cm.filter,tp,LOCATION_HAND+LOCATION_ONFIELD+LOCATION_GRAVE,0,5,5,sg) local ttg=Duel.SelectMatchingCard(tp,cm.filter,tp,LOCATION_HAND+LOCATION_ONFIELD+LOCATION_GRAVE,0,5,5,sg)
local tttc=ttg:GetFirst() local tttc=ttg:GetFirst()
while tttc do while tttc do
...@@ -81,6 +88,8 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -81,6 +88,8 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp)
lv=lv+tttc:GetLevel() lv=lv+tttc:GetLevel()
g:RemoveCard(tttc) g:RemoveCard(tttc)
sg:AddCard(tttc) sg:AddCard(tttc)
if not tttc:IsLocation(LOCATION_HAND) then Duel.HintSelection(Group.FromCards(tttc)) end
if tttc:IsLocation(LOCATION_HAND) then Duel.ConfirmCards(1-tp,tttc) end
tttc=ttg:GetNext() tttc=ttg:GetNext()
end end
if lv<24 then if lv<24 then
...@@ -90,11 +99,13 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -90,11 +99,13 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp)
g:RemoveCard(ttttc) g:RemoveCard(ttttc)
lv=lv+ttttc:GetLevel() lv=lv+ttttc:GetLevel()
sg:AddCard(ttttc) sg:AddCard(ttttc)
if not ttttc:IsLocation(LOCATION_HAND) then Duel.HintSelection(Group.FromCards(ttttc)) end
if ttttc:IsLocation(LOCATION_HAND) then Duel.ConfirmCards(1-tp,ttttc) end
end end
end end
sg:Sub(ag)
Duel.Remove(sg,POS_FACEDOWN,REASON_EFFECT) Duel.Remove(sg,POS_FACEDOWN,REASON_EFFECT)
Duel.BreakEffect() Duel.BreakEffect()
local ag=Duel.SelectMatchingCard(tp,cm.spfilter,tp,LOCATION_DECK+LOCATION_HAND,0,1,1,nil,e,tp)
if Duel.SpecialSummon(ag,SUMMON_TYPE_RITUAL,tp,tp,true,true,POS_FACEUP)~=0 then if Duel.SpecialSummon(ag,SUMMON_TYPE_RITUAL,tp,tp,true,true,POS_FACEUP)~=0 then
ag:GetFirst():CompleteProcedure() ag:GetFirst():CompleteProcedure()
Duel.Damage(1-tp,sg:GetCount()*200,REASON_EFFECT) Duel.Damage(1-tp,sg:GetCount()*200,REASON_EFFECT)
......
...@@ -105,7 +105,7 @@ function Sr_aonami.euip(c,tp,ec,tc,ttt) ...@@ -105,7 +105,7 @@ function Sr_aonami.euip(c,tp,ec,tc,ttt)
e2:SetCode(EFFECT_UPDATE_ATTACK) e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetValue(500) e2:SetValue(500)
e2:SetReset(RESET_EVENT+RESETS_STANDARD) e2:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e2) ec:RegisterEffect(e2)
end end
function Sr_aonami.eqlimit(e,c) function Sr_aonami.eqlimit(e,c)
return c==e:GetLabelObject() return c==e:GetLabelObject()
......
...@@ -35,7 +35,7 @@ end ...@@ -35,7 +35,7 @@ end
function cm.ovfilter(c) function cm.ovfilter(c)
if c:GetOverlayCount()<1 then return false end if c:GetOverlayCount()<1 then return false end
local sg=c:GetOverlayGroup() local sg=c:GetOverlayGroup()
return c:IsFaceup() and sg:IsExists(Card.IsSetCard,1,nil,0xfb7) return c:IsFaceup() and sg:IsExists(Card.IsSetCard,1,nil,0xfa7)
end end
function cm.xyzop(e,tp,chk) function cm.xyzop(e,tp,chk)
if chk==0 then return Duel.GetFlagEffect(tp,m)==0 end if chk==0 then return Duel.GetFlagEffect(tp,m)==0 end
......
...@@ -68,7 +68,7 @@ end ...@@ -68,7 +68,7 @@ end
function cm.epexop(e,tp,eg,ep,ev,re,r,rp) function cm.epexop(e,tp,eg,ep,ev,re,r,rp)
local dg=Duel.GetMatchingGroup(cm.disfilter,tp,0,LOCATION_ONFIELD,nil) local dg=Duel.GetMatchingGroup(cm.disfilter,tp,0,LOCATION_ONFIELD,nil)
if dg:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(m,1)) then if dg:GetCount()>0 and Duel.IsExistingMatchingCard(Card.IsCode,tp,LOCATION_ONFIELD,0,1,e:GetHandler(),c:GetCode()) and Duel.SelectYesNo(tp,aux.Stringid(m,1)) then
Duel.BreakEffect() Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local sg1=dg:Select(tp,1,1,nil) local sg1=dg:Select(tp,1,1,nil)
......
...@@ -49,7 +49,7 @@ function cm.eqop(e,tp,eg,ep,ev,re,r,rp) ...@@ -49,7 +49,7 @@ function cm.eqop(e,tp,eg,ep,ev,re,r,rp)
if tc then if tc then
Sr_aonami.euip(c,tp,tc,c,500) Sr_aonami.euip(c,tp,tc,c,500)
Duel.BreakEffect() Duel.BreakEffect()
if c.epexop(e,tp,eg,ep,ev,re,r,rp) then c.epexop(e,tp,eg,ep,ev,re,r,rp) end if c.epexop(e,tp,eg,ep,ev,re,r,rp) and Duel.IsExistingMatchingCard(Card.IsCode,tp,LOCATION_ONFIELD,0,1,e:GetHandler(),c:GetCode()) then c.epexop(e,tp,eg,ep,ev,re,r,rp) end
end end
end end
function cm.epexop(e,tp,eg,ep,ev,re,r,rp) function cm.epexop(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -48,7 +48,7 @@ function cm.eqop(e,tp,eg,ep,ev,re,r,rp) ...@@ -48,7 +48,7 @@ function cm.eqop(e,tp,eg,ep,ev,re,r,rp)
if tc then if tc then
Sr_aonami.euip(c,tp,tc,c,500) Sr_aonami.euip(c,tp,tc,c,500)
Duel.BreakEffect() Duel.BreakEffect()
if c.epexop(e,tp,eg,ep,ev,re,r,rp) then c.epexop(e,tp,eg,ep,ev,re,r,rp) end if c.epexop(e,tp,eg,ep,ev,re,r,rp) and Duel.IsExistingMatchingCard(Card.IsCode,tp,LOCATION_ONFIELD,0,1,e:GetHandler(),c:GetCode()) then c.epexop(e,tp,eg,ep,ev,re,r,rp) end
end end
end end
function cm.filter(c,e,tp) function cm.filter(c,e,tp)
......
...@@ -123,7 +123,7 @@ function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -123,7 +123,7 @@ function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
e:GetHandler():ResetFlagEffect(m) e:GetHandler():ResetFlagEffect(m)
end end
function cm.spcostfilter(c) function cm.spcostfilter(c)
return c:IsSetCard(0x2e8) and c:IsAbleToRemoveAsCost() return c:IsSetCard(0x2e8) and c:IsAbleToRemoveAsCost() and c:IsType(TYPE_MONSTER)
end end
function cm.spcost(e,tp,eg,ep,ev,re,r,rp,chk) function cm.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.spcostfilter,tp,LOCATION_GRAVE,0,1,e:GetHandler()) end if chk==0 then return Duel.IsExistingMatchingCard(cm.spcostfilter,tp,LOCATION_GRAVE,0,1,e:GetHandler()) end
......
...@@ -35,7 +35,6 @@ function cm.initial_effect(c) ...@@ -35,7 +35,6 @@ function cm.initial_effect(c)
e2:SetProperty(EFFECT_FLAG_DELAY) e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_DESTROYED) e2:SetCode(EVENT_DESTROYED)
e2:SetCost(cm.cost) e2:SetCost(cm.cost)
e2:SetCondition(cm.ctcon)
e2:SetTarget(cm.target) e2:SetTarget(cm.target)
e2:SetOperation(cm.operation) e2:SetOperation(cm.operation)
c:RegisterEffect(e2) c:RegisterEffect(e2)
......
...@@ -51,7 +51,7 @@ function cm.stop(e,tp,eg,ep,ev,re,r,rp) ...@@ -51,7 +51,7 @@ function cm.stop(e,tp,eg,ep,ev,re,r,rp)
if not c:IsRelateToEffect(e) then return end if not c:IsRelateToEffect(e) then return end
local loc,seq=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION,CHAININFO_TRIGGERING_SEQUENCE) local loc,seq=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION,CHAININFO_TRIGGERING_SEQUENCE)
local seq1=aux.MZoneSequence(c:GetSequence()) local seq1=aux.MZoneSequence(c:GetSequence())
if seq1==4-seq or math.abs(e:GetHandler():GetSequence()-seq)<=1 then if seq1==4-seq or (math.abs(e:GetHandler():GetSequence()-seq)<=1 and loc==LOCATION_MZONE and seq<5) then
local cg=c:GetColumnGroup():Filter(aux.disfilter1,nil) local cg=c:GetColumnGroup():Filter(aux.disfilter1,nil)
if aux.disfilter1(c) then cg:AddCard(c) end if aux.disfilter1(c) then cg:AddCard(c) end
if cg:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(m,0)) then if cg:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(m,0)) then
......
...@@ -63,7 +63,7 @@ function cm.stop(e,tp,eg,ep,ev,re,r,rp) ...@@ -63,7 +63,7 @@ function cm.stop(e,tp,eg,ep,ev,re,r,rp)
if not c:IsRelateToEffect(e) then return end if not c:IsRelateToEffect(e) then return end
local loc,seq=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION,CHAININFO_TRIGGERING_SEQUENCE) local loc,seq=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION,CHAININFO_TRIGGERING_SEQUENCE)
local seq1=aux.MZoneSequence(c:GetSequence()) local seq1=aux.MZoneSequence(c:GetSequence())
if seq1==4-seq or math.abs(e:GetHandler():GetSequence()-seq)<=1 then if seq1==4-seq or (math.abs(e:GetHandler():GetSequence()-seq)<=1 and loc==LOCATION_MZONE and seq<5) then
local cg=c:GetColumnGroup(1,1):Filter(cm.ckfilter,nil,1-tp) local cg=c:GetColumnGroup(1,1):Filter(cm.ckfilter,nil,1-tp)
if cg:GetCount()>0 then if cg:GetCount()>0 then
local tc=cg:GetFirst() local tc=cg:GetFirst()
......
...@@ -69,7 +69,7 @@ function cm.stop(e,tp,eg,ep,ev,re,r,rp) ...@@ -69,7 +69,7 @@ function cm.stop(e,tp,eg,ep,ev,re,r,rp)
if not c:IsRelateToEffect(e) then return end if not c:IsRelateToEffect(e) then return end
local loc,seq=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION,CHAININFO_TRIGGERING_SEQUENCE) local loc,seq=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION,CHAININFO_TRIGGERING_SEQUENCE)
local seq1=aux.MZoneSequence(c:GetSequence()) local seq1=aux.MZoneSequence(c:GetSequence())
if seq1==4-seq or math.abs(e:GetHandler():GetSequence()-seq)<=1 then if seq1==4-seq or (math.abs(e:GetHandler():GetSequence()-seq)<=1 and loc==LOCATION_MZONE and seq<5) then
local cg=c:GetColumnGroup():Filter(cm.ckfilter,nil,1-tp) local cg=c:GetColumnGroup():Filter(cm.ckfilter,nil,1-tp)
if cg:GetCount()>0 then if cg:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
......
...@@ -57,7 +57,7 @@ function cm.stop(e,tp,eg,ep,ev,re,r,rp) ...@@ -57,7 +57,7 @@ function cm.stop(e,tp,eg,ep,ev,re,r,rp)
if not c:IsRelateToEffect(e) then return end if not c:IsRelateToEffect(e) then return end
local loc,seq=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION,CHAININFO_TRIGGERING_SEQUENCE) local loc,seq=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION,CHAININFO_TRIGGERING_SEQUENCE)
local seq1=aux.MZoneSequence(c:GetSequence()) local seq1=aux.MZoneSequence(c:GetSequence())
if seq1==4-seq or math.abs(e:GetHandler():GetSequence()-seq)<=1 then if seq1==4-seq or (math.abs(e:GetHandler():GetSequence()-seq)<=1 and loc==LOCATION_MZONE and seq<5) then
local chkf=tp local chkf=tp
local mg1=Duel.GetFusionMaterial(tp) local mg1=Duel.GetFusionMaterial(tp)
local sg1=Duel.GetMatchingGroup(cm.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg1,nil,chkf) local sg1=Duel.GetMatchingGroup(cm.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg1,nil,chkf)
......
...@@ -55,7 +55,7 @@ function cm.stop(e,tp,eg,ep,ev,re,r,rp) ...@@ -55,7 +55,7 @@ function cm.stop(e,tp,eg,ep,ev,re,r,rp)
if not c:IsRelateToEffect(e) then return end if not c:IsRelateToEffect(e) then return end
local loc,seq=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION,CHAININFO_TRIGGERING_SEQUENCE) local loc,seq=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION,CHAININFO_TRIGGERING_SEQUENCE)
local seq1=aux.MZoneSequence(c:GetSequence()) local seq1=aux.MZoneSequence(c:GetSequence())
if seq1==4-seq or math.abs(e:GetHandler():GetSequence()-seq)<=1 then if seq1==4-seq or (math.abs(e:GetHandler():GetSequence()-seq)<=1 and loc==LOCATION_MZONE and seq<5) then
local cg=c:GetColumnGroup():Filter(Card.IsAbleToHand,nil) local cg=c:GetColumnGroup():Filter(Card.IsAbleToHand,nil)
local cg2=c:GetColumnGroup(1,1):Filter(cm.ckfilter,nil,tp) local cg2=c:GetColumnGroup(1,1):Filter(cm.ckfilter,nil,tp)
cg:Merge(cg2) cg:Merge(cg2)
......
...@@ -64,7 +64,7 @@ function cm.stop(e,tp,eg,ep,ev,re,r,rp) ...@@ -64,7 +64,7 @@ function cm.stop(e,tp,eg,ep,ev,re,r,rp)
if not c:IsRelateToEffect(e) then return end if not c:IsRelateToEffect(e) then return end
local loc,seq=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION,CHAININFO_TRIGGERING_SEQUENCE) local loc,seq=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION,CHAININFO_TRIGGERING_SEQUENCE)
local seq1=aux.MZoneSequence(c:GetSequence()) local seq1=aux.MZoneSequence(c:GetSequence())
if seq1==4-seq or math.abs(e:GetHandler():GetSequence()-seq)<=1 then if seq1==4-seq or (math.abs(e:GetHandler():GetSequence()-seq)<=1 and loc==LOCATION_MZONE and seq<5) then
local cg=c:GetColumnGroup(1,1):Filter(cm.ckfilter,nil,tp) local cg=c:GetColumnGroup(1,1):Filter(cm.ckfilter,nil,tp)
if cg:GetCount()>0 then if cg:GetCount()>0 then
local tc=cg:GetFirst() local tc=cg:GetFirst()
......
...@@ -69,7 +69,7 @@ function cm.stop(e,tp,eg,ep,ev,re,r,rp) ...@@ -69,7 +69,7 @@ function cm.stop(e,tp,eg,ep,ev,re,r,rp)
if not c:IsRelateToEffect(e) then return end if not c:IsRelateToEffect(e) then return end
local loc,seq=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION,CHAININFO_TRIGGERING_SEQUENCE) local loc,seq=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION,CHAININFO_TRIGGERING_SEQUENCE)
local seq1=aux.MZoneSequence(c:GetSequence()) local seq1=aux.MZoneSequence(c:GetSequence())
if seq1==4-seq or math.abs(e:GetHandler():GetSequence()-seq)<=1 then if seq1==4-seq or (math.abs(e:GetHandler():GetSequence()-seq)<=1 and loc==LOCATION_MZONE and seq<5) then
local cg=c:GetColumnGroup(1,1):Filter(cm.ckfilter,nil,1-tp) local cg=c:GetColumnGroup(1,1):Filter(cm.ckfilter,nil,1-tp)
if cg:GetCount()>0 then if cg:GetCount()>0 then
local tc=cg:GetFirst() local tc=cg:GetFirst()
......
...@@ -57,7 +57,7 @@ function cm.stop(e,tp,eg,ep,ev,re,r,rp) ...@@ -57,7 +57,7 @@ function cm.stop(e,tp,eg,ep,ev,re,r,rp)
if not c:IsRelateToEffect(e) then return end if not c:IsRelateToEffect(e) then return end
local loc,seq=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION,CHAININFO_TRIGGERING_SEQUENCE) local loc,seq=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION,CHAININFO_TRIGGERING_SEQUENCE)
local seq1=aux.MZoneSequence(c:GetSequence()) local seq1=aux.MZoneSequence(c:GetSequence())
if seq1==4-seq or math.abs(e:GetHandler():GetSequence()-seq)<=1 then if seq1==4-seq or (math.abs(e:GetHandler():GetSequence()-seq)<=1 and loc==LOCATION_MZONE and seq<5) then
local chkf=tp local chkf=tp
local mg1=Duel.GetFusionMaterial(tp) local mg1=Duel.GetFusionMaterial(tp)
local sg1=Duel.GetMatchingGroup(cm.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg1,nil,chkf) local sg1=Duel.GetMatchingGroup(cm.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg1,nil,chkf)
......
...@@ -68,7 +68,7 @@ function cm.stop(e,tp,eg,ep,ev,re,r,rp) ...@@ -68,7 +68,7 @@ function cm.stop(e,tp,eg,ep,ev,re,r,rp)
if not c:IsRelateToEffect(e) then return end if not c:IsRelateToEffect(e) then return end
local loc,seq=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION,CHAININFO_TRIGGERING_SEQUENCE) local loc,seq=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION,CHAININFO_TRIGGERING_SEQUENCE)
local seq1=aux.MZoneSequence(c:GetSequence()) local seq1=aux.MZoneSequence(c:GetSequence())
if seq1==4-seq or math.abs(e:GetHandler():GetSequence()-seq)<=1 then if seq1==4-seq or (math.abs(e:GetHandler():GetSequence()-seq)<=1 and loc==LOCATION_MZONE and seq<5) then
local cg=Duel.GetMatchingGroup(nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil):Filter(cm.ckfilter1,nil,tp) local cg=Duel.GetMatchingGroup(nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil):Filter(cm.ckfilter1,nil,tp)
if cg:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(m,1)) then if cg:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(m,1)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
......
...@@ -83,8 +83,7 @@ function cm.stop(e,tp,eg,ep,ev,re,r,rp) ...@@ -83,8 +83,7 @@ function cm.stop(e,tp,eg,ep,ev,re,r,rp)
if not c:IsRelateToEffect(e) then return end if not c:IsRelateToEffect(e) then return end
local loc,seq=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION,CHAININFO_TRIGGERING_SEQUENCE) local loc,seq=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION,CHAININFO_TRIGGERING_SEQUENCE)
local seq1=aux.MZoneSequence(c:GetSequence()) local seq1=aux.MZoneSequence(c:GetSequence())
if seq1==4-seq or math.abs(e:GetHandler():GetSequence()-seq)<=1 then if seq1==4-seq or (math.abs(e:GetHandler():GetSequence()-seq)<=1 and loc==LOCATION_MZONE and seq<5) then
local ph=PHASE_END
if Duel.GetCurrentPhase()==PHASE_DRAW then ph=PHASE_STANDBY end if Duel.GetCurrentPhase()==PHASE_DRAW then ph=PHASE_STANDBY end
if Duel.GetCurrentPhase()==PHASE_STANDBY then ph=PHASE_MAIN1 end if Duel.GetCurrentPhase()==PHASE_STANDBY then ph=PHASE_MAIN1 end
if Duel.GetCurrentPhase()==PHASE_MAIN1 then ph=PHASE_BATTLE end if Duel.GetCurrentPhase()==PHASE_MAIN1 then ph=PHASE_BATTLE end
......
...@@ -68,7 +68,7 @@ function cm.stop(e,tp,eg,ep,ev,re,r,rp) ...@@ -68,7 +68,7 @@ function cm.stop(e,tp,eg,ep,ev,re,r,rp)
if not c:IsRelateToEffect(e) then return end if not c:IsRelateToEffect(e) then return end
local loc,seq=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION,CHAININFO_TRIGGERING_SEQUENCE) local loc,seq=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION,CHAININFO_TRIGGERING_SEQUENCE)
local seq1=aux.MZoneSequence(c:GetSequence()) local seq1=aux.MZoneSequence(c:GetSequence())
if seq1==4-seq or math.abs(e:GetHandler():GetSequence()-seq)<=1 then if seq1==4-seq or (math.abs(e:GetHandler():GetSequence()-seq)<=1 and loc==LOCATION_MZONE and seq<5) then
local cg=Duel.GetMatchingGroup(nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil):Filter(cm.ckfilter1,nil,tp) local cg=Duel.GetMatchingGroup(nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil):Filter(cm.ckfilter1,nil,tp)
if cg:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(m,0)) then if cg:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(m,0)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESREPLACE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESREPLACE)
......
...@@ -84,7 +84,7 @@ function cm.stop(e,tp,eg,ep,ev,re,r,rp) ...@@ -84,7 +84,7 @@ function cm.stop(e,tp,eg,ep,ev,re,r,rp)
if not c:IsRelateToEffect(e) then return end if not c:IsRelateToEffect(e) then return end
local loc,seq=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION,CHAININFO_TRIGGERING_SEQUENCE) local loc,seq=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION,CHAININFO_TRIGGERING_SEQUENCE)
local seq1=aux.MZoneSequence(c:GetSequence()) local seq1=aux.MZoneSequence(c:GetSequence())
if seq1==4-seq or math.abs(e:GetHandler():GetSequence()-seq)<=1 then if seq1==4-seq or (math.abs(e:GetHandler():GetSequence()-seq)<=1 and loc==LOCATION_MZONE and seq<5) then
local ph=PHASE_END local ph=PHASE_END
if Duel.GetCurrentPhase()==PHASE_DRAW then ph=PHASE_STANDBY end if Duel.GetCurrentPhase()==PHASE_DRAW then ph=PHASE_STANDBY end
if Duel.GetCurrentPhase()==PHASE_STANDBY then ph=PHASE_MAIN1 end if Duel.GetCurrentPhase()==PHASE_STANDBY then ph=PHASE_MAIN1 end
......
...@@ -100,7 +100,7 @@ function cm.stop(e,tp,eg,ep,ev,re,r,rp) ...@@ -100,7 +100,7 @@ function cm.stop(e,tp,eg,ep,ev,re,r,rp)
if not c:IsRelateToEffect(e) then return end if not c:IsRelateToEffect(e) then return end
local loc,seq=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION,CHAININFO_TRIGGERING_SEQUENCE) local loc,seq=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION,CHAININFO_TRIGGERING_SEQUENCE)
local seq1=aux.MZoneSequence(c:GetSequence()) local seq1=aux.MZoneSequence(c:GetSequence())
if seq1==4-seq or math.abs(e:GetHandler():GetSequence()-seq)<=1 then if seq1==4-seq or (math.abs(e:GetHandler():GetSequence()-seq)<=1 and loc==LOCATION_MZONE and seq<5) then
if Duel.SelectOption(tp,aux.Stringid(m,0),aux.Stringid(m,1))==0 then if Duel.SelectOption(tp,aux.Stringid(m,0),aux.Stringid(m,1))==0 then
--disable --disable
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
......
...@@ -96,7 +96,7 @@ function cm.stop(e,tp,eg,ep,ev,re,r,rp) ...@@ -96,7 +96,7 @@ function cm.stop(e,tp,eg,ep,ev,re,r,rp)
if not c:IsRelateToEffect(e) then return end if not c:IsRelateToEffect(e) then return end
local loc,seq=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION,CHAININFO_TRIGGERING_SEQUENCE) local loc,seq=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION,CHAININFO_TRIGGERING_SEQUENCE)
local seq1=aux.MZoneSequence(c:GetSequence()) local seq1=aux.MZoneSequence(c:GetSequence())
if seq1==4-seq or math.abs(e:GetHandler():GetSequence()-seq)<=1 then if seq1==4-seq or (math.abs(e:GetHandler():GetSequence()-seq)<=1 and loc==LOCATION_MZONE and seq<5) then
if Duel.SelectOption(tp,aux.Stringid(m,0),aux.Stringid(m,1))==0 then if Duel.SelectOption(tp,aux.Stringid(m,0),aux.Stringid(m,1))==0 then
--disable --disable
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
......
...@@ -128,6 +128,7 @@ function cm.ntdop(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -128,6 +128,7 @@ function cm.ntdop(e,tp,eg,ep,ev,re,r,rp,chk)
local tcode=c.dfc_back_side local tcode=c.dfc_back_side
c:SetEntityCode(tcode,true) c:SetEntityCode(tcode,true)
c:ReplaceEffect(tcode,0,0) c:ReplaceEffect(tcode,0,0)
c:RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD,0,0)
end end
end end
......
...@@ -62,6 +62,15 @@ function cm.initial_effect(c) ...@@ -62,6 +62,15 @@ function cm.initial_effect(c)
e7:SetCountLimit(1) e7:SetCountLimit(1)
e7:SetOperation(cm.tgop) e7:SetOperation(cm.tgop)
c:RegisterEffect(e7) c:RegisterEffect(e7)
--back
local e9=Effect.CreateEffect(c)
e9:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e9:SetCode(EVENT_ADJUST)
e9:SetRange(LOCATION_DECK+LOCATION_GRAVE+LOCATION_REMOVED+LOCATION_HAND+LOCATION_EXTRA)
e9:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_SET_AVAILABLE)
e9:SetCondition(cm.backon)
e9:SetOperation(cm.backop)
c:RegisterEffect(e9)
end end
function cm.mvfilter1(c) function cm.mvfilter1(c)
return c:IsFaceup() return c:IsFaceup()
...@@ -227,3 +236,23 @@ function cm.tgop(e,tp,eg,ep,ev,re,r,rp) ...@@ -227,3 +236,23 @@ function cm.tgop(e,tp,eg,ep,ev,re,r,rp)
Duel.ConfirmCards(1-tp,g1) Duel.ConfirmCards(1-tp,g1)
end end
end end
function cm.backon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return ((c:GetFlagEffect(tp,m-2)>0 and m-2) or (c:GetFlagEffect(tp,m-1)>0 and m-1)) and c:GetOriginalCode()==m
end
function cm.backop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:GetFlagEffect(tp,m-2)>0 then
c:SetEntityCode(m-2)
Duel.ConfirmCards(tp,Group.FromCards(c))
Duel.ConfirmCards(1-tp,Group.FromCards(c))
c:ReplaceEffect(m-2,0,0)
end
if c:GetFlagEffect(tp,m-1)>0 then
c:SetEntityCode(m-1)
Duel.ConfirmCards(tp,Group.FromCards(c))
Duel.ConfirmCards(1-tp,Group.FromCards(c))
c:ReplaceEffect(m-1,0,0)
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