Commit 95567d56 authored by Tachibana's avatar Tachibana

tnndx

parent 9a5cbf4e
......@@ -62,7 +62,7 @@ function cm.actcon(e)
return Duel.GetMatchingGroupCount(cm.gfilter,tp,LOCATION_MZONE,0,nil)>0
end
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
----
function cm.ctfilter(c)
......
......@@ -41,7 +41,7 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
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)
if g:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
......
......@@ -24,7 +24,7 @@ function cm.initial_effect(c)
end
function cm.filter1(c,tp,slv)
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)
end
function cm.filter2(c,lv1,slv)
......@@ -46,6 +46,7 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local mg,mlv=sg:GetMinGroup(Card.GetLevel)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
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)
local g2=Duel.SelectTarget(tp,cm.filter2,tp,0,LOCATION_GRAVE,1,1,nil,g1:GetFirst():GetLevel(),mlv)
g1:Merge(g2)
......@@ -59,8 +60,15 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
local tg=g:Filter(Card.IsRelateToEffect,nil,e)
if tg:GetCount()==0 then return end
Duel.SendtoGrave(tg:GetFirst(),REASON_EFFECT)
Duel.SendtoDeck(tg:GetNext(),nil,2,REASON_EFFECT)
local tc=tg:GetFirst()
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
local lv=e:GetLabel()
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