Commit 95567d56 authored by Tachibana's avatar Tachibana

tnndx

parent 9a5cbf4e
...@@ -62,7 +62,7 @@ function cm.actcon(e) ...@@ -62,7 +62,7 @@ function cm.actcon(e)
return Duel.GetMatchingGroupCount(cm.gfilter,tp,LOCATION_MZONE,0,nil)>0 return Duel.GetMatchingGroupCount(cm.gfilter,tp,LOCATION_MZONE,0,nil)>0
end end
function cm.gfilter(c) function cm.gfilter(c)
return (c:IsRankAbove(10) and c:IsLevelAbove(10)) and c:IsType(TYPE_MONSTER) and c:IsFaceup() return (c:IsRankAbove(10) or c:IsLevelAbove(10)) and c:IsType(TYPE_MONSTER) and c:IsFaceup()
end end
---- ----
function cm.ctfilter(c) function cm.ctfilter(c)
......
...@@ -41,7 +41,7 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -41,7 +41,7 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
end end
function cm.activate(e,tp,eg,ep,ev,re,r,rp) function cm.activate(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end if not e:GetHandler():IsRelateToEffect(e) then return end
local mg=Duel.GetMatchingGroup(cm.mgfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil) local mg=Duel.GetMatchingGroup(cm.mgfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
local g=Duel.GetMatchingGroup(cm.xyzfilter,tp,LOCATION_EXTRA,0,nil,mg) local g=Duel.GetMatchingGroup(cm.xyzfilter,tp,LOCATION_EXTRA,0,nil,mg)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
......
...@@ -24,7 +24,7 @@ function cm.initial_effect(c) ...@@ -24,7 +24,7 @@ function cm.initial_effect(c)
end end
function cm.filter1(c,tp,slv) function cm.filter1(c,tp,slv)
local lv1=c:GetLevel() local lv1=c:GetLevel()
return c:IsFaceup() and c:IsSetCard(0x37fb) and lv1>0 and c:IsAbleToGraveAsCost() return c:IsFaceup() and c:IsSetCard(0x37fb) and lv1>0
and Duel.IsExistingTarget(cm.filter2,tp,0,LOCATION_GRAVE,1,nil,lv1,slv) and Duel.IsExistingTarget(cm.filter2,tp,0,LOCATION_GRAVE,1,nil,lv1,slv)
end end
function cm.filter2(c,lv1,slv) function cm.filter2(c,lv1,slv)
...@@ -46,6 +46,7 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -46,6 +46,7 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local mg,mlv=sg:GetMinGroup(Card.GetLevel) local mg,mlv=sg:GetMinGroup(Card.GetLevel)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g1=Duel.SelectTarget(tp,cm.filter1,tp,LOCATION_MZONE,0,1,1,nil,tp,mlv) local g1=Duel.SelectTarget(tp,cm.filter1,tp,LOCATION_MZONE,0,1,1,nil,tp,mlv)
g1:GetFirst():RegisterFlagEffect(17020120,RESET_CHAIN,0,1)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g2=Duel.SelectTarget(tp,cm.filter2,tp,0,LOCATION_GRAVE,1,1,nil,g1:GetFirst():GetLevel(),mlv) local g2=Duel.SelectTarget(tp,cm.filter2,tp,0,LOCATION_GRAVE,1,1,nil,g1:GetFirst():GetLevel(),mlv)
g1:Merge(g2) g1:Merge(g2)
...@@ -59,8 +60,15 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -59,8 +60,15 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
local tg=g:Filter(Card.IsRelateToEffect,nil,e) local tg=g:Filter(Card.IsRelateToEffect,nil,e)
if tg:GetCount()==0 then return end if tg:GetCount()==0 then return end
Duel.SendtoGrave(tg:GetFirst(),REASON_EFFECT) local tc=tg:GetFirst()
Duel.SendtoDeck(tg:GetNext(),nil,2,REASON_EFFECT) while tc do
if tc:GetFlagEffect(17020120)==0 then
Duel.SendtoDeck(tc,nil,2,REASON_EFFECT)
else
Duel.SendtoGrave(tc,REASON_EFFECT)
end
tc=tg:GetNext()
end
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
local lv=e:GetLabel() local lv=e:GetLabel()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
......
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