Commit ece8728c authored by DailyShana's avatar DailyShana

fix

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