Commit 1976bfd8 authored by GuGu's avatar GuGu

Update c99677002.lua

parent 8dfec4d8
Pipeline #31677 passed with stage
in 21 seconds
......@@ -63,24 +63,30 @@ function c99677002.spop(e,tp,eg,ep,ev,re,r,rp)
end
end
function c99677002.eqcon(e,tp,eg,ep,ev,re,r,rp)
local ec=e:GetLabelObject()
return Duel.GetAttacker()==e:GetHandler() and (ec==nil or ec:GetFlagEffect(99677002)==0)
local c=e:GetHandler()
local g=c:GetEquipGroup():Filter(c99677002.eqfilter1,nil)
return g:GetCount()==0
end
function c99677002.eqfilter1(c)
return c:GetFlagEffect(99677002)~=0
end
function c99677002.eqfilter2(c,tp)
return c:IsFaceup() and (c:IsControler(tp) or c:IsAbleToChangeControler())
end
function c99677002.eqtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingMatchingCard(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,e:GetHandler()) end
and Duel.IsExistingMatchingCard(c99677002.eqfilter2,tp,LOCATION_MZONE,LOCATION_MZONE,1,e:GetHandler(),tp) end
end
function c99677002.eqop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end
if c:IsFacedown() or not c:IsRelateToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local g=Duel.SelectMatchingCard(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,aux.ExceptThisCard(e))
local g=Duel.SelectMatchingCard(tp,c99677002.eqfilter2,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,aux.ExceptThisCard(e),tp)
local tc=g:GetFirst()
if tc then
if not Duel.Equip(tp,tc,c) then return end
tc:RegisterFlagEffect(99677002,RESET_EVENT+RESETS_STANDARD,0,0)
e:SetLabelObject(tc)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_COPY_INHERIT+EFFECT_FLAG_OWNER_RELATE)
......
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