Commit 07f2b630 authored by DailyShana's avatar DailyShana Committed by GitHub

update effect that equip other card (#1284)

parent f5f660ac
......@@ -37,9 +37,5 @@ function c10712320.eqop(e,tp,eg,ep,ev,re,r,rp)
local tc=g:GetFirst()
if tc==eqc then tc=g:GetNext() end
if not eqc:IsRelateToEffect(e) then return end
if tc:IsFacedown() or not tc:IsRelateToEffect(e) then
Duel.SendtoGrave(eqc,REASON_EFFECT)
return
end
Duel.Equip(tp,eqc,tc)
end
......@@ -36,7 +36,6 @@ function c11743119.eqop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsFaceup() and tc:IsRelateToEffect(e) then
if c:IsFaceup() and c:IsRelateToEffect(e) then
if not Duel.Equip(tp,tc,c,false) then return end
--Add Equip limit
tc:RegisterFlagEffect(11743119,RESET_EVENT+RESETS_STANDARD,0,0)
......@@ -48,6 +47,5 @@ function c11743119.eqop(e,tp,eg,ep,ev,re,r,rp)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(c11743119.eqlimit)
tc:RegisterEffect(e1)
else Duel.SendtoGrave(tc,REASON_RULE) end
end
end
......@@ -77,10 +77,11 @@ end
function c11790356.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end
if not tc:IsFaceup() or not tc:IsRelateToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local sg=Duel.SelectMatchingCard(tp,c11790356.filter2,tp,LOCATION_GRAVE,0,1,1,nil)
local sc=sg:GetFirst()
if sc and tc:IsFaceup() and tc:IsRelateToEffect(e) then
if sc then
if not Duel.Equip(tp,sc,tc) then return end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
......
......@@ -39,10 +39,9 @@ function c12496261.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,g,1,0,0)
end
function c12496261.eqop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if c:IsFaceup() and c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) then
if tc:IsRelateToEffect(e) then
if not Duel.Equip(tp,tc,c,false) then return end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
......
......@@ -64,7 +64,6 @@ function c14466224.eqop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsFaceup() and tc:IsRelateToEffect(e) then
if c:IsFaceup() and c:IsRelateToEffect(e) then
local atk=tc:GetTextAttack()
local def=tc:GetTextDefense()
if atk<0 then atk=0 end
......@@ -98,6 +97,5 @@ function c14466224.eqop(e,tp,eg,ep,ev,re,r,rp)
e3:SetValue(def)
tc:RegisterEffect(e3)
end
else Duel.SendtoGrave(tc,REASON_RULE) end
end
end
......@@ -41,11 +41,9 @@ function c16255173.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,g,1,0,0)
end
function c16255173.eqop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if not (tc:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsType(TYPE_MONSTER)) then return end
if c:IsFaceup() and c:IsRelateToEffect(e) then
local atk=tc:GetTextAttack()
if tc:IsFacedown() or atk<0 then atk=0 end
if not Duel.Equip(tp,tc,c) then return end
......@@ -64,7 +62,6 @@ function c16255173.eqop(e,tp,eg,ep,ev,re,r,rp)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e2)
tc:RegisterFlagEffect(16255173,RESET_EVENT+RESETS_STANDARD,0,1)
else Duel.SendtoGrave(tc,REASON_RULE) end
end
function c16255173.eqlimit(e,c)
return e:GetOwner()==c
......
......@@ -67,10 +67,8 @@ function c21140872.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end
function c21140872.eqop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsFacedown() or not c:IsRelateToEffect(e) then return end
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.Equip(tp,tc,c)
if tc:IsRelateToEffect(e) and Duel.Equip(tp,tc,c) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
......
......@@ -41,10 +41,9 @@ function c21249921.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,g,1,0,0)
end
function c21249921.eqop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if c:IsFaceup() and c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) then
if tc:IsRelateToEffect(e) then
if not Duel.Equip(tp,tc,c,false) then return end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
......
......@@ -42,7 +42,7 @@ end
function c22011689.eqop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if c:IsRelateToEffect(e) and c:IsFaceup() and tc:IsRelateToEffect(e) then
if tc:IsRelateToEffect(e) then
if not Duel.Equip(tp,tc,c,false) then return end
--Add Equip limit
local e1=Effect.CreateEffect(c)
......
......@@ -48,18 +48,17 @@ end
function c22842214.eqop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e)
local tg0=g:Filter(Card.IsRelateToEffect,nil,e)
local ft=Duel.GetLocationCount(tp,LOCATION_SZONE)
if tg0:GetCount()==0 or ft<=0 then return end
if c:IsFaceup() and c:IsRelateToEffect(e) then
local tg=nil
if ft<tg0:GetCount() then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
tg=tg0:FilterSelect(tp,c22842214.filter,ft,ft,nil)
local tg=Group.CreateGroup()
if c:IsRelateToEffect(e) and c:IsFaceup() then
if ft>=g:GetCount() then
tg:Merge(g)
else
tg=tg0:Clone()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
tg:Merge(g:Select(tp,ft,ft,nil))
end
end
if tg:GetCount()>0 then
g:Sub(tg)
local tc=tg:GetFirst()
while tc do
Duel.Equip(tp,tc,c,false,true)
......@@ -74,8 +73,9 @@ function c22842214.eqop(e,tp,eg,ep,ev,re,r,rp)
tc=tg:GetNext()
end
Duel.EquipComplete()
if g:GetCount()>0 then
Duel.SendtoGrave(g,REASON_RULE)
end
else Duel.SendtoGrave(tg0,REASON_RULE) end
end
function c22842214.eqfilter(c,ec)
return c:GetFlagEffect(22842214)~=0 and c:IsHasCardTarget(ec)
......
......@@ -62,7 +62,6 @@ function c23756165.eqop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsFaceup() and tc:IsRelateToEffect(e) then
if c:IsFaceup() and c:IsRelateToEffect(e) then
local atk=tc:GetTextAttack()
local def=tc:GetTextDefense()
if atk<0 then atk=0 end
......@@ -85,7 +84,6 @@ function c23756165.eqop(e,tp,eg,ep,ev,re,r,rp)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
e2:SetValue(c23756165.repval)
tc:RegisterEffect(e2)
else Duel.SendtoGrave(tc,REASON_RULE) end
end
end
function c23756165.repval(e,re,r,rp)
......
......@@ -46,14 +46,11 @@ function c25067275.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,ec,1,0,0)
end
function c25067275.operation(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end
local ec=e:GetLabelObject()
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
local tc=g:GetFirst()
if tc==ec then tc=g:GetNext() end
if ec:IsFaceup() and ec:IsRelateToEffect(e) then
if tc:IsFaceup() and tc:IsRelateToEffect(e) then
Duel.Equip(tp,ec,tc)
if ec:IsFaceup() and ec:IsRelateToEffect(e) and Duel.Equip(tp,ec,tc) then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetRange(LOCATION_SZONE)
......@@ -63,7 +60,6 @@ function c25067275.operation(e,tp,eg,ep,ev,re,r,rp)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
ec:RegisterEffect(e1)
end
end
end
function c25067275.desop(e,tp,eg,ep,ev,re,r,rp)
Duel.Destroy(e:GetHandler(),REASON_EFFECT)
......
......@@ -37,11 +37,7 @@ function c26211048.eqop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if not tc:IsRelateToEffect(e) or not tc:IsType(TYPE_MONSTER) then return end
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 or c:IsFacedown() or not c:IsRelateToEffect(e) then
if tc:IsLocation(LOCATION_MZONE) then Duel.SendtoGrave(tc,REASON_EFFECT) end
return
end
Duel.Equip(tp,tc,c,false)
if not Duel.Equip(tp,tc,c,false) then return end
local e1=Effect.CreateEffect(c)
e1:SetProperty(EFFECT_FLAG_COPY_INHERIT+EFFECT_FLAG_OWNER_RELATE)
e1:SetType(EFFECT_TYPE_SINGLE)
......
......@@ -26,7 +26,7 @@ end
function c26885836.eqop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if c:IsRelateToEffect(e) and c:IsFaceup() and tc:IsRelateToEffect(e) then
if tc:IsRelateToEffect(e) then
local atk=tc:GetBaseAttack()
if atk<0 then atk=0 end
if not Duel.Equip(tp,tc,c,false) then return end
......
......@@ -38,10 +38,9 @@ function c28183605.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,g,1,0,0)
end
function c28183605.eqop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if c:IsFaceup() and c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) then
if tc:IsRelateToEffect(e) then
if not Duel.Equip(tp,tc,c,false) then return end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
......
......@@ -34,10 +34,9 @@ function c3019642.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,g,1,0,0)
end
function c3019642.eqop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if c:IsFaceup() and c:IsRelateToEffect(e) and tc and tc:IsRelateToEffect(e) then
if tc and tc:IsRelateToEffect(e) then
local atk=tc:GetTextAttack()
if atk<0 then atk=0 end
if not Duel.Equip(tp,tc,c,false) then return end
......
......@@ -87,8 +87,7 @@ end
function c31930787.eqop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsFaceup() and tc:IsRelateToEffect(e) and tc:IsType(TYPE_MONSTER)then
if c:IsFaceup() and c:IsRelateToEffect(e) then
if tc:IsFaceup() and tc:IsRelateToEffect(e) and tc:IsType(TYPE_MONSTER) then
local atk=tc:GetTextAttack()
if atk<0 then atk=0 end
if not Duel.Equip(tp,tc,c,false) then return end
......@@ -109,7 +108,6 @@ function c31930787.eqop(e,tp,eg,ep,ev,re,r,rp)
e2:SetValue(atk)
tc:RegisterEffect(e2)
end
else Duel.SendtoGrave(tc,REASON_RULE) end
end
end
function c31930787.dircon(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -51,7 +51,6 @@ function c3897065.eqop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsFaceup() and tc:IsType(TYPE_MONSTER) and not tc:IsRace(RACE_MACHINE) and tc:IsRelateToEffect(e) then
if c:IsFaceup() and c:IsRelateToEffect(e) then
if not Duel.Equip(tp,tc,c,false) then return end
--equip limit
local e1=Effect.CreateEffect(c)
......@@ -67,7 +66,6 @@ function c3897065.eqop(e,tp,eg,ep,ev,re,r,rp)
e2:SetCode(3897065)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e2)
else Duel.SendtoGrave(tc,REASON_RULE) end
end
end
function c3897065.atcon(e)
......
......@@ -61,8 +61,8 @@ function c39978267.operation(e,tp,eg,ep,ev,re,r,rp)
end
else
local c=e:GetHandler()
if tc and tc:IsRelateToEffect(e) and c:IsRelateToEffect(e) and c:IsFaceup() then
Duel.Equip(tp,tc,e:GetHandler())
if tc and tc:IsRelateToEffect(e) then
Duel.Equip(tp,tc,c)
end
end
end
......@@ -48,7 +48,6 @@ function c39987164.eqop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsFaceup() and tc:IsRelateToEffect(e) and tc:IsAttackPos() and tc:IsRelateToEffect(e) then
if c:IsFaceup() and c:IsRelateToEffect(e) then
if not Duel.Equip(tp,tc,c,false) then return end
--Add Equip limit
tc:RegisterFlagEffect(39987164,RESET_EVENT+RESETS_STANDARD,0,0)
......@@ -59,7 +58,6 @@ function c39987164.eqop(e,tp,eg,ep,ev,re,r,rp)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(c39987164.eqlimit)
tc:RegisterEffect(e1)
else Duel.SendtoGrave(tc,REASON_RULE) end
end
end
function c39987164.desfilter(c,att)
......
......@@ -37,11 +37,9 @@ function c40267580.eqlimit(e,c)
end
function c40267580.eqop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end
local tc=Duel.GetFirstTarget()
if tc and not c:IsStatus(STATUS_BATTLE_DESTROYED) and c:IsFaceup() and c:IsRelateToEffect(e) then
if tc:IsFaceup() and tc:IsRelateToEffect(e) then
Duel.Equip(tp,c,tc)
if tc and not c:IsStatus(STATUS_BATTLE_DESTROYED)
and c:IsFaceup() and c:IsRelateToEffect(e) and Duel.Equip(tp,c,tc) then
--Add Equip limit
local e1=Effect.CreateEffect(tc)
e1:SetType(EFFECT_TYPE_SINGLE)
......@@ -56,7 +54,6 @@ function c40267580.eqop(e,tp,eg,ep,ev,re,r,rp)
e2:SetValue(tp)
e2:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET)
c:RegisterEffect(e2)
else Duel.SendtoGrave(c,REASON_RULE) end
end
end
function c40267580.reccon(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -41,10 +41,9 @@ function c40418351.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,g,1,0,0)
end
function c40418351.eqop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if c:IsFaceup() and c:IsRelateToEffect(e) and tc and tc:IsRelateToEffect(e) then
if tc and tc:IsRelateToEffect(e) then
local atk=tc:GetTextAttack()
if atk<0 then atk=0 end
if not Duel.Equip(tp,tc,c,false) then return end
......
......@@ -24,10 +24,9 @@ function c40884383.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,g,1,0,0)
end
function c40884383.eqop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and c:IsFaceup() and c:IsRelateToEffect(e) then
if tc:IsRelateToEffect(e) then
Duel.Equip(tp,tc,c)
end
end
......@@ -28,10 +28,9 @@ function c41230939.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,g,1,0,0)
end
function c41230939.eqop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if c:IsFaceup() and c:IsRelateToEffect(e) and tc and tc:IsRelateToEffect(e) then
if tc and tc:IsRelateToEffect(e) then
local atk=tc:GetTextAttack()
if atk<0 then atk=0 end
if not Duel.Equip(tp,tc,c,false) then return end
......
......@@ -89,9 +89,7 @@ function c41578483.eqop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsFaceup() and tc:IsRelateToEffect(e) and tc:IsType(TYPE_MONSTER) and tc:IsControler(1-tp) then
if c:IsFaceup() and c:IsRelateToEffect(e) then
c41578483.equip_monster(c,tp,tc)
else Duel.SendtoGrave(tc,REASON_RULE) end
end
end
function c41578483.atkval(e,c)
......
......@@ -46,7 +46,6 @@ function c4252828.eqop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsFaceup() and tc:IsRelateToEffect(e) and tc:IsType(TYPE_MONSTER) then
if c:IsFaceup() and c:IsRelateToEffect(e) then
if not Duel.Equip(tp,tc,c,false) then return end
--Add Equip limit
tc:RegisterFlagEffect(4252828,RESET_EVENT+RESETS_STANDARD,0,0)
......@@ -64,7 +63,6 @@ function c4252828.eqop(e,tp,eg,ep,ev,re,r,rp)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
e2:SetValue(800)
tc:RegisterEffect(e2)
else Duel.SendtoGrave(tc,REASON_RULE) end
end
end
function c4252828.desreptg(e,tp,eg,ep,ev,re,r,rp,chk)
......
......@@ -33,10 +33,6 @@ function c43641473.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=g:GetFirst()
if tc==ec then tc=g:GetNext() end
if ec:IsFaceup() and ec:IsRelateToEffect(e) then
if tc:IsFaceup() and tc:IsRelateToEffect(e) then
Duel.Equip(tp,ec,tc)
else
Duel.SendtoGrave(ec,REASON_EFFECT)
end
end
end
......@@ -44,9 +44,8 @@ end
function c44505297.eqop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 or c:IsFacedown()
or not c:IsRelateToEffect(e) or not tc:IsRelateToEffect(e) then return end
Duel.Equip(tp,tc,c,false)
if not tc:IsRelateToEffect(e) then return end
if not Duel.Equip(tp,tc,c,false) then return end
local e1=Effect.CreateEffect(c)
e1:SetProperty(EFFECT_FLAG_OWNER_RELATE)
e1:SetType(EFFECT_TYPE_SINGLE)
......
......@@ -92,7 +92,6 @@ function c4545683.eqop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsFaceup() and tc:IsRelateToEffect(e) and tc:IsType(TYPE_MONSTER) then
if c:IsFaceup() and c:IsRelateToEffect(e) then
local atk=tc:GetTextAttack()
if atk<0 then atk=0 end
if not Duel.Equip(tp,tc,c,false) then return end
......@@ -114,7 +113,6 @@ function c4545683.eqop(e,tp,eg,ep,ev,re,r,rp)
e2:SetValue(atk)
tc:RegisterEffect(e2)
end
else Duel.SendtoGrave(tc,REASON_RULE) end
end
end
function c4545683.spfilter(c,e,tp,ec)
......
......@@ -67,7 +67,6 @@ function c48868994.opd(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsAttackPos() then
if c:IsFaceup() and c:IsRelateToEffect(e) then
if not Duel.Equip(tp,tc,c,false) then return end
--Add Equip limit
tc:CreateRelation(c,RESET_EVENT+RESETS_STANDARD)
......@@ -83,6 +82,5 @@ function c48868994.opd(e,tp,eg,ep,ev,re,r,rp)
e2:SetCode(48868994)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e2)
else Duel.SendtoGrave(tc,REASON_RULE) end
end
end
......@@ -49,7 +49,6 @@ function c50140163.eqop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
if c:IsFaceup() and c:IsRelateToEffect(e) then
local atk=tc:GetTextAttack()
local def=tc:GetTextDefense()
if atk<0 then atk=0 end
......@@ -72,7 +71,6 @@ function c50140163.eqop(e,tp,eg,ep,ev,re,r,rp)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
e2:SetValue(c50140163.repval)
tc:RegisterEffect(e2)
else Duel.SendtoGrave(tc,REASON_RULE) end
end
end
function c50140163.repval(e,re,r,rp)
......
......@@ -39,11 +39,7 @@ function c53241226.activate(e,tp,eg,ep,ev,re,r,rp)
if hc==tc then hc=g:GetNext() end
if hc:IsControler(tp) and tc:IsFaceup() and tc:IsRelateToEffect(e)
and tc:IsControler(1-tp) and tc:IsLocation(LOCATION_MZONE)
and tc:IsAbleToChangeControler() then
if hc:IsFaceup() and hc:IsRelateToEffect(e)
and hc:IsLocation(LOCATION_MZONE) then
if Duel.GetLocationCount(tp,LOCATION_SZONE)>0 then
if Duel.Equip(tp,tc,hc,false) then
and tc:IsAbleToChangeControler() and Duel.Equip(tp,tc,hc,false) then
--Add Equip limit
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
......@@ -68,11 +64,6 @@ function c53241226.activate(e,tp,eg,ep,ev,re,r,rp)
e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
hc:RegisterEffect(e3,true)
end
else Duel.Destroy(tc,REASON_RULE)
end
else Duel.SendtoGrave(tc,REASON_RULE)
end
end
end
function c53241226.eqlimit(e,c)
return c==e:GetLabelObject()
......
......@@ -35,10 +35,9 @@ function c54578613.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,g,1,0,0)
end
function c54578613.eqop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if c:IsFaceup() and c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) then
if tc:IsRelateToEffect(e) then
if not Duel.Equip(tp,tc,c,false) then return end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
......
......@@ -58,10 +58,9 @@ function c56051086.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,g,1,0,0)
end
function c56051086.eqop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if c:IsFaceup() and c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) then
if tc:IsRelateToEffect(e) then
if not Duel.Equip(tp,tc,c,false) then return end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
......
......@@ -42,7 +42,7 @@ end
function c56768355.eqop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and c:IsFaceup() and c:IsRelateToEffect(e) then
if tc:IsRelateToEffect(e) then
Duel.Equip(tp,tc,c)
end
end
......
......@@ -45,7 +45,6 @@ function c57784563.eqop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsFaceup() and tc:IsRelateToEffect(e) and tc:IsType(TYPE_MONSTER) then
if c:IsFaceup() and c:IsRelateToEffect(e) then
if not Duel.Equip(tp,tc,c,false) then return end
--Add Equip limit
tc:RegisterFlagEffect(57784563,RESET_EVENT+RESETS_STANDARD,0,0)
......@@ -64,6 +63,5 @@ function c57784563.eqop(e,tp,eg,ep,ev,re,r,rp)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
e2:SetValue(1)
tc:RegisterEffect(e2)
else Duel.SendtoGrave(tc,REASON_RULE) end
end
end
......@@ -46,7 +46,7 @@ function c6075801.eqop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local g=Duel.SelectMatchingCard(tp,c6075801.filter,tp,LOCATION_DECK+LOCATION_HAND,0,1,1,nil,c)
local tc=g:GetFirst()
if c:IsFaceup() and c:IsRelateToEffect(e) then
if tc then
if not Duel.Equip(tp,tc,c) then return end
--Add Equip limit
local e1=Effect.CreateEffect(c)
......@@ -56,7 +56,7 @@ function c6075801.eqop(e,tp,eg,ep,ev,re,r,rp)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(c6075801.eqlimit)
tc:RegisterEffect(e1)
else Duel.SendtoGrave(tc,REASON_RULE) end
end
end
function c6075801.eqlimit(e,c)
return e:GetOwner()==c
......
......@@ -93,6 +93,7 @@ function c61397885.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
Duel.SelectTarget(tp,c61397885.efilter,tp,LOCATION_MZONE,0,1,1,nil,tp)
end
function c61397885.eqop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end
local tc=Duel.GetFirstTarget()
if tc:IsFacedown() or not tc:IsRelateToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
......
......@@ -27,7 +27,7 @@ end
function c61538782.eqop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if c:IsRelateToEffect(e) and c:IsFaceup() and tc:IsRelateToEffect(e) then
if tc:IsRelateToEffect(e) then
local atk=tc:GetTextAttack()
if atk<0 then atk=0 end
if not Duel.Equip(tp,tc,c,false) then return end
......
......@@ -38,7 +38,7 @@ function c62878208.eqop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
local tc=g:GetFirst()
if eq==tc then tc=g:GetNext() end
if eqc and eq:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsRelateToEffect(e) then
if eqc and eq:IsRelateToEffect(e) then
if not Duel.Equip(tp,eq,tc) then return end
Duel.BreakEffect()
local a=eqc
......
......@@ -65,7 +65,6 @@ function c63465535.eqop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsFaceup() and tc:IsRelateToEffect(e) and tc:IsType(TYPE_MONSTER) then
if c:IsFaceup() and c:IsRelateToEffect(e) then
if not Duel.Equip(tp,tc,c,false) then return end
--Add Equip limit
tc:RegisterFlagEffect(63465535,RESET_EVENT+RESETS_STANDARD,0,0)
......@@ -77,7 +76,6 @@ function c63465535.eqop(e,tp,eg,ep,ev,re,r,rp)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(c63465535.eqlimit)
tc:RegisterEffect(e1)
else Duel.SendtoGrave(tc,REASON_RULE) end
end
end
function c63465535.desreptg(e,tp,eg,ep,ev,re,r,rp,chk)
......
......@@ -74,7 +74,6 @@ function c63468625.eqop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsFaceup() and tc:IsRelateToEffect(e) and tc:IsType(TYPE_MONSTER) then
if c:IsFaceup() and c:IsRelateToEffect(e) then
local atk=tc:GetTextAttack()
if atk<0 then atk=0 end
if not Duel.Equip(tp,tc,c,false) then return end
......@@ -93,7 +92,6 @@ function c63468625.eqop(e,tp,eg,ep,ev,re,r,rp)
e2:SetValue(atk)
tc:RegisterEffect(e2)
tc:RegisterFlagEffect(63468625,RESET_EVENT+RESETS_STANDARD,0,1)
else Duel.SendtoGrave(tc,REASON_RULE) end
end
end
function c63468625.damcon(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -70,10 +70,9 @@ function c63487632.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,g,1,0,0)
end
function c63487632.eqop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if c:IsFaceup() and c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) then
if tc:IsRelateToEffect(e) then
if not Duel.Equip(tp,tc,c,false) then return end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
......
......@@ -91,9 +91,7 @@ function c63519819.eqop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsType(TYPE_MONSTER) and tc:IsControler(1-tp) then
if c:IsFaceup() and c:IsRelateToEffect(e) then
c63519819.equip_monster(c,tp,tc)
else Duel.SendtoGrave(tc,REASON_RULE) end
end
end
function c63519819.repval(e,re,r,rp)
......
......@@ -72,12 +72,6 @@ function c63633694.eqop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() then
if c:IsFaceup() and c:IsRelateToEffect(e) then
local p=c:GetControler()
if Duel.GetLocationCount(p,LOCATION_SZONE)<=0 then
Duel.SendtoGrave(tc,REASON_RULE)
return
end
if not Duel.Equip(tp,tc,c,false) then return end
tc:RegisterFlagEffect(63633694,RESET_EVENT+RESETS_STANDARD,0,0)
e:SetLabelObject(tc)
......@@ -88,7 +82,6 @@ function c63633694.eqop(e,tp,eg,ep,ev,re,r,rp)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(c63633694.eqlimit)
tc:RegisterEffect(e1)
else Duel.SendtoGrave(tc,REASON_RULE) end
end
end
function c63633694.eqlimit(e,c)
......
......@@ -37,7 +37,6 @@ function c6387204.eqop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
if c:IsFaceup() and c:IsRelateToEffect(e) then
if not Duel.Equip(tp,tc,c,false) then return end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
......@@ -53,7 +52,6 @@ function c6387204.eqop(e,tp,eg,ep,ev,re,r,rp)
e2:SetValue(1000)
tc:RegisterEffect(e2)
tc:RegisterFlagEffect(6387204,RESET_EVENT+RESETS_STANDARD,0,0)
else Duel.SendtoGrave(tc,REASON_RULE) end
end
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
......
......@@ -84,9 +84,7 @@ function c64631466.eqop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsType(TYPE_MONSTER) and tc:IsControler(1-tp) then
if c:IsFaceup() and c:IsRelateToEffect(e) then
c64631466.equip_monster(c,tp,tc)
else Duel.SendtoGrave(tc,REASON_RULE) end
end
end
function c64631466.repval(e,re,r,rp)
......
......@@ -59,7 +59,6 @@ function c66094973.eqop(e,tp,eg,ep,ev,re,r,rp)
Duel.DiscardHand(tp,nil,1,1,REASON_EFFECT+REASON_DISCARD)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
if c:IsFaceup() and c:IsRelateToEffect(e) then
local atk=tc:GetTextAttack()
if atk<0 then atk=0 end
if not Duel.Equip(tp,tc,c,false) then return end
......@@ -87,7 +86,6 @@ function c66094973.eqop(e,tp,eg,ep,ev,re,r,rp)
e3:SetCode(66094973)
e3:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e3)
else Duel.SendtoGrave(tc,REASON_RULE) end
end
end
function c66094973.poscon(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -35,7 +35,6 @@ function c66970385.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,g2,1,0,0)
end
function c66970385.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 or Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end
local tc=e:GetLabelObject()
local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
local ec=tg:GetFirst()
......
......@@ -52,7 +52,7 @@ end
function c68084557.eqop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if c:IsRelateToEffect(e) and c:IsFaceup() and tc:IsRelateToEffect(e) and tc:IsFaceup() and tc:CheckEquipTarget(c) then
if tc:IsRelateToEffect(e) and tc:IsFaceup() and tc:CheckEquipTarget(c) then
Duel.Equip(tp,tc,c)
end
end
......@@ -92,7 +92,6 @@ function c68140974.eqop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsFaceup() and tc:IsRelateToEffect(e) and tc:IsType(TYPE_MONSTER) then
if c:IsFaceup() and c:IsRelateToEffect(e) then
local atk=tc:GetTextAttack()
if atk<0 then atk=0 end
if not Duel.Equip(tp,tc,c,false) then return end
......@@ -113,7 +112,6 @@ function c68140974.eqop(e,tp,eg,ep,ev,re,r,rp)
e2:SetValue(atk)
tc:RegisterEffect(e2)
end
else Duel.SendtoGrave(tc,REASON_RULE) end
end
end
function c68140974.negcon(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -52,10 +52,9 @@ function c74367458.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,g,1,0,0)
end
function c74367458.eqop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and c:IsFaceup() and c:IsRelateToEffect(e) then
if tc:IsRelateToEffect(e) then
Duel.Equip(tp,tc,c)
end
end
......@@ -30,9 +30,9 @@ function c74854609.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local ec=Duel.GetAttackTarget()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsAttackable() and not tc:IsStatus(STATUS_ATTACK_CANCELED)
if tc:IsAttackable() and not tc:IsStatus(STATUS_ATTACK_CANCELED)
and ec:IsLocation(LOCATION_MZONE) and ec:IsFaceup() then
Duel.Equip(tp,ec,tc)
if not Duel.Equip(tp,ec,tc) then return end
--Add Equip limit
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
......
......@@ -77,7 +77,7 @@ end
function c75886890.eqop2(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
local ec=e:GetLabelObject()
if tc:IsRelateToEffect(e) and ec:IsFaceup() and ec:IsRelateToEffect(e) then
if tc:IsRelateToEffect(e) then
Duel.Equip(tp,tc,ec)
end
end
......@@ -37,10 +37,9 @@ function c77625948.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,g,1,0,0)
end
function c77625948.eqop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if c:IsFaceup() and c:IsRelateToEffect(e) and tc and tc:IsRelateToEffect(e) then
if tc and tc:IsRelateToEffect(e) then
local atk=tc:GetTextAttack()
if atk<0 then atk=0 end
if not Duel.Equip(tp,tc,c,false) then return end
......
......@@ -54,7 +54,6 @@ function c77693536.eqop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if not (tc:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsType(TYPE_EFFECT)) then return end
if c:IsFaceup() and c:IsRelateToEffect(e) then
local atk=tc:GetTextAttack()
if atk<0 then atk=0 end
if not Duel.Equip(tp,tc,c) then return end
......@@ -72,7 +71,6 @@ function c77693536.eqop(e,tp,eg,ep,ev,re,r,rp)
e2:SetValue(c77693536.eqlimit)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e2)
else Duel.SendtoGrave(tc,REASON_RULE) end
end
function c77693536.eqlimit(e,c)
return e:GetOwner()==c
......
......@@ -34,11 +34,8 @@ function c80769747.eqlimit(e,c)
end
function c80769747.eqop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end
local tc=Duel.GetFirstTarget()
if c:IsRelateToEffect(e) and c:IsFaceup() then
if tc:IsFaceup() and tc:IsRelateToEffect(e) then
Duel.Equip(tp,c,tc)
if c:IsRelateToEffect(e) and c:IsFaceup() and Duel.Equip(tp,c,tc) then
--Add Equip limit
local e1=Effect.CreateEffect(tc)
e1:SetType(EFFECT_TYPE_SINGLE)
......@@ -59,7 +56,6 @@ function c80769747.eqop(e,tp,eg,ep,ev,re,r,rp)
e3:SetValue(-800)
e3:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e3)
else Duel.SendtoGrave(c,REASON_RULE) end
end
end
function c80769747.ddescon(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -64,7 +64,6 @@ function c82962242.eqop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if not tc:IsRelateToEffect(e) or not tc:IsType(TYPE_MONSTER) then return end
if c:IsFaceup() and c:IsRelateToEffect(e) then
local atk=tc:GetTextAttack()
if tc:IsFacedown() or atk<0 then atk=0 end
if not Duel.Equip(tp,tc,c) then return end
......@@ -82,7 +81,6 @@ function c82962242.eqop(e,tp,eg,ep,ev,re,r,rp)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e2)
tc:RegisterFlagEffect(82962242,RESET_EVENT+RESETS_STANDARD,0,1)
else Duel.SendtoGrave(tc,REASON_RULE) end
end
function c82962242.eqlimit(e,c)
return e:GetOwner()==c and not c:IsDisabled()
......
......@@ -40,10 +40,11 @@ function c83812099.eqtg1(e,tp,eg,ep,ev,re,r,rp,chk)
end
function c83812099.eqop1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) or not c:IsFaceup() then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local g=Duel.SelectMatchingCard(tp,c83812099.filter1,tp,LOCATION_SZONE,LOCATION_SZONE,1,1,nil,c)
local eqc=g:GetFirst()
if eqc and c:IsRelateToEffect(e) and c:IsFaceup() then
if eqc then
Duel.Equip(tp,eqc,c)
end
end
......@@ -64,7 +65,7 @@ end
function c83812099.eqop2(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
local eqc=e:GetHandler():GetEquipGroup():Filter(Card.IsCode,nil,75560629):GetFirst()
if eqc and tc:IsRelateToEffect(e) and tc:IsFaceup() then
if eqc then
Duel.Equip(tp,eqc,tc)
end
end
......@@ -88,7 +88,6 @@ function c83965310.eqop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
if c:IsFaceup() and c:IsRelateToEffect(e) then
local atk=math.ceil(tc:GetTextAttack()/2)
if tc:IsFacedown() then atk=0 end
if atk<0 then atk=0 end
......@@ -112,6 +111,5 @@ function c83965310.eqop(e,tp,eg,ep,ev,re,r,rp)
e2:SetValue(atk)
tc:RegisterEffect(e2)
end
else Duel.SendtoGrave(tc,REASON_RULE) end
end
end
......@@ -49,7 +49,6 @@ function c87257460.eqop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsFaceup() and tc:IsRelateToEffect(e) then
if c:IsFaceup() and c:IsRelateToEffect(e) then
if not Duel.Equip(tp,tc,c,false) then return end
--Add Equip limit
tc:RegisterFlagEffect(87257460,RESET_EVENT+RESETS_STANDARD,0,0)
......@@ -68,7 +67,6 @@ function c87257460.eqop(e,tp,eg,ep,ev,re,r,rp)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
e2:SetValue(c87257460.repval)
tc:RegisterEffect(e2)
else Duel.SendtoGrave(tc,REASON_RULE) end
end
end
function c87257460.repval(e,re,r,rp)
......
......@@ -55,10 +55,9 @@ function c876330.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,g,1,0,0)
end
function c876330.eqop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if c:IsFaceup() and c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) then
if tc:IsRelateToEffect(e) then
if not Duel.Equip(tp,tc,c,false) then return end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
......
......@@ -24,10 +24,9 @@ function c90407382.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,g,1,0,0)
end
function c90407382.eqop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and c:IsFaceup() and c:IsRelateToEffect(e) then
if tc:IsRelateToEffect(e) then
Duel.Equip(tp,tc,c)
end
end
......@@ -42,10 +42,9 @@ function c9161357.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,g,1,0,0)
end
function c9161357.eqop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if c:IsFaceup() and c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) then
if tc:IsRelateToEffect(e) then
if not Duel.Equip(tp,tc,c,false) then return end
e:SetLabelObject(tc)
local e1=Effect.CreateEffect(c)
......
......@@ -74,7 +74,7 @@ end
function c93157004.eqop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and c:IsFaceup() and c:IsRelateToEffect(e) then
if tc:IsRelateToEffect(e) then
if not Duel.Equip(tp,tc,c) then return end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
......
......@@ -69,9 +69,7 @@ function c94259633.eqop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsFaceup() and tc:IsRelateToEffect(e) and tc:IsType(TYPE_MONSTER) then
if c:IsRelateToEffect(e) then
c94259633.equip_monster(c,tp,tc)
else Duel.SendtoGrave(tc,REASON_RULE) end
end
end
function c94259633.adcon(e)
......
......@@ -74,10 +74,9 @@ function c95090813.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,g,1,0,0)
end
function c95090813.eqop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if c:IsFaceup() and c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) then
if tc:IsRelateToEffect(e) then
if not Duel.Equip(tp,tc,c,false) then return end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
......
......@@ -46,8 +46,8 @@ function c98371278.eqop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc1=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsLocation,nil,LOCATION_GRAVE):GetFirst()
local tc2=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsLocation,nil,LOCATION_MZONE):GetFirst()
if tc1 and tc2 and tc1:IsRelateToEffect(e) and tc2:IsRelateToEffect(e) and aux.NecroValleyFilter()(tc1) then
Duel.Equip(tp,tc1,tc2)
if tc1 and tc2 and tc1:IsRelateToEffect(e) and aux.NecroValleyFilter()(tc1) then
if not Duel.Equip(tp,tc1,tc2) then return end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
......
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