Commit 02b08231 authored by wind2009's avatar wind2009

Fix アルカナスプレッド

parent 83548570
...@@ -25,12 +25,6 @@ function s.initial_effect(c) ...@@ -25,12 +25,6 @@ function s.initial_effect(c)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
s.toss_coin=true s.toss_coin=true
function s.thfilter1(c)
return not c:IsCode(11819473) and c.toss_coin and c:IsAbleToHand()
end
function s.thfilter2(c,p)
return c:IsAbleToHand(p)
end
function s.spfilter1(c,e,tp) function s.spfilter1(c,e,tp)
return c:IsSetCard(0x5) and c:IsLevelBelow(4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsSetCard(0x5) and c:IsLevelBelow(4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
...@@ -47,32 +41,33 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -47,32 +41,33 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp)
local res local res
if Duel.IsEnvironment(73206827,tp,LOCATION_FZONE) then if Duel.IsEnvironment(73206827,tp,LOCATION_FZONE) then
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
local off=1 local b1=Duel.IsExistingMatchingCard(s.spfilter1,tp,LOCATION_DECK,0,1,nil,e,tp)
local ops={} local b2=Duel.IsExistingMatchingCard(aux.NecroValleyFilter(s.spfilter2),tp,0,LOCATION_GRAVE,1,nil,e,tp)
local opval={} if b1 and not b2 then
if Duel.IsExistingMatchingCard(s.spfilter1,tp,LOCATION_DECK,0,1,nil,e,tp) then Duel.Hint(HINT_OPSELECTED,1-tp,60)
ops[off]=aux.Stringid(id,2) res=1
opval[off-1]=0 end
off=off+1 if b2 and not b1 then
Duel.Hint(HINT_OPSELECTED,1-tp,61)
res=2
end end
if Duel.IsExistingMatchingCard(aux.NecroValleyFilter(s.spfilter2),tp,0,LOCATION_GRAVE,1,nil,e,tp)then if b1 and b2 then
ops[off]=aux.Stringid(id,3) res=aux.SelectFromOptions(tp,
opval[off-1]=1 {b1,60},
off=off+1 {b2,61})
end end
if off==1 then return end
local op=Duel.SelectOption(tp,table.unpack(ops))
res=opval[op]
else else
res=1-Duel.TossCoin(tp,1) res=Duel.TossCoin(tp,1)
end end
if res==0 then if res==1 then
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,s.spfilter1,tp,LOCATION_DECK,0,1,1,nil,e,tp) local g=Duel.SelectMatchingCard(tp,s.spfilter1,tp,LOCATION_DECK,0,1,1,nil,e,tp)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end end
else else
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter2),tp,LOCATION_GRAVE,0,1,1,nil,e,tp) local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter2),tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
if g:GetCount()>0 then if g:GetCount()>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