Commit 06d3204c authored by 聖園ミカ's avatar 聖園ミカ 🐟

vme50

parent e3f15de5
...@@ -55,27 +55,13 @@ end ...@@ -55,27 +55,13 @@ end
function c50218350.splimit(e,c,tp,sumtp,sumpos) function c50218350.splimit(e,c,tp,sumtp,sumpos)
return not c:IsSetCard(0xcb3) return not c:IsSetCard(0xcb3)
end end
function c50218350.filter(c,e,tp,m,ft) function c50218350.rfilter(c,e,tp,chk)
if not c:IsSetCard(0xcb3) or bit.band(c:GetType(),0x81)~=0x81 return c:IsSetCard(0xcb3) and (not chk or c~=e:GetHandler())
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(c50218350.rfilter,1,nil,tp,mg,c)
end
end
function c50218350.rfilter(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 c50218350.rtg(e,tp,eg,ep,ev,re,r,rp,chk) function c50218350.rtg(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+LOCATION_REMOVED,0,1,nil,c50218350.rfilter,e,tp,mg,nil,Card.GetLevel,"Greater")
return ft>-1 and Duel.IsExistingMatchingCard(c50218350.filter,tp,LOCATION_HAND+LOCATION_REMOVED,0,1,nil,e,tp,mg,ft)
end end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,e:GetHandler(),1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_REMOVED) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_REMOVED)
...@@ -83,31 +69,30 @@ end ...@@ -83,31 +69,30 @@ end
function c50218350.rop(e,tp,eg,ep,ev,re,r,rp) function c50218350.rop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.Destroy(c,REASON_EFFECT)>0 then if c:IsRelateToEffect(e) and Duel.Destroy(c,REASON_EFFECT)>0 then
local mg=Duel.GetRitualMaterial(tp) ::cancel::
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) local mg=Duel.GetRitualMaterial(tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=Duel.SelectMatchingCard(tp,c50218350.filter,tp,LOCATION_HAND+LOCATION_REMOVED,0,1,1,nil,e,tp,mg,ft) local tg=Duel.SelectMatchingCard(tp,aux.RitualUltimateFilter,tp,LOCATION_HAND+LOCATION_REMOVED,0,1,1,nil,c50218350.rfilter,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) else
mat=mg:SelectWithSumGreater(tp,Card.GetRitualLevel,tc:GetLevel(),tc) mg:RemoveCard(tc)
else end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
mat=mg:FilterSelect(tp,c50218350.rfilter,1,1,nil,tp,mg,tc)
Duel.SetSelectedCard(mat)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local mat2=mg:SelectWithSumGreater(tp,Card.GetRitualLevel,tc:GetLevel(),tc) aux.GCheckAdditional=aux.RitualCheckAdditional(tc,tc:GetLevel(),"Greater")
mat:Merge(mat2) local mat=mg:SelectSubGroup(tp,aux.RitualCheck,true,1,tc:GetLevel(),tp,tc,tc:GetLevel(),"Greater")
aux.GCheckAdditional=nil
if not mat then goto cancel end
tc:SetMaterial(mat)
local lv=mat:GetSum(Card.GetLevel)
Duel.ReleaseRitualMaterial(mat)
Duel.BreakEffect()
Duel.SpecialSummon(tc,SUMMON_TYPE_RITUAL,tp,tp,false,true,POS_FACEUP)
tc:CompleteProcedure()
end end
tc:SetMaterial(mat)
Duel.ReleaseRitualMaterial(mat)
Duel.BreakEffect()
Duel.SpecialSummon(tc,SUMMON_TYPE_RITUAL,tp,tp,false,true,POS_FACEUP)
tc:CompleteProcedure()
end
end end
end end
function c50218350.actcon(e,tp,eg,ep,ev,re,r,rp) function c50218350.actcon(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -55,27 +55,13 @@ end ...@@ -55,27 +55,13 @@ end
function c50218355.splimit(e,c,tp,sumtp,sumpos) function c50218355.splimit(e,c,tp,sumtp,sumpos)
return not c:IsSetCard(0xcb3) return not c:IsSetCard(0xcb3)
end end
function c50218355.filter(c,e,tp,m,ft) function c50218355.rfilter(c,e,tp,chk)
if not c:IsSetCard(0xcb3) or bit.band(c:GetType(),0x81)~=0x81 return c:IsSetCard(0xcb3) and (not chk or c~=e:GetHandler())
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(c50218355.rfilter,1,nil,tp,mg,c)
end
end
function c50218355.rfilter(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 c50218355.rtg(e,tp,eg,ep,ev,re,r,rp,chk) function c50218355.rtg(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+LOCATION_GRAVE,0,1,nil,c50218355.rfilter,e,tp,mg,nil,Card.GetLevel,"Greater")
return ft>-1 and Duel.IsExistingMatchingCard(c50218355.filter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp,mg,ft)
end end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,e:GetHandler(),1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE)
...@@ -83,31 +69,30 @@ end ...@@ -83,31 +69,30 @@ end
function c50218355.rop(e,tp,eg,ep,ev,re,r,rp) function c50218355.rop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.Destroy(c,REASON_EFFECT)>0 then if c:IsRelateToEffect(e) and Duel.Destroy(c,REASON_EFFECT)>0 then
local mg=Duel.GetRitualMaterial(tp) ::cancel::
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) local mg=Duel.GetRitualMaterial(tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=Duel.SelectMatchingCard(tp,c50218355.filter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,e,tp,mg,ft) local tg=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(aux.RitualUltimateFilter),tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,c50218355.rfilter,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) else
mat=mg:SelectWithSumGreater(tp,Card.GetRitualLevel,tc:GetLevel(),tc) mg:RemoveCard(tc)
else end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
mat=mg:FilterSelect(tp,c50218355.rfilter,1,1,nil,tp,mg,tc)
Duel.SetSelectedCard(mat)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local mat2=mg:SelectWithSumGreater(tp,Card.GetRitualLevel,tc:GetLevel(),tc) aux.GCheckAdditional=aux.RitualCheckAdditional(tc,tc:GetLevel(),"Greater")
mat:Merge(mat2) local mat=mg:SelectSubGroup(tp,aux.RitualCheck,true,1,tc:GetLevel(),tp,tc,tc:GetLevel(),"Greater")
aux.GCheckAdditional=nil
if not mat then goto cancel end
tc:SetMaterial(mat)
local lv=mat:GetSum(Card.GetLevel)
Duel.ReleaseRitualMaterial(mat)
Duel.BreakEffect()
Duel.SpecialSummon(tc,SUMMON_TYPE_RITUAL,tp,tp,false,true,POS_FACEUP)
tc:CompleteProcedure()
end end
tc:SetMaterial(mat)
Duel.ReleaseRitualMaterial(mat)
Duel.BreakEffect()
Duel.SpecialSummon(tc,SUMMON_TYPE_RITUAL,tp,tp,false,true,POS_FACEUP)
tc:CompleteProcedure()
end
end end
end end
function c50218355.actcon(e,tp,eg,ep,ev,re,r,rp) function c50218355.actcon(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -56,27 +56,13 @@ end ...@@ -56,27 +56,13 @@ end
function c50218360.splimit(e,c,tp,sumtp,sumpos) function c50218360.splimit(e,c,tp,sumtp,sumpos)
return not c:IsSetCard(0xcb3) return not c:IsSetCard(0xcb3)
end end
function c50218360.filter(c,e,tp,m,ft) function c50218360.rfilter(c,e,tp,chk)
if not c:IsSetCard(0xcb3) or bit.band(c:GetType(),0x81)~=0x81 return c:IsSetCard(0xcb3) and (not chk or c~=e:GetHandler())
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(c50218360.rfilter,1,nil,tp,mg,c)
end
end
function c50218360.rfilter(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 c50218360.rtg(e,tp,eg,ep,ev,re,r,rp,chk) function c50218360.rtg(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+LOCATION_EXTRA,0,1,nil,c50218360.rfilter,e,tp,mg,nil,Card.GetLevel,"Greater")
return ft>-1 and Duel.IsExistingMatchingCard(c50218360.filter,tp,LOCATION_HAND+LOCATION_EXTRA,0,1,nil,e,tp,mg,ft)
end end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,e:GetHandler(),1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_EXTRA) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_EXTRA)
...@@ -84,31 +70,30 @@ end ...@@ -84,31 +70,30 @@ end
function c50218360.rop(e,tp,eg,ep,ev,re,r,rp) function c50218360.rop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.Destroy(c,REASON_EFFECT)>0 then if c:IsRelateToEffect(e) and Duel.Destroy(c,REASON_EFFECT)>0 then
local mg=Duel.GetRitualMaterial(tp) ::cancel::
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) local mg=Duel.GetRitualMaterial(tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=Duel.SelectMatchingCard(tp,c50218360.filter,tp,LOCATION_HAND+LOCATION_EXTRA,0,1,1,nil,e,tp,mg,ft) local tg=Duel.SelectMatchingCard(tp,aux.RitualUltimateFilter,tp,LOCATION_HAND+LOCATION_EXTRA,0,1,1,nil,c50218360.rfilter,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) else
mat=mg:SelectWithSumGreater(tp,Card.GetRitualLevel,tc:GetLevel(),tc) mg:RemoveCard(tc)
else end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
mat=mg:FilterSelect(tp,c50218360.rfilter,1,1,nil,tp,mg,tc)
Duel.SetSelectedCard(mat)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local mat2=mg:SelectWithSumGreater(tp,Card.GetRitualLevel,tc:GetLevel(),tc) aux.GCheckAdditional=aux.RitualCheckAdditional(tc,tc:GetLevel(),"Greater")
mat:Merge(mat2) local mat=mg:SelectSubGroup(tp,aux.RitualCheck,true,1,tc:GetLevel(),tp,tc,tc:GetLevel(),"Greater")
aux.GCheckAdditional=nil
if not mat then goto cancel end
tc:SetMaterial(mat)
local lv=mat:GetSum(Card.GetLevel)
Duel.ReleaseRitualMaterial(mat)
Duel.BreakEffect()
Duel.SpecialSummon(tc,SUMMON_TYPE_RITUAL,tp,tp,false,true,POS_FACEUP)
tc:CompleteProcedure()
end end
tc:SetMaterial(mat)
Duel.ReleaseRitualMaterial(mat)
Duel.BreakEffect()
Duel.SpecialSummon(tc,SUMMON_TYPE_RITUAL,tp,tp,false,true,POS_FACEUP)
tc:CompleteProcedure()
end
end end
end end
function c50218360.actcon(e,tp,eg,ep,ev,re,r,rp) function c50218360.actcon(e,tp,eg,ep,ev,re,r,rp)
......
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