Commit f8a80d23 authored by salix5's avatar salix5

fix

parent 957d4a5f
...@@ -50,7 +50,7 @@ function c10248389.atkval(e,c) ...@@ -50,7 +50,7 @@ function c10248389.atkval(e,c)
end end
function c10248389.disop(e,tp,eg,ep,ev,re,r,rp) function c10248389.disop(e,tp,eg,ep,ev,re,r,rp)
local tl=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION) local tl=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION)
if rp~=tp and tl==LOCATION_SZONE then if rp~=tp and (tl==LOCATION_MZONE or tl==LOCATION_SZONE) then
Duel.NegateEffect(ev) Duel.NegateEffect(ev)
end end
end end
...@@ -14,9 +14,6 @@ function c12247206.condition(e,tp,eg,ep,ev,re,r,rp) ...@@ -14,9 +14,6 @@ function c12247206.condition(e,tp,eg,ep,ev,re,r,rp)
return eg:GetCount()==1 and tc:IsLocation(LOCATION_MZONE) and tc:IsControler(tp) and tc:IsAttackBelow(1500) return eg:GetCount()==1 and tc:IsLocation(LOCATION_MZONE) and tc:IsControler(tp) and tc:IsAttackBelow(1500)
and Duel.IsExistingMatchingCard(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) and Duel.IsExistingMatchingCard(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil)
end end
function c12247206.filter(c,tc,e,tp)
return c12247206.nfilter(c,tc) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c12247206.nfilter(c,tc) function c12247206.nfilter(c,tc)
local code1,code2=tc:GetCode() local code1,code2=tc:GetCode()
return c:IsCode(code1) or (code2 and c:IsCode(code2)) return c:IsCode(code1) or (code2 and c:IsCode(code2))
...@@ -30,6 +27,9 @@ function c12247206.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -30,6 +27,9 @@ function c12247206.target(e,tp,eg,ep,ev,re,r,rp,chk)
tc:CreateEffectRelation(e) tc:CreateEffectRelation(e)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,PLAYER_ALL,0x13) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,PLAYER_ALL,0x13)
end end
function c12247206.filter(c,tc,e,tp)
return c12247206.nfilter(c,tc) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
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,0x13,0,1,nil,c,e,tp)
end end
...@@ -44,11 +44,12 @@ function c12247206.sp(g,tp,pos) ...@@ -44,11 +44,12 @@ function c12247206.sp(g,tp,pos)
end end
end end
function c12247206.activate(e,tp,eg,ep,ev,re,r,rp) function c12247206.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject() local tc=eg:GetFirst()
local ft1=Duel.GetLocationCount(tp,LOCATION_MZONE) local ft1=Duel.GetLocationCount(tp,LOCATION_MZONE)
local gg=Group.CreateGroup() local gg=Group.CreateGroup()
local g=Duel.GetMatchingGroup(c12247206.filter,tp,0x13,0,nil,tc,e,tp)
if g:IsExist(Card.IsHasEffect,1,nil,EFFECT_NECRO_VALLEY) then return end
if ft1>0 and tc:IsFaceup() and tc:IsRelateToEffect(e) then if ft1>0 and tc:IsFaceup() and tc:IsRelateToEffect(e) then
local g=Duel.GetMatchingGroup(c12247206.filter,tp,0x13,0,nil,tc,e,tp)
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
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
...@@ -62,14 +63,17 @@ function c12247206.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -62,14 +63,17 @@ 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 g=Duel.GetMatchingGroup(c12247206.filter,1-tp,0x13,0,nil,sg:GetFirst(),e,1-tp) local g2=Duel.GetMatchingGroup(c12247206.filter,1-tp,0x13,0,nil,sg:GetFirst(),e,1-tp)
if g:GetCount()<=ft2 then c12247206.sp(g,1-tp,POS_FACEUP) if not g2:IsExist(Card.IsHasEffect,1,nil,EFFECT_NECRO_VALLEY) then
else if g2:GetCount()<=ft2 then
Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_SPSUMMON) c12247206.sp(g2,1-tp,POS_FACEUP)
local fg=g:Select(1-tp,ft2,ft2,nil) else
c12247206.sp(fg,1-tp,POS_FACEUP) Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_SPSUMMON)
g:Remove(c12247206.rmfilter,nil) local fg=g2:Select(1-tp,ft2,ft2,nil)
gg:Merge(g) c12247206.sp(fg,1-tp,POS_FACEUP)
g2:Remove(c12247206.rmfilter,nil)
gg:Merge(g2)
end
end end
end end
Duel.SpecialSummonComplete() Duel.SpecialSummonComplete()
......
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