Commit 6c2b7cc7 authored by wind2009's avatar wind2009

Add aux.NecroValleyFilter()

parent b6de8649
...@@ -103,7 +103,8 @@ end ...@@ -103,7 +103,8 @@ end
function s.spop(e,tp,eg,ep,ev,re,r,rp) function s.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local g=Duel.GetTargetsRelateToChain():Filter(Card.IsType,nil,TYPE_MONSTER) local g=Duel.GetTargetsRelateToChain():Filter(Card.IsType,nil,TYPE_MONSTER)
if g:GetCount()>0 and Duel.SendtoGrave(g,REASON_EFFECT)>0 and g:IsExists(Card.IsLocation,1,nil,LOCATION_GRAVE) and c:IsRelateToEffect(e) then if g:GetCount()>0 and Duel.SendtoGrave(g,REASON_EFFECT)>0 and g:IsExists(Card.IsLocation,1,nil,LOCATION_GRAVE)
and c:IsRelateToEffect(e) and aux.NecroValleyFilter()(c) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end end
end end
\ No newline at end of file
...@@ -158,7 +158,7 @@ function s.sptg2(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -158,7 +158,7 @@ function s.sptg2(e,tp,eg,ep,ev,re,r,rp,chk)
end end
function s.spop2(e,tp,eg,ep,ev,re,r,rp) function s.spop2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if c:IsRelateToEffect(e) then if c:IsRelateToEffect(e) and aux.NecroValleyFilter()(c) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end end
end end
\ No newline at end of file
...@@ -78,7 +78,7 @@ end ...@@ -78,7 +78,7 @@ end
function s.eqop(e,tp,eg,ep,ev,re,r,rp) function s.eqop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if c:IsRelateToEffect(e) and c:IsFaceup() and tc:IsRelateToEffect(e) and Duel.Equip(tp,tc,c,false) then if c:IsRelateToEffect(e) and c:IsFaceup() and tc:IsRelateToEffect(e) and aux.NecroValleyFilter()(tc) and Duel.Equip(tp,tc,c,false) then
tc:RegisterFlagEffect(FLAG_ID_ALLURE_QUEEN,RESET_EVENT+RESETS_STANDARD,0,0,id) tc:RegisterFlagEffect(FLAG_ID_ALLURE_QUEEN,RESET_EVENT+RESETS_STANDARD,0,0,id)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
......
...@@ -64,8 +64,8 @@ end ...@@ -64,8 +64,8 @@ end
function s.spop(e,tp,eg,ep,ev,re,r,rp) function s.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if c:IsRelateToEffect(e) and Duel.SendtoDeck(c,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)~=0 and c:IsLocation(LOCATION_DECK) if c:IsRelateToEffect(e) and aux.NecroValleyFilter()(c) and Duel.SendtoDeck(c,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)~=0 and c:IsLocation(LOCATION_DECK)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and tc:IsRelateToEffect(e) then and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and tc:IsRelateToEffect(e) and aux.NecroValleyFilter()(tc) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end end
end end
\ No newline at end of file
...@@ -72,7 +72,7 @@ function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -72,7 +72,7 @@ function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end end
function s.thop(e,tp,eg,ep,ev,re,r,rp) function s.thop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then if tc:IsRelateToEffect(e) and aux.NecroValleyFilter()(tc) then
Duel.SendtoHand(tc,nil,REASON_EFFECT) Duel.SendtoHand(tc,nil,REASON_EFFECT)
end end
end end
......
...@@ -19,7 +19,7 @@ function s.filter(c,e,tp) ...@@ -19,7 +19,7 @@ function s.filter(c,e,tp)
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP) and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP)
end end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and s.filter(chkc,e,tp) end if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.filter(chkc,e,tp) end
if chk==0 then return Duel.IsExistingTarget(s.filter,tp,LOCATION_MZONE,0,1,nil,e,tp) end if chk==0 then return Duel.IsExistingTarget(s.filter,tp,LOCATION_MZONE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,s.filter,tp,LOCATION_MZONE,0,1,1,nil,e,tp) local g=Duel.SelectTarget(tp,s.filter,tp,LOCATION_MZONE,0,1,1,nil,e,tp)
......
...@@ -67,7 +67,7 @@ function s.sptg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -67,7 +67,7 @@ function s.sptg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end end
function s.spop2(e,tp,eg,ep,ev,re,r,rp) function s.spop2(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEDOWN_DEFENSE)~=0 then if tc:IsRelateToEffect(e) and aux.NecroValleyFilter()(tc) and Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEDOWN_DEFENSE)~=0 then
Duel.ConfirmCards(1-tp,tc) Duel.ConfirmCards(1-tp,tc)
end end
end end
......
...@@ -48,7 +48,7 @@ function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -48,7 +48,7 @@ function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
end end
function s.spop(e,tp,eg,ep,ev,re,r,rp) function s.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.SpecialSummonStep(c,0,tp,tp,false,false,POS_FACEUP)~=0 then if c:IsRelateToEffect(e) and aux.NecroValleyFilter()(c) and Duel.SpecialSummonStep(c,0,tp,tp,false,false,POS_FACEUP)~=0 then
local fid=e:GetHandler():GetFieldID() local fid=e:GetHandler():GetFieldID()
c:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD,0,1,fid) c:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD,0,1,fid)
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
......
...@@ -57,8 +57,7 @@ function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -57,8 +57,7 @@ function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end end
function s.thop(e,tp,eg,ep,ev,re,r,rp) function s.thop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then if tc:IsRelateToEffect(e) and aux.NecroValleyFilter()(tc) then
Duel.SendtoHand(tc,nil,REASON_EFFECT) Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc)
end end
end end
\ No newline at end of file
...@@ -46,7 +46,7 @@ function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -46,7 +46,7 @@ function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end end
function s.spop(e,tp,eg,ep,ev,re,r,rp) function s.spop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then if tc:IsRelateToEffect(e) and aux.NecroValleyFilter()(tc) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end end
end end
......
...@@ -87,6 +87,7 @@ function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -87,6 +87,7 @@ function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
end end
function s.spop(e,tp,eg,ep,ev,re,r,rp) function s.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end if c:IsRelateToEffect(e) and aux.NecroValleyFilter()(c) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
end end
\ No newline at end of file
...@@ -40,7 +40,7 @@ end ...@@ -40,7 +40,7 @@ end
function s.spop(e,tp,eg,ep,ev,re,r,rp) function s.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)~=0 if tc:IsRelateToEffect(e) and aux.NecroValleyFilter()(tc) and Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)~=0
and c:IsRelateToEffect(e) and c:IsFaceup() and c:IsControler(tp) then and c:IsRelateToEffect(e) and c:IsFaceup() and c:IsControler(tp) then
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 or not tc:IsLocation(LOCATION_MZONE) then if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 or not tc:IsLocation(LOCATION_MZONE) then
Duel.SendtoGrave(c,REASON_EFFECT) Duel.SendtoGrave(c,REASON_EFFECT)
......
...@@ -54,7 +54,7 @@ function s.mvop(e,tp,eg,ep,ev,re,r,rp) ...@@ -54,7 +54,7 @@ function s.mvop(e,tp,eg,ep,ev,re,r,rp)
e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET) e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET)
e1:SetValue(TYPE_SPELL+TYPE_CONTINUOUS) e1:SetValue(TYPE_SPELL+TYPE_CONTINUOUS)
c:RegisterEffect(e1) c:RegisterEffect(e1)
if tc:IsRelateToEffect(e) then if tc:IsRelateToEffect(e) and aux.NecroValleyFilter()(tc) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end end
end end
......
...@@ -79,7 +79,8 @@ end ...@@ -79,7 +79,8 @@ end
function s.thop(e,tp,eg,ep,ev,re,r,rp) function s.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsType(TYPE_MONSTER) and Duel.SendtoDeck(tc,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)~=0 if tc:IsRelateToEffect(e) and aux.NecroValleyFilter()(tc) and tc:IsType(TYPE_MONSTER)
and Duel.SendtoDeck(tc,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)~=0
and tc:IsLocation(LOCATION_DECK+LOCATION_EXTRA) and tc:IsLocation(LOCATION_DECK+LOCATION_EXTRA)
and c:IsRelateToEffect(e) then and c:IsRelateToEffect(e) then
Duel.SendtoHand(c,nil,REASON_EFFECT) Duel.SendtoHand(c,nil,REASON_EFFECT)
......
...@@ -82,5 +82,5 @@ function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -82,5 +82,5 @@ function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end end
function s.spop(e,tp,eg,ep,ev,re,r,rp) function s.spop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end if tc:IsRelateToEffect(e) and aux.NecroValleyFilter()(tc) then Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) end
end end
\ No newline at end of file
...@@ -105,5 +105,5 @@ function s.settg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -105,5 +105,5 @@ function s.settg(e,tp,eg,ep,ev,re,r,rp,chk)
end end
function s.setop(e,tp,eg,ep,ev,re,r,rp) function s.setop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if c:IsRelateToEffect(e) then Duel.SSet(tp,c) end if c:IsRelateToEffect(e) and aux.NecroValleyFilter()(c) then Duel.SSet(tp,c) end
end end
\ No newline at end of file
...@@ -107,5 +107,5 @@ function s.settg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -107,5 +107,5 @@ function s.settg(e,tp,eg,ep,ev,re,r,rp,chk)
end end
function s.setop(e,tp,eg,ep,ev,re,r,rp) function s.setop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if c:IsRelateToEffect(e) then Duel.SSet(tp,c) end if c:IsRelateToEffect(e) and aux.NecroValleyFilter()(c) then Duel.SSet(tp,c) end
end end
\ No newline at end of file
...@@ -95,5 +95,5 @@ function s.settg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -95,5 +95,5 @@ function s.settg(e,tp,eg,ep,ev,re,r,rp,chk)
end end
function s.setop(e,tp,eg,ep,ev,re,r,rp) function s.setop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if c:IsRelateToEffect(e) then Duel.SSet(tp,c) end if c:IsRelateToEffect(e) and aux.NecroValleyFilter()(c) then Duel.SSet(tp,c) end
end end
\ No newline at end of file
...@@ -56,7 +56,7 @@ function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -56,7 +56,7 @@ function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end end
function s.spop(e,tp,eg,ep,ev,re,r,rp) function s.spop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then if tc:IsRelateToEffect(e) and aux.NecroValleyFilter()(tc) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP_DEFENSE) Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP_DEFENSE)
end end
end end
...@@ -79,7 +79,7 @@ function s.settg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -79,7 +79,7 @@ function s.settg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end end
function s.setop(e,tp,eg,ep,ev,re,r,rp) function s.setop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.SSet(tp,tc) then if tc:IsRelateToEffect(e) and aux.NecroValleyFilter()(tc) and Duel.SSet(tp,tc) then
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT) e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT)
......
...@@ -101,7 +101,7 @@ function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -101,7 +101,7 @@ function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end end
function s.thop(e,tp,eg,ep,ev,re,r,rp) function s.thop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then if tc:IsRelateToEffect(e) and aux.NecroValleyFilter()(tc) then
Duel.SendtoHand(tc,nil,REASON_EFFECT) Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc) Duel.ConfirmCards(1-tp,tc)
end end
......
...@@ -78,7 +78,7 @@ function s.settg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -78,7 +78,7 @@ function s.settg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end end
function s.setop(e,tp,eg,ep,ev,re,r,rp) function s.setop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.SSet(tp,tc)~=0 then if tc:IsRelateToEffect(e) and aux.NecroValleyFilter(tc) and Duel.SSet(tp,tc)~=0 then
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_TRIGGER) e1:SetCode(EFFECT_CANNOT_TRIGGER)
......
...@@ -59,7 +59,7 @@ function s.rmopfilter(c,e) ...@@ -59,7 +59,7 @@ function s.rmopfilter(c,e)
end end
function s.rmop(e,tp,eg,ep,ev,re,r,rp) function s.rmop(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(s.rmopfilter,nil,e) local tg=g:Filter(aux.NecroValleyFilter(s.rmopfilter),nil,e)
if tg:GetCount()==2 then if tg:GetCount()==2 then
Duel.Remove(tg,POS_FACEUP,REASON_EFFECT) Duel.Remove(tg,POS_FACEUP,REASON_EFFECT)
end end
......
...@@ -40,11 +40,11 @@ function s.tspop(e,tp,eg,ep,ev,re,r,rp) ...@@ -40,11 +40,11 @@ function s.tspop(e,tp,eg,ep,ev,re,r,rp)
c:AddMonsterAttribute(TYPE_NORMAL+TYPE_TRAP) c:AddMonsterAttribute(TYPE_NORMAL+TYPE_TRAP)
if Duel.SpecialSummon(c,0,tp,tp,true,false,POS_FACEUP)~=0 if Duel.SpecialSummon(c,0,tp,tp,true,false,POS_FACEUP)~=0
and Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE,0,1,nil) and Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE,0,1,nil)
and Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,0,LOCATION_GRAVE,1,nil) and Duel.IsExistingMatchingCard(aux.NecroValleyFilter(Card.IsAbleToRemove),tp,0,LOCATION_GRAVE,1,nil)
and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then
Duel.BreakEffect() Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToRemove,tp,0,LOCATION_GRAVE,1,2,nil) local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(Card.IsAbleToRemove),tp,0,LOCATION_GRAVE,1,2,nil)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.Remove(g,POS_FACEUP,REASON_EFFECT) Duel.Remove(g,POS_FACEUP,REASON_EFFECT)
end end
...@@ -69,9 +69,8 @@ function s.setop(e,tp,eg,ep,ev,re,r,rp) ...@@ -69,9 +69,8 @@ function s.setop(e,tp,eg,ep,ev,re,r,rp)
if sg:GetCount()>0 then if sg:GetCount()>0 then
Duel.HintSelection(sg) Duel.HintSelection(sg)
local c=e:GetHandler() local c=e:GetHandler()
if Duel.SendtoDeck(sg,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) if Duel.SendtoDeck(sg,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) and sg:FilterCount(Card.IsLocation,nil,LOCATION_DECK+LOCATION_EXTRA)>0
and sg:FilterCount(Card.IsLocation,nil,LOCATION_DECK+LOCATION_EXTRA)>0 and c:IsRelateToEffect(e) and aux.NecroValleyFilter()(c) then
and c:IsRelateToEffect(e) then
Duel.SSet(tp,c) Duel.SSet(tp,c)
end end
end end
......
...@@ -55,7 +55,7 @@ function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -55,7 +55,7 @@ function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end end
function s.spop(e,tp,eg,ep,ev,re,r,rp) function s.spop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then if tc:IsRelateToEffect(e) and aux.NecroValleyFilter()(tc) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end end
end end
...@@ -77,7 +77,7 @@ end ...@@ -77,7 +77,7 @@ end
function s.eqop(e,tp,eg,ep,ev,re,r,rp) function s.eqop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if c:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsRelateToEffect(e) and tc:IsType(TYPE_MONSTER) then if aux.NecroValleyFilter()(c) and c:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsRelateToEffect(e) and tc:IsType(TYPE_MONSTER) then
if not Duel.Equip(tp,c,tc) then return end if not Duel.Equip(tp,c,tc) then return end
--equip limit --equip limit
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
......
...@@ -45,7 +45,7 @@ function s.discost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -45,7 +45,7 @@ function s.discost(e,tp,eg,ep,ev,re,r,rp,chk)
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end end
function s.distg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function s.distg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and aux.NegateEffectMonsterFilter(chkc) end if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and aux.NegateEffectMonsterFilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(aux.NegateEffectMonsterFilter,tp,0,LOCATION_MZONE,1,nil) end if chk==0 then return Duel.IsExistingTarget(aux.NegateEffectMonsterFilter,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISABLE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISABLE)
local g=Duel.SelectTarget(tp,aux.NegateEffectMonsterFilter,tp,0,LOCATION_MZONE,1,1,nil) local g=Duel.SelectTarget(tp,aux.NegateEffectMonsterFilter,tp,0,LOCATION_MZONE,1,1,nil)
......
...@@ -63,7 +63,7 @@ end ...@@ -63,7 +63,7 @@ end
function s.thop2(e,tp,eg,ep,ev,re,r,rp) function s.thop2(e,tp,eg,ep,ev,re,r,rp)
if not Duel.CheckRemoveOverlayCard(tp,1,0,1,REASON_EFFECT) or not Duel.RemoveOverlayCard(tp,1,0,1,1,REASON_EFFECT) then return end if not Duel.CheckRemoveOverlayCard(tp,1,0,1,REASON_EFFECT) or not Duel.RemoveOverlayCard(tp,1,0,1,1,REASON_EFFECT) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,s.thfilter2,tp,LOCATION_GRAVE,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.thfilter2),tp,LOCATION_GRAVE,0,1,1,nil)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.BreakEffect() Duel.BreakEffect()
Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.SendtoHand(g,nil,REASON_EFFECT)
......
...@@ -65,7 +65,7 @@ function s.atkfilter(c) ...@@ -65,7 +65,7 @@ function s.atkfilter(c)
return c:IsFaceup() and c:IsRace(RACE_FISH+RACE_AQUA+RACE_SEASERPENT) return c:IsFaceup() and c:IsRace(RACE_FISH+RACE_AQUA+RACE_SEASERPENT)
end end
function s.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function s.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and s.atkfilter(chkc) end if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.atkfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(s.atkfilter,tp,LOCATION_MZONE,0,1,nil) end if chk==0 then return Duel.IsExistingTarget(s.atkfilter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,s.atkfilter,tp,LOCATION_MZONE,0,1,1,nil) Duel.SelectTarget(tp,s.atkfilter,tp,LOCATION_MZONE,0,1,1,nil)
......
...@@ -102,7 +102,8 @@ function s.eqfilter(c,ec,tp) ...@@ -102,7 +102,8 @@ function s.eqfilter(c,ec,tp)
end end
function s.eqop(e,tp,eg,ep,ev,re,r,rp) function s.eqop(e,tp,eg,ep,ev,re,r,rp)
local ec=e:GetHandler() local ec=e:GetHandler()
if ec:IsRelateToEffect(e) and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 and Duel.IsExistingMatchingCard(s.eqfilter,tp,LOCATION_MZONE,0,1,nil,ec,tp) then if ec:IsRelateToEffect(e) and aux.NecroValleyFilter(ec) and Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingMatchingCard(s.eqfilter,tp,LOCATION_MZONE,0,1,nil,ec,tp) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local tg=Duel.SelectMatchingCard(tp,s.eqfilter,tp,LOCATION_MZONE,0,1,1,nil,ec,tp) local tg=Duel.SelectMatchingCard(tp,s.eqfilter,tp,LOCATION_MZONE,0,1,1,nil,ec,tp)
Duel.HintSelection(tg) Duel.HintSelection(tg)
......
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