Commit 32a71ab5 authored by Nemo Ma's avatar Nemo Ma

fix

parent ce338699
......@@ -16,7 +16,7 @@ function cm.tdfilter(c)
return c:IsAbleToDeck() and not c:IsPublic()
end
function cm.tdtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.tdfilter,tp,LOCATION_HAND,0,1,nil) and Duel.IsExistingMatchingCard(nil,tp,LOCATION_DECK,0,1,nil) and Duel.IsExistingMatchingCard(nil,tp,LOCATION_EXTRA,0,1,nil) end
if chk==0 then return Duel.IsExistingMatchingCard(cm.tdfilter,tp,LOCATION_HAND,0,1,e:GetHandler()) and Duel.IsExistingMatchingCard(nil,tp,LOCATION_DECK,0,1,nil) and Duel.IsExistingMatchingCard(nil,tp,LOCATION_EXTRA,0,1,nil) end
end
function cm.tdop(e,tp,eg,ep,ev,re,r,rp)
local g1=Duel.GetMatchingGroup(cm.tdfilter,tp,LOCATION_HAND,0,nil)
......
......@@ -8,10 +8,10 @@ function cm.op(e,tp,eg,ep,ev,re,r,rp,c)
local op={}
local os={}
for i=2,4,1 do
if i==2 and Duel.GetFieldGroupCount(tp,0,i)>0 then
if i==2 and Duel.GetFieldGroupCount(tp,0,2)>0 then
op[1]=aux.Stringid(m,1)
os[1]=i
elseif Duel.GetMatchingGroupCount(Card.IsType,tp,0,i*4,nil,TYPE_SPELL+TYPE_TRAP)>0 then
elseif i~=2 and Duel.GetMatchingGroupCount(Card.IsType,tp,0,i*4,nil,TYPE_SPELL+TYPE_TRAP)>0 then
op[#op+1]=aux.Stringid(m,i-1)
os[#os+1]=i
end
......@@ -23,4 +23,4 @@ function cm.op(e,tp,eg,ep,ev,re,r,rp,c)
os = Duel.GetMatchingGroup(Card.IsType,tp,0,op*(op==2 and 1 or 4),nil,TYPE_SPELL+TYPE_TRAP)
if op==2 then Duel.ConfirmCards(tp,Duel.GetFieldGroup(tp,0,LOCATION_HAND)) end
if #os>0 then Duel.Remove(os,POS_FACEUP,REASON_EFFECT) end
end
\ No newline at end of file
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