Commit 10abb648 authored by Nemo Ma's avatar Nemo Ma

fix

parent bb2db5d6
...@@ -42,10 +42,10 @@ function c115031.spcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -42,10 +42,10 @@ function c115031.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c115031.myfilter,tp,LOCATION_PZONE,0,1,e:GetHandler()) return Duel.IsExistingMatchingCard(c115031.myfilter,tp,LOCATION_PZONE,0,1,e:GetHandler())
end end
function c115031.myfilter(c) function c115031.myfilter(c)
return c:IsSetCard(0x87af) or (_G["c"..c:GetCode()] and _G["c"..c:GetCode()].named_with_Arknight) return c:IsSetCard(0x87af) or (_G["c"..c:GetCode()] and _G["c"..c:GetCode()].named_with_Arknight) and c:IsType(TYPE_PENDULUM)
end end
function c115031.spfil(c,e,tp) function c115031.spfil(c,e,tp)
return (c:IsSetCard(0x87af) or (_G["c"..c:GetCode()] and _G["c"..c:GetCode()].named_with_Arknight)) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and ((c:IsLocation(LOCATION_HAND+LOCATION_GRAVE) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0) or (c:IsLocation(LOCATION_EXTRA) and c:IsFaceup() and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0 )) return c:IsType(TYPE_PENDULUM) and (c:IsSetCard(0x87af) or (_G["c"..c:GetCode()] and _G["c"..c:GetCode()].named_with_Arknight)) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and ((c:IsLocation(LOCATION_HAND+LOCATION_GRAVE) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0) or (c:IsLocation(LOCATION_EXTRA) and c:IsFaceup() and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0 ))
end end
function c115031.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c115031.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c115031.myfilter,tp,LOCATION_PZONE,0,1,nil) and Duel.IsExistingMatchingCard(nil,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,nil) and Duel.IsExistingMatchingCard(c115031.spfil,tp,LOCATION_HAND+LOCATION_GRAVE+LOCATION_EXTRA,0,1,nil,e,tp) end if chk==0 then return Duel.IsExistingMatchingCard(c115031.myfilter,tp,LOCATION_PZONE,0,1,nil) and Duel.IsExistingMatchingCard(nil,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,nil) and Duel.IsExistingMatchingCard(c115031.spfil,tp,LOCATION_HAND+LOCATION_GRAVE+LOCATION_EXTRA,0,1,nil,e,tp) end
......
...@@ -85,19 +85,23 @@ function cm.top(e,tp) ...@@ -85,19 +85,23 @@ function cm.top(e,tp)
local g=Duel.GetOperatedGroup() local g=Duel.GetOperatedGroup()
local sg=g:Filter(Card.IsLocation,nil,LOCATION_GRAVE) local sg=g:Filter(Card.IsLocation,nil,LOCATION_GRAVE)
Duel.BreakEffect() Duel.BreakEffect()
if sg:GetClassCount(Card.GetCode)==#sg and sg:IsExists(cm.rfilter2,1,nil) then if sg:GetClassCount(Card.GetCode)==#sg then
local rg=sg:Filter(cm.rfilter2,nil) local rct=sg:FilterCount(cm.rfilter2,nil)
local num=Duel.GetMatchingGroupCount(Card.IsAbleToHand,tp,0,LOCATION_ONFIELD,nil)
if rct==0 or num==0 then return end
if rct>num then rct=num end
if not Duel.SelectYesNo(tp,aux.Stringid(9910024,0)) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg1=Duel.SelectMatchingCard(tp,Card.IsAbleToHand,tp,0,LOCATION_ONFIELD,1,#rg,nil) local sg1=Duel.SelectMatchingCard(tp,Card.IsAbleToHand,tp,0,LOCATION_ONFIELD,1,rct,nil)
if sg1:GetCount()>0 then if sg1:GetCount()>0 then
Duel.SendtoHand(sg1,nil,REASON_EFFECT) Duel.SendtoHand(sg1,nil,REASON_EFFECT)
end end
else else
local num=Duel.GetMatchingGroupCount(Card.IsAbleToGrave,tp,LOCATION_HAND+LOCATION_ONFIELD,0,nil) local num=Duel.GetMatchingGroupCount(Card.IsAbleToGrave,tp,LOCATION_HAND+LOCATION_ONFIELD,0,nil)
if num<1 then return end if num<1 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) if num>#sg then num=#sg end
local sg1=Duel.SelectMatchingCard(Card.IsAbleToHand,tp,LOCATION_ONFIELD+LOCATION_HAND,0,num,#sg,nil) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local sg1=Duel.SelectMatchingCard(tp,Card.IsAbleToGrave,tp,LOCATION_ONFIELD+LOCATION_HAND,0,num,num,nil)
if sg1:GetCount()>0 then if sg1:GetCount()>0 then
Duel.SendtoGrave(sg1,REASON_EFFECT) Duel.SendtoGrave(sg1,REASON_EFFECT)
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