Commit fa43f124 authored by nekrozar's avatar nekrozar

fix&update Duel.Equip

https://github.com/Fluorohydride/ygopro-core/blob/master/libduel.cpp#L1252
- Duel.Equip return boolean.
- 4 parameter is true by default.
parent e45d7c76
......@@ -81,7 +81,7 @@ function c11790356.operation(e,tp,eg,ep,ev,re,r,rp)
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 not Duel.Equip(tp,sc,tc,true) then return end
if not Duel.Equip(tp,sc,tc) then return end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
......
......@@ -68,7 +68,7 @@ function c12927849.eqop(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoGrave(c,REASON_EFFECT)
return
end
Duel.Equip(tp,c,tc,true)
Duel.Equip(tp,c,tc)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
......
......@@ -42,7 +42,7 @@ function c14235211.eqop(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoGrave(c,REASON_EFFECT)
return
end
Duel.Equip(tp,c,tc,true)
Duel.Equip(tp,c,tc)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
......
......@@ -40,7 +40,7 @@ function c14457896.eqop(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoGrave(c,REASON_EFFECT)
return
end
Duel.Equip(tp,c,tc,true)
Duel.Equip(tp,c,tc)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
......
......@@ -29,7 +29,7 @@ function c14624296.eqop(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoGrave(c,REASON_EFFECT)
return
end
Duel.Equip(tp,c,tc,true)
Duel.Equip(tp,c,tc)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
......
......@@ -48,7 +48,7 @@ function c16255173.eqop(e,tp,eg,ep,ev,re,r,rp)
if c:IsFaceup() and c:IsRelateToEffect(e) then
local atk=tc:GetTextAttack()
if tc:IsFacedown() or atk<0 then atk=0 end
if Duel.Equip(tp,tc,c)==0 then return end
if not Duel.Equip(tp,tc,c) then return end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_EQUIP)
e1:SetCode(EFFECT_UPDATE_ATTACK)
......
......@@ -35,7 +35,7 @@ function c18060565.eqop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local eq=Duel.SelectMatchingCard(tp,c18060565.eqfilter,tp,LOCATION_DECK,0,1,1,nil)
local eqc=eq:GetFirst()
if eqc and Duel.Equip(tp,eqc,tc,true) then
if eqc and Duel.Equip(tp,eqc,tc) then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
......
......@@ -47,7 +47,7 @@ function c18865703.eqop(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoGrave(c,REASON_EFFECT)
return
end
Duel.Equip(tp,c,tc,true)
Duel.Equip(tp,c,tc)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
......
......@@ -56,7 +56,7 @@ function c18967507.eqop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c18967507.eqfilter),tp,LOCATION_GRAVE,0,1,1,nil,tp)
local tc=g:GetFirst()
if tc then
if not Duel.Equip(tp,tc,c,true) then return end
if not Duel.Equip(tp,tc,c) then return end
local e1=Effect.CreateEffect(c)
e1:SetProperty(EFFECT_FLAG_COPY_INHERIT+EFFECT_FLAG_OWNER_RELATE)
e1:SetType(EFFECT_TYPE_SINGLE)
......
......@@ -57,7 +57,7 @@ function c19748583.eqop(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoGrave(c,REASON_EFFECT)
return
end
Duel.Equip(tp,c,tc,true)
Duel.Equip(tp,c,tc)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
......
......@@ -45,7 +45,7 @@ function c20563387.eqop(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoGrave(c,REASON_EFFECT)
return
end
Duel.Equip(tp,c,tc,true)
Duel.Equip(tp,c,tc)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
......
......@@ -67,7 +67,7 @@ function c21140872.eqop(e,tp,eg,ep,ev,re,r,rp)
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,true)
Duel.Equip(tp,tc,c)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
......
......@@ -45,7 +45,7 @@ function c21790410.eqop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c21790410.filter),tp,LOCATION_GRAVE+LOCATION_HAND,0,1,1,nil)
local tc=g:GetFirst()
if tc then
if not Duel.Equip(tp,tc,c,true) then return end
if not Duel.Equip(tp,tc,c) then return end
local e1=Effect.CreateEffect(c)
e1:SetProperty(EFFECT_FLAG_COPY_INHERIT+EFFECT_FLAG_OWNER_RELATE)
e1:SetType(EFFECT_TYPE_SINGLE)
......
......@@ -47,7 +47,7 @@ function c21977828.eqop(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoGrave(c,REASON_EFFECT)
return
end
Duel.Equip(tp,c,tc,true)
Duel.Equip(tp,c,tc)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
......
......@@ -73,7 +73,7 @@ function c22091647.eqop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.SelectMatchingCard(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,aux.ExceptThisCard(e))
local tc=g:GetFirst()
if tc then
if not Duel.Equip(tp,tc,c,true) then return end
if not Duel.Equip(tp,tc,c) then return end
tc:RegisterFlagEffect(22091647,RESET_EVENT+RESETS_STANDARD,0,0)
e:SetLabelObject(tc)
local e1=Effect.CreateEffect(c)
......
......@@ -53,7 +53,7 @@ function c2461031.eqop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c2461031.filter),tp,LOCATION_GRAVE+LOCATION_HAND,0,1,1,nil)
local tc=g:GetFirst()
if tc then
if not Duel.Equip(tp,tc,c,true) then return end
if not Duel.Equip(tp,tc,c) then return end
local e1=Effect.CreateEffect(c)
e1:SetProperty(EFFECT_FLAG_COPY_INHERIT+EFFECT_FLAG_OWNER_RELATE)
e1:SetType(EFFECT_TYPE_SINGLE)
......
......@@ -24,7 +24,7 @@ function c2584136.eqop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end
local tc=c:GetBattleTarget()
if c:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsRelateToBattle() then
Duel.Equip(tp,c,tc,true)
Duel.Equip(tp,c,tc)
--Add Equip limit
local e1=Effect.CreateEffect(tc)
e1:SetType(EFFECT_TYPE_SINGLE)
......
......@@ -48,7 +48,7 @@ function c2602411.eqop(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoGrave(c,REASON_EFFECT)
return
end
Duel.Equip(tp,c,tc,true)
Duel.Equip(tp,c,tc)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
......
......@@ -16,7 +16,7 @@ function c2648201.initial_effect(c)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(2648201,1))
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetCondition(c2648201.spcon)
......@@ -46,7 +46,7 @@ function c2648201.eqop(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoGrave(c,REASON_EFFECT)
return
end
Duel.Equip(tp,c,tc,true)
Duel.Equip(tp,c,tc)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
......
......@@ -50,7 +50,7 @@ function c27548199.eqop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c27548199.eqfilter),tp,LOCATION_GRAVE,0,1,1,nil,tp,c)
local tc=g:GetFirst()
if tc then
if not Duel.Equip(tp,tc,c,true) then return end
if not Duel.Equip(tp,tc,c) then return end
local lk=tc:GetLink()
if lk>0 then
c:AddCounter(0x4b,lk)
......
......@@ -42,7 +42,7 @@ function c27756115.eqop(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoGrave(c,REASON_EFFECT)
return
end
Duel.Equip(tp,c,tc,true)
Duel.Equip(tp,c,tc)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
......
......@@ -39,7 +39,7 @@ function c2830693.eqop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 or tc:IsFacedown() or not tc:IsRelateToEffect(e) then
Duel.SendtoGrave(c,REASON_EFFECT)
else
Duel.Equip(tp,c,tc,true)
Duel.Equip(tp,c,tc)
--Add Equip limit
local e1=Effect.CreateEffect(tc)
e1:SetType(EFFECT_TYPE_SINGLE)
......
......@@ -68,7 +68,7 @@ function c28927782.efop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c28927782.eqfilter2),tp,LOCATION_GRAVE,0,1,1,nil,ec,tp)
local tc=g:GetFirst()
if not tc or not Duel.Equip(tp,tc,ec,true) then return end
if not tc or not Duel.Equip(tp,tc,ec) then return end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
......
......@@ -57,7 +57,7 @@ function c29353756.eqop(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoGrave(c,REASON_EFFECT)
return
end
Duel.Equip(tp,c,tc,true)
Duel.Equip(tp,c,tc)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
......@@ -79,7 +79,7 @@ function c29353756.eqlimit(e,c)
end
function c29353756.negcon(e,tp,eg,ep,ev,re,r,rp)
return rp==1-tp and Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION)==LOCATION_SZONE
and re:IsActiveType(TYPE_TRAP) and Duel.IsChainDisablable(ev)
and re:IsActiveType(TYPE_TRAP) and Duel.IsChainDisablable(ev)
end
function c29353756.negop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,29353756)
......
......@@ -37,7 +37,7 @@ function c29834183.eqop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end
local tc=Duel.GetFirstTarget()
if c:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsRelateToEffect(e) and tc:IsControler(1-tp) then
Duel.Equip(tp,c,tc,true)
Duel.Equip(tp,c,tc)
--Add Equip limit
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
......
......@@ -43,7 +43,7 @@ function c3064425.eqop(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoGrave(c,REASON_EFFECT)
return
end
Duel.Equip(tp,c,tc,true)
Duel.Equip(tp,c,tc)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
......
......@@ -30,7 +30,7 @@ function c31181711.eqop(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoGrave(c,REASON_EFFECT)
return
end
Duel.Equip(tp,c,tc,true)
Duel.Equip(tp,c,tc)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
......
......@@ -35,7 +35,7 @@ function c31563350.eqop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.SelectMatchingCard(tp,c31563350.filter,tp,LOCATION_HAND,0,1,1,nil,tp)
local tc=g:GetFirst()
if tc then
if not Duel.Equip(tp,tc,c,true) then return end
if not Duel.Equip(tp,tc,c) then return end
local e1=Effect.CreateEffect(c)
e1:SetProperty(EFFECT_FLAG_COPY_INHERIT+EFFECT_FLAG_OWNER_RELATE)
e1:SetType(EFFECT_TYPE_SINGLE)
......
......@@ -37,7 +37,7 @@ function c33460840.eqop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c33460840.filter),tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,c)
local tc=g:GetFirst()
if not (tc and Duel.Equip(tp,tc,c,true)) then return end
if not (tc and Duel.Equip(tp,tc,c)) then return end
local atk=tc:GetTextAttack()/2
local def=tc:GetTextDefense()/2
if atk<0 then atk=0 end
......
......@@ -67,7 +67,7 @@ function c33725002.eqop(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoGrave(c,REASON_EFFECT)
return
end
Duel.Equip(tp,c,tc,true)
Duel.Equip(tp,c,tc)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
......
......@@ -40,7 +40,7 @@ function c35800511.eqop(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoGrave(c,REASON_EFFECT)
return
end
Duel.Equip(tp,c,tc,true)
Duel.Equip(tp,c,tc)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
......
......@@ -30,7 +30,7 @@ function c37433748.eqop(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoGrave(c,REASON_EFFECT)
return
end
Duel.Equip(tp,c,tc,true)
Duel.Equip(tp,c,tc)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
......
......@@ -41,7 +41,7 @@ function c38210374.eqop(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoGrave(c,REASON_EFFECT)
return
end
Duel.Equip(tp,c,tc,true)
Duel.Equip(tp,c,tc)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
......
......@@ -48,7 +48,7 @@ function c38450736.eqop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c38450736.filter),tp,LOCATION_GRAVE+LOCATION_HAND,0,1,1,nil)
local tc=g:GetFirst()
if tc then
if not Duel.Equip(tp,tc,c,true) then return end
if not Duel.Equip(tp,tc,c) then return end
local e1=Effect.CreateEffect(c)
e1:SetProperty(EFFECT_FLAG_COPY_INHERIT+EFFECT_FLAG_OWNER_RELATE)
e1:SetType(EFFECT_TYPE_SINGLE)
......
......@@ -45,7 +45,7 @@ function c38601126.eqop(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoGrave(c,REASON_EFFECT)
return
end
Duel.Equip(tp,c,tc,true)
Duel.Equip(tp,c,tc)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
......
......@@ -29,7 +29,7 @@ function c40028305.eqop(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoGrave(c,REASON_EFFECT)
return
end
Duel.Equip(tp,c,tc,true)
Duel.Equip(tp,c,tc)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
......
......@@ -29,7 +29,7 @@ function c40240595.eqop(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoGrave(c,REASON_EFFECT)
return
end
Duel.Equip(tp,c,tc,true)
Duel.Equip(tp,c,tc)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
......
......@@ -41,7 +41,7 @@ function c40941889.eqop(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoGrave(c,REASON_EFFECT)
return
end
Duel.Equip(tp,c,tc,true)
Duel.Equip(tp,c,tc)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
......
......@@ -51,7 +51,7 @@ function c45082499.eqop(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoGrave(c,REASON_EFFECT)
return
end
Duel.Equip(tp,c,tc,true)
Duel.Equip(tp,c,tc)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
......
......@@ -50,7 +50,7 @@ function c4786063.eqop(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoGrave(c,REASON_EFFECT)
return
end
Duel.Equip(tp,c,tc,true)
Duel.Equip(tp,c,tc)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
......
......@@ -74,7 +74,7 @@ function c48948935.eqop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local g=Duel.SelectMatchingCard(tp,c48948935.filter,tp,LOCATION_DECK,0,1,1,nil)
local eqc=g:GetFirst()
if not eqc or not Duel.Equip(tp,eqc,tc,true) then return end
if not eqc or not Duel.Equip(tp,eqc,tc) then return end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
......
......@@ -27,7 +27,7 @@ function c50287060.eqop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end
local tc=Duel.GetFirstTarget()
if c:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsRelateToEffect(e) then
Duel.Equip(tp,c,tc,true)
Duel.Equip(tp,c,tc)
--Add Equip limit
local e1=Effect.CreateEffect(tc)
e1:SetType(EFFECT_TYPE_SINGLE)
......
......@@ -42,7 +42,7 @@ function c52601736.eqop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c52601736.filter),tp,LOCATION_GRAVE+LOCATION_HAND,0,1,1,nil)
local tc=g:GetFirst()
if tc then
if not Duel.Equip(tp,tc,c,true) then return end
if not Duel.Equip(tp,tc,c) then return end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
......
......@@ -102,7 +102,7 @@ function c55742055.operation2(e,tp,eg,ep,ev,re,r,rp)
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local sg=tg:Select(tp,1,1,nil)
Duel.Equip(tp,sg:GetFirst(),tc,true)
Duel.Equip(tp,sg:GetFirst(),tc)
end
end
function c55742055.thfilter(c)
......
......@@ -44,7 +44,7 @@ function c58257569.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=g:GetFirst()
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
Duel.Equip(tp,c,tc,true)
Duel.Equip(tp,c,tc)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
......
......@@ -39,7 +39,7 @@ function c58293343.eqop(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoGrave(c,REASON_EFFECT)
return
end
Duel.Equip(tp,c,tc,true)
Duel.Equip(tp,c,tc)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
......
......@@ -80,7 +80,7 @@ function c60004971.eqop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local g=Duel.SelectMatchingCard(tp,c60004971.eqfilter,tp,LOCATION_DECK,0,1,1,nil)
local tc=g:GetFirst()
if not tc or not Duel.Equip(tp,tc,ec,true) then return end
if not tc or not Duel.Equip(tp,tc,ec) then return end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
......
......@@ -47,7 +47,7 @@ function c6075801.eqop(e,tp,eg,ep,ev,re,r,rp)
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 not Duel.Equip(tp,tc,c,true) then return end
if not Duel.Equip(tp,tc,c) then return end
--Add Equip limit
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
......
......@@ -78,7 +78,7 @@ function c60992364.eqop(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoGrave(c,REASON_EFFECT)
return
end
Duel.Equip(tp,c,tc,true)
Duel.Equip(tp,c,tc)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
......
......@@ -99,6 +99,6 @@ function c61397885.eqop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c61397885.eqfilter),tp,LOCATION_GRAVE+LOCATION_HAND,0,1,1,nil,tc)
local eq=g:GetFirst()
if eq then
Duel.Equip(tp,eq,tc,true)
Duel.Equip(tp,eq,tc)
end
end
......@@ -39,7 +39,7 @@ function c62878208.eqop(e,tp,eg,ep,ev,re,r,rp)
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 Duel.Equip(tp,eq,tc)==0 then return end
if not Duel.Equip(tp,eq,tc) then return end
Duel.BreakEffect()
local a=eqc
local d=tc
......
......@@ -46,7 +46,7 @@ function c6330307.eqop(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoGrave(c,REASON_EFFECT)
return
end
Duel.Equip(tp,c,tc,true)
Duel.Equip(tp,c,tc)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
......
......@@ -50,7 +50,7 @@ function c65844845.eqop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 or tc:IsFacedown() or not tc:IsRelateToEffect(e) then
return
end
Duel.Equip(tp,c,tc,true)
Duel.Equip(tp,c,tc)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
......
......@@ -54,7 +54,7 @@ function c66066482.eqop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c66066482.filter),tp,LOCATION_GRAVE+LOCATION_HAND,0,1,1,nil)
local tc=g:GetFirst()
if tc then
if not Duel.Equip(tp,tc,c,true) then return end
if not Duel.Equip(tp,tc,c) then return end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
......
......@@ -37,7 +37,7 @@ function c66451379.eqop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end
local tc=Duel.GetFirstTarget()
if c:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsRelateToEffect(e) and tc:IsControler(1-tp) then
Duel.Equip(tp,c,tc,true)
Duel.Equip(tp,c,tc)
--Add Equip limit
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
......
......@@ -45,7 +45,7 @@ function c68184115.eqop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c68184115.filter),tp,LOCATION_GRAVE+LOCATION_HAND,0,1,1,nil)
local tc=g:GetFirst()
if tc then
if not Duel.Equip(tp,tc,c,true) then return end
if not Duel.Equip(tp,tc,c) then return end
local e1=Effect.CreateEffect(c)
e1:SetProperty(EFFECT_FLAG_COPY_INHERIT+EFFECT_FLAG_OWNER_RELATE)
e1:SetType(EFFECT_TYPE_SINGLE)
......
......@@ -54,7 +54,7 @@ function c69207766.eqop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c69207766.filter),tp,LOCATION_GRAVE+LOCATION_HAND,0,1,1,nil)
local tc=g:GetFirst()
if tc then
if not Duel.Equip(tp,tc,c,true) then return end
if not Duel.Equip(tp,tc,c) then return end
local e1=Effect.CreateEffect(c)
e1:SetProperty(EFFECT_FLAG_COPY_INHERIT+EFFECT_FLAG_OWNER_RELATE)
e1:SetType(EFFECT_TYPE_SINGLE)
......
......@@ -33,7 +33,7 @@ function c70913714.eqop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end
local tc=Duel.GetFirstTarget()
if c:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsRelateToEffect(e) then
Duel.Equip(tp,c,tc,true)
Duel.Equip(tp,c,tc)
--Add Equip limit
local e1=Effect.CreateEffect(tc)
e1:SetType(EFFECT_TYPE_SINGLE)
......
......@@ -53,7 +53,7 @@ function c76080032.eqop(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoGrave(c,REASON_EFFECT)
return
end
Duel.Equip(tp,c,tc,true)
Duel.Equip(tp,c,tc)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
......
......@@ -49,7 +49,7 @@ function c76218313.eqop(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoGrave(c,REASON_EFFECT)
return
end
Duel.Equip(tp,c,tc,true)
Duel.Equip(tp,c,tc)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
......
......@@ -48,7 +48,7 @@ function c77679716.eqop(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoGrave(c,REASON_EFFECT)
return
end
Duel.Equip(tp,c,tc,true)
Duel.Equip(tp,c,tc)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
......
......@@ -57,7 +57,7 @@ function c77693536.eqop(e,tp,eg,ep,ev,re,r,rp)
if c:IsFaceup() and c:IsRelateToEffect(e) then
local atk=tc:GetTextAttack()
if atk<0 then atk=0 end
if Duel.Equip(tp,tc,c)==0 then return end
if not Duel.Equip(tp,tc,c) then return end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_EQUIP)
e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE+EFFECT_FLAG_OWNER_RELATE)
......
......@@ -38,7 +38,7 @@ function c80769747.eqop(e,tp,eg,ep,ev,re,r,rp)
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,true)
Duel.Equip(tp,c,tc)
--Add Equip limit
local e1=Effect.CreateEffect(tc)
e1:SetType(EFFECT_TYPE_SINGLE)
......
......@@ -49,7 +49,7 @@ function c81471108.eqop(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoGrave(c,REASON_EFFECT)
return
end
Duel.Equip(tp,c,tc,true)
Duel.Equip(tp,c,tc)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
......
......@@ -50,7 +50,7 @@ function c81570454.eqop(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoGrave(c,REASON_EFFECT)
return
end
Duel.Equip(tp,c,tc,true)
Duel.Equip(tp,c,tc)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
......
......@@ -67,7 +67,7 @@ function c82962242.eqop(e,tp,eg,ep,ev,re,r,rp)
if c:IsFaceup() and c:IsRelateToEffect(e) then
local atk=tc:GetTextAttack()
if tc:IsFacedown() or atk<0 then atk=0 end
if Duel.Equip(tp,tc,c)==0 then return end
if not Duel.Equip(tp,tc,c) then return end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_EQUIP)
e1:SetCode(EFFECT_UPDATE_ATTACK)
......
......@@ -53,7 +53,7 @@ function c83519853.operation(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.SelectMatchingCard(tp,c83519853.filter,tp,LOCATION_DECK,0,1,1,nil,c)
local tc=g:GetFirst()
if tc then
Duel.Equip(tp,tc,c,true)
Duel.Equip(tp,tc,c)
end
end
function c83519853.regcon(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -59,7 +59,7 @@ function c84769941.eqop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c84769941.eqfilter),tp,LOCATION_GRAVE+LOCATION_HAND,0,1,1,nil)
local tc=g:GetFirst()
if tc then
if not Duel.Equip(tp,tc,c,true) then return end
if not Duel.Equip(tp,tc,c) then return end
tc:RegisterFlagEffect(84769941,RESET_EVENT+RESETS_STANDARD,0,0)
local e1=Effect.CreateEffect(c)
e1:SetProperty(EFFECT_FLAG_COPY_INHERIT+EFFECT_FLAG_OWNER_RELATE)
......
......@@ -44,7 +44,7 @@ function c87008374.eqop(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoGrave(c,REASON_EFFECT)
return
end
Duel.Equip(tp,c,tc,true)
Duel.Equip(tp,c,tc)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
......
......@@ -42,7 +42,7 @@ function c89132148.eqop(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoGrave(c,REASON_EFFECT)
return
end
Duel.Equip(tp,c,tc,true)
Duel.Equip(tp,c,tc)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
......
......@@ -41,7 +41,7 @@ function c90361010.eqop(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoGrave(c,REASON_EFFECT)
return
end
Duel.Equip(tp,c,tc,true)
Duel.Equip(tp,c,tc)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
......
......@@ -37,7 +37,7 @@ function c93445074.eqop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end
local tc=Duel.GetFirstTarget()
if c:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsRelateToEffect(e) and tc:IsControler(1-tp) then
Duel.Equip(tp,c,tc,true)
Duel.Equip(tp,c,tc)
--Add Equip limit
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
......
......@@ -40,7 +40,7 @@ function c93969023.eqop(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoGrave(c,REASON_EFFECT)
return
end
Duel.Equip(tp,c,tc,true)
Duel.Equip(tp,c,tc)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
......
......@@ -95,7 +95,7 @@ function c94207108.eqop(mc)
return
function (e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject()
if Duel.Equip(tp,tc,mc)==0 then return end
if not Duel.Equip(tp,tc,mc) then return end
local e1=Effect.CreateEffect(mc)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
......
......@@ -47,7 +47,7 @@ function c94573223.eqop(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoGrave(c,REASON_EFFECT)
return
end
Duel.Equip(tp,c,tc,true)
Duel.Equip(tp,c,tc)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
......
......@@ -50,7 +50,7 @@ function c95395761.eqop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c95395761.filter),tp,LOCATION_GRAVE+LOCATION_HAND,0,1,1,nil)
local tc=g:GetFirst()
if tc then
if not Duel.Equip(tp,tc,c,true) then return end
if not Duel.Equip(tp,tc,c) then return end
local e1=Effect.CreateEffect(c)
e1:SetProperty(EFFECT_FLAG_COPY_INHERIT+EFFECT_FLAG_OWNER_RELATE)
e1:SetType(EFFECT_TYPE_SINGLE)
......
......@@ -29,7 +29,7 @@ function c95500396.eqop(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoGrave(c,REASON_EFFECT)
return
end
Duel.Equip(tp,c,tc,true)
Duel.Equip(tp,c,tc)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
......
......@@ -39,7 +39,7 @@ function c97904474.eqop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end
local tc=c:GetBattleTarget()
if c:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsRelateToBattle() then
Duel.Equip(tp,c,tc,true)
Duel.Equip(tp,c,tc)
--Add Equip limit
local e1=Effect.CreateEffect(tc)
e1:SetType(EFFECT_TYPE_SINGLE)
......
......@@ -47,7 +47,7 @@ function c98371278.eqop(e,tp,eg,ep,ev,re,r,rp)
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,true)
Duel.Equip(tp,tc1,tc2)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
......
......@@ -49,7 +49,7 @@ function c99659159.operation(e,tp,eg,ep,ev,re,r,rp)
local sg=Duel.SelectMatchingCard(tp,c99659159.filter,tp,LOCATION_HAND,0,1,1,nil)
if sg:GetCount()==0 then return end
local sc=sg:GetFirst()
Duel.Equip(tp,sc,tc,true)
Duel.Equip(tp,sc,tc)
local e1=Effect.CreateEffect(e:GetHandler())
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