Commit c98bd80e authored by GuGu's avatar GuGu

Update c74561066.lua

parent 4bc2ab0a
Pipeline #33322 passed with stage
in 15 seconds
...@@ -79,20 +79,20 @@ function cCardno.baop(e,tp,eg,ep,ev,re,r,rp) ...@@ -79,20 +79,20 @@ function cCardno.baop(e,tp,eg,ep,ev,re,r,rp)
end end
end end
--SPSUMMON_SUCCESS --SPSUMMON_SUCCESS
function cCardno.spfilter(c) function cCardno.spfilter(c,tp,ec)
return c:IsSetCard(0x201) return c:IsSetCard(0x201) and c:CheckUniqueOnField(tp) and c:CheckEquipTarget(ec)
end end
function cCardno.spcon(e,tp,eg,ep,ev,re,r,rp) function cCardno.spcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetSummonType()==SUMMON_TYPE_SYNCHRO return e:GetHandler():GetSummonType()==SUMMON_TYPE_SYNCHRO
end end
function cCardno.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function cCardno.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 and Duel.IsExistingMatchingCard(cCardno.spfilter,tp,LOCATION_GRAVE,0,1,nil) end if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 and Duel.IsExistingMatchingCard(cCardno.spfilter,tp,LOCATION_GRAVE,0,1,nil,tp,e:GetHandler()) end
end end
function cCardno.spop(e,tp,eg,ep,ev,re,r,rp) function cCardno.spop(e,tp,eg,ep,ev,re,r,rp)
local c = e:GetHandler() local c = e:GetHandler()
if c:IsRelateToEffect(e) and c:IsFaceup() and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 and Duel.IsExistingMatchingCard(cCardno.spfilter,tp,LOCATION_GRAVE,0,1,nil) then if c:IsRelateToEffect(e) and c:IsFaceup() and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 and Duel.IsExistingMatchingCard(cCardno.spfilter,tp,LOCATION_GRAVE,0,1,nil,tp,e:GetHandler()) then
local num=0 local num=0
local equip_count=Duel.GetMatchingGroupCount(cCardno.spfilter,tp,LOCATION_GRAVE,0,nil) local equip_count=Duel.GetMatchingGroupCount(cCardno.spfilter,tp,LOCATION_GRAVE,0,nil,tp,e:GetHandler())
local szong_count=Duel.GetLocationCount(tp,LOCATION_SZONE) local szong_count=Duel.GetLocationCount(tp,LOCATION_SZONE)
local hand_count=Duel.GetMatchingGroupCount(Card.IsDiscardable,tp,LOCATION_HAND,0,nil,REASON_EFFECT) local hand_count=Duel.GetMatchingGroupCount(Card.IsDiscardable,tp,LOCATION_HAND,0,nil,REASON_EFFECT)
if hand_count>0 then if hand_count>0 then
...@@ -102,7 +102,7 @@ function cCardno.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -102,7 +102,7 @@ function cCardno.spop(e,tp,eg,ep,ev,re,r,rp)
num=num+1 num=num+1
local can_equip=math.min(szong_count,num) local can_equip=math.min(szong_count,num)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local eg=Duel.SelectMatchingCard(tp,cCardno.spfilter,tp,LOCATION_GRAVE,0,1,can_equip,nil) local eg=Duel.SelectMatchingCard(tp,cCardno.spfilter,tp,LOCATION_GRAVE,0,1,can_equip,nil,tp,e:GetHandler())
local tc=eg:GetFirst() local tc=eg:GetFirst()
while tc do while tc do
Duel.Equip(tp,tc,c) Duel.Equip(tp,tc,c)
......
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