Commit 08df2c38 authored by Tachibana's avatar Tachibana

ndyd

parent c0977e51
......@@ -207,9 +207,9 @@ function cm.spsumtg(e,tp,eg,ep,ev,re,r,rp,chk)
end
function cm.spsumop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not (Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0) then return end
if not (Duel.IsExistingMatchingCard(aux.NecroValleyFilter(cm.filter),tp,LOCATION_GRAVE,0,1,nil,e,tp) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,cm.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.filter),tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
if g:GetCount()<=0 then return end
local sc=g:GetFirst()
if Duel.SpecialSummon(sc,0,tp,tp,false,false,POS_FACEUP)~=0 and Duel.IsPlayerCanSpecialSummonMonster(tp,16104418,0xccb,0x4011,0,0,10,RACE_FAIRY,ATTRIBUTE_LIGHT) then
......
......@@ -48,9 +48,9 @@ function cm.changefilter(c)
return c:IsFaceup() and c:IsCanTurnSet()
end
function cm.flipop(e,tp)
if not (Duel.IsExistingMatchingCard(Card.IsAbleToHand,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) and Duel.IsExistingMatchingCard(Card.IsAbleToHand,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil)) then return end
if not (Duel.IsExistingMatchingCard(Card.IsAbleToHand,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) and Duel.IsExistingMatchingCard(aux.NecroValleyFilter(Card.IsAbleToHand),tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil)) then return end
local sg1=Duel.SelectMatchingCard(tp,Card.IsAbleToHand,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
local sg2=Duel.SelectMatchingCard(tp,Card.IsAbleToHand,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,1,nil)
local sg2=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(Card.IsAbleToHand),tp,LOCATION_GRAVE,LOCATION_GRAVE,1,1,nil)
sg1:Merge(sg2)
if #sg1>0 then
if Duel.SendtoHand(sg1,nil,REASON_EFFECT)~=0 then
......
......@@ -20,8 +20,8 @@ function cm.turnuptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
Duel.SetOperationInfo(0,CATEGORY_ANNOUNCE,nil,0,tp,0)
end
function cm.turnupop(e,tp,eg,ep,ev,re,r,rp)
local b1=Duel.IsExistingMatchingCard(cm.turnupfilter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil,e,tp)
local b2=Duel.IsExistingMatchingCard(cm.setfilter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil)
local b1=Duel.IsExistingMatchingCard(aux.NecroValleyFilter(cm.turnupfilter),tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil,e,tp)
local b2=Duel.IsExistingMatchingCard(aux.NecroValleyFilter(cm.setfilter),tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil)
local op=2
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CODE)
getmetatable(e:GetHandler()).announce_filter={TYPE_FUSION+TYPE_SYNCHRO+TYPE_XYZ+TYPE_LINK,OPCODE_ISTYPE,OPCODE_NOT}
......@@ -40,11 +40,11 @@ function cm.turnupop(e,tp,eg,ep,ev,re,r,rp)
end
if op==0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sc=Duel.SelectMatchingCard(tp,cm.turnupfilter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,1,nil,e,tp)
local sc=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.turnupfilter),tp,LOCATION_GRAVE,LOCATION_GRAVE,1,1,nil,e,tp)
Duel.SpecialSummon(sc,0,tp,tp,false,false,POS_FACEDOWN_DEFENSE)
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local sc=Duel.SelectMatchingCard(tp,cm.setfilter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,1,nil)
local sc=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.setfilter),tp,LOCATION_GRAVE,LOCATION_GRAVE,1,1,nil)
Duel.SSet(tp,sc)
Duel.ConfirmCards(1-tp,sc)
local tc=Duel.GetOperatedGroup():GetFirst()
......@@ -75,10 +75,10 @@ function cm.changefilter(c)
return c:IsFaceup() and c:IsCanTurnSet()
end
function cm.flipop(e,tp)
if not (Duel.IsExistingMatchingCard(Card.IsAbleToHand,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) and Duel.IsExistingMatchingCard(Card.IsAbleToHand,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil)) then return end
if not (Duel.IsExistingMatchingCard(Card.IsAbleToHand,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) and Duel.IsExistingMatchingCard(aux.NecroValleyFilter(Card.IsAbleToHand),tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil)) then return end
local sg1=Duel.SelectMatchingCard(tp,Card.IsAbleToHand,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
local sg0=sg1
local sg2=Duel.SelectMatchingCard(tp,Card.IsAbleToHand,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,1,nil)
local sg2=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(Card.IsAbleToHand),tp,LOCATION_GRAVE,LOCATION_GRAVE,1,1,nil)
sg1:Merge(sg2)
if #sg1>0 then
if Duel.SendtoHand(sg1,tp,REASON_EFFECT)~=2 or (sg0:GetFirst():IsType(TYPE_FUSION+TYPE_SYNCHRO+TYPE_XYZ+TYPE_LINK)) or (sg2:GetFirst():IsType(TYPE_FUSION+TYPE_SYNCHRO+TYPE_XYZ+TYPE_LINK)) then
......
......@@ -31,7 +31,7 @@ end
function cm.turnupop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local b1=Duel.IsChainNegatable(ev)
local b2=Duel.IsExistingMatchingCard(Card.IsAbleToHand,tp,0,LOCATION_HAND+LOCATION_GRAVE+LOCATION_DECK+LOCATION_REMOVED,1,nil)
local b2=Duel.IsExistingMatchingCard(aux.NecroValleyFilter(Card.IsAbleToHand),tp,0,LOCATION_HAND+LOCATION_GRAVE+LOCATION_DECK+LOCATION_REMOVED,1,nil)
local op=0
if b1 and b2 then op=Duel.SelectOption(tp,aux.Stringid(m,4),aux.Stringid(m,5))
elseif b1 then op=Duel.SelectOption(tp,aux.Stringid(m,4))
......@@ -52,7 +52,7 @@ function cm.turnupop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,1-tp,aux.Stringid(m,6))--to you hand
local nx=Duel.GetMatchingGroupCount(cm.splimit,tp,0,LOCATION_ONFIELD,nil)
if nx<1 then nx=1 end
local thg=Duel.SelectMatchingCard(1-tp,cm.thfilter,1-tp,LOCATION_HAND+LOCATION_GRAVE+LOCATION_DECK+LOCATION_REMOVED,0,nx,nx,nil)
local thg=Duel.SelectMatchingCard(1-tp,aux.NecroValleyFilter(cm.thfilter),1-tp,LOCATION_HAND+LOCATION_GRAVE+LOCATION_DECK+LOCATION_REMOVED,0,nx,nx,nil)
Duel.SendtoHand(thg,tp,REASON_EFFECT)
end
end
......
......@@ -97,9 +97,9 @@ function cm.spptarget(e,tp,eg,ep,ev,re,r,rp,chk)
end
function cm.sppop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not (c:IsRelateToEffect(e) and Duel.IsExistingMatchingCard(cm.tdfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) and c:IsAbleToExtra()) then return end
if not (c:IsRelateToEffect(e) and Duel.IsExistingMatchingCard(aux.NecroValleyFilter(cm.tdfilter),tp,LOCATION_GRAVE,0,1,nil,e,tp) and c:IsAbleToExtra()) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tc=Duel.SelectMatchingCard(tp,cm.tdfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
local tc=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.tdfilte)r,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
if tc:GetCount()>0 then
if Duel.SpecialSummon(tc,0,tp,tp,true,false,POS_FACEUP)~=0 then
Duel.SendtoExtraP(c,nil,REASON_EFFECT)
......
......@@ -81,7 +81,7 @@ function cm.thop(e,tp,eg,ep,ev,re,r,rp)
if Duel.SendtoGrave(g,REASON_EFFECT)~=0 then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=Duel.SelectMatchingCard(tp,cm.thfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,lv)
local sg=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.thfilter),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,lv)
if sg:GetCount()>0 then
Duel.SendtoHand(sg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,sg)
......
......@@ -116,7 +116,7 @@ end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,cm.thfilter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,1,nil)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.thfilter),tp,LOCATION_GRAVE,LOCATION_GRAVE,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,tp,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
......
......@@ -99,7 +99,7 @@ function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,cm.thfilter,tp,LOCATION_GRAVE,LOCATION_ONFIELD,1,1,nil)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.thfilter),tp,LOCATION_GRAVE,LOCATION_ONFIELD,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,tp,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
......
......@@ -44,7 +44,7 @@ end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<1 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,cm.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.spfilter),tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
......
......@@ -47,7 +47,7 @@ end
function cm.spop1(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,cm.spfilter1,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,e,tp)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.spfilter1),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
......
......@@ -40,7 +40,7 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local thg=Duel.SelectMatchingCard(tp,cm.filter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,1,nil)
local thg=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.filter),tp,LOCATION_GRAVE,LOCATION_GRAVE,1,1,nil)
if thg:GetCount()>0 then
Duel.HintSelection(thg)
if Duel.SendtoHand(thg,nil,REASON_EFFECT)~=0 and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 then
......
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