Commit 0f7815b7 authored by Tianchenglipu's avatar Tianchenglipu

Update c33252803.lua

parent 4f7ff2e9
...@@ -11,8 +11,9 @@ function c33252803.initial_effect(c) ...@@ -11,8 +11,9 @@ function c33252803.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c33252803.filter1(c,e,tp) function c33252803.filter1(c,e,tp)
local m=_G["c" .. c:GetCode()]
return c:IsFaceup() and c:IsSetCard(0x48) and not c:IsSetCard(0x1048) return c:IsFaceup() and c:IsSetCard(0x48) and not c:IsSetCard(0x1048)
and Duel.IsExistingMatchingCard(c33252803.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,c,c:GetRank()+1,c.xyz_number) and Duel.IsExistingMatchingCard(c33252803.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,c,c:GetRank()+1,m.xyz_number)
end end
function c33252803.filter2(c,e,tp,mc,rk,no) function c33252803.filter2(c,e,tp,mc,rk,no)
return c:GetRank()==rk and c:IsSetCard(0x1048) and c.xyz_number==no and mc:IsCanBeXyzMaterial(c) return c:GetRank()==rk and c:IsSetCard(0x1048) and c.xyz_number==no and mc:IsCanBeXyzMaterial(c)
...@@ -30,8 +31,9 @@ function c33252803.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -30,8 +31,9 @@ function c33252803.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<0 then return end if Duel.GetLocationCount(tp,LOCATION_MZONE)<0 then return end
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsFacedown() or not tc:IsRelateToEffect(e) or tc:IsControler(1-tp) or tc:IsImmuneToEffect(e) then return end if tc:IsFacedown() or not tc:IsRelateToEffect(e) or tc:IsControler(1-tp) or tc:IsImmuneToEffect(e) then return end
local m=_G["c" .. tc:GetCode()]
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c33252803.filter2,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,tc,tc:GetRank()+1,tc.xyz_number) local g=Duel.SelectMatchingCard(tp,c33252803.filter2,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,tc,tc:GetRank()+1,m.xyz_number)
local sc=g:GetFirst() local sc=g:GetFirst()
if sc then if sc then
local mg=tc:GetOverlayGroup() local mg=tc:GetOverlayGroup()
......
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