Commit 30afca46 authored by nekrozar's avatar nekrozar Committed by DailyShana

fix Ancient Telescope (#516)

parent e395049a
...@@ -10,12 +10,18 @@ function c17092736.initial_effect(c) ...@@ -10,12 +10,18 @@ function c17092736.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c17092736.cftg(e,tp,eg,ep,ev,re,r,rp,chk) function c17092736.cftg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFieldGroupCount(tp,0,LOCATION_DECK)>=5 end if chk==0 then return Duel.GetFieldGroupCount(tp,0,LOCATION_DECK)>0 end
Duel.SetTargetPlayer(tp) Duel.SetTargetPlayer(tp)
end end
function c17092736.cfop(e,tp,eg,ep,ev,re,r,rp) function c17092736.cfop(e,tp,eg,ep,ev,re,r,rp)
local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER) local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER)
local g=Duel.GetDecktopGroup(1-p,5) local ct=math.min(5,Duel.GetFieldGroupCount(p,0,LOCATION_DECK))
local t={}
for i=1,ct do
t[i]=i
end
local ac=Duel.AnnounceNumber(p,table.unpack(t))
local g=Duel.GetDecktopGroup(1-p,ac)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.ConfirmCards(p,g) Duel.ConfirmCards(p,g)
end end
......
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