Commit 213fe19d authored by Tachibana's avatar Tachibana

ndyd

parent 7577a074
...@@ -62,33 +62,8 @@ function c30005000.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -62,33 +62,8 @@ function c30005000.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.BreakEffect() Duel.BreakEffect()
Duel.SpecialSummon(tc,SUMMON_TYPE_RITUAL,tp,tp,false,true,POS_FACEUP) Duel.SpecialSummon(tc,SUMMON_TYPE_RITUAL,tp,tp,false,true,POS_FACEUP)
tc:CompleteProcedure() tc:CompleteProcedure()
local fid=c:GetFieldID()
tc:RegisterFlagEffect(30005000,RESET_EVENT+RESET_TODECK,0,1,fid)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_LEAVE_FIELD)
e1:SetCondition(c30005000.drcon)
e1:SetOperation(c30005000.drop)
e1:SetLabel(fid)
e1:SetLabelObject(tc)
Duel.RegisterEffect(e1,tp)
end end
end end
function c30005000.drcon(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject()
if tc and tc:GetFlagEffectLabel(30005000)==e:GetLabel() then
if not eg:IsContains(tc) then return false end
tc:ResetFlagEffect(30005000)
return true
else
e:Reset()
return false
end
end
function c30005000.drop(e,tp,eg,ep,ev,re,r,rp)
--Duel.Hint(HINT_CARD,0,30005000)
--Duel.Draw(tp,1,REASON_EFFECT)
end
function c30005000.thfilter(c) function c30005000.thfilter(c)
return c:IsCode(30005000) and c:IsAbleToHand() return c:IsCode(30005000) and c:IsAbleToHand()
end end
......
...@@ -8,8 +8,8 @@ function cm.initial_effect(c) ...@@ -8,8 +8,8 @@ function cm.initial_effect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(cm.qtarget) e1:SetTarget(cm.rstg)
e1:SetOperation(cm.qactivate) e1:SetOperation(cm.rsop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--grave --grave
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
...@@ -27,50 +27,33 @@ function cm.Mayumi(c) ...@@ -27,50 +27,33 @@ function cm.Mayumi(c)
local m=_G["c"..c:GetCode()] local m=_G["c"..c:GetCode()]
return m and m.Attack_Defense_Listed return m and m.Attack_Defense_Listed
end end
function cm.qfilter(c,e,tp,m,ft) function cm.rsfilter(c,e,tp)
if not (c:IsType(TYPE_PENDULUM) and c:IsAttack(1550) and c:IsDefense(1050)) or bit.band(c:GetType(),0x81)~=0x81 return c:IsType(TYPE_PENDULUM) and c:IsAttack(1550) and c:IsDefense(1050)
or not c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_RITUAL,tp,false,true) then return false end
local mg=m:Filter(Card.IsCanBeRitualMaterial,c,c)
if ft>0 then
return mg:CheckWithSumGreater(Card.GetRitualLevel,c:GetLevel(),c)
else
return mg:IsExists(cm.qfilterF,1,nil,tp,mg,c)
end
end
function cm.qfilterF(c,tp,mg,rc)
if c:IsControler(tp) and c:IsLocation(LOCATION_MZONE) and c:GetSequence()<5 then
Duel.SetSelectedCard(c)
return mg:CheckWithSumGreater(Card.GetRitualLevel,rc:GetLevel(),rc)
else return false end
end end
function cm.qtarget(e,tp,eg,ep,ev,re,r,rp,chk) function cm.rstg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then if chk==0 then
local mg=Duel.GetRitualMaterial(tp) local mg=Duel.GetRitualMaterial(tp)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) return Duel.IsExistingMatchingCard(aux.RitualUltimateFilter,tp,LOCATION_HAND,0,1,nil,cm.rsfilter,e,tp,mg,nil,Card.GetLevel,"Greater")
return ft>-1 and Duel.IsExistingMatchingCard(cm.qfilter,tp,LOCATION_HAND,0,1,nil,e,tp,mg,ft)
end end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
end end
function cm.qactivate(e,tp,eg,ep,ev,re,r,rp) function cm.rsop(e,tp,eg,ep,ev,re,r,rp)
local mg=Duel.GetRitualMaterial(tp) local mg=Duel.GetRitualMaterial(tp)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=Duel.SelectMatchingCard(tp,cm.qfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp,mg,ft) local tg=Duel.SelectMatchingCard(tp,aux.RitualUltimateFilter,tp,LOCATION_HAND,0,1,1,nil,cm.rsfilter,e,tp,mg,nil,Card.GetLevel,"Greater")
local tc=tg:GetFirst() local tc=tg:GetFirst()
if tc then if tc then
mg=mg:Filter(Card.IsCanBeRitualMaterial,tc,tc) mg=mg:Filter(Card.IsCanBeRitualMaterial,tc,tc)
local mat=nil if tc.mat_filter then
if ft>0 then mg=mg:Filter(tc.mat_filter,tc,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
mat=mg:SelectWithSumGreater(tp,Card.GetRitualLevel,tc:GetLevel(),tc)
else else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE) mg:RemoveCard(tc)
mat=mg:FilterSelect(tp,cm.qfilterF,1,1,nil,tp,mg,tc)
Duel.SetSelectedCard(mat)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local mat2=mg:SelectWithSumGreater(tp,Card.GetRitualLevel,tc:GetLevel(),tc)
mat:Merge(mat2)
end end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
aux.GCheckAdditional=aux.RitualCheckAdditional(tc,tc:GetLevel(),"Greater")
local mat=mg:SelectSubGroup(tp,aux.RitualCheck,false,1,tc:GetLevel(),tp,tc,tc:GetLevel(),"Greater")
aux.GCheckAdditional=nil
if not mat or mat:GetCount()==0 then return end
tc:SetMaterial(mat) tc:SetMaterial(mat)
Duel.ReleaseRitualMaterial(mat) Duel.ReleaseRitualMaterial(mat)
Duel.BreakEffect() Duel.BreakEffect()
......
...@@ -9,8 +9,8 @@ function cm.initial_effect(c) ...@@ -9,8 +9,8 @@ function cm.initial_effect(c)
e0:SetCategory(CATEGORY_SPECIAL_SUMMON) e0:SetCategory(CATEGORY_SPECIAL_SUMMON)
e0:SetType(EFFECT_TYPE_ACTIVATE) e0:SetType(EFFECT_TYPE_ACTIVATE)
e0:SetCode(EVENT_FREE_CHAIN) e0:SetCode(EVENT_FREE_CHAIN)
e0:SetTarget(cm.qtarget) e0:SetTarget(cm.rstg)
e0:SetOperation(cm.qactivate) e0:SetOperation(cm.rsop)
c:RegisterEffect(e0) c:RegisterEffect(e0)
--spsummon --spsummon
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
...@@ -37,50 +37,33 @@ function cm.Mayumi(c) ...@@ -37,50 +37,33 @@ function cm.Mayumi(c)
local m=_G["c"..c:GetCode()] local m=_G["c"..c:GetCode()]
return m and m.Attack_Defense_Listed return m and m.Attack_Defense_Listed
end end
function cm.qfilter(c,e,tp,m,ft) function cm.rsfilter(c,e,tp)
if not (c:IsType(TYPE_PENDULUM) and c:IsAttack(1550) and c:IsDefense(1050)) or bit.band(c:GetType(),0x81)~=0x81 return c:IsType(TYPE_PENDULUM) and c:IsAttack(1550) and c:IsDefense(1050)
or not c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_RITUAL,tp,false,true) then return false end
local mg=m:Filter(Card.IsCanBeRitualMaterial,c,c)
if ft>0 then
return mg:CheckWithSumGreater(Card.GetRitualLevel,c:GetLevel(),c)
else
return mg:IsExists(cm.qfilterF,1,nil,tp,mg,c)
end
end
function cm.qfilterF(c,tp,mg,rc)
if c:IsControler(tp) and c:IsLocation(LOCATION_MZONE) and c:GetSequence()<5 then
Duel.SetSelectedCard(c)
return mg:CheckWithSumGreater(Card.GetRitualLevel,rc:GetLevel(),rc)
else return false end
end end
function cm.qtarget(e,tp,eg,ep,ev,re,r,rp,chk) function cm.rstg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then if chk==0 then
local mg=Duel.GetRitualMaterial(tp) local mg=Duel.GetRitualMaterial(tp)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) return Duel.IsExistingMatchingCard(aux.RitualUltimateFilter,tp,LOCATION_HAND,0,1,nil,cm.rsfilter,e,tp,mg,nil,Card.GetLevel,"Greater")
return ft>-1 and Duel.IsExistingMatchingCard(cm.qfilter,tp,LOCATION_HAND,0,1,nil,e,tp,mg,ft)
end end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
end end
function cm.qactivate(e,tp,eg,ep,ev,re,r,rp) function cm.rsop(e,tp,eg,ep,ev,re,r,rp)
local mg=Duel.GetRitualMaterial(tp) local mg=Duel.GetRitualMaterial(tp)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=Duel.SelectMatchingCard(tp,cm.qfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp,mg,ft) local tg=Duel.SelectMatchingCard(tp,aux.RitualUltimateFilter,tp,LOCATION_HAND,0,1,1,nil,cm.rsfilter,e,tp,mg,nil,Card.GetLevel,"Greater")
local tc=tg:GetFirst() local tc=tg:GetFirst()
if tc then if tc then
mg=mg:Filter(Card.IsCanBeRitualMaterial,tc,tc) mg=mg:Filter(Card.IsCanBeRitualMaterial,tc,tc)
local mat=nil if tc.mat_filter then
if ft>0 then mg=mg:Filter(tc.mat_filter,tc,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
mat=mg:SelectWithSumGreater(tp,Card.GetRitualLevel,tc:GetLevel(),tc)
else else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE) mg:RemoveCard(tc)
mat=mg:FilterSelect(tp,cm.qfilterF,1,1,nil,tp,mg,tc)
Duel.SetSelectedCard(mat)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local mat2=mg:SelectWithSumGreater(tp,Card.GetRitualLevel,tc:GetLevel(),tc)
mat:Merge(mat2)
end end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
aux.GCheckAdditional=aux.RitualCheckAdditional(tc,tc:GetLevel(),"Greater")
local mat=mg:SelectSubGroup(tp,aux.RitualCheck,false,1,tc:GetLevel(),tp,tc,tc:GetLevel(),"Greater")
aux.GCheckAdditional=nil
if not mat or mat:GetCount()==0 then return end
tc:SetMaterial(mat) tc:SetMaterial(mat)
Duel.ReleaseRitualMaterial(mat) Duel.ReleaseRitualMaterial(mat)
Duel.BreakEffect() Duel.BreakEffect()
......
...@@ -9,8 +9,8 @@ function cm.initial_effect(c) ...@@ -9,8 +9,8 @@ function cm.initial_effect(c)
e0:SetCategory(CATEGORY_SPECIAL_SUMMON) e0:SetCategory(CATEGORY_SPECIAL_SUMMON)
e0:SetType(EFFECT_TYPE_ACTIVATE) e0:SetType(EFFECT_TYPE_ACTIVATE)
e0:SetCode(EVENT_FREE_CHAIN) e0:SetCode(EVENT_FREE_CHAIN)
e0:SetTarget(cm.qtarget) e0:SetTarget(cm.rstg)
e0:SetOperation(cm.qactivate) e0:SetOperation(cm.rsop)
c:RegisterEffect(e0) c:RegisterEffect(e0)
--change name --change name
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
...@@ -36,50 +36,33 @@ function cm.Mayumi(c) ...@@ -36,50 +36,33 @@ function cm.Mayumi(c)
local m=_G["c"..c:GetCode()] local m=_G["c"..c:GetCode()]
return m and m.Attack_Defense_Listed return m and m.Attack_Defense_Listed
end end
function cm.qfilter(c,e,tp,m,ft) function cm.rsfilter(c,e,tp)
if not (c:IsType(TYPE_PENDULUM) and c:IsAttack(1550) and c:IsDefense(1050)) or bit.band(c:GetType(),0x81)~=0x81 return c:IsType(TYPE_PENDULUM) and c:IsAttack(1550) and c:IsDefense(1050)
or not c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_RITUAL,tp,false,true) then return false end
local mg=m:Filter(Card.IsCanBeRitualMaterial,c,c)
if ft>0 then
return mg:CheckWithSumGreater(Card.GetRitualLevel,c:GetLevel(),c)
else
return mg:IsExists(cm.qfilterF,1,nil,tp,mg,c)
end
end
function cm.qfilterF(c,tp,mg,rc)
if c:IsControler(tp) and c:IsLocation(LOCATION_MZONE) and c:GetSequence()<5 then
Duel.SetSelectedCard(c)
return mg:CheckWithSumGreater(Card.GetRitualLevel,rc:GetLevel(),rc)
else return false end
end end
function cm.qtarget(e,tp,eg,ep,ev,re,r,rp,chk) function cm.rstg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then if chk==0 then
local mg=Duel.GetRitualMaterial(tp) local mg=Duel.GetRitualMaterial(tp)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) return Duel.IsExistingMatchingCard(aux.RitualUltimateFilter,tp,LOCATION_HAND,0,1,nil,cm.rsfilter,e,tp,mg,nil,Card.GetLevel,"Greater")
return ft>-1 and Duel.IsExistingMatchingCard(cm.qfilter,tp,LOCATION_HAND,0,1,nil,e,tp,mg,ft)
end end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
end end
function cm.qactivate(e,tp,eg,ep,ev,re,r,rp) function cm.rsop(e,tp,eg,ep,ev,re,r,rp)
local mg=Duel.GetRitualMaterial(tp) local mg=Duel.GetRitualMaterial(tp)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=Duel.SelectMatchingCard(tp,cm.qfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp,mg,ft) local tg=Duel.SelectMatchingCard(tp,aux.RitualUltimateFilter,tp,LOCATION_HAND,0,1,1,nil,cm.rsfilter,e,tp,mg,nil,Card.GetLevel,"Greater")
local tc=tg:GetFirst() local tc=tg:GetFirst()
if tc then if tc then
mg=mg:Filter(Card.IsCanBeRitualMaterial,tc,tc) mg=mg:Filter(Card.IsCanBeRitualMaterial,tc,tc)
local mat=nil if tc.mat_filter then
if ft>0 then mg=mg:Filter(tc.mat_filter,tc,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
mat=mg:SelectWithSumGreater(tp,Card.GetRitualLevel,tc:GetLevel(),tc)
else else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE) mg:RemoveCard(tc)
mat=mg:FilterSelect(tp,cm.qfilterF,1,1,nil,tp,mg,tc)
Duel.SetSelectedCard(mat)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local mat2=mg:SelectWithSumGreater(tp,Card.GetRitualLevel,tc:GetLevel(),tc)
mat:Merge(mat2)
end end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
aux.GCheckAdditional=aux.RitualCheckAdditional(tc,tc:GetLevel(),"Greater")
local mat=mg:SelectSubGroup(tp,aux.RitualCheck,false,1,tc:GetLevel(),tp,tc,tc:GetLevel(),"Greater")
aux.GCheckAdditional=nil
if not mat or mat:GetCount()==0 then return end
tc:SetMaterial(mat) tc:SetMaterial(mat)
Duel.ReleaseRitualMaterial(mat) Duel.ReleaseRitualMaterial(mat)
Duel.BreakEffect() Duel.BreakEffect()
......
...@@ -9,8 +9,8 @@ function cm.initial_effect(c) ...@@ -9,8 +9,8 @@ function cm.initial_effect(c)
e0:SetCategory(CATEGORY_SPECIAL_SUMMON) e0:SetCategory(CATEGORY_SPECIAL_SUMMON)
e0:SetType(EFFECT_TYPE_ACTIVATE) e0:SetType(EFFECT_TYPE_ACTIVATE)
e0:SetCode(EVENT_FREE_CHAIN) e0:SetCode(EVENT_FREE_CHAIN)
e0:SetTarget(cm.qtarget) e0:SetTarget(cm.rstg)
e0:SetOperation(cm.qactivate) e0:SetOperation(cm.rsop)
c:RegisterEffect(e0) c:RegisterEffect(e0)
--change name --change name
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
...@@ -36,50 +36,33 @@ function cm.Mayumi(c) ...@@ -36,50 +36,33 @@ function cm.Mayumi(c)
local m=_G["c"..c:GetCode()] local m=_G["c"..c:GetCode()]
return m and m.Attack_Defense_Listed return m and m.Attack_Defense_Listed
end end
function cm.qfilter(c,e,tp,m,ft) function cm.rsfilter(c,e,tp)
if not (c:IsType(TYPE_PENDULUM) and c:IsAttack(1550) and c:IsDefense(1050)) or bit.band(c:GetType(),0x81)~=0x81 return c:IsType(TYPE_PENDULUM) and c:IsAttack(1550) and c:IsDefense(1050)
or not c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_RITUAL,tp,false,true) then return false end
local mg=m:Filter(Card.IsCanBeRitualMaterial,c,c)
if ft>0 then
return mg:CheckWithSumGreater(Card.GetRitualLevel,c:GetLevel(),c)
else
return mg:IsExists(cm.qfilterF,1,nil,tp,mg,c)
end
end
function cm.qfilterF(c,tp,mg,rc)
if c:IsControler(tp) and c:IsLocation(LOCATION_MZONE) and c:GetSequence()<5 then
Duel.SetSelectedCard(c)
return mg:CheckWithSumGreater(Card.GetRitualLevel,rc:GetLevel(),rc)
else return false end
end end
function cm.qtarget(e,tp,eg,ep,ev,re,r,rp,chk) function cm.rstg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then if chk==0 then
local mg=Duel.GetRitualMaterial(tp) local mg=Duel.GetRitualMaterial(tp)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) return Duel.IsExistingMatchingCard(aux.RitualUltimateFilter,tp,LOCATION_HAND,0,1,nil,cm.rsfilter,e,tp,mg,nil,Card.GetLevel,"Greater")
return ft>-1 and Duel.IsExistingMatchingCard(cm.qfilter,tp,LOCATION_HAND,0,1,nil,e,tp,mg,ft)
end end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
end end
function cm.qactivate(e,tp,eg,ep,ev,re,r,rp) function cm.rsop(e,tp,eg,ep,ev,re,r,rp)
local mg=Duel.GetRitualMaterial(tp) local mg=Duel.GetRitualMaterial(tp)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=Duel.SelectMatchingCard(tp,cm.qfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp,mg,ft) local tg=Duel.SelectMatchingCard(tp,aux.RitualUltimateFilter,tp,LOCATION_HAND,0,1,1,nil,cm.rsfilter,e,tp,mg,nil,Card.GetLevel,"Greater")
local tc=tg:GetFirst() local tc=tg:GetFirst()
if tc then if tc then
mg=mg:Filter(Card.IsCanBeRitualMaterial,tc,tc) mg=mg:Filter(Card.IsCanBeRitualMaterial,tc,tc)
local mat=nil if tc.mat_filter then
if ft>0 then mg=mg:Filter(tc.mat_filter,tc,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
mat=mg:SelectWithSumGreater(tp,Card.GetRitualLevel,tc:GetLevel(),tc)
else else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE) mg:RemoveCard(tc)
mat=mg:FilterSelect(tp,cm.qfilterF,1,1,nil,tp,mg,tc)
Duel.SetSelectedCard(mat)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local mat2=mg:SelectWithSumGreater(tp,Card.GetRitualLevel,tc:GetLevel(),tc)
mat:Merge(mat2)
end end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
aux.GCheckAdditional=aux.RitualCheckAdditional(tc,tc:GetLevel(),"Greater")
local mat=mg:SelectSubGroup(tp,aux.RitualCheck,false,1,tc:GetLevel(),tp,tc,tc:GetLevel(),"Greater")
aux.GCheckAdditional=nil
if not mat or mat:GetCount()==0 then return end
tc:SetMaterial(mat) tc:SetMaterial(mat)
Duel.ReleaseRitualMaterial(mat) Duel.ReleaseRitualMaterial(mat)
Duel.BreakEffect() Duel.BreakEffect()
......
...@@ -8,8 +8,8 @@ function cm.initial_effect(c) ...@@ -8,8 +8,8 @@ function cm.initial_effect(c)
e0:SetCategory(CATEGORY_SPECIAL_SUMMON) e0:SetCategory(CATEGORY_SPECIAL_SUMMON)
e0:SetType(EFFECT_TYPE_ACTIVATE) e0:SetType(EFFECT_TYPE_ACTIVATE)
e0:SetCode(EVENT_FREE_CHAIN) e0:SetCode(EVENT_FREE_CHAIN)
e0:SetTarget(cm.qtarget) e0:SetTarget(cm.rstg)
e0:SetOperation(cm.qactivate) e0:SetOperation(cm.rsop)
c:RegisterEffect(e0) c:RegisterEffect(e0)
--change name --change name
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
...@@ -37,50 +37,33 @@ function cm.Mayumi(c) ...@@ -37,50 +37,33 @@ function cm.Mayumi(c)
local m=_G["c"..c:GetCode()] local m=_G["c"..c:GetCode()]
return m and m.Attack_Defense_Listed return m and m.Attack_Defense_Listed
end end
function cm.qfilter(c,e,tp,m,ft) function cm.rsfilter(c,e,tp)
if not (c:IsType(TYPE_PENDULUM) and c:IsAttack(1550) and c:IsDefense(1050)) or bit.band(c:GetType(),0x81)~=0x81 return c:IsType(TYPE_PENDULUM) and c:IsAttack(1550) and c:IsDefense(1050)
or not c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_RITUAL,tp,false,true) then return false end
local mg=m:Filter(Card.IsCanBeRitualMaterial,c,c)
if ft>0 then
return mg:CheckWithSumGreater(Card.GetRitualLevel,c:GetLevel(),c)
else
return mg:IsExists(cm.qfilterF,1,nil,tp,mg,c)
end
end
function cm.qfilterF(c,tp,mg,rc)
if c:IsControler(tp) and c:IsLocation(LOCATION_MZONE) and c:GetSequence()<5 then
Duel.SetSelectedCard(c)
return mg:CheckWithSumGreater(Card.GetRitualLevel,rc:GetLevel(),rc)
else return false end
end end
function cm.qtarget(e,tp,eg,ep,ev,re,r,rp,chk) function cm.rstg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then if chk==0 then
local mg=Duel.GetRitualMaterial(tp) local mg=Duel.GetRitualMaterial(tp)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) return Duel.IsExistingMatchingCard(aux.RitualUltimateFilter,tp,LOCATION_HAND,0,1,nil,cm.rsfilter,e,tp,mg,nil,Card.GetLevel,"Greater")
return ft>-1 and Duel.IsExistingMatchingCard(cm.qfilter,tp,LOCATION_HAND,0,1,nil,e,tp,mg,ft)
end end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
end end
function cm.qactivate(e,tp,eg,ep,ev,re,r,rp) function cm.rsop(e,tp,eg,ep,ev,re,r,rp)
local mg=Duel.GetRitualMaterial(tp) local mg=Duel.GetRitualMaterial(tp)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=Duel.SelectMatchingCard(tp,cm.qfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp,mg,ft) local tg=Duel.SelectMatchingCard(tp,aux.RitualUltimateFilter,tp,LOCATION_HAND,0,1,1,nil,cm.rsfilter,e,tp,mg,nil,Card.GetLevel,"Greater")
local tc=tg:GetFirst() local tc=tg:GetFirst()
if tc then if tc then
mg=mg:Filter(Card.IsCanBeRitualMaterial,tc,tc) mg=mg:Filter(Card.IsCanBeRitualMaterial,tc,tc)
local mat=nil if tc.mat_filter then
if ft>0 then mg=mg:Filter(tc.mat_filter,tc,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
mat=mg:SelectWithSumGreater(tp,Card.GetRitualLevel,tc:GetLevel(),tc)
else else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE) mg:RemoveCard(tc)
mat=mg:FilterSelect(tp,cm.qfilterF,1,1,nil,tp,mg,tc)
Duel.SetSelectedCard(mat)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local mat2=mg:SelectWithSumGreater(tp,Card.GetRitualLevel,tc:GetLevel(),tc)
mat:Merge(mat2)
end end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
aux.GCheckAdditional=aux.RitualCheckAdditional(tc,tc:GetLevel(),"Greater")
local mat=mg:SelectSubGroup(tp,aux.RitualCheck,false,1,tc:GetLevel(),tp,tc,tc:GetLevel(),"Greater")
aux.GCheckAdditional=nil
if not mat or mat:GetCount()==0 then return end
tc:SetMaterial(mat) tc:SetMaterial(mat)
Duel.ReleaseRitualMaterial(mat) Duel.ReleaseRitualMaterial(mat)
Duel.BreakEffect() Duel.BreakEffect()
......
...@@ -10,8 +10,8 @@ function cm.initial_effect(c) ...@@ -10,8 +10,8 @@ function cm.initial_effect(c)
e0:SetType(EFFECT_TYPE_ACTIVATE) e0:SetType(EFFECT_TYPE_ACTIVATE)
e0:SetCode(EVENT_FREE_CHAIN) e0:SetCode(EVENT_FREE_CHAIN)
e0:SetCountLimit(1,m) e0:SetCountLimit(1,m)
e0:SetTarget(cm.qtarget) e0:SetTarget(cm.rstg)
e0:SetOperation(cm.qactivate) e0:SetOperation(cm.rsop)
c:RegisterEffect(e0) c:RegisterEffect(e0)
--atkup --atkup
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
...@@ -46,50 +46,33 @@ function cm.Mayumi(c) ...@@ -46,50 +46,33 @@ function cm.Mayumi(c)
local m=_G["c"..c:GetCode()] local m=_G["c"..c:GetCode()]
return m and m.Attack_Defense_Listed return m and m.Attack_Defense_Listed
end end
function cm.qfilter(c,e,tp,m,ft) function cm.rsfilter(c,e,tp)
if not (c:IsType(TYPE_PENDULUM) and c:IsAttack(1550) and c:IsDefense(1050)) or bit.band(c:GetType(),0x81)~=0x81 return c:IsType(TYPE_PENDULUM) and c:IsAttack(1550) and c:IsDefense(1050)
or not c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_RITUAL,tp,false,true) then return false end
local mg=m:Filter(Card.IsCanBeRitualMaterial,c,c)
if ft>0 then
return mg:CheckWithSumGreater(Card.GetRitualLevel,c:GetLevel(),c)
else
return mg:IsExists(cm.qfilterF,1,nil,tp,mg,c)
end
end
function cm.qfilterF(c,tp,mg,rc)
if c:IsControler(tp) and c:IsLocation(LOCATION_MZONE) and c:GetSequence()<5 then
Duel.SetSelectedCard(c)
return mg:CheckWithSumGreater(Card.GetRitualLevel,rc:GetLevel(),rc)
else return false end
end end
function cm.qtarget(e,tp,eg,ep,ev,re,r,rp,chk) function cm.rstg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then if chk==0 then
local mg=Duel.GetRitualMaterial(tp) local mg=Duel.GetRitualMaterial(tp)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) return Duel.IsExistingMatchingCard(aux.RitualUltimateFilter,tp,LOCATION_HAND,0,1,nil,cm.rsfilter,e,tp,mg,nil,Card.GetLevel,"Greater")
return ft>-1 and Duel.IsExistingMatchingCard(cm.qfilter,tp,LOCATION_HAND,0,1,nil,e,tp,mg,ft)
end end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
end end
function cm.qactivate(e,tp,eg,ep,ev,re,r,rp) function cm.rsop(e,tp,eg,ep,ev,re,r,rp)
local mg=Duel.GetRitualMaterial(tp) local mg=Duel.GetRitualMaterial(tp)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=Duel.SelectMatchingCard(tp,cm.qfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp,mg,ft) local tg=Duel.SelectMatchingCard(tp,aux.RitualUltimateFilter,tp,LOCATION_HAND,0,1,1,nil,cm.rsfilter,e,tp,mg,nil,Card.GetLevel,"Greater")
local tc=tg:GetFirst() local tc=tg:GetFirst()
if tc then if tc then
mg=mg:Filter(Card.IsCanBeRitualMaterial,tc,tc) mg=mg:Filter(Card.IsCanBeRitualMaterial,tc,tc)
local mat=nil if tc.mat_filter then
if ft>0 then mg=mg:Filter(tc.mat_filter,tc,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
mat=mg:SelectWithSumGreater(tp,Card.GetRitualLevel,tc:GetLevel(),tc)
else else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE) mg:RemoveCard(tc)
mat=mg:FilterSelect(tp,cm.qfilterF,1,1,nil,tp,mg,tc)
Duel.SetSelectedCard(mat)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local mat2=mg:SelectWithSumGreater(tp,Card.GetRitualLevel,tc:GetLevel(),tc)
mat:Merge(mat2)
end end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
aux.GCheckAdditional=aux.RitualCheckAdditional(tc,tc:GetLevel(),"Greater")
local mat=mg:SelectSubGroup(tp,aux.RitualCheck,false,1,tc:GetLevel(),tp,tc,tc:GetLevel(),"Greater")
aux.GCheckAdditional=nil
if not mat or mat:GetCount()==0 then return end
tc:SetMaterial(mat) tc:SetMaterial(mat)
Duel.ReleaseRitualMaterial(mat) Duel.ReleaseRitualMaterial(mat)
Duel.BreakEffect() Duel.BreakEffect()
......
...@@ -38,59 +38,49 @@ function cm.Mayumi(c) ...@@ -38,59 +38,49 @@ function cm.Mayumi(c)
local m=_G["c"..c:GetCode()] local m=_G["c"..c:GetCode()]
return m and m.Attack_Defense_Listed return m and m.Attack_Defense_Listed
end end
function cm.filter(c,e,tp,m1,m2,ft) function cm.filter(c,e,tp)
if not (c:IsType(TYPE_PENDULUM) and c:IsAttack(1550) and c:IsDefense(1050)) or bit.band(c:GetType(),0x81)~=0x81 return c:IsType(TYPE_PENDULUM) and c:IsAttack(1550) and c:IsDefense(1050)
or not c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_RITUAL,tp,false,true) then return false end
local mg=m1:Filter(Card.IsCanBeRitualMaterial,c,c)
mg:Merge(m2)
if ft>0 then
return mg:CheckWithSumGreater(Card.GetRitualLevel,c:GetLevel(),c)
else
return mg:IsExists(cm.mfilterf,1,nil,tp,mg,c)
end
end
function cm.mfilterf(c,tp,mg,rc)
if c:IsControler(tp) and c:IsLocation(LOCATION_MZONE) and c:GetSequence()<5 then
Duel.SetSelectedCard(c)
return mg:CheckWithSumGreater(Card.GetRitualLevel,rc:GetLevel(),rc)
else return false end
end end
function cm.mfilter(c) function cm.mfilter(c)
return c:GetLevel()>0 and c:IsAttack(1550) and c:IsDefense(1050) and c:IsAbleToRemove() return c:GetLevel()>0 and c:IsAttack(1550) and c:IsDefense(1050) and c:IsAbleToRemove()
end end
function cm.nfilter(c)
return c:IsAttack(1550) and c:IsDefense(1050)
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
local mg1=Duel.GetRitualMaterial(tp) local mg1=Duel.GetRitualMaterial(tp)
local mg2=Duel.GetMatchingGroup(cm.mfilter,tp,LOCATION_GRAVE,0,nil) local mg2=Duel.GetMatchingGroup(cm.mfilter,tp,LOCATION_GRAVE,0,nil)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) return Duel.IsExistingMatchingCard(aux.RitualUltimateFilter,tp,LOCATION_HAND,0,1,nil,cm.filter,e,tp,mg1,mg2,Card.GetLevel,"Greater")
return ft>-1 and Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_HAND,0,1,nil,e,tp,mg1,mg2,ft)
end end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,0,tp,LOCATION_GRAVE)
end end
function cm.activate(e,tp,eg,ep,ev,re,r,rp) function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local mg1=Duel.GetRitualMaterial(tp) local mg1=Duel.GetRitualMaterial(tp)
local mg2=Duel.GetMatchingGroup(cm.mfilter,tp,LOCATION_GRAVE,0,nil) local mg2=Duel.GetMatchingGroup(aux.NecroValleyFilter(cm.mfilter),tp,LOCATION_GRAVE,0,nil)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=Duel.SelectMatchingCard(tp,cm.filter,tp,LOCATION_HAND,0,1,1,nil,e,tp,mg1,mg2,ft) local g=Duel.SelectMatchingCard(tp,aux.RitualUltimateFilter,tp,LOCATION_HAND,0,1,1,nil,cm.filter,e,tp,mg1,mg2,Card.GetLevel,"Greater")
local tc=tg:GetFirst() local tc=g:GetFirst()
if tc then if tc then
local mg=mg1:Filter(Card.IsCanBeRitualMaterial,tc,tc) local mg=mg1:Filter(Card.IsCanBeRitualMaterial,tc,tc)
mg:Merge(mg2) mg:Merge(mg2)
local mat=nil if tc.mat_filter then
if ft>0 then mg=mg:Filter(tc.mat_filter,tc,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
mat=mg:SelectWithSumGreater(tp,Card.GetRitualLevel,tc:GetLevel(),tc)
else else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE) mg:RemoveCard(tc)
mat=mg:FilterSelect(tp,cm.mfilterf,1,1,nil,tp,mg,tc)
Duel.SetSelectedCard(mat)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local mat2=mg:SelectWithSumGreater(tp,Card.GetRitualLevel,tc:GetLevel(),tc)
mat:Merge(mat2)
end end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
aux.GCheckAdditional=aux.RitualCheckAdditional(tc,tc:GetLevel(),"Greater")
local mat=mg:SelectSubGroup(tp,aux.RitualCheck,false,1,tc:GetLevel(),tp,tc,tc:GetLevel(),"Greater")
aux.GCheckAdditional=nil
if not mat or mat:GetCount()==0 then return end
tc:SetMaterial(mat) tc:SetMaterial(mat)
local mat2=mat:Filter(Card.IsLocation,nil,LOCATION_GRAVE):Filter(cm.nfilter,nil)
mat:Sub(mat2)
Duel.ReleaseRitualMaterial(mat) Duel.ReleaseRitualMaterial(mat)
Duel.Remove(mat2,POS_FACEUP,REASON_EFFECT+REASON_MATERIAL+REASON_RITUAL)
Duel.BreakEffect() Duel.BreakEffect()
Duel.SpecialSummon(tc,SUMMON_TYPE_RITUAL,tp,tp,false,true,POS_FACEUP) Duel.SpecialSummon(tc,SUMMON_TYPE_RITUAL,tp,tp,false,true,POS_FACEUP)
Duel.Hint(HINT_MUSIC,0,aux.Stringid(m,0)) Duel.Hint(HINT_MUSIC,0,aux.Stringid(m,0))
......
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