Commit 04a5bba2 authored by mercury233's avatar mercury233 Committed by GitHub

fix

parent 88255c7b
...@@ -63,21 +63,22 @@ function c77610772.initial_effect(c) ...@@ -63,21 +63,22 @@ function c77610772.initial_effect(c)
end end
end end
end end
function c77610772.linkfilter1(c,tp) function c77610772.linkfilter1(c,lc,tp)
return c:IsFaceup() and Duel.IsExistingMatchingCard(c77610772.linkfilter2,tp,LOCATION_MZONE,0,1,c,c) return c:IsFaceup() and Duel.IsExistingMatchingCard(c77610772.linkfilter2,tp,LOCATION_MZONE,0,1,c,lc,c,tp)
end end
function c77610772.linkfilter2(c,lc) function c77610772.linkfilter2(c,lc,mc,tp)
return c:IsFaceup() and not c:IsRace(lc:GetRace()) and not c:IsAttribute(lc:GetAttribute()) local mg=Group.FromCards(c,mc)
return c:IsFaceup() and not c:IsRace(mc:GetRace()) and not c:IsAttribute(mc:GetAttribute()) and Duel.GetLocationCountFromEx(tp,tp,mg,lc)>0
end end
function c77610772.linkcon(e,c) function c77610772.linkcon(e,c)
if c==nil then return true end if c==nil then return true end
if c:IsType(TYPE_PENDULUM) and c:IsFaceup() then return false end if c:IsType(TYPE_PENDULUM) and c:IsFaceup() then return false end
local tp=c:GetControler() local tp=c:GetControler()
return Duel.IsExistingMatchingCard(c77610772.linkfilter1,tp,LOCATION_MZONE,0,1,nil,tp) return Duel.IsExistingMatchingCard(c77610772.linkfilter1,tp,LOCATION_MZONE,0,1,nil,c,tp)
end end
function c77610772.linkop(e,tp,eg,ep,ev,re,r,rp,c) function c77610772.linkop(e,tp,eg,ep,ev,re,r,rp,c)
local g1=Duel.SelectMatchingCard(tp,c77610772.linkfilter1,tp,LOCATION_MZONE,0,1,1,nil,tp) local g1=Duel.SelectMatchingCard(tp,c77610772.linkfilter1,tp,LOCATION_MZONE,0,1,1,nil,c,tp)
local g2=Duel.SelectMatchingCard(tp,c77610772.linkfilter2,tp,LOCATION_MZONE,0,1,1,g1:GetFirst(),g1:GetFirst()) local g2=Duel.SelectMatchingCard(tp,c77610772.linkfilter2,tp,LOCATION_MZONE,0,1,1,g1:GetFirst(),c,g1:GetFirst(),tp)
g1:Merge(g2) g1:Merge(g2)
c:SetMaterial(g1) c:SetMaterial(g1)
Duel.SendtoGrave(g1,REASON_MATERIAL+REASON_LINK) Duel.SendtoGrave(g1,REASON_MATERIAL+REASON_LINK)
......
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