Skip to content

Commit b658fc0

Browse files
committed
"Rise Rank-Up-Magic Raidraptor's Force" fix
Fixed a bug where it would be possible to target cards that cannot be targeted by effects.
1 parent 394cdbd commit b658fc0

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

official/c38044854.lua

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,9 @@ function s.initial_effect(c)
1818
c:RegisterEffect(e1)
1919
end
2020
s.listed_series={SET_RAIDRAPTOR}
21-
function s.tgfilter(c,tp)
22-
return c:IsType(TYPE_XYZ) and c:IsSetCard(SET_RAIDRAPTOR) and c:IsFaceup() and c:IsCanBeXyzMaterial(nil,tp,REASON_EFFECT)
21+
function s.tgfilter(c,e,tp)
22+
return c:IsType(TYPE_XYZ) and c:IsSetCard(SET_RAIDRAPTOR) and c:IsFaceup()
23+
and c:IsCanBeXyzMaterial(nil,tp,REASON_EFFECT) and c:IsCanBeEffectTarget(e)
2324
end
2425
function s.rescon(sg,e,tp,mg)
2526
return sg:IsExists(Card.IsLocation,1,nil,LOCATION_MZONE) and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,sg:GetSum(Card.GetRank))
@@ -30,7 +31,7 @@ function s.spfilter(c,e,tp,rk)
3031
end
3132
function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
3233
if chkc then return false end
33-
local g=Duel.GetMatchingGroup(s.tgfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,nil,tp)
34+
local g=Duel.GetMatchingGroup(s.tgfilter,tp,LOCATION_MZONE|LOCATION_GRAVE,0,nil,e,tp)
3435
if chk==0 then return #g>=2 and aux.SelectUnselectGroup(g,e,tp,2,#g,s.rescon,0) end
3536
local tg=aux.SelectUnselectGroup(g,e,tp,2,#g,s.rescon,1,tp,HINTMSG_XMATERIAL,s.rescon)
3637
Duel.SetTargetCard(tg)

0 commit comments

Comments
 (0)