Commit 633ce1d8 authored by wind2009's avatar wind2009

script fix

parent 2f0a0e52
...@@ -127,9 +127,6 @@ function s.fop(e,tp,eg,ep,ev,re,r,rp) ...@@ -127,9 +127,6 @@ function s.fop(e,tp,eg,ep,ev,re,r,rp)
tc:CompleteProcedure() tc:CompleteProcedure()
end end
end end
function s.fcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetEquipTarget()
end
function s.tokentg(e,tp,eg,ep,ev,re,r,rp,chk) function s.tokentg(e,tp,eg,ep,ev,re,r,rp,chk)
local tc=e:GetHandler():GetEquipTarget() local tc=e:GetHandler():GetEquipTarget()
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
......
...@@ -53,7 +53,7 @@ function s.toop(e,tp,eg,ep,ev,re,r,rp) ...@@ -53,7 +53,7 @@ function s.toop(e,tp,eg,ep,ev,re,r,rp)
if tc then Duel.MoveToField(tc,tp,tp,LOCATION_SZONE,POS_FACEUP,true) end if tc then Duel.MoveToField(tc,tp,tp,LOCATION_SZONE,POS_FACEUP,true) end
end end
function s.cfilter(c,tp) function s.cfilter(c,tp)
return c:IsFaceup() and c:IsCode(id) return c:IsFaceup() and c:IsCode(id) and c:IsAbleToGraveAsCost()
end end
function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk) function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
......
...@@ -88,18 +88,18 @@ function s.eqcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -88,18 +88,18 @@ function s.eqcon(e,tp,eg,ep,ev,re,r,rp)
end end
function s.eqtg(e,tp,eg,ep,ev,re,r,rp,chk) function s.eqtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingMatchingCard(s.eqfilter,tp,LOCATION_MZONE,0,1,nil,e:GetHandler()) end and Duel.IsExistingMatchingCard(s.eqfilter,tp,LOCATION_MZONE,0,1,nil,e:GetHandler(),tp) end
Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0)
end end
function s.eqfilter(c,ec) function s.eqfilter(c,ec,tp)
return c:IsType(TYPE_XYZ) and c:IsFaceup() return c:IsType(TYPE_XYZ) and c:IsFaceup()
and ec:CheckEquipTarget(c) and ec:CheckUniqueOnField(tp,LOCATION_SZONE) and not ec:IsForbidden() and ec:CheckEquipTarget(c) and ec:CheckUniqueOnField(tp,LOCATION_SZONE) and not ec:IsForbidden()
end end
function s.eqop(e,tp,eg,ep,ev,re,r,rp) function s.eqop(e,tp,eg,ep,ev,re,r,rp)
local ec=e:GetHandler() local ec=e:GetHandler()
if ec:IsRelateToEffect(e) and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 and Duel.IsExistingMatchingCard(s.eqfilter,tp,LOCATION_MZONE,0,1,nil,ec) then if ec:IsRelateToEffect(e) and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 and Duel.IsExistingMatchingCard(s.eqfilter,tp,LOCATION_MZONE,0,1,nil,ec,tp) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local tg=Duel.SelectMatchingCard(tp,s.eqfilter,tp,LOCATION_MZONE,0,1,1,nil,ec) local tg=Duel.SelectMatchingCard(tp,s.eqfilter,tp,LOCATION_MZONE,0,1,1,nil,ec,tp)
Duel.HintSelection(tg) Duel.HintSelection(tg)
Duel.Equip(tp,ec,tg:GetFirst()) Duel.Equip(tp,ec,tg:GetFirst())
end 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