Commit d3be0180 authored by mercury233's avatar mercury233

fix

parent fb68361b
...@@ -32,28 +32,32 @@ end ...@@ -32,28 +32,32 @@ end
function c101102006.cfilter(c) function c101102006.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 c101102006.fselect(g,e,tp) function c101102006.fselect(g,tg)
return Duel.IsExistingMatchingCard(c101102006.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,g:GetCount()) return tg:IsExists(Card.IsLink,1,nil,#g)
end end
function c101102006.spfilter(c,e,tp,lk) function c101102006.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 c101102006.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c101102006.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local cg=Duel.GetMatchingGroup(c101102006.cfilter,tp,LOCATION_GRAVE,0,nil)
local tg=Duel.GetMatchingGroup(c101102006.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(c101102006.cfilter,tp,LOCATION_GRAVE,0,nil) if #tg==0 then return false end
local ct=cg:GetCount() return cg:CheckSubGroup(c101102006.fselect,1,maxlink,tg)
return cg:CheckSubGroup(c101102006.fselect,1,ct,e,tp)
end end
local cg=Duel.GetMatchingGroup(c101102006.cfilter,tp,LOCATION_GRAVE,0,nil) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local ct=cg:GetCount() local rg=cg:SelectSubGroup(tp,c101102006.fselect,false,1,maxlink,tg)
local rg=cg:SelectSubGroup(tp,c101102006.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 c101102006.spfilter1(c,e,tp,lk)
return c101102006.spfilter(c,e,tp) and c:IsLink(lk)
end
function c101102006.spop(e,tp,eg,ep,ev,re,r,rp) function c101102006.spop(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
...@@ -67,7 +71,7 @@ function c101102006.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -67,7 +71,7 @@ function c101102006.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,c101102006.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,lk) local g=Duel.SelectMatchingCard(tp,c101102006.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)
......
...@@ -50,42 +50,46 @@ end ...@@ -50,42 +50,46 @@ end
function c101102007.cfilter1(c) function c101102007.cfilter1(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 c101102007.fselect(g,e,tp) function c101102007.fselect(g,tg)
return Duel.IsExistingMatchingCard(c101102007.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,g:GetCount()) return tg:IsExists(Card.IsLink,1,nil,#g)
end end
function c101102007.spfilter(c,e,tp,lk) function c101102007.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 c101102007.sptg1(e,tp,eg,ep,ev,re,r,rp,chk) function c101102007.sptg1(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local cg=Duel.GetMatchingGroup(c101102007.cfilter1,tp,LOCATION_GRAVE,0,nil)
local tg=Duel.GetMatchingGroup(c101102007.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(c101102007.cfilter1,tp,LOCATION_GRAVE,0,nil) if #tg==0 then return false end
local ct=cg:GetCount() return cg:CheckSubGroup(c101102007.fselect,1,maxlink,tg)
return cg:CheckSubGroup(c101102007.fselect,1,ct,e,tp)
end end
local cg=Duel.GetMatchingGroup(c101102007.cfilter1,tp,LOCATION_GRAVE,0,nil) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local ct=cg:GetCount() local rg=cg:SelectSubGroup(tp,c101102007.fselect,false,1,maxlink,tg)
local rg=cg:SelectSubGroup(tp,c101102007.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 c101102007.spfilter1(c,e,tp,lk)
return c101102007.spfilter(c,e,tp) and c:IsLink(lk)
end
function c101102007.spop1(e,tp,eg,ep,ev,re,r,rp) function c101102007.spop1(e,tp,eg,ep,ev,re,r,rp)
local e2=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL) e1:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL)
e2:SetProperty(EFFECT_FLAG_SET_AVAILABLE+EFFECT_FLAG_IGNORE_IMMUNE) e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE+EFFECT_FLAG_IGNORE_IMMUNE)
e2:SetTargetRange(0xff,0xff) e1:SetTargetRange(0xff,0xff)
e2:SetTarget(aux.NOT(aux.TargetBoolFunction(Card.IsRace,RACE_BEAST+RACE_BEASTWARRIOR+RACE_WINDBEAST))) e1:SetTarget(aux.NOT(aux.TargetBoolFunction(Card.IsRace,RACE_BEAST+RACE_BEASTWARRIOR+RACE_WINDBEAST)))
e2:SetValue(c101102007.sumlimit) e1:SetValue(c101102007.sumlimit)
e2:SetReset(RESET_PHASE+PHASE_END) e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp) Duel.RegisterEffect(e1,tp)
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,c101102007.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,lk) local g=Duel.SelectMatchingCard(tp,c101102007.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)
......
...@@ -59,7 +59,6 @@ function c101102008.spfilter(c,e,tp) ...@@ -59,7 +59,6 @@ function c101102008.spfilter(c,e,tp)
and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0 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 cg=Duel.GetMatchingGroup(c101102008.cfilter,tp,LOCATION_GRAVE,0,nil) 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 tg=Duel.GetMatchingGroup(c101102008.spfilter,tp,LOCATION_EXTRA,0,nil,e,tp)
local _,maxlink=tg:GetMaxGroup(Card.GetLink) local _,maxlink=tg:GetMaxGroup(Card.GetLink)
...@@ -79,15 +78,15 @@ function c101102008.spfilter1(c,e,tp,lk) ...@@ -79,15 +78,15 @@ function c101102008.spfilter1(c,e,tp,lk)
return c101102008.spfilter(c,e,tp) and c:IsLink(lk) return c101102008.spfilter(c,e,tp) and c:IsLink(lk)
end 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 e1=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL) e1:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL)
e2:SetProperty(EFFECT_FLAG_SET_AVAILABLE+EFFECT_FLAG_IGNORE_IMMUNE) e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE+EFFECT_FLAG_IGNORE_IMMUNE)
e2:SetTargetRange(0xff,0xff) e1:SetTargetRange(0xff,0xff)
e2:SetTarget(aux.NOT(aux.TargetBoolFunction(Card.IsRace,RACE_BEAST+RACE_BEASTWARRIOR+RACE_WINDBEAST))) e1:SetTarget(aux.NOT(aux.TargetBoolFunction(Card.IsRace,RACE_BEAST+RACE_BEASTWARRIOR+RACE_WINDBEAST)))
e2:SetValue(c101102008.sumlimit) e1:SetValue(c101102008.sumlimit)
e2:SetReset(RESET_PHASE+PHASE_END) e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp) Duel.RegisterEffect(e1,tp)
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)
......
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