Commit ece8728c authored by DailyShana's avatar DailyShana

fix

parent 3ad71ae1
......@@ -43,17 +43,17 @@ end
function c14799437.spfilter(c)
return c:IsSetCard(0xbb) and c:IsType(TYPE_MONSTER) and c:IsAbleToRemoveAsCost()
end
function c14799437.sumfilter(c)
return c:IsFaceup() and c:IsType(TYPE_EFFECT)
end
function c14799437.lv_or_rk(c)
if c:IsType(TYPE_XYZ) then Debug.Message(c:GetRank()) return c:GetRank()
else Debug.Message(c:GetLevel()) return c:GetLevel() end
end
function c14799437.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
local sum=0
for i=0,4 do
local tc=Duel.GetFieldCard(tp,LOCATION_MZONE,i)
if tc and tc:IsFaceup() and tc:IsType(TYPE_EFFECT) then
if tc:IsType(TYPE_XYZ) then sum=sum+tc:GetRank()
else sum=sum+tc:GetLevel() end
end
end
local sum=Duel.GetMatchingGroup(c14799437.sumfilter,tp,LOCATION_MZONE,0,nil):GetSum(c14799437.lv_or_rk)
if sum>8 then return false end
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if ft<-2 then return false end
......
......@@ -45,12 +45,7 @@ function c15335853.initial_effect(c)
end
function c15335853.lvval(e,c)
local tp=c:GetControler()
local lv=0
for i=0,4 do
local tc=Duel.GetFieldCard(tp,LOCATION_MZONE,i)
if tc and tc:IsCode(31533705) then lv=lv+tc:GetLevel() end
end
return lv
return Duel.GetMatchingGroup(Card.IsCode,tp,LOCATION_MZONE,0,nil,31533705):GetSum(Card.GetLevel)
end
function c15335853.indcon(e)
return Duel.IsExistingMatchingCard(Card.IsType,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil,TYPE_TOKEN)
......
......@@ -34,12 +34,7 @@ function c16943770.initial_effect(c)
end
function c16943770.lvval(e,c)
local tp=c:GetControler()
local lv=0
for i=0,4 do
local tc=Duel.GetFieldCard(tp,LOCATION_MZONE,i)
if tc and tc:IsCode(31533705) then lv=lv+tc:GetLevel() end
end
return lv
return Duel.GetMatchingGroup(Card.IsCode,tp,LOCATION_MZONE,0,nil,31533705):GetSum(Card.GetLevel)
end
function c16943770.indcon(e)
return Duel.IsExistingMatchingCard(Card.IsType,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil,TYPE_TOKEN)
......
......@@ -47,12 +47,7 @@ function c20368763.initial_effect(c)
end
function c20368763.lvval(e,c)
local tp=c:GetControler()
local lv=0
for i=0,4 do
local tc=Duel.GetFieldCard(tp,LOCATION_MZONE,i)
if tc and tc:IsCode(31533705) then lv=lv+tc:GetLevel() end
end
return lv
return Duel.GetMatchingGroup(Card.IsCode,tp,LOCATION_MZONE,0,nil,31533705):GetSum(Card.GetLevel)
end
function c20368763.indcon(e)
return Duel.IsExistingMatchingCard(Card.IsType,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil,TYPE_TOKEN)
......
......@@ -41,17 +41,17 @@ end
function c23440231.spfilter(c)
return c:IsSetCard(0xbb) and c:IsType(TYPE_MONSTER) and c:IsAbleToRemoveAsCost()
end
function c23440231.sumfilter(c)
return c:IsFaceup() and c:IsType(TYPE_EFFECT)
end
function c23440231.lv_or_rk(c)
if c:IsType(TYPE_XYZ) then return c:GetRank()
else return c:GetLevel() end
end
function c23440231.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
local sum=0
for i=0,4 do
local tc=Duel.GetFieldCard(tp,LOCATION_MZONE,i)
if tc and tc:IsFaceup() and tc:IsType(TYPE_EFFECT) then
if tc:IsType(TYPE_XYZ) then sum=sum+tc:GetRank()
else sum=sum+tc:GetLevel() end
end
end
local sum=Duel.GetMatchingGroup(c23440231.sumfilter,tp,LOCATION_MZONE,0,nil):GetSum(c23440231.lv_or_rk)
if sum>8 then return false end
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if ft<-2 then return false end
......
......@@ -43,17 +43,17 @@ end
function c25811989.spfilter(c)
return c:IsSetCard(0xbb) and c:IsType(TYPE_MONSTER) and c:IsAbleToRemoveAsCost()
end
function c25811989.sumfilter(c)
return c:IsFaceup() and c:IsType(TYPE_EFFECT)
end
function c25811989.lv_or_rk(c)
if c:IsType(TYPE_XYZ) then return c:GetRank()
else return c:GetLevel() end
end
function c25811989.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
local sum=0
for i=0,4 do
local tc=Duel.GetFieldCard(tp,LOCATION_MZONE,i)
if tc and tc:IsFaceup() and tc:IsType(TYPE_EFFECT) then
if tc:IsType(TYPE_XYZ) then sum=sum+tc:GetRank()
else sum=sum+tc:GetLevel() end
end
end
local sum=Duel.GetMatchingGroup(c25811989.sumfilter,tp,LOCATION_MZONE,0,nil):GetSum(c25811989.lv_or_rk)
if sum>8 then return false end
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if ft<-1 then return false end
......
......@@ -45,17 +45,17 @@ end
function c26034577.spfilter(c)
return c:IsSetCard(0xbb) and c:IsType(TYPE_MONSTER) and c:IsAbleToRemoveAsCost()
end
function c26034577.sumfilter(c)
return c:IsFaceup() and c:IsType(TYPE_EFFECT)
end
function c26034577.lv_or_rk(c)
if c:IsType(TYPE_XYZ) then return c:GetRank()
else return c:GetLevel() end
end
function c26034577.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
local sum=0
for i=0,4 do
local tc=Duel.GetFieldCard(tp,LOCATION_MZONE,i)
if tc and tc:IsFaceup() and tc:IsType(TYPE_EFFECT) then
if tc:IsType(TYPE_XYZ) then sum=sum+tc:GetRank()
else sum=sum+tc:GetLevel() end
end
end
local sum=Duel.GetMatchingGroup(c26034577.sumfilter,tp,LOCATION_MZONE,0,nil):GetSum(c26034577.lv_or_rk)
if sum>8 then return false end
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if ft<0 then return false end
......
......@@ -45,12 +45,7 @@ function c30811116.initial_effect(c)
end
function c30811116.lvval(e,c)
local tp=c:GetControler()
local lv=0
for i=0,4 do
local tc=Duel.GetFieldCard(tp,LOCATION_MZONE,i)
if tc and tc:IsCode(31533705) then lv=lv+tc:GetLevel() end
end
return lv
return Duel.GetMatchingGroup(Card.IsCode,tp,LOCATION_MZONE,0,nil,31533705):GetSum(Card.GetLevel)
end
function c30811116.indcon(e)
return Duel.IsExistingMatchingCard(Card.IsType,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil,TYPE_TOKEN)
......
......@@ -46,12 +46,7 @@ function c31533704.initial_effect(c)
end
function c31533704.lvval(e,c)
local tp=c:GetControler()
local lv=0
for i=0,4 do
local tc=Duel.GetFieldCard(tp,LOCATION_MZONE,i)
if tc and tc:IsCode(31533705) then lv=lv+tc:GetLevel() end
end
return lv
return Duel.GetMatchingGroup(Card.IsCode,tp,LOCATION_MZONE,0,nil,31533705):GetSum(Card.GetLevel)
end
function c31533704.indcon(e)
return Duel.IsExistingMatchingCard(Card.IsType,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil,TYPE_TOKEN)
......
......@@ -111,11 +111,11 @@ c33900648[0]=0
c33900648[1]=0
function c33900648.raccheck(p)
local rac=0
for i=0,4 do
local tc=Duel.GetFieldCard(p,LOCATION_MZONE,i)
if tc and tc:IsFaceup() then
rac=bit.bor(rac,tc:GetAttribute())
end
local g=Duel.GetMatchingGroup(Card.IsFaceup,p,LOCATION_MZONE,0,nil)
local tc=g:GetFirst()
while tc do
rac=bit.bor(rac,tc:GetAttribute())
tc=g:GetNext()
end
c33900648[p]=rac
end
......
......@@ -11,14 +11,17 @@ function c35537251.initial_effect(c)
e1:SetOperation(c35537251.spop)
c:RegisterEffect(e1)
end
function c35537251.cfilter(c)
return c:IsFaceup() and c:IsSetCard(0x84) and c:IsType(TYPE_XYZ)
end
function c35537251.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local g=Group.CreateGroup()
for i=0,4 do
local tc=Duel.GetFieldCard(tp,LOCATION_MZONE,i)
if tc and tc:IsFaceup() and tc:IsSetCard(0x84) and tc:IsType(TYPE_XYZ) then
g:Merge(tc:GetOverlayGroup())
end
local mg=Duel.GetMatchingGroup(c35537251.cfilter,tp,LOCATION_MZONE,0,nil)
local tc=mg:GetFirst()
while tc do
g:Merge(tc:GetOverlayGroup())
tc=mg:GetNext()
end
if g:GetCount()==0 then return false end
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
......@@ -28,11 +31,11 @@ function c35537251.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
end
function c35537251.spop(e,tp,eg,ep,ev,re,r,rp)
local g=Group.CreateGroup()
for i=0,4 do
local tc=Duel.GetFieldCard(tp,LOCATION_MZONE,i)
if tc and tc:IsFaceup() and tc:IsSetCard(0x84) and tc:IsType(TYPE_XYZ) then
g:Merge(tc:GetOverlayGroup())
end
local mg=Duel.GetMatchingGroup(c35537251.cfilter,tp,LOCATION_MZONE,0,nil)
local tc=mg:GetFirst()
while tc do
g:Merge(tc:GetOverlayGroup())
tc=mg:GetNext()
end
if g:GetCount()==0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVEXYZ)
......
......@@ -46,12 +46,7 @@ function c4417407.initial_effect(c)
end
function c4417407.lvval(e,c)
local tp=c:GetControler()
local lv=0
for i=0,4 do
local tc=Duel.GetFieldCard(tp,LOCATION_MZONE,i)
if tc and tc:IsCode(31533705) then lv=lv+tc:GetLevel() end
end
return lv
return Duel.GetMatchingGroup(Card.IsCode,tp,LOCATION_MZONE,0,nil,31533705):GetSum(Card.GetLevel)
end
function c4417407.indcon(e)
return Duel.IsExistingMatchingCard(Card.IsType,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil,TYPE_TOKEN)
......
......@@ -21,19 +21,12 @@ function c47111934.initial_effect(c)
e2:SetOperation(c47111934.thop)
c:RegisterEffect(e2)
end
function c47111934.check(tp)
local ret=false
for i=0,4 do
local tc=Duel.GetFieldCard(tp,LOCATION_MZONE,i)
if tc then
if not ret and tc:IsFaceup() and tc:IsCode(11722335) then ret=true
else return false end
end
end
return ret
function c47111934.cfilter(c)
return c:IsFaceup() and c:IsCode(11722335)
end
function c47111934.spcon(e,tp,eg,ep,ev,re,r,rp,chk)
return c47111934.check(tp)
return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==1
and Duel.IsExistingMatchingCard(c47111934.cfilter,tp,LOCATION_MZONE,0,1,nil)
end
function c47111934.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
......
......@@ -45,17 +45,17 @@ end
function c51316684.spfilter(c)
return c:IsSetCard(0xbb) and c:IsType(TYPE_MONSTER) and c:IsAbleToRemoveAsCost()
end
function c51316684.sumfilter(c)
return c:IsFaceup() and c:IsType(TYPE_EFFECT)
end
function c51316684.lv_or_rk(c)
if c:IsType(TYPE_XYZ) then return c:GetRank()
else return c:GetLevel() end
end
function c51316684.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
local sum=0
for i=0,4 do
local tc=Duel.GetFieldCard(tp,LOCATION_MZONE,i)
if tc and tc:IsFaceup() and tc:IsType(TYPE_EFFECT) then
if tc:IsType(TYPE_XYZ) then sum=sum+tc:GetRank()
else sum=sum+tc:GetLevel() end
end
end
local sum=Duel.GetMatchingGroup(c51316684.sumfilter,tp,LOCATION_MZONE,0,nil):GetSum(c51316684.lv_or_rk)
if sum>8 then return false end
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if ft<-1 then return false end
......
......@@ -46,17 +46,17 @@ end
function c52038272.spfilter(c)
return c:IsSetCard(0xbb) and c:IsType(TYPE_MONSTER) and c:IsAbleToRemoveAsCost()
end
function c52038272.sumfilter(c)
return c:IsFaceup() and c:IsType(TYPE_EFFECT)
end
function c52038272.lv_or_rk(c)
if c:IsType(TYPE_XYZ) then return c:GetRank()
else return c:GetLevel() end
end
function c52038272.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
local sum=0
for i=0,4 do
local tc=Duel.GetFieldCard(tp,LOCATION_MZONE,i)
if tc and tc:IsFaceup() and tc:IsType(TYPE_EFFECT) then
if tc:IsType(TYPE_XYZ) then sum=sum+tc:GetRank()
else sum=sum+tc:GetLevel() end
end
end
local sum=Duel.GetMatchingGroup(c52038272.sumfilter,tp,LOCATION_MZONE,0,nil):GetSum(c52038272.lv_or_rk)
if sum>8 then return false end
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if ft<0 then return false end
......
......@@ -40,25 +40,17 @@ end
function c54306223.acop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
local g=Group.CreateGroup()
for i=0,4 do
local tc=Duel.GetFieldCard(tp,LOCATION_MZONE,i)
if tc and tc:IsCanAddCounter(0x1009,1) and not tc:IsSetCard(0x50) then
local atk=tc:GetAttack()
tc:AddCounter(0x1009,1)
if atk>0 and tc:GetAttack()==0 then
g:AddCard(tc)
end
end
end
for i=0,4 do
local tc=Duel.GetFieldCard(1-tp,LOCATION_MZONE,i)
if tc and tc:IsCanAddCounter(0x1009,1) and not tc:IsSetCard(0x50) then
local tg=Duel.GetFieldGroup(tp,LOCATION_MZONE,LOCATION_MZONE)
local tc=tg:GetFirst()
while tc do
if tc:IsCanAddCounter(0x1009,1) and not tc:IsSetCard(0x50) then
local atk=tc:GetAttack()
tc:AddCounter(0x1009,1)
if atk>0 and tc:GetAttack()==0 then
g:AddCard(tc)
end
end
tc=tg:GetNext()
end
if g:GetCount()>0 then
Duel.RaiseEvent(g,EVENT_CUSTOM+54306223,e,0,0,0,0)
......
......@@ -43,17 +43,17 @@ end
function c60551528.spfilter(c)
return c:IsSetCard(0xbb) and c:IsType(TYPE_MONSTER) and c:IsAbleToRemoveAsCost()
end
function c60551528.sumfilter(c)
return c:IsFaceup() and c:IsType(TYPE_EFFECT)
end
function c60551528.lv_or_rk(c)
if c:IsType(TYPE_XYZ) then return c:GetRank()
else return c:GetLevel() end
end
function c60551528.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
local sum=0
for i=0,4 do
local tc=Duel.GetFieldCard(tp,LOCATION_MZONE,i)
if tc and tc:IsFaceup() and tc:IsType(TYPE_EFFECT) then
if tc:IsType(TYPE_XYZ) then sum=sum+tc:GetRank()
else sum=sum+tc:GetLevel() end
end
end
local sum=Duel.GetMatchingGroup(c60551528.sumfilter,tp,LOCATION_MZONE,0,nil):GetSum(c60551528.lv_or_rk)
if sum>8 then return false end
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if ft<0 then return false end
......
......@@ -33,9 +33,11 @@ end
function c62312469.value(e,c)
local tp=e:GetHandlerPlayer()
local att=0
for i=0,4 do
local tc=Duel.GetFieldCard(tp,LOCATION_MZONE,i)
if tc and tc:IsFaceup() then att=bit.bor(att,tc:GetAttribute()) end
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,0,nil)
local tc=g:GetFirst()
while tc do
att=bit.bor(att,tc:GetAttribute())
tc=g:GetNext()
end
local ct=0
while att~=0 do
......
......@@ -44,12 +44,7 @@ function c66200210.initial_effect(c)
end
function c66200210.lvval(e,c)
local tp=c:GetControler()
local lv=0
for i=0,4 do
local tc=Duel.GetFieldCard(tp,LOCATION_MZONE,i)
if tc and tc:IsCode(31533705) then lv=lv+tc:GetLevel() end
end
return lv
return Duel.GetMatchingGroup(Card.IsCode,tp,LOCATION_MZONE,0,nil,31533705):GetSum(Card.GetLevel)
end
function c66200210.indcon(e)
return Duel.IsExistingMatchingCard(Card.IsType,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil,TYPE_TOKEN)
......
......@@ -45,12 +45,7 @@ function c67922702.initial_effect(c)
end
function c67922702.lvval(e,c)
local tp=c:GetControler()
local lv=0
for i=0,4 do
local tc=Duel.GetFieldCard(tp,LOCATION_MZONE,i)
if tc and tc:IsCode(31533705) then lv=lv+tc:GetLevel() end
end
return lv
return Duel.GetMatchingGroup(Card.IsCode,tp,LOCATION_MZONE,0,nil,31533705):GetSum(Card.GetLevel)
end
function c67922702.indcon(e)
return Duel.IsExistingMatchingCard(Card.IsType,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil,TYPE_TOKEN)
......
......@@ -33,12 +33,7 @@ function c76902476.initial_effect(c)
end
function c76902476.lvval(e,c)
local tp=c:GetControler()
local lv=0
for i=0,4 do
local tc=Duel.GetFieldCard(tp,LOCATION_MZONE,i)
if tc and tc:IsCode(31533705) then lv=lv+tc:GetLevel() end
end
return lv
return Duel.GetMatchingGroup(Card.IsCode,tp,LOCATION_MZONE,0,nil,31533705):GetSum(Card.GetLevel)
end
function c76902476.indcon(e)
return Duel.IsExistingMatchingCard(Card.IsType,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil,TYPE_TOKEN)
......
......@@ -41,17 +41,17 @@ end
function c88301393.spfilter(c)
return c:IsSetCard(0xbb) and c:IsType(TYPE_MONSTER) and c:IsAbleToRemoveAsCost()
end
function c88301393.sumfilter(c)
return c:IsFaceup() and c:IsType(TYPE_EFFECT)
end
function c88301393.lv_or_rk(c)
if c:IsType(TYPE_XYZ) then return c:GetRank()
else return c:GetLevel() end
end
function c88301393.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
local sum=0
for i=0,4 do
local tc=Duel.GetFieldCard(tp,LOCATION_MZONE,i)
if tc and tc:IsFaceup() and tc:IsType(TYPE_EFFECT) then
if tc:IsType(TYPE_XYZ) then sum=sum+tc:GetRank()
else sum=sum+tc:GetLevel() end
end
end
local sum=Duel.GetMatchingGroup(c88301393.sumfilter,tp,LOCATION_MZONE,0,nil):GetSum(c88301393.lv_or_rk)
if sum>8 then return false end
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if ft<-1 then return false end
......
......@@ -26,24 +26,12 @@ function c88513608.poscheck(e,tp,eg,ep,ev,re,r,rp)
end
end
function c88513608.check(tp)
local at1=0
local ct=0
for i=0,4 do
local tc=Duel.GetFieldCard(tp,LOCATION_MZONE,i)
if tc and tc:IsPosition(POS_FACEUP_ATTACK) then
at1=at1+tc:GetAttack()
ct=ct+1
end
end
if ct<2 then return false end
local at2=-1
for i=0,4 do
local tc=Duel.GetFieldCard(1-tp,LOCATION_MZONE,i)
if tc and tc:IsFaceup() then
local atk=tc:GetAttack()
if at2<0 or atk<at2 then at2=atk end
end
end
local sg=Duel.GetMatchingGroup(Card.IsPosition,tp,LOCATION_MZONE,0,nil,POS_FACEUP_ATTACK)
if sg:GetCount()<2 then return false end
local og=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_MZONE,nil)
if og:GetCount()==0 then return false end
local at1=sg:GetSum(Card.GetAttack)
local tg,at2=og:GetMinGroup(Card.GetAttack)
return at1<at2
end
function c88513608.condition(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -46,17 +46,17 @@ end
function c89423971.spfilter(c)
return c:IsSetCard(0xbb) and c:IsType(TYPE_MONSTER) and c:IsAbleToRemoveAsCost()
end
function c89423971.sumfilter(c)
return c:IsFaceup() and c:IsType(TYPE_EFFECT)
end
function c89423971.lv_or_rk(c)
if c:IsType(TYPE_XYZ) then return c:GetRank()
else return c:GetLevel() end
end
function c89423971.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
local sum=0
for i=0,4 do
local tc=Duel.GetFieldCard(tp,LOCATION_MZONE,i)
if tc and tc:IsFaceup() and tc:IsType(TYPE_EFFECT) then
if tc:IsType(TYPE_XYZ) then sum=sum+tc:GetRank()
else sum=sum+tc:GetLevel() end
end
end
local sum=Duel.GetMatchingGroup(c89423971.sumfilter,tp,LOCATION_MZONE,0,nil):GetSum(c89423971.lv_or_rk)
if sum>8 then return false end
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if ft<0 then return false end
......
......@@ -19,15 +19,13 @@ function c94662235.initial_effect(c)
e2:SetOperation(c94662235.activate2)
c:RegisterEffect(e2)
end
function c94662235.cfilter(c)
return c:IsFaceup() and c:IsSetCard(0x31)
end
function c94662235.check(tp)
local ret=false
for i=0,4 do
local c=Duel.GetFieldCard(tp,LOCATION_MZONE,i)
if c and c:IsFaceup() then
if c:IsSetCard(0x31) then ret=true else return false end
end
end
return ret
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,0,nil)
return g:IsExists(c94662235.cfilter,1,nil)
and not g:IsExists(aux.NOT(c94662235.cfilter),1,nil)
end
function c94662235.condition1(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentChain()==0 and c94662235.check(tp)
......
......@@ -45,12 +45,7 @@ function c94973028.initial_effect(c)
end
function c94973028.lvval(e,c)
local tp=c:GetControler()
local lv=0
for i=0,4 do
local tc=Duel.GetFieldCard(tp,LOCATION_MZONE,i)
if tc and tc:IsCode(31533705) then lv=lv+tc:GetLevel() end
end
return lv
return Duel.GetMatchingGroup(Card.IsCode,tp,LOCATION_MZONE,0,nil,31533705):GetSum(Card.GetLevel)
end
function c94973028.indcon(e)
return Duel.IsExistingMatchingCard(Card.IsType,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil,TYPE_TOKEN)
......
......@@ -40,17 +40,17 @@ end
function c96055137.spfilter(c)
return c:IsSetCard(0xbb) and c:IsType(TYPE_MONSTER) and c:IsAbleToRemoveAsCost()
end
function c96055137.sumfilter(c)
return c:IsFaceup() and c:IsType(TYPE_EFFECT)
end
function c96055137.lv_or_rk(c)
if c:IsType(TYPE_XYZ) then return c:GetRank()
else return c:GetLevel() end
end
function c96055137.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
local sum=0
for i=0,4 do
local tc=Duel.GetFieldCard(tp,LOCATION_MZONE,i)
if tc and tc:IsFaceup() and tc:IsType(TYPE_EFFECT) then
if tc:IsType(TYPE_XYZ) then sum=sum+tc:GetRank()
else sum=sum+tc:GetLevel() end
end
end
local sum=Duel.GetMatchingGroup(c96055137.sumfilter,tp,LOCATION_MZONE,0,nil):GetSum(c96055137.lv_or_rk)
if sum>8 then return false end
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if ft<-1 then return false 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