Commit 9da0f22a authored by Nemo Ma's avatar Nemo Ma

Update c11451552.lua

parent 8c0ad301
...@@ -33,7 +33,7 @@ function cm.eqlimit(e,c) ...@@ -33,7 +33,7 @@ function cm.eqlimit(e,c)
return e:GetOwner()==c return e:GetOwner()==c
end end
function cm.equipfd(c,tp,tc) function cm.equipfd(c,tp,tc)
if tc:IsPosition(POS_FACEUP) then Duel.MoveToField(tc,tp,tp,LOCATION_SZONE,POS_FACEDOWN,false) return true end if tc:IsPosition(POS_FACEUP) then return Duel.MoveToField(tc,tp,tp,LOCATION_SZONE,POS_FACEDOWN,false) end
if not Duel.Equip(tp,tc,c,false) then return false end if not Duel.Equip(tp,tc,c,false) then return false end
--Add Equip limit --Add Equip limit
tc:RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD,0,0) tc:RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD,0,0)
...@@ -46,6 +46,19 @@ function cm.equipfd(c,tp,tc) ...@@ -46,6 +46,19 @@ function cm.equipfd(c,tp,tc)
tc:RegisterEffect(e1) tc:RegisterEffect(e1)
return true return true
end end
function cm.equipfd2(c,tp,tc)
if tc:IsPosition(POS_FACEUP) then return Duel.MoveToField(tc,tp,tp,LOCATION_SZONE,POS_FACEDOWN,false) end
if not Duel.Equip(tp,tc,c,false) then return false end
--Add Equip limit
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_OWNER_RELATE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(cm.eqlimit)
tc:RegisterEffect(e1)
return true
end
function cm.adjustop(e,tp,eg,ep,ev,re,r,rp) function cm.adjustop(e,tp,eg,ep,ev,re,r,rp)
local phase=Duel.GetCurrentPhase() local phase=Duel.GetCurrentPhase()
local c=e:GetHandler() local c=e:GetHandler()
...@@ -82,7 +95,7 @@ function cm.eqop(e,tp,eg,ep,ev,re,r,rp) ...@@ -82,7 +95,7 @@ function cm.eqop(e,tp,eg,ep,ev,re,r,rp)
local tc=g:Select(tp,1,1,nil):GetFirst() local tc=g:Select(tp,1,1,nil):GetFirst()
if tc:IsForbidden() then if tc:IsForbidden() then
Duel.SendtoGrave(tc,REASON_RULE) Duel.SendtoGrave(tc,REASON_RULE)
elseif cm.equipfd(c,tp,tc) then elseif cm.equipfd2(c,tp,tc) then
Duel.RaiseEvent(tc,EVENT_SSET,e,REASON_EFFECT,tp,tp,0) Duel.RaiseEvent(tc,EVENT_SSET,e,REASON_EFFECT,tp,tp,0)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
......
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