Commit 02b08231 authored by wind2009's avatar wind2009

Fix アルカナスプレッド

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