Commit 46debde4 authored by salix5's avatar salix5

fix 王家の眠る谷-ネクロバレー

parent 31881780
...@@ -21,19 +21,19 @@ end ...@@ -21,19 +21,19 @@ end
function c12247206.target(e,tp,eg,ep,ev,re,r,rp,chk) function c12247206.target(e,tp,eg,ep,ev,re,r,rp,chk)
local tc=eg:GetFirst() local tc=eg:GetFirst()
if chk==0 then if chk==0 then
local g=Duel.GetMatchingGroup(c12247206.nfilter,tp,0x13,0,nil,tc) local g=Duel.GetMatchingGroup(c12247206.nfilter,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,nil,tc)
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and g:GetCount()>0 and g:GetCount()==g:FilterCount(Card.IsCanBeSpecialSummoned,nil,e,0,tp,false,false) and g:GetCount()>0 and g:GetCount()==g:FilterCount(Card.IsCanBeSpecialSummoned,nil,e,0,tp,false,false)
end end
tc:CreateEffectRelation(e) tc:CreateEffectRelation(e)
local g=Duel.GetMatchingGroup(c12247206.filter,tp,0x13,0,nil,tc,e,tp) local g=Duel.GetMatchingGroup(c12247206.filter,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,nil,tc,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,g:GetCount(),PLAYER_ALL,0x13) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,g:GetCount(),PLAYER_ALL,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE)
end end
function c12247206.filter(c,tc,e,tp) function c12247206.filter(c,tc,e,tp)
return c12247206.nfilter(c,tc) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c12247206.nfilter(c,tc) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function c12247206.selfilter(c,e,tp) function c12247206.selfilter(c,e,tp)
return c:IsFaceup() and Duel.IsExistingMatchingCard(c12247206.filter,tp,0x13,0,1,nil,c,e,tp) return c:IsFaceup() and Duel.IsExistingMatchingCard(c12247206.filter,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,1,nil,c,e,tp)
end end
function c12247206.sp(g,tp,pos) function c12247206.sp(g,tp,pos)
local sc=g:GetFirst() local sc=g:GetFirst()
...@@ -47,7 +47,7 @@ function c12247206.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -47,7 +47,7 @@ function c12247206.activate(e,tp,eg,ep,ev,re,r,rp)
local ft1=Duel.GetLocationCount(tp,LOCATION_MZONE) local ft1=Duel.GetLocationCount(tp,LOCATION_MZONE)
if ft1>1 and Duel.IsPlayerAffectedByEffect(tp,59822133) then ft1=1 end if ft1>1 and Duel.IsPlayerAffectedByEffect(tp,59822133) then ft1=1 end
local gg=Group.CreateGroup() local gg=Group.CreateGroup()
local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(c12247206.filter),tp,0x13,0,nil,tc,e,tp) local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(c12247206.filter),tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,nil,tc,e,tp)
if ft1>0 and tc:IsFaceup() and tc:IsRelateToEffect(e) then if ft1>0 and tc:IsFaceup() and tc:IsRelateToEffect(e) then
if g:GetCount()<=ft1 then c12247206.sp(g,tp,POS_FACEUP_ATTACK) if g:GetCount()<=ft1 then c12247206.sp(g,tp,POS_FACEUP_ATTACK)
else else
...@@ -63,7 +63,7 @@ function c12247206.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -63,7 +63,7 @@ function c12247206.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_FACEUP) Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_FACEUP)
local sg=Duel.SelectMatchingCard(1-tp,c12247206.selfilter,1-tp,LOCATION_MZONE,0,1,1,nil,e,1-tp) local sg=Duel.SelectMatchingCard(1-tp,c12247206.selfilter,1-tp,LOCATION_MZONE,0,1,1,nil,e,1-tp)
if ft2>0 and sg:GetCount()>0 then if ft2>0 and sg:GetCount()>0 then
local g2=Duel.GetMatchingGroup(aux.NecroValleyFilter(c12247206.filter),1-tp,0x13,0,nil,sg:GetFirst(),e,1-tp) local g2=Duel.GetMatchingGroup(aux.NecroValleyFilter(c12247206.filter),1-tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,nil,sg:GetFirst(),e,1-tp)
if g2:GetCount()>0 then if g2:GetCount()>0 then
if g2:GetCount()<=ft2 then if g2:GetCount()<=ft2 then
c12247206.sp(g2,1-tp,POS_FACEUP) c12247206.sp(g2,1-tp,POS_FACEUP)
......
...@@ -68,8 +68,8 @@ end ...@@ -68,8 +68,8 @@ end
function c47355498.conntp(e) function c47355498.conntp(e)
return not Duel.IsPlayerAffectedByEffect(1-e:GetHandler():GetControler(),EFFECT_NECRO_VALLEY_IM) return not Duel.IsPlayerAffectedByEffect(1-e:GetHandler():GetControler(),EFFECT_NECRO_VALLEY_IM)
end end
function c47355498.disfilter(c) function c47355498.disfilter(c,re)
return c:IsHasEffect(EFFECT_NECRO_VALLEY) return c:IsHasEffect(EFFECT_NECRO_VALLEY) and c:IsRelateToEffect(re)
end end
function c47355498.discheck(ev,category,re,im0,im1) function c47355498.discheck(ev,category,re,im0,im1)
local ex,tg,ct,p,v=Duel.GetOperationInfo(ev,category) local ex,tg,ct,p,v=Duel.GetOperationInfo(ev,category)
...@@ -81,7 +81,7 @@ function c47355498.discheck(ev,category,re,im0,im1) ...@@ -81,7 +81,7 @@ function c47355498.discheck(ev,category,re,im0,im1)
end end
end end
if tg and tg:GetCount()>0 then if tg and tg:GetCount()>0 then
return tg:IsExists(c47355498.disfilter,1,nil) return tg:IsExists(c47355498.disfilter,1,nil,re)
end end
return false return false
end end
......
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