Skip to content

Commit fd7aec9

Browse files
authored
Fix "ZEXAL Catapult"
Prevent script error
1 parent ebbbb01 commit fd7aec9

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

unofficial/c100000168.lua

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,20 +11,20 @@ function s.initial_effect(c)
1111
e1:SetOperation(s.activate)
1212
c:RegisterEffect(e1)
1313
end
14-
s.listed_series={0x107e}
15-
function s.filter(c,e,tp)
14+
s.listed_series={SET_ZW}
15+
function s.spfilter(c,e,tp)
1616
return c:IsSetCard(SET_ZW) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
1717
end
1818
function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
1919
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
20-
and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_HAND,0,1,nil,e,tp) end
21-
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,tp,LOCATION_HAND)
20+
and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) end
21+
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
2222
end
2323
function s.activate(e,tp,eg,ep,ev,re,r,rp)
24-
if Duel.GetLocationCount(tp,LOCATION_MZONE)<1 then return end
24+
if Duel.GetLocationCount(tp,LOCATION_MZONE)==0 then return end
2525
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
26-
local tc=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_HAND,0,1,1,nil,e,tp)
27-
if #tc>0 then
28-
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
26+
local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp)
27+
if #g>0 then
28+
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
2929
end
30-
end
30+
end

0 commit comments

Comments
 (0)