Commit 11dc26e7 authored by 八宫一月's avatar 八宫一月 Committed by GitHub

fix 閉ザサレシ天ノ月 (#2564)

parent 6107f737
......@@ -28,15 +28,15 @@ 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
if not tc:IsImmuneToEffect(e) then
tc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1)
end
local fid=c:GetFieldID()
c:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1,fid)
local e1=Effect.CreateEffect(c)
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:SetLabel(fid)
e1:SetCondition(s.mcon)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
e1:SetValue(s.matval)
......@@ -49,6 +49,7 @@ function s.mcon(e)
end
function s.matval(e,lc,mg,c,tp)
local ct=e:GetLabelObject()
if not lc:IsLink(5) then return false,nil end
local fid=e:GetLabel()
if not lc:IsLink(5) or ct:GetFlagEffectLabel(id)~=fid then return false,nil end
return true,not mg or mg:IsContains(ct)
end
\ No newline at end of file
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