Commit fea49718 authored by Tachibana's avatar Tachibana

得得得得得

parent bc11e8d6
...@@ -67,12 +67,12 @@ function cm.mvtg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -67,12 +67,12 @@ function cm.mvtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.mvfilter1,tp,LOCATION_MZONE,0,1,nil,tp) end if chk==0 then return Duel.IsExistingMatchingCard(cm.mvfilter1,tp,LOCATION_MZONE,0,1,nil,tp) end
end end
function cm.mvop(e,tp,eg,ep,ev,re,r,rp) function cm.mvop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL) Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(22198672,2))
local g1=Duel.SelectMatchingCard(tp,cm.mvfilter1,tp,LOCATION_MZONE,0,1,1,nil,tp) local g1=Duel.SelectMatchingCard(tp,cm.mvfilter1,tp,LOCATION_MZONE,0,1,1,nil,tp)
local tc1=g1:GetFirst() local tc1=g1:GetFirst()
if not tc1 then return end if not tc1 then return end
Duel.HintSelection(g1) Duel.HintSelection(g1)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL) Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(22198672,2))
local g2=Duel.SelectMatchingCard(tp,cm.mvfilter2,tp,LOCATION_MZONE,0,1,1,tc1) local g2=Duel.SelectMatchingCard(tp,cm.mvfilter2,tp,LOCATION_MZONE,0,1,1,tc1)
Duel.HintSelection(g2) Duel.HintSelection(g2)
local tc2=g2:GetFirst() local tc2=g2:GetFirst()
......
...@@ -9,71 +9,56 @@ function c81004001.initial_effect(c) ...@@ -9,71 +9,56 @@ function c81004001.initial_effect(c)
e1:SetOperation(c81004001.activate) e1:SetOperation(c81004001.activate)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c81004001.filter(c,e,tp,m,m2,ft) function cm.filter(c,e,tp)
if not (c:IsType(TYPE_PENDULUM) and c:IsType(TYPE_RITUAL)) or bit.band(c:GetType(),0x81)~=0x81 return c:IsType(TYPE_PENDULUM)
or not c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_RITUAL,tp,false,true) then return false end
local mg=m:Filter(Card.IsCanBeRitualMaterial,c,c)
mg:Merge(m2)
if ft>0 then
return mg:CheckWithSumGreater(Card.GetRitualLevel,c:GetLevel(),c)
else
return mg:IsExists(c81004001.filterF,1,nil,tp,mg,c)
end
end
function c81004001.filterF(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 c81004001.mfilter(c) function cm.mfilter(c)
return c:GetLevel()>0 and c:IsType(TYPE_PENDULUM) and c:IsType(TYPE_RITUAL) and c:IsAbleToDeck() return c:GetLevel()>0 and c:IsType(TYPE_PENDULUM) and c:IsType(TYPE_RITUAL) and c:IsFaceup() and c:IsAbleToDeck()
end end
function c81004001.cfilter(c) function cm.cfilter(c)
return c:IsFaceup() and c:IsType(TYPE_PENDULUM) return c:IsFaceup() and c:IsType(TYPE_PENDULUM)
end end
function c81004001.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 mg=Duel.GetRitualMaterial(tp) local mg=Duel.GetRitualMaterial(tp)
local mg2=Group.CreateGroup() local mg2=nil
if not Duel.IsExistingMatchingCard(c81004001.cfilter,tp,LOCATION_MZONE,0,1,nil) then if not Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_MZONE,0,1,nil) then
mg2=Duel.GetMatchingGroup(c81004001.mfilter,tp,LOCATION_EXTRA,0,nil) mg2=Duel.GetMatchingGroup(cm.mfilter,tp,LOCATION_EXTRA,0,nil)
end end
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) return Duel.IsExistingMatchingCard(aux.RitualUltimateFilter,tp,LOCATION_HAND,0,1,nil,cm.filter,e,tp,mg,mg2,Card.GetLevel,"Greater")
return ft>-1 and Duel.IsExistingMatchingCard(c81004001.filter,tp,LOCATION_HAND,0,1,nil,e,tp,mg,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_TODECK,nil,0,tp,LOCATION_EXTRA)
end end
function c81004001.activate(e,tp,eg,ep,ev,re,r,rp) function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local mg=Duel.GetRitualMaterial(tp) local mg=Duel.GetRitualMaterial(tp)
local mg2=Group.CreateGroup() local mg2=nil
if not Duel.IsExistingMatchingCard(c81004001.cfilter,tp,LOCATION_MZONE,0,1,nil) then if not Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_MZONE,0,1,nil) then
mg2=Duel.GetMatchingGroup(c81004001.mfilter,tp,LOCATION_EXTRA,0,nil) mg2=Duel.GetMatchingGroup(cm.mfilter,tp,LOCATION_EXTRA,0,nil)
end end
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,c81004001.filter,tp,LOCATION_HAND,0,1,1,nil,e,tp,mg,mg2,ft) local tg=Duel.SelectMatchingCard(tp,aux.RitualUltimateFilter,tp,LOCATION_HAND,0,1,1,nil,cm.filter,e,tp,mg,mg2,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)
mg:Merge(mg2) if mg2 then
local mat=nil mg:Merge(mg2)
if ft>0 then end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE) if tc.mat_filter then
mat=mg:SelectWithSumGreater(tp,Card.GetRitualLevel,tc:GetLevel(),tc) mg=mg:Filter(tc.mat_filter,tc,tp)
else else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE) mg:RemoveCard(tc)
mat=mg:FilterSelect(tp,c81004001.filterF,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_EXTRA) local mat2=mat:Filter(Card.IsLocation,nil,LOCATION_EXTRA)
mat:Sub(mat2) mat:Sub(mat2)
Duel.ReleaseRitualMaterial(mat) Duel.ReleaseRitualMaterial(mat)
Duel.SendtoDeck(mat2,nil,2,REASON_EFFECT+REASON_MATERIAL+REASON_RITUAL) Duel.SendtoDeck(mat2,nil,SEQ_DECKSHUFFLE,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)
tc:CompleteProcedure() tc:CompleteProcedure()
......
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