Commit b9210e15 authored by fallenstardust's avatar fallenstardust
parent 7ad01211
......@@ -27,18 +27,25 @@ function s.lmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end
function s.lmop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
local c=e:GetHandler()
if tc and tc:IsRelateToEffect(e) then
local e1=Effect.CreateEffect(tc)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetCode(EFFECT_EXTRA_LINK_MATERIAL)
e1:SetRange(LOCATION_MZONE)
e1:SetLabelObject(c)
e1:SetCondition(s.mcon)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
e1:SetValue(s.matval)
tc:RegisterEffect(e1)
end
end
end
function s.mcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsControler(tp)
end
function s.matval(e,lc,mg,c,tp)
local ct=e:GetLabelObject()
if not lc:IsLink(5) then return false,nil end
return true, mg
return true,not mg or mg:IsContains(ct)
end
\ No newline at end of file
No preview for this file type
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