Commit 3e3c1041 authored by wind2009's avatar wind2009

Fix GMX Applied Experiment #55

parent 03478237
Pipeline #42935 passed with stages
in 2 minutes and 57 seconds
...@@ -20,9 +20,7 @@ function s.cfilter2(c) ...@@ -20,9 +20,7 @@ function s.cfilter2(c)
return c:IsRace(RACE_DINOSAUR) return c:IsRace(RACE_DINOSAUR)
end end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk) function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter1,tp,LOCATION_DECK,0,1,nil,tp) end
return Duel.IsExistingMatchingCard(s.cfilter1,tp,LOCATION_DECK,0,1,nil,tp) and Duel.IsPlayerCanDiscardDeck(tp,2)
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,LOCATION_EXTRA) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,LOCATION_EXTRA)
end end
function s.filter2(c,e,tp,m,f,chkf) function s.filter2(c,e,tp,m,f,chkf)
...@@ -34,20 +32,16 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -34,20 +32,16 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp)
local dcount=Duel.GetFieldGroupCount(tp,LOCATION_DECK,0) local dcount=Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)
if dcount==0 then return end if dcount==0 then return end
local seq1=-1 local seq1=-1
local spcard1=nil
for tc in aux.Next(g1) do for tc in aux.Next(g1) do
if tc:GetSequence()>seq1 then if tc:GetSequence()>seq1 then
seq1=tc:GetSequence() seq1=tc:GetSequence()
spcard1=tc
end end
end end
local g2=Duel.GetMatchingGroup(s.cfilter2,tp,LOCATION_DECK,0,nil) local g2=Duel.GetMatchingGroup(s.cfilter2,tp,LOCATION_DECK,0,nil)
local seq2=-1 local seq2=-1
local spcard2=nil
for tc in aux.Next(g2) do for tc in aux.Next(g2) do
if tc:GetSequence()>seq2 and tc:GetSequence()~=seq1 then if tc:GetSequence()>seq2 and tc:GetSequence()~=seq1 then
seq2=tc:GetSequence() seq2=tc:GetSequence()
spcard2=tc
end end
end end
if seq1==-1 or seq2==-1 then if seq1==-1 or seq2==-1 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