Commit 842ec2ab authored by gg123gg's avatar gg123gg Committed by GitHub

fix

parent ec3eb120
...@@ -111,13 +111,13 @@ function c12026001.drop2(e,tp,eg,ep,ev,re,r,rp) ...@@ -111,13 +111,13 @@ function c12026001.drop2(e,tp,eg,ep,ev,re,r,rp)
e:Reset() e:Reset()
end end
function c12026001.xyzfilter(c,e,tp,xyzc) function c12026001.xyzfilter(c,e,tp,xyzc)
return c:IsSetCard(0xfba) and xyzc:IsCanBeXyzMaterial(c) return c:IsSetCard(0xfba) and c:IsType(TYPE_XYZ) xyzc:IsCanBeXyzMaterial(c)
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false)
end end
function c12026001.xyztg(e,tp,eg,ep,ev,re,r,rp,chk) function c12026001.xyztg(e,tp,eg,ep,ev,re,r,rp,chk)
local tc=eg:GetFirst() local tc=eg:GetFirst()
if chk==0 then return Duel.GetLocationCountFromEx(tp,tp,e:GetHandler())>0 if chk==0 then return Duel.GetLocationCountFromEx(tp,tp,e:GetHandler())>0
and aux.MustMaterialCheck(e:GetHandler(),tp,EFFECT_MUST_BE_XMATERIAL) and aux.MustMaterialCheck(tc,tp,EFFECT_MUST_BE_XMATERIAL)
and Duel.IsExistingMatchingCard(c12026001.xyzfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,tc) end and Duel.IsExistingMatchingCard(c12026001.xyzfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,tc) end
Duel.SetTargetCard(tc) Duel.SetTargetCard(tc)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
...@@ -126,18 +126,18 @@ function c12026001.xyzop(e,tp,eg,ep,ev,re,r,rp) ...@@ -126,18 +126,18 @@ function c12026001.xyzop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end if not c:IsRelateToEffect(e) then return end
local tc=eg:GetFirst() local tc=eg:GetFirst()
if Duel.GetLocationCountFromEx(tp,tp,tc)<=0 or not aux.MustMaterialCheck(tc,tp,EFFECT_MUST_BE_XMATERIAL) then return end if Duel.GetLocationCountFromEx(tp,tp,tc,TYPE_XYZ)<=0 or not aux.MustMaterialCheck(tc,tp,EFFECT_MUST_BE_XMATERIAL) then return end
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
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c12026001.xyzfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,tc) local g=Duel.SelectMatchingCard(tp,c12026001.xyzfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,tc)
local sc=g:GetFirst() local sc=g:GetFirst()
if sc then if sc and sc:IsType(TYPE_XYZ) then
local mg=c:GetOverlayGroup() local mg=tc:GetOverlayGroup()
if mg:GetCount()~=0 then if mg:GetCount()~=0 then
Duel.Overlay(sc,mg) Duel.Overlay(sc,mg)
end end
sc:SetMaterial(Group.FromCards(c)) sc:SetMaterial(Group.FromCards(tc))
Duel.Overlay(sc,Group.FromCards(c)) Duel.Overlay(sc,Group.FromCards(tc))
Duel.SpecialSummon(sc,SUMMON_TYPE_XYZ,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(sc,SUMMON_TYPE_XYZ,tp,tp,false,false,POS_FACEUP)
sc:CompleteProcedure() sc:CompleteProcedure()
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