Commit 98c5983b authored by wind2009's avatar wind2009

Fix アルカナフォースⅩⅨ-THE SUN

parent efc9dcfb
...@@ -54,35 +54,37 @@ end ...@@ -54,35 +54,37 @@ end
function s.setfilter(c) function s.setfilter(c)
return c:IsType(TYPE_SPELL) and c:IsSSetable() and c.toss_coin return c:IsType(TYPE_SPELL) and c:IsSSetable() and c.toss_coin
end end
function s.desfilter(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:GetSequence()<5
end
function s.coinop(e,tp,eg,ep,ev,re,r,rp) function s.coinop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local res=0 local res=0
if c:IsHasEffect(73206827) then if c:IsHasEffect(73206827) then
local off=1 local b1=Duel.IsExistingMatchingCard(s.setfilter,tp,LOCATION_DECK,0,1,nil)
local ops={} local b2=Duel.IsExistingMatchingCard(s.desfilter,tp,LOCATION_SZONE,LOCATION_SZONE,1,nil)
local opval={} if b1 and not b2 then
if Duel.IsExistingMatchingCard(s.setfilter,tp,LOCATION_DECK,0,1,nil) then Duel.Hint(HINT_OPSELECTED,1-tp,60)
ops[off]=aux.Stringid(id,2) res=1
opval[off-1]=1 end
off=off+1 if b2 and not b1 then
Duel.Hint(HINT_OPSELECTED,1-tp,61)
res=2
end end
if Duel.IsExistingMatchingCard(Card.IsType,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil,TYPE_SPELL+TYPE_TRAP) then if b1 and b2 then
ops[off]=aux.Stringid(id,3) res=aux.SelectFromOptions(tp,
opval[off-1]=0 {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 res=Duel.TossCoin(tp,1) end else res=Duel.TossCoin(tp,1) end
if res==1 then if res==1 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local g=Duel.SelectMatchingCard(tp,s.stfilter,tp,LOCATION_DECK,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,s.setfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.SSet(tp,g:GetFirst()) Duel.SSet(tp,g:GetFirst())
end end
else else
local sg=Duel.GetMatchingGroup(Card.IsType,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil,TYPE_SPELL+TYPE_TRAP) local sg=Duel.GetMatchingGroup(s.desfilter,tp,LOCATION_SZONE,LOCATION_SZONE,nil)
Duel.Destroy(sg,REASON_EFFECT) Duel.Destroy(sg,REASON_EFFECT)
end end
end end
\ No newline at end of file
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