Commit fb68361b authored by mercury233's avatar mercury233

fix

parent 5112841a
...@@ -51,28 +51,33 @@ end ...@@ -51,28 +51,33 @@ end
function c101102008.cfilter(c) function c101102008.cfilter(c)
return c:IsRace(RACE_BEAST+RACE_BEASTWARRIOR+RACE_WINDBEAST) and c:IsAbleToRemoveAsCost() return c:IsRace(RACE_BEAST+RACE_BEASTWARRIOR+RACE_WINDBEAST) and c:IsAbleToRemoveAsCost()
end end
function c101102008.fselect(g,e,tp) function c101102008.fselect(g,tg)
return Duel.IsExistingMatchingCard(c101102008.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,g:GetCount()) return tg:IsExists(Card.IsLink,1,nil,#g)
end end
function c101102008.spfilter(c,e,tp,lk) function c101102008.spfilter(c,e,tp)
return c:IsRace(RACE_BEAST+RACE_BEASTWARRIOR+RACE_WINDBEAST) and c:IsLink(lk) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0 return c:IsType(TYPE_LINK) and c:IsRace(RACE_BEAST+RACE_BEASTWARRIOR+RACE_WINDBEAST)
and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0
end end
function c101102008.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c101102008.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
local cg=Duel.GetMatchingGroup(c101102008.cfilter,tp,LOCATION_GRAVE,0,nil)
local tg=Duel.GetMatchingGroup(c101102008.spfilter,tp,LOCATION_EXTRA,0,nil,e,tp)
local _,maxlink=tg:GetMaxGroup(Card.GetLink)
if chk==0 then if chk==0 then
if e:GetLabel()~=100 then return false end if e:GetLabel()~=100 then return false end
e:SetLabel(0) e:SetLabel(0)
local cg=Duel.GetMatchingGroup(c101102008.cfilter,tp,LOCATION_GRAVE,0,nil) if #tg==0 then return false end
local ct=cg:GetCount() return cg:CheckSubGroup(c101102008.fselect,1,maxlink,tg)
return cg:CheckSubGroup(c101102008.fselect,1,ct,e,tp)
end end
local cg=Duel.GetMatchingGroup(c101102008.cfilter,tp,LOCATION_GRAVE,0,nil) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local ct=cg:GetCount() local rg=cg:SelectSubGroup(tp,c101102008.fselect,false,1,maxlink,tg)
local rg=cg:SelectSubGroup(tp,c101102008.fselect,false,1,ct,e,tp,ct)
Duel.Remove(rg,POS_FACEUP,REASON_COST) Duel.Remove(rg,POS_FACEUP,REASON_COST)
e:SetLabel(rg:GetCount()) e:SetLabel(rg:GetCount())
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end end
function c101102008.spfilter1(c,e,tp,lk)
return c101102008.spfilter(c,e,tp) and c:IsLink(lk)
end
function c101102008.spop(e,tp,eg,ep,ev,re,r,rp) function c101102008.spop(e,tp,eg,ep,ev,re,r,rp)
local e2=Effect.CreateEffect(e:GetHandler()) local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_FIELD) e2:SetType(EFFECT_TYPE_FIELD)
...@@ -86,7 +91,7 @@ function c101102008.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -86,7 +91,7 @@ function c101102008.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
local lk=e:GetLabel() local lk=e:GetLabel()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c101102008.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,lk) local g=Duel.SelectMatchingCard(tp,c101102008.spfilter1,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,lk)
local tc=g:GetFirst() local tc=g:GetFirst()
if tc then if tc then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
......
...@@ -39,11 +39,12 @@ function c101102043.rmfilter(c) ...@@ -39,11 +39,12 @@ function c101102043.rmfilter(c)
end end
function c101102043.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c101102043.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return false end if chkc then return false end
if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToRemove,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil) and Duel.IsExistingTarget(c101102043.rmfilter,tp,0,LOCATION_ONFIELD,1,nil) end if chk==0 then return Duel.IsExistingTarget(c101102043.rmfilter,tp,0,LOCATION_ONFIELD,1,nil)
and Duel.IsExistingTarget(Card.IsAbleToRemove,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g1=Duel.SelectTarget(tp,Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD,1,1,nil) local g1=Duel.SelectTarget(tp,c101102043.rmfilter,tp,0,LOCATION_ONFIELD,1,1,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g2=Duel.SelectTarget(tp,c101102043.rmfilter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,1,nil) local g2=Duel.SelectTarget(tp,Card.IsAbleToRemove,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,1,nil)
g1:Merge(g2) g1:Merge(g2)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g1,g1:GetCount(),0,0) Duel.SetOperationInfo(0,CATEGORY_REMOVE,g1,g1:GetCount(),0,0)
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