Commit 46c9851a authored by VanillaSalt's avatar VanillaSalt

fix

parent d79002c1
...@@ -33,14 +33,34 @@ function c102380.initial_effect(c) ...@@ -33,14 +33,34 @@ function c102380.initial_effect(c)
e3:SetOperation(c102380.spcop) e3:SetOperation(c102380.spcop)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
function c102380.mzfilter(c)
return c:GetSequence()<5
end
function c102380.spcon(e,c) function c102380.spcon(e,c)
if c==nil then return true end if c==nil then return true end
return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>-2 local tp=c:GetControler()
and Duel.IsExistingMatchingCard(Card.IsReleasable,c:GetControler(),0,LOCATION_MZONE,2,nil) local rg=Duel.GetMatchingGroup(Card.IsReleasable,tp,0,LOCATION_MZONE,nil)
local ft=Duel.GetLocationCount(1-tp,LOCATION_MZONE)
local ct=-ft+1
return ft>-2 and rg:GetCount()>1 and (ft>0 or rg:IsExists(c102380.mzfilter,ct,nil))
end end
function c102380.spop(e,tp,eg,ep,ev,re,r,rp,c) function c102380.spop(e,tp,eg,ep,ev,re,r,rp,c)
local rg=Duel.GetMatchingGroup(Card.IsReleasable,tp,0,LOCATION_MZONE,nil)
local ft=Duel.GetLocationCount(1-tp,LOCATION_MZONE)
local g=nil
if ft>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
g=rg:Select(tp,2,2,nil)
elseif ft==0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
g=rg:FilterSelect(tp,c102380.mzfilter,1,1,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g2=rg:Select(tp,1,1,g:GetFirst())
g:Merge(g2)
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g=Duel.SelectMatchingCard(tp,Card.IsReleasable,tp,0,LOCATION_MZONE,2,2,nil) g=rg:FilterSelect(tp,c102380.mzfilter,2,2,nil)
end
Duel.Release(g,REASON_COST) Duel.Release(g,REASON_COST)
end end
function c102380.damcon(e,tp,eg,ep,ev,re,r,rp) function c102380.damcon(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -50,13 +50,19 @@ function c15180041.initial_effect(c) ...@@ -50,13 +50,19 @@ function c15180041.initial_effect(c)
e5:SetOperation(c15180041.spop2) e5:SetOperation(c15180041.spop2)
c:RegisterEffect(e5) c:RegisterEffect(e5)
end end
function c15180041.spfilter(c,ft,tp)
return c:IsRace(RACE_WARRIOR)
and (ft>0 or (c:IsControler(tp) and c:GetSequence()<5)) and (c:IsControler(tp) or c:IsFaceup())
end
function c15180041.spcon(e,c) function c15180041.spcon(e,c)
if c==nil then return true end if c==nil then return true end
return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>-1 local tp=c:GetControler()
and Duel.CheckReleaseGroup(c:GetControler(),Card.IsRace,1,nil,RACE_WARRIOR) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
return ft>-1 and Duel.CheckReleaseGroup(tp,c15180041.spfilter,1,nil,ft,tp)
end end
function c15180041.spop(e,tp,eg,ep,ev,re,r,rp,c) function c15180041.spop(e,tp,eg,ep,ev,re,r,rp,c)
local g=Duel.SelectReleaseGroup(c:GetControler(),Card.IsRace,1,1,nil,RACE_WARRIOR) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
local g=Duel.SelectReleaseGroup(tp,c15180041.spfilter,1,1,nil,ft,tp)
Duel.Release(g,REASON_COST) Duel.Release(g,REASON_COST)
end end
function c15180041.atkop(e,tp,eg,ep,ev,re,r,rp) function c15180041.atkop(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -31,16 +31,19 @@ function c16024176.initial_effect(c) ...@@ -31,16 +31,19 @@ function c16024176.initial_effect(c)
e3:SetOperation(c16024176.drop) e3:SetOperation(c16024176.drop)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
function c16024176.hspfilter(c) function c16024176.hspfilter(c,ft,tp)
return c:IsSetCard(0xe6) and c:GetLevel()==1 and not c:IsCode(16024176) return c:IsSetCard(0xe6) and c:GetLevel()==1 and not c:IsCode(16024176)
and (ft>0 or (c:IsControler(tp) and c:GetSequence()<5)) and (c:IsControler(tp) or c:IsFaceup())
end end
function c16024176.hspcon(e,c) function c16024176.hspcon(e,c)
if c==nil then return true end if c==nil then return true end
return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>-1 local tp=c:GetControler()
and Duel.CheckReleaseGroup(c:GetControler(),c16024176.hspfilter,1,nil) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
return ft>-1 and Duel.CheckReleaseGroup(tp,c16024176.hspfilter,1,nil,ft,tp)
end end
function c16024176.hspop(e,tp,eg,ep,ev,re,r,rp,c) function c16024176.hspop(e,tp,eg,ep,ev,re,r,rp,c)
local g=Duel.SelectReleaseGroup(c:GetControler(),c16024176.hspfilter,1,1,nil) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
local g=Duel.SelectReleaseGroup(tp,c16024176.hspfilter,1,1,nil,ft,tp)
Duel.Release(g,REASON_COST) Duel.Release(g,REASON_COST)
end end
function c16024176.target(e,tp,eg,ep,ev,re,r,rp,chk) function c16024176.target(e,tp,eg,ep,ev,re,r,rp,chk)
......
...@@ -10,17 +10,19 @@ function c16638212.initial_effect(c) ...@@ -10,17 +10,19 @@ function c16638212.initial_effect(c)
e1:SetOperation(c16638212.spop) e1:SetOperation(c16638212.spop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c16638212.spfilter(c) function c16638212.spfilter(c,ft)
return c:IsFaceup() and c:IsAbleToRemoveAsCost() return c:IsFaceup() and c:IsAbleToRemoveAsCost() and (ft>0 or c:GetSequence()<5)
end end
function c16638212.spcon(e,c) function c16638212.spcon(e,c)
if c==nil then return true end if c==nil then return true end
return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>-1 local tp=c:GetControler()
and Duel.IsExistingMatchingCard(c16638212.spfilter,c:GetControler(),LOCATION_MZONE,0,1,nil) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
return ft>-1 and Duel.IsExistingMatchingCard(c16638212.spfilter,tp,LOCATION_MZONE,0,1,nil,ft)
end end
function c16638212.spop(e,tp,eg,ep,ev,re,r,rp,c) function c16638212.spop(e,tp,eg,ep,ev,re,r,rp,c)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c16638212.spfilter,tp,LOCATION_MZONE,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,c16638212.spfilter,tp,LOCATION_MZONE,0,1,1,nil,ft)
Duel.Remove(g,POS_FACEUP,REASON_COST+REASON_TEMPORARY) Duel.Remove(g,POS_FACEUP,REASON_COST+REASON_TEMPORARY)
g:GetFirst():RegisterFlagEffect(16638212,RESET_EVENT+0x1fe0000,0,0) g:GetFirst():RegisterFlagEffect(16638212,RESET_EVENT+0x1fe0000,0,0)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
......
...@@ -30,16 +30,19 @@ function c16802689.initial_effect(c) ...@@ -30,16 +30,19 @@ function c16802689.initial_effect(c)
e3:SetOperation(c16802689.drop) e3:SetOperation(c16802689.drop)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
function c16802689.hspfilter(c) function c16802689.hspfilter(c,ft,tp)
return c:IsSetCard(0xe6) and c:GetLevel()==12 and not c:IsCode(16802689) return c:IsSetCard(0xe6) and c:GetLevel()==12 and not c:IsCode(16802689)
and (ft>0 or (c:IsControler(tp) and c:GetSequence()<5)) and (c:IsControler(tp) or c:IsFaceup())
end end
function c16802689.hspcon(e,c) function c16802689.hspcon(e,c)
if c==nil then return true end if c==nil then return true end
return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>-1 local tp=c:GetControler()
and Duel.CheckReleaseGroup(c:GetControler(),c16802689.hspfilter,1,nil) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
return ft>-1 and Duel.CheckReleaseGroup(tp,c16802689.hspfilter,1,nil,ft,tp)
end end
function c16802689.hspop(e,tp,eg,ep,ev,re,r,rp,c) function c16802689.hspop(e,tp,eg,ep,ev,re,r,rp,c)
local g=Duel.SelectReleaseGroup(c:GetControler(),c16802689.hspfilter,1,1,nil) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
local g=Duel.SelectReleaseGroup(tp,c16802689.hspfilter,1,1,nil,ft,tp)
Duel.Release(g,REASON_COST) Duel.Release(g,REASON_COST)
end end
function c16802689.target(e,tp,eg,ep,ev,re,r,rp,chk) function c16802689.target(e,tp,eg,ep,ev,re,r,rp,chk)
......
...@@ -27,22 +27,55 @@ function c17132130.initial_effect(c) ...@@ -27,22 +27,55 @@ function c17132130.initial_effect(c)
c:RegisterEffect(e3) c:RegisterEffect(e3)
c:EnableReviveLimit() c:EnableReviveLimit()
end end
function c17132130.rfilter(c,tp)
return c:IsSetCard(0xc008) and (c:IsControler(tp) or c:IsFaceup())
end
function c17132130.mzfilter(c,tp)
return c:IsControler(tp) and c:GetSequence()<5
end
function c17132130.rmzfilter(c,tp)
return c:IsSetCard(0xc008) and c:IsControler(tp) and c:GetSequence()<5
end
function c17132130.spcon(e,c) function c17132130.spcon(e,c)
if c==nil then return true end if c==nil then return true end
local g=Duel.GetReleaseGroup(c:GetControler()) local tp=c:GetControler()
local d=g:FilterCount(Card.IsSetCard,nil,0xc008) local rg=Duel.GetReleaseGroup(tp)
local ct=g:GetCount() local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>-3 and d>0 and ct>2 local ct=-ft+1
return ft>-3 and rg:GetCount()>2 and rg:IsExists(c17132130.rfilter,1,nil,tp)
and (ft>0 or rg:IsExists(c17132130.mzfilter,ct,nil,tp))
and (ft>-2 or rg:IsExists(c17132130.rmzfilter,1,nil,tp))
end end
function c17132130.spop(e,tp,eg,ep,ev,re,r,rp,c) function c17132130.spop(e,tp,eg,ep,ev,re,r,rp,c)
local g=Duel.GetReleaseGroup(c:GetControler()) local rg=Duel.GetReleaseGroup(tp)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
local g=nil
if ft>-2 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
g=rg:FilterSelect(tp,Card.IsSetCard,1,1,nil,0xc008)
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
g=rg:FilterSelect(tp,c17132130.rmzfilter,1,1,nil,tp)
end
local tc=g:GetFirst()
if tc:IsControler(tp) and tc:GetSequence()<5 then ft=ft+1 end
if ft>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g2=rg:Select(tp,2,2,tc)
g:Merge(g2)
elseif ft>-1 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g2=rg:FilterSelect(tp,c17132130.mzfilter,1,1,tc,tp)
g:Merge(g2)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local sg1=g:FilterSelect(tp,Card.IsSetCard,1,1,nil,0xc008) local g3=rg:Select(tp,1,1,g)
g:RemoveCard(sg1:GetFirst()) g:Merge(g3)
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local sg2=g:Select(tp,2,2,nil) local g2=rg:FilterSelect(tp,c17132130.mzfilter,2,2,tc,tp)
sg2:Merge(sg1) g:Merge(g2)
Duel.Release(sg2,REASON_COST) end
Duel.Release(g,REASON_COST)
end end
function c17132130.lp(e,tp,eg,ep,ev,re,r,rp) function c17132130.lp(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetSummonType()==SUMMON_TYPE_SPECIAL+1 return e:GetHandler():GetSummonType()==SUMMON_TYPE_SPECIAL+1
......
...@@ -25,17 +25,20 @@ function c17264592.initial_effect(c) ...@@ -25,17 +25,20 @@ function c17264592.initial_effect(c)
e3:SetCondition(c17264592.spcon) e3:SetCondition(c17264592.spcon)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
function c17264592.thfilter(c) function c17264592.thfilter(c,ft)
return c:IsFaceup() and c:IsSetCard(0xb2) and not c:IsCode(17264592) and c:IsAbleToHandAsCost() return c:IsFaceup() and c:IsSetCard(0xb2) and not c:IsCode(17264592) and c:IsAbleToHandAsCost()
and (ft>0 or c:GetSequence()<5)
end end
function c17264592.sprcon(e,c) function c17264592.sprcon(e,c)
if c==nil then return true end if c==nil then return true end
return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>-1 local tp=c:GetControler()
and Duel.IsExistingMatchingCard(c17264592.thfilter,c:GetControler(),LOCATION_MZONE,0,1,nil) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
return ft>-1 and Duel.IsExistingMatchingCard(c17264592.thfilter,tp,LOCATION_MZONE,0,1,nil,ft)
end end
function c17264592.sprop(e,tp,eg,ep,ev,re,r,rp,c) function c17264592.sprop(e,tp,eg,ep,ev,re,r,rp,c)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g=Duel.SelectMatchingCard(tp,c17264592.thfilter,tp,LOCATION_MZONE,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,c17264592.thfilter,tp,LOCATION_MZONE,0,1,1,nil,ft)
Duel.SendtoHand(g,nil,REASON_COST) Duel.SendtoHand(g,nil,REASON_COST)
end end
function c17264592.spfilter(c,e,tp) function c17264592.spfilter(c,e,tp)
......
...@@ -40,20 +40,26 @@ function c17286057.initial_effect(c) ...@@ -40,20 +40,26 @@ function c17286057.initial_effect(c)
e5:SetCondition(c17286057.atcon) e5:SetCondition(c17286057.atcon)
c:RegisterEffect(e5) c:RegisterEffect(e5)
end end
function c17286057.hspfilter(c,ft,tp)
return c:IsCode(80887952)
and (ft>0 or (c:IsControler(tp) and c:GetSequence()<5)) and (c:IsControler(tp) or c:IsFaceup())
end
function c17286057.hspcon(e,c) function c17286057.hspcon(e,c)
if c==nil then return true end if c==nil then return true end
return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>-1 local tp=c:GetControler()
and Duel.CheckReleaseGroup(c:GetControler(),Card.IsCode,1,nil,80887952) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
return ft>-1 and Duel.CheckReleaseGroup(tp,c17286057.hspfilter,1,nil,ft,tp)
end end
function c17286057.hspop(e,tp,eg,ep,ev,re,r,rp,c) function c17286057.hspop(e,tp,eg,ep,ev,re,r,rp,c)
local g=Duel.SelectReleaseGroup(tp,Card.IsCode,1,1,nil,80887952) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
local g=Duel.SelectReleaseGroup(tp,c17286057.hspfilter,1,1,nil,ft,tp)
Duel.Release(g,REASON_COST) Duel.Release(g,REASON_COST)
end end
function c17286057.filter(c) function c17286057.filter(c)
return c:IsFaceup() and c:IsType(TYPE_MONSTER) return c:IsFaceup() and c:IsType(TYPE_MONSTER)
end end
function c17286057.value(e,c) function c17286057.value(e,c)
return Duel.GetMatchingGroupCount(c17286057.filter,c:GetControler(),LOCATION_REMOVED,LOCATION_REMOVED,nil)*300 return Duel.GetMatchingGroupCount(c17286057.filter,0,LOCATION_REMOVED,LOCATION_REMOVED,nil)*300
end end
function c17286057.spcon(e,tp,eg,ep,ev,re,r,rp) function c17286057.spcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsReason(REASON_BATTLE) and e:GetHandler():GetTurnID()==Duel.GetTurnCount() return e:GetHandler():IsReason(REASON_BATTLE) and e:GetHandler():GetTurnID()==Duel.GetTurnCount()
......
...@@ -21,16 +21,19 @@ function c18828179.initial_effect(c) ...@@ -21,16 +21,19 @@ function c18828179.initial_effect(c)
e2:SetOperation(c18828179.desop) e2:SetOperation(c18828179.desop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c18828179.rfilter(c) function c18828179.rfilter(c,ft,tp)
return c:IsCode(45045866) return c:IsCode(45045866)
and (ft>0 or (c:IsControler(tp) and c:GetSequence()<5)) and (c:IsControler(tp) or c:IsFaceup())
end end
function c18828179.spcon(e,c) function c18828179.spcon(e,c)
if c==nil then return true end if c==nil then return true end
return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>-1 local tp=c:GetControler()
and Duel.CheckReleaseGroup(c:GetControler(),c18828179.rfilter,1,nil) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
return ft>-1 and Duel.CheckReleaseGroup(tp,c18828179.rfilter,1,nil,ft,tp)
end end
function c18828179.spop(e,tp,eg,ep,ev,re,r,rp,c) function c18828179.spop(e,tp,eg,ep,ev,re,r,rp,c)
local g=Duel.SelectReleaseGroup(c:GetControler(),c18828179.rfilter,1,1,nil) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
local g=Duel.SelectReleaseGroup(tp,c18828179.rfilter,1,1,nil,ft,tp)
Duel.Release(g,REASON_COST) Duel.Release(g,REASON_COST)
end end
function c18828179.cfilter(c) function c18828179.cfilter(c)
......
...@@ -22,16 +22,19 @@ function c20403123.initial_effect(c) ...@@ -22,16 +22,19 @@ function c20403123.initial_effect(c)
e2:SetOperation(c20403123.desop) e2:SetOperation(c20403123.desop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c20403123.hspfilter(c) function c20403123.hspfilter(c,ft,tp)
return c:IsSetCard(0x9f) and not c:IsType(TYPE_PENDULUM) return c:IsSetCard(0x9f) and not c:IsType(TYPE_PENDULUM)
and (ft>0 or (c:IsControler(tp) and c:GetSequence()<5)) and (c:IsControler(tp) or c:IsFaceup())
end end
function c20403123.hspcon(e,c) function c20403123.hspcon(e,c)
if c==nil then return true end if c==nil then return true end
return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>-1 local tp=c:GetControler()
and Duel.CheckReleaseGroup(c:GetControler(),c20403123.hspfilter,1,nil) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
return ft>-1 and Duel.CheckReleaseGroup(tp,c20403123.hspfilter,1,nil,ft,tp)
end end
function c20403123.hspop(e,tp,eg,ep,ev,re,r,rp,c) function c20403123.hspop(e,tp,eg,ep,ev,re,r,rp,c)
local g=Duel.SelectReleaseGroup(c:GetControler(),c20403123.hspfilter,1,1,nil) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
local g=Duel.SelectReleaseGroup(tp,c20403123.hspfilter,1,1,nil,ft,tp)
Duel.Release(g,REASON_COST) Duel.Release(g,REASON_COST)
end end
function c20403123.descost(e,tp,eg,ep,ev,re,r,rp,chk) function c20403123.descost(e,tp,eg,ep,ev,re,r,rp,chk)
......
...@@ -67,13 +67,19 @@ function c21686473.thop(e,tp,eg,ep,ev,re,r,rp) ...@@ -67,13 +67,19 @@ function c21686473.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.ConfirmCards(1-tp,g) Duel.ConfirmCards(1-tp,g)
end end
end end
function c21686473.hspfilter(c,ft,tp)
return c:IsSetCard(0x10af)
and (ft>0 or (c:IsControler(tp) and c:GetSequence()<5)) and (c:IsControler(tp) or c:IsFaceup())
end
function c21686473.hspcon(e,c) function c21686473.hspcon(e,c)
if c==nil then return true end if c==nil then return true end
return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>-1 local tp=c:GetControler()
and Duel.CheckReleaseGroup(c:GetControler(),Card.IsSetCard,1,nil,0x10af) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
return ft>-1 and Duel.CheckReleaseGroup(tp,c21686473.hspfilter,1,nil,ft,tp)
end end
function c21686473.hspop(e,tp,eg,ep,ev,re,r,rp,c) function c21686473.hspop(e,tp,eg,ep,ev,re,r,rp,c)
local g=Duel.SelectReleaseGroup(c:GetControler(),Card.IsSetCard,1,1,nil,0x10af) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
local g=Duel.SelectReleaseGroup(tp,c21686473.hspfilter,1,1,nil,ft,tp)
Duel.Release(g,REASON_COST) Duel.Release(g,REASON_COST)
end end
function c21686473.atkcon(e,tp,eg,ep,ev,re,r,rp) function c21686473.atkcon(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -20,16 +20,19 @@ function c21772453.initial_effect(c) ...@@ -20,16 +20,19 @@ function c21772453.initial_effect(c)
e2:SetOperation(c21772453.operation) e2:SetOperation(c21772453.operation)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c21772453.hspfilter(c) function c21772453.hspfilter(c,ft,tp)
return c:IsSetCard(0xe6) and not c:IsCode(21772453) return c:IsSetCard(0xe6) and not c:IsCode(21772453)
and (ft>0 or (c:IsControler(tp) and c:GetSequence()<5)) and (c:IsControler(tp) or c:IsFaceup())
end end
function c21772453.hspcon(e,c) function c21772453.hspcon(e,c)
if c==nil then return true end if c==nil then return true end
return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>-1 local tp=c:GetControler()
and Duel.CheckReleaseGroup(c:GetControler(),c21772453.hspfilter,1,nil) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
return ft>-1 and Duel.CheckReleaseGroup(tp,c21772453.hspfilter,1,nil,ft,tp)
end end
function c21772453.hspop(e,tp,eg,ep,ev,re,r,rp,c) function c21772453.hspop(e,tp,eg,ep,ev,re,r,rp,c)
local g=Duel.SelectReleaseGroup(c:GetControler(),c21772453.hspfilter,1,1,nil) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
local g=Duel.SelectReleaseGroup(tp,c21772453.hspfilter,1,1,nil,ft,tp)
Duel.Release(g,REASON_COST) Duel.Release(g,REASON_COST)
end end
function c21772453.target(e,tp,eg,ep,ev,re,r,rp,chk) function c21772453.target(e,tp,eg,ep,ev,re,r,rp,chk)
......
...@@ -27,17 +27,19 @@ function c22056710.initial_effect(c) ...@@ -27,17 +27,19 @@ function c22056710.initial_effect(c)
e3:SetOperation(c22056710.spop) e3:SetOperation(c22056710.spop)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
function c22056710.hspfilter(c) function c22056710.hspfilter(c,ft)
return c:IsFaceup() and c:IsCode(53839837) and c:IsAbleToRemoveAsCost() return c:IsFaceup() and c:IsCode(53839837) and c:IsAbleToRemoveAsCost() and (ft>0 or c:GetSequence()<5)
end end
function c22056710.hspcon(e,c) function c22056710.hspcon(e,c)
if c==nil then return true end if c==nil then return true end
return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>-1 local tp=c:GetControler()
and Duel.IsExistingMatchingCard(c22056710.hspfilter,c:GetControler(),LOCATION_MZONE,0,1,nil) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
return ft>-1 and Duel.IsExistingMatchingCard(c22056710.hspfilter,tp,LOCATION_MZONE,0,1,nil,ft)
end end
function c22056710.hspop(e,tp,eg,ep,ev,re,r,rp,c) function c22056710.hspop(e,tp,eg,ep,ev,re,r,rp,c)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c22056710.hspfilter,c:GetControler(),LOCATION_MZONE,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,c22056710.hspfilter,tp,LOCATION_MZONE,0,1,1,nil,ft)
Duel.Remove(g,POS_FACEUP,REASON_COST) Duel.Remove(g,POS_FACEUP,REASON_COST)
end end
function c22056710.cfilter(c,e,tp) function c22056710.cfilter(c,e,tp)
......
...@@ -31,20 +31,24 @@ function c28674152.initial_effect(c) ...@@ -31,20 +31,24 @@ function c28674152.initial_effect(c)
e3:SetOperation(c28674152.tkop) e3:SetOperation(c28674152.tkop)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
function c28674152.cfilter(c) function c28674152.spfilter(c,ft)
return c:IsFaceup() and c:IsSetCard(0xd3) return c:IsReleasable() and (ft>0 or c:GetSequence()<5)
end end
function c28674152.spcon(e,c) function c28674152.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()
return Duel.GetLocationCount(1-tp,LOCATION_MZONE)>-1 local ft=Duel.GetLocationCount(1-tp,LOCATION_MZONE)
and Duel.IsExistingMatchingCard(Card.IsReleasable,tp,0,LOCATION_MZONE,1,nil) return ft>-1 and Duel.IsExistingMatchingCard(c28674152.spfilter,tp,0,LOCATION_MZONE,1,nil,ft)
end end
function c28674152.spop(e,tp,eg,ep,ev,re,r,rp,c) function c28674152.spop(e,tp,eg,ep,ev,re,r,rp,c)
local ft=Duel.GetLocationCount(1-tp,LOCATION_MZONE)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g=Duel.SelectMatchingCard(tp,Card.IsReleasable,tp,0,LOCATION_MZONE,1,1,nil) local g=Duel.SelectMatchingCard(tp,c28674152.spfilter,tp,0,LOCATION_MZONE,1,1,nil,ft)
Duel.Release(g,REASON_COST) Duel.Release(g,REASON_COST)
end end
function c28674152.cfilter(c)
return c:IsFaceup() and c:IsSetCard(0xd3)
end
function c28674152.spcon2(e,c) function c28674152.spcon2(e,c)
if c==nil then return true end if c==nil then return true end
local tp=c:GetControler() local tp=c:GetControler()
......
...@@ -34,16 +34,19 @@ function c29436665.initial_effect(c) ...@@ -34,16 +34,19 @@ function c29436665.initial_effect(c)
e4:SetOperation(c29436665.dmgop) e4:SetOperation(c29436665.dmgop)
c:RegisterEffect(e4) c:RegisterEffect(e4)
end end
function c29436665.rfilter(c) function c29436665.rfilter(c,ft,tp)
return c:IsCode(46986414) return c:IsCode(46986414)
and (ft>0 or (c:IsControler(tp) and c:GetSequence()<5)) and (c:IsControler(tp) or c:IsFaceup())
end end
function c29436665.spcon(e,c) function c29436665.spcon(e,c)
if c==nil then return true end if c==nil then return true end
return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>-1 local tp=c:GetControler()
and Duel.CheckReleaseGroup(c:GetControler(),c29436665.rfilter,1,nil) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
return ft>-1 and Duel.CheckReleaseGroup(tp,c29436665.rfilter,1,nil,ft,tp)
end end
function c29436665.spop(e,tp,eg,ep,ev,re,r,rp,c) function c29436665.spop(e,tp,eg,ep,ev,re,r,rp,c)
local g=Duel.SelectReleaseGroup(c:GetControler(),c29436665.rfilter,1,1,nil) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
local g=Duel.SelectReleaseGroup(tp,c29436665.rfilter,1,1,nil,ft,tp)
Duel.Release(g,REASON_COST) Duel.Release(g,REASON_COST)
end end
function c29436665.dmgcon(e,tp,eg,ep,ev,re,r,rp) function c29436665.dmgcon(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -37,13 +37,19 @@ function c2948263.initial_effect(c) ...@@ -37,13 +37,19 @@ function c2948263.initial_effect(c)
e4:SetOperation(c2948263.disop) e4:SetOperation(c2948263.disop)
c:RegisterEffect(e4) c:RegisterEffect(e4)
end end
function c2948263.spfilter(c,ft,tp)
return c:IsSetCard(0x59)
and (ft>0 or (c:IsControler(tp) and c:GetSequence()<5)) and (c:IsControler(tp) or c:IsFaceup())
end
function c2948263.spcon(e,c) function c2948263.spcon(e,c)
if c==nil then return true end if c==nil then return true end
return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>-1 local tp=c:GetControler()
and Duel.CheckReleaseGroup(c:GetControler(),Card.IsSetCard,1,nil,0x59) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
return ft>-1 and Duel.CheckReleaseGroup(tp,c2948263.spfilter,1,nil,ft,tp)
end end
function c2948263.spop(e,tp,eg,ep,ev,re,r,rp,c) function c2948263.spop(e,tp,eg,ep,ev,re,r,rp,c)
local g=Duel.SelectReleaseGroup(c:GetControler(),Card.IsSetCard,1,1,nil,0x59) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
local g=Duel.SelectReleaseGroup(tp,c2948263.spfilter,1,1,nil,ft,tp)
Duel.Release(g,REASON_COST) Duel.Release(g,REASON_COST)
local atk=g:GetFirst():GetBaseAttack() local atk=g:GetFirst():GetBaseAttack()
if atk<0 then return end if atk<0 then return end
......
...@@ -33,20 +33,24 @@ function c29726552.initial_effect(c) ...@@ -33,20 +33,24 @@ function c29726552.initial_effect(c)
e4:SetCode(EVENT_SPSUMMON_SUCCESS) e4:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e4) c:RegisterEffect(e4)
end end
function c29726552.cfilter(c) function c29726552.spfilter(c,ft)
return c:IsFaceup() and c:IsSetCard(0xd3) return c:IsReleasable() and (ft>0 or c:GetSequence()<5)
end end
function c29726552.spcon(e,c) function c29726552.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()
return Duel.GetLocationCount(1-tp,LOCATION_MZONE)>-1 local ft=Duel.GetLocationCount(1-tp,LOCATION_MZONE)
and Duel.IsExistingMatchingCard(Card.IsReleasable,tp,0,LOCATION_MZONE,1,nil) return ft>-1 and Duel.IsExistingMatchingCard(c29726552.spfilter,tp,0,LOCATION_MZONE,1,nil,ft)
end end
function c29726552.spop(e,tp,eg,ep,ev,re,r,rp,c) function c29726552.spop(e,tp,eg,ep,ev,re,r,rp,c)
local ft=Duel.GetLocationCount(1-tp,LOCATION_MZONE)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g=Duel.SelectMatchingCard(tp,Card.IsReleasable,tp,0,LOCATION_MZONE,1,1,nil) local g=Duel.SelectMatchingCard(tp,c29726552.spfilter,tp,0,LOCATION_MZONE,1,1,nil,ft)
Duel.Release(g,REASON_COST) Duel.Release(g,REASON_COST)
end end
function c29726552.cfilter(c)
return c:IsFaceup() and c:IsSetCard(0xd3)
end
function c29726552.spcon2(e,c) function c29726552.spcon2(e,c)
if c==nil then return true end if c==nil then return true end
local tp=c:GetControler() local tp=c:GetControler()
......
...@@ -31,13 +31,19 @@ function c31516413.initial_effect(c) ...@@ -31,13 +31,19 @@ function c31516413.initial_effect(c)
e3:SetOperation(c31516413.spop) e3:SetOperation(c31516413.spop)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
function c31516413.hspfilter(c,ft,tp)
return c:IsSetCard(0x69)
and (ft>0 or (c:IsControler(tp) and c:GetSequence()<5)) and (c:IsControler(tp) or c:IsFaceup())
end
function c31516413.hspcon(e,c) function c31516413.hspcon(e,c)
if c==nil then return true end if c==nil then return true end
return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>-1 local tp=c:GetControler()
and Duel.CheckReleaseGroup(c:GetControler(),Card.IsSetCard,1,nil,0x69) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
return ft>-1 and Duel.CheckReleaseGroup(tp,c31516413.hspfilter,1,nil,ft,tp)
end end
function c31516413.hspop(e,tp,eg,ep,ev,re,r,rp,c) function c31516413.hspop(e,tp,eg,ep,ev,re,r,rp,c)
local g=Duel.SelectReleaseGroup(c:GetControler(),Card.IsSetCard,1,1,nil,0x69) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
local g=Duel.SelectReleaseGroup(tp,c31516413.hspfilter,1,1,nil,ft,tp)
Duel.Release(g,REASON_COST) Duel.Release(g,REASON_COST)
c:RegisterFlagEffect(0,RESET_EVENT+0x4fc0000,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(31516413,2)) c:RegisterFlagEffect(0,RESET_EVENT+0x4fc0000,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(31516413,2))
end end
......
...@@ -31,20 +31,44 @@ function c32750510.initial_effect(c) ...@@ -31,20 +31,44 @@ function c32750510.initial_effect(c)
e3:SetOperation(c32750510.desop) e3:SetOperation(c32750510.desop)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
function c32750510.rfilter(c,tp)
return c:IsAttribute(ATTRIBUTE_WATER) and (c:IsControler(tp) or c:IsFaceup())
end
function c32750510.mzfilter(c,tp)
return c:IsControler(tp) and c:GetSequence()<5
end
function c32750510.spcon(e,c) function c32750510.spcon(e,c)
if c==nil then return true end if c==nil then return true end
return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>-2 local tp=c:GetControler()
and Duel.CheckReleaseGroup(c:GetControler(),Card.IsAttribute,2,nil,ATTRIBUTE_WATER) local rg=Duel.GetReleaseGroup(tp):Filter(c32750510.rfilter,nil,tp)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
local ct=-ft+1
return ft>-2 and rg:GetCount()>1 and (ft>0 or rg:IsExists(c32750510.mzfilter,ct,nil,tp))
end end
function c32750510.spop(e,tp,eg,ep,ev,re,r,rp,c) function c32750510.spop(e,tp,eg,ep,ev,re,r,rp,c)
local g=Duel.SelectReleaseGroup(c:GetControler(),Card.IsAttribute,2,2,nil,ATTRIBUTE_WATER) local rg=Duel.GetReleaseGroup(tp):Filter(c32750510.rfilter,nil,tp)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
local g=nil
if ft>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
g=rg:Select(tp,2,2,nil)
elseif ft==0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
g=rg:FilterSelect(tp,c32750510.mzfilter,1,1,nil,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g2=rg:Select(tp,1,1,g:GetFirst())
g:Merge(g2)
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
g=rg:FilterSelect(tp,c32750510.mzfilter,2,2,nil,tp)
end
Duel.Release(g,REASON_COST) Duel.Release(g,REASON_COST)
end end
function c32750510.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c32750510.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsCanAddCounter(0x1015,1) end if chkc then return chkc:IsCanAddCounter(0x1015,1) end
if chk==0 then return Duel.IsExistingTarget(Card.IsCanAddCounter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil,0x1015,1) end if chk==0 then return Duel.IsExistingTarget(Card.IsCanAddCounter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil,0x1015,1) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local g=Duel.SelectTarget(tp,Card.IsCanAddCounter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil,0x1015,1) Duel.SelectTarget(tp,Card.IsCanAddCounter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil,0x1015,1)
Duel.SetOperationInfo(0,CATEGORY_COUNTER,nil,1,0,0) Duel.SetOperationInfo(0,CATEGORY_COUNTER,nil,1,0,0)
end end
function c32750510.operation(e,tp,eg,ep,ev,re,r,rp) function c32750510.operation(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -31,13 +31,19 @@ function c3300267.initial_effect(c) ...@@ -31,13 +31,19 @@ function c3300267.initial_effect(c)
e3:SetOperation(c3300267.spop) e3:SetOperation(c3300267.spop)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
function c3300267.hspfilter(c,ft,tp)
return c:IsSetCard(0x69)
and (ft>0 or (c:IsControler(tp) and c:GetSequence()<5)) and (c:IsControler(tp) or c:IsFaceup())
end
function c3300267.hspcon(e,c) function c3300267.hspcon(e,c)
if c==nil then return true end if c==nil then return true end
return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>-1 local tp=c:GetControler()
and Duel.CheckReleaseGroup(c:GetControler(),Card.IsSetCard,1,nil,0x69) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
return ft>-1 and Duel.CheckReleaseGroup(tp,c3300267.hspfilter,1,nil,ft,tp)
end end
function c3300267.hspop(e,tp,eg,ep,ev,re,r,rp,c) function c3300267.hspop(e,tp,eg,ep,ev,re,r,rp,c)
local g=Duel.SelectReleaseGroup(c:GetControler(),Card.IsSetCard,1,1,nil,0x69) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
local g=Duel.SelectReleaseGroup(tp,c3300267.hspfilter,1,1,nil,ft,tp)
Duel.Release(g,REASON_COST) Duel.Release(g,REASON_COST)
c:RegisterFlagEffect(0,RESET_EVENT+0x4fc0000,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(3300267,2)) c:RegisterFlagEffect(0,RESET_EVENT+0x4fc0000,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(3300267,2))
end end
......
...@@ -20,18 +20,21 @@ function c34230233.initial_effect(c) ...@@ -20,18 +20,21 @@ function c34230233.initial_effect(c)
e2:SetOperation(c34230233.desop) e2:SetOperation(c34230233.desop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c34230233.spfilter(c) function c34230233.spfilter(c,ft)
return c:IsFaceup() and c:IsAbleToHandAsCost() and c:IsSetCard(0x6) and c:GetCode()~=34230233 return c:IsFaceup() and c:IsSetCard(0x6) and not c:IsCode(34230233) and c:IsAbleToHandAsCost()
and (ft>0 or c:GetSequence()<5)
end end
function c34230233.spcon(e,c) function c34230233.spcon(e,c)
if c==nil then return true end if c==nil then return true end
if c:IsHasEffect(EFFECT_NECRO_VALLEY) then return false end if c:IsHasEffect(EFFECT_NECRO_VALLEY) then return false end
return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>-1 local tp=c:GetControler()
and Duel.IsExistingMatchingCard(c34230233.spfilter,c:GetControler(),LOCATION_MZONE,0,1,nil) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
return ft>-1 and Duel.IsExistingMatchingCard(c34230233.spfilter,tp,LOCATION_MZONE,0,1,nil,ft)
end end
function c34230233.spop(e,tp,eg,ep,ev,re,r,rp,c) function c34230233.spop(e,tp,eg,ep,ev,re,r,rp,c)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g=Duel.SelectMatchingCard(tp,c34230233.spfilter,tp,LOCATION_MZONE,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,c34230233.spfilter,tp,LOCATION_MZONE,0,1,1,nil,ft)
Duel.SendtoHand(g,nil,REASON_COST) Duel.SendtoHand(g,nil,REASON_COST)
end end
function c34230233.descon(e,tp,eg,ep,ev,re,r,rp) function c34230233.descon(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -21,17 +21,20 @@ function c34614289.initial_effect(c) ...@@ -21,17 +21,20 @@ function c34614289.initial_effect(c)
e2:SetOperation(c34614289.posop) e2:SetOperation(c34614289.posop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c34614289.spfilter(c) function c34614289.spfilter(c,ft)
return c:IsFaceup() and c:IsSetCard(0xb2) and not c:IsCode(34614289) and c:IsAbleToHandAsCost() return c:IsFaceup() and c:IsSetCard(0xb2) and not c:IsCode(34614289) and c:IsAbleToHandAsCost()
and (ft>0 or c:GetSequence()<5)
end end
function c34614289.spcon(e,c) function c34614289.spcon(e,c)
if c==nil then return true end if c==nil then return true end
return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>-1 local tp=c:GetControler()
and Duel.IsExistingMatchingCard(c34614289.spfilter,c:GetControler(),LOCATION_MZONE,0,1,nil) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
return ft>-1 and Duel.IsExistingMatchingCard(c34614289.spfilter,tp,LOCATION_MZONE,0,1,nil,ft)
end end
function c34614289.spop(e,tp,eg,ep,ev,re,r,rp,c) function c34614289.spop(e,tp,eg,ep,ev,re,r,rp,c)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g=Duel.SelectMatchingCard(tp,c34614289.spfilter,tp,LOCATION_MZONE,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,c34614289.spfilter,tp,LOCATION_MZONE,0,1,1,nil,ft)
Duel.SendtoHand(g,nil,REASON_COST) Duel.SendtoHand(g,nil,REASON_COST)
end end
function c34614289.filter(c,sp) function c34614289.filter(c,sp)
......
...@@ -35,20 +35,24 @@ function c36956512.initial_effect(c) ...@@ -35,20 +35,24 @@ function c36956512.initial_effect(c)
e3:SetOperation(c36956512.atkop) e3:SetOperation(c36956512.atkop)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
function c36956512.cfilter(c) function c36956512.spfilter(c,ft)
return c:IsFaceup() and c:IsSetCard(0xd3) return c:IsReleasable() and (ft>0 or c:GetSequence()<5)
end end
function c36956512.spcon(e,c) function c36956512.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()
return Duel.GetLocationCount(1-tp,LOCATION_MZONE)>-1 local ft=Duel.GetLocationCount(1-tp,LOCATION_MZONE)
and Duel.IsExistingMatchingCard(Card.IsReleasable,tp,0,LOCATION_MZONE,1,nil) return ft>-1 and Duel.IsExistingMatchingCard(c36956512.spfilter,tp,0,LOCATION_MZONE,1,nil,ft)
end end
function c36956512.spop(e,tp,eg,ep,ev,re,r,rp,c) function c36956512.spop(e,tp,eg,ep,ev,re,r,rp,c)
local ft=Duel.GetLocationCount(1-tp,LOCATION_MZONE)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g=Duel.SelectMatchingCard(tp,Card.IsReleasable,tp,0,LOCATION_MZONE,1,1,nil) local g=Duel.SelectMatchingCard(tp,c36956512.spfilter,tp,0,LOCATION_MZONE,1,1,nil,ft)
Duel.Release(g,REASON_COST) Duel.Release(g,REASON_COST)
end end
function c36956512.cfilter(c)
return c:IsFaceup() and c:IsSetCard(0xd3)
end
function c36956512.spcon2(e,c) function c36956512.spcon2(e,c)
if c==nil then return true end if c==nil then return true end
local tp=c:GetControler() local tp=c:GetControler()
......
...@@ -42,15 +42,35 @@ end ...@@ -42,15 +42,35 @@ end
function c3775068.spcfilter(c) function c3775068.spcfilter(c)
return c:IsFaceup() and c:IsSetCard(0xe3) and c:IsAbleToGraveAsCost() return c:IsFaceup() and c:IsSetCard(0xe3) and c:IsAbleToGraveAsCost()
end end
function c3775068.mzfilter(c)
return c:GetSequence()<5
end
function c3775068.sprcon(e,c) function c3775068.sprcon(e,c)
if c==nil then return true end if c==nil then return true end
local tp=c:GetControler() local tp=c:GetControler()
return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>-3 local mg=Duel.GetMatchingGroup(c3775068.spcfilter,tp,LOCATION_MZONE,0,nil)
and Duel.IsExistingMatchingCard(c3775068.spcfilter,tp,LOCATION_MZONE,0,3,nil) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
local ct=-ft+1
return ft>-3 and mg:GetCount()>2 and (ft>0 or mg:IsExists(c3775068.mzfilter,ct,nil))
end end
function c3775068.sprop(e,tp,eg,ep,ev,re,r,rp,c) function c3775068.sprop(e,tp,eg,ep,ev,re,r,rp,c)
local mg=Duel.GetMatchingGroup(c3775068.spcfilter,tp,LOCATION_MZONE,0,nil)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
local g=nil
if ft>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
g=mg:Select(tp,3,3,nil)
elseif ft>-2 then
local ct=-ft+1
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c3775068.spcfilter,tp,LOCATION_MZONE,0,3,3,nil) g=mg:FilterSelect(tp,c3775068.mzfilter,ct,ct,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g2=mg:Select(tp,3-ct,3-ct,g)
g:Merge(g2)
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
g=mg:FilterSelect(tp,c3775068.mzfilter,3,3,nil)
end
Duel.SendtoGrave(g,REASON_COST) Duel.SendtoGrave(g,REASON_COST)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
......
...@@ -30,17 +30,19 @@ function c40392714.initial_effect(c) ...@@ -30,17 +30,19 @@ function c40392714.initial_effect(c)
e4:SetOperation(c40392714.spop2) e4:SetOperation(c40392714.spop2)
c:RegisterEffect(e4) c:RegisterEffect(e4)
end end
function c40392714.filter(c) function c40392714.filter(c,ft)
return c:IsFaceup() and c:IsSetCard(0xe3) and c:IsAbleToGraveAsCost() return c:IsFaceup() and c:IsSetCard(0xe3) and c:IsAbleToGraveAsCost() and (ft>0 or c:GetSequence()<5)
end end
function c40392714.spcon(e,c) function c40392714.spcon(e,c)
if c==nil then return true end if c==nil then return true end
return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>-1 local tp=c:GetControler()
and Duel.IsExistingMatchingCard(c40392714.filter,c:GetControler(),LOCATION_MZONE,0,1,nil) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
return ft>-1 and Duel.IsExistingMatchingCard(c40392714.filter,tp,LOCATION_MZONE,0,1,nil,ft)
end end
function c40392714.spop(e,tp,eg,ep,ev,re,r,rp,c) function c40392714.spop(e,tp,eg,ep,ev,re,r,rp,c)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c40392714.filter,tp,LOCATION_MZONE,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,c40392714.filter,tp,LOCATION_MZONE,0,1,1,nil,ft)
Duel.SendtoGrave(g,REASON_COST) Duel.SendtoGrave(g,REASON_COST)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
......
...@@ -28,23 +28,26 @@ function c4068622.initial_effect(c) ...@@ -28,23 +28,26 @@ function c4068622.initial_effect(c)
c:RegisterEffect(e3) c:RegisterEffect(e3)
c:EnableReviveLimit() c:EnableReviveLimit()
end end
function c4068622.spfilter1(c) function c4068622.spfilter1(c,ft,tp)
if c:GetSequence()<5 then ft=ft+1 end
return c:IsFaceup() and c:IsSetCard(0x33) and c:IsType(TYPE_TUNER) and c:IsAbleToRemove() return c:IsFaceup() and c:IsSetCard(0x33) and c:IsType(TYPE_TUNER) and c:IsAbleToRemove()
and ft>-1 and Duel.IsExistingMatchingCard(c4068622.spfilter2,tp,LOCATION_MZONE,0,1,c,ft)
end end
function c4068622.spfilter2(c) function c4068622.spfilter2(c,ft)
return c:IsFaceup() and not c:IsType(TYPE_TUNER) and c:IsAbleToRemove() return c:IsFaceup() and not c:IsType(TYPE_TUNER) and c:IsAbleToRemove() and (ft>0 or c:GetSequence()<5)
end end
function c4068622.spcon(e,c) function c4068622.spcon(e,c)
if c==nil then return true end if c==nil then return true end
return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>-2 local tp=c:GetControler()
and Duel.IsExistingMatchingCard(c4068622.spfilter1,c:GetControler(),LOCATION_MZONE,0,1,nil) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
and Duel.IsExistingMatchingCard(c4068622.spfilter2,c:GetControler(),LOCATION_MZONE,0,1,nil) return ft>-2 and Duel.IsExistingMatchingCard(c4068622.spfilter1,tp,LOCATION_MZONE,0,1,nil,ft,tp)
end end
function c4068622.spop(e,tp,eg,ep,ev,re,r,rp,c) function c4068622.spop(e,tp,eg,ep,ev,re,r,rp,c)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g1=Duel.SelectMatchingCard(tp,c4068622.spfilter1,tp,LOCATION_MZONE,0,1,1,nil) local g1=Duel.SelectMatchingCard(tp,c4068622.spfilter1,tp,LOCATION_MZONE,0,1,1,nil,ft,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g2=Duel.SelectMatchingCard(tp,c4068622.spfilter2,tp,LOCATION_MZONE,0,1,1,nil) local g2=Duel.SelectMatchingCard(tp,c4068622.spfilter2,tp,LOCATION_MZONE,0,1,1,g1:GetFirst(),ft)
g1:Merge(g2) g1:Merge(g2)
Duel.Remove(g1,POS_FACEUP,REASON_COST) Duel.Remove(g1,POS_FACEUP,REASON_COST)
end end
......
...@@ -21,17 +21,19 @@ function c41114306.initial_effect(c) ...@@ -21,17 +21,19 @@ function c41114306.initial_effect(c)
e3:SetOperation(c41114306.spop2) e3:SetOperation(c41114306.spop2)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
function c41114306.filter(c) function c41114306.filter(c,ft)
return c:IsFaceup() and c:IsSetCard(0xe3) and c:IsAbleToGraveAsCost() return c:IsFaceup() and c:IsSetCard(0xe3) and c:IsAbleToGraveAsCost() and (ft>0 or c:GetSequence()<5)
end end
function c41114306.spcon(e,c) function c41114306.spcon(e,c)
if c==nil then return true end if c==nil then return true end
return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>-1 local tp=c:GetControler()
and Duel.IsExistingMatchingCard(c41114306.filter,c:GetControler(),LOCATION_MZONE,0,1,nil) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
return ft>-1 and Duel.IsExistingMatchingCard(c41114306.filter,tp,LOCATION_MZONE,0,1,nil,ft)
end end
function c41114306.spop(e,tp,eg,ep,ev,re,r,rp,c) function c41114306.spop(e,tp,eg,ep,ev,re,r,rp,c)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c41114306.filter,tp,LOCATION_MZONE,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,c41114306.filter,tp,LOCATION_MZONE,0,1,1,nil,ft)
Duel.SendtoGrave(g,REASON_COST) Duel.SendtoGrave(g,REASON_COST)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
......
...@@ -49,13 +49,19 @@ function c41175645.initial_effect(c) ...@@ -49,13 +49,19 @@ function c41175645.initial_effect(c)
e5:SetOperation(c41175645.spop2) e5:SetOperation(c41175645.spop2)
c:RegisterEffect(e5) c:RegisterEffect(e5)
end end
function c41175645.spfilter(c,ft,tp)
return c:IsRace(RACE_SPELLCASTER)
and (ft>0 or (c:IsControler(tp) and c:GetSequence()<5)) and (c:IsControler(tp) or c:IsFaceup())
end
function c41175645.spcon(e,c) function c41175645.spcon(e,c)
if c==nil then return true end if c==nil then return true end
return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>-1 local tp=c:GetControler()
and Duel.CheckReleaseGroup(c:GetControler(),Card.IsRace,1,nil,RACE_SPELLCASTER) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
return ft>-1 and Duel.CheckReleaseGroup(tp,c41175645.spfilter,1,nil,ft,tp)
end end
function c41175645.spop(e,tp,eg,ep,ev,re,r,rp,c) function c41175645.spop(e,tp,eg,ep,ev,re,r,rp,c)
local g=Duel.SelectReleaseGroup(c:GetControler(),Card.IsRace,1,1,nil,RACE_SPELLCASTER) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
local g=Duel.SelectReleaseGroup(tp,c41175645.spfilter,1,1,nil,ft,tp)
Duel.Release(g,REASON_COST) Duel.Release(g,REASON_COST)
end end
function c41175645.value(e,c) function c41175645.value(e,c)
......
...@@ -30,16 +30,19 @@ function c43413875.initial_effect(c) ...@@ -30,16 +30,19 @@ function c43413875.initial_effect(c)
e3:SetOperation(c43413875.drop) e3:SetOperation(c43413875.drop)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
function c43413875.hspfilter(c) function c43413875.hspfilter(c,ft,tp)
return c:IsSetCard(0xe6) and c:GetLevel()==8 and not c:IsCode(43413875) return c:IsSetCard(0xe6) and c:GetLevel()==8 and not c:IsCode(43413875)
and (ft>0 or (c:IsControler(tp) and c:GetSequence()<5)) and (c:IsControler(tp) or c:IsFaceup())
end end
function c43413875.hspcon(e,c) function c43413875.hspcon(e,c)
if c==nil then return true end if c==nil then return true end
return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>-1 local tp=c:GetControler()
and Duel.CheckReleaseGroup(c:GetControler(),c43413875.hspfilter,1,nil) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
return ft>-1 and Duel.CheckReleaseGroup(tp,c43413875.hspfilter,1,nil,ft,tp)
end end
function c43413875.hspop(e,tp,eg,ep,ev,re,r,rp,c) function c43413875.hspop(e,tp,eg,ep,ev,re,r,rp,c)
local g=Duel.SelectReleaseGroup(c:GetControler(),c43413875.hspfilter,1,1,nil) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
local g=Duel.SelectReleaseGroup(tp,c43413875.hspfilter,1,1,nil,ft,tp)
Duel.Release(g,REASON_COST) Duel.Release(g,REASON_COST)
end end
function c43413875.target(e,tp,eg,ep,ev,re,r,rp,chk) function c43413875.target(e,tp,eg,ep,ev,re,r,rp,chk)
......
...@@ -11,15 +11,19 @@ function c46565218.initial_effect(c) ...@@ -11,15 +11,19 @@ function c46565218.initial_effect(c)
e1:SetOperation(c46565218.spop) e1:SetOperation(c46565218.spop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c46565218.spfilter(c,ft)
return c:IsReleasable() and (ft>0 or c:GetSequence()<5)
end
function c46565218.spcon(e,c) function c46565218.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()
return Duel.GetLocationCount(1-tp,LOCATION_MZONE)>-1 local ft=Duel.GetLocationCount(1-tp,LOCATION_MZONE)
and Duel.IsExistingMatchingCard(Card.IsReleasable,tp,0,LOCATION_MZONE,1,nil) return ft>-1 and Duel.IsExistingMatchingCard(c46565218.spfilter,tp,0,LOCATION_MZONE,1,nil,ft)
end end
function c46565218.spop(e,tp,eg,ep,ev,re,r,rp,c) function c46565218.spop(e,tp,eg,ep,ev,re,r,rp,c)
local ft=Duel.GetLocationCount(1-tp,LOCATION_MZONE)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g=Duel.SelectMatchingCard(tp,Card.IsReleasable,tp,0,LOCATION_MZONE,1,1,nil) local g=Duel.SelectMatchingCard(tp,c46565218.spfilter,tp,0,LOCATION_MZONE,1,1,nil,ft)
Duel.Release(g,REASON_COST) Duel.Release(g,REASON_COST)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(46565218,0)) e1:SetDescription(aux.Stringid(46565218,0))
......
...@@ -14,15 +14,18 @@ end ...@@ -14,15 +14,18 @@ end
function c48579379.eqfilter(c) function c48579379.eqfilter(c)
return c:IsCode(40240595) and c:GetTurnCounter()>=6 return c:IsCode(40240595) and c:GetTurnCounter()>=6
end end
function c48579379.rfilter(c) function c48579379.rfilter(c,ft,tp)
return c:IsCode(58192742) and c:GetEquipGroup():FilterCount(c48579379.eqfilter,nil)>0 return c:IsCode(58192742) and c:GetEquipGroup():FilterCount(c48579379.eqfilter,nil)>0
and (ft>0 or (c:IsControler(tp) and c:GetSequence()<5)) and (c:IsControler(tp) or c:IsFaceup())
end end
function c48579379.spcon(e,c) function c48579379.spcon(e,c)
if c==nil then return true end if c==nil then return true end
return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>-1 local tp=c:GetControler()
and Duel.CheckReleaseGroup(c:GetControler(),c48579379.rfilter,1,nil) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
return ft>-1 and Duel.CheckReleaseGroup(tp,c48579379.rfilter,1,nil,ft,tp)
end end
function c48579379.spop(e,tp,eg,ep,ev,re,r,rp,c) function c48579379.spop(e,tp,eg,ep,ev,re,r,rp,c)
local g=Duel.SelectReleaseGroup(c:GetControler(),c48579379.rfilter,1,1,nil) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
local g=Duel.SelectReleaseGroup(tp,c48579379.rfilter,1,1,nil,ft,tp)
Duel.Release(g,REASON_COST) Duel.Release(g,REASON_COST)
end end
...@@ -30,20 +30,24 @@ function c48770333.initial_effect(c) ...@@ -30,20 +30,24 @@ function c48770333.initial_effect(c)
e3:SetOperation(c48770333.atkop) e3:SetOperation(c48770333.atkop)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
function c48770333.cfilter(c) function c48770333.spfilter(c,ft)
return c:IsFaceup() and c:IsSetCard(0xd3) return c:IsReleasable() and (ft>0 or c:GetSequence()<5)
end end
function c48770333.spcon(e,c) function c48770333.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()
return Duel.GetLocationCount(1-tp,LOCATION_MZONE)>-1 local ft=Duel.GetLocationCount(1-tp,LOCATION_MZONE)
and Duel.IsExistingMatchingCard(Card.IsReleasable,tp,0,LOCATION_MZONE,1,nil) return ft>-1 and Duel.IsExistingMatchingCard(c48770333.spfilter,tp,0,LOCATION_MZONE,1,nil,ft)
end end
function c48770333.spop(e,tp,eg,ep,ev,re,r,rp,c) function c48770333.spop(e,tp,eg,ep,ev,re,r,rp,c)
local ft=Duel.GetLocationCount(1-tp,LOCATION_MZONE)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g=Duel.SelectMatchingCard(tp,Card.IsReleasable,tp,0,LOCATION_MZONE,1,1,nil) local g=Duel.SelectMatchingCard(tp,c48770333.spfilter,tp,0,LOCATION_MZONE,1,1,nil,ft)
Duel.Release(g,REASON_COST) Duel.Release(g,REASON_COST)
end end
function c48770333.cfilter(c)
return c:IsFaceup() and c:IsSetCard(0xd3)
end
function c48770333.spcon2(e,c) function c48770333.spcon2(e,c)
if c==nil then return true end if c==nil then return true end
local tp=c:GetControler() local tp=c:GetControler()
......
...@@ -22,21 +22,37 @@ function c48948935.initial_effect(c) ...@@ -22,21 +22,37 @@ function c48948935.initial_effect(c)
e2:SetOperation(c48948935.eqop) e2:SetOperation(c48948935.eqop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c48948935.spfilter(c,g,ft,tp)
if c:IsControler(tp) and c:GetSequence()<5 then ft=ft+1 end
return c:IsCode(13676474,86569121) and (c:IsControler(tp) or c:IsFaceup())
and (ft>0 or g:IsExists(c48948935.mzfilter,1,c,tp))
end
function c48948935.mzfilter(c,tp)
return c:IsControler(tp) and c:GetSequence()<5
end
function c48948935.spcon(e,c) function c48948935.spcon(e,c)
if c==nil then return true end if c==nil then return true end
local g=Duel.GetReleaseGroup(c:GetControler()) local tp=c:GetControler()
return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>-2 local rg=Duel.GetReleaseGroup(tp)
and g:GetCount()>1 and g:IsExists(Card.IsCode,1,nil,13676474,86569121) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
return ft>-2 and rg:GetCount()>1 and rg:IsExists(c48948935.spfilter,1,nil,rg,ft,tp)
end end
function c48948935.spop(e,tp,eg,ep,ev,re,r,rp,c) function c48948935.spop(e,tp,eg,ep,ev,re,r,rp,c)
local g=Duel.GetReleaseGroup(tp) local rg=Duel.GetReleaseGroup(tp)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local sg1=g:FilterSelect(tp,Card.IsCode,1,1,nil,13676474,86569121) local g=rg:FilterSelect(tp,c48948935.spfilter,1,1,nil,rg,ft,tp)
g:RemoveCard(sg1:GetFirst()) local tc=g:GetFirst()
if tc:IsControler(tp) and tc:GetSequence()<5 then ft=ft+1 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local sg2=g:Select(tp,1,1,nil) if ft>0 then
sg1:Merge(sg2) local g2=g:Select(tp,1,1,tc)
Duel.Release(sg1,REASON_COST) g:Merge(g2)
else
local g2=g:FilterSelect(tp,c48948935.mzfilter,1,1,tc,tp)
g:Merge(g2)
end
Duel.Release(g,REASON_COST)
end end
function c48948935.eqcon(e,tp,eg,ep,ev,re,r,rp) function c48948935.eqcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD)
......
...@@ -10,17 +10,20 @@ function c49674183.initial_effect(c) ...@@ -10,17 +10,20 @@ function c49674183.initial_effect(c)
e1:SetOperation(c49674183.spop) e1:SetOperation(c49674183.spop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c49674183.spfilter(c) function c49674183.spfilter(c,ft)
return c:IsFaceup() and c:IsRace(RACE_PLANT) and c:GetCode()~=49674183 and c:IsAbleToHandAsCost() return c:IsFaceup() and c:IsRace(RACE_PLANT) and not c:IsCode(49674183) and c:IsAbleToHandAsCost()
and (ft>0 or c:GetSequence()<5)
end end
function c49674183.spcon(e,c) function c49674183.spcon(e,c)
if c==nil then return true end if c==nil then return true end
return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>-1 local tp=c:GetControler()
and Duel.IsExistingMatchingCard(c49674183.spfilter,c:GetControler(),LOCATION_MZONE,0,1,nil) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
return ft>-1 and Duel.IsExistingMatchingCard(c49674183.spfilter,tp,LOCATION_MZONE,0,1,nil,ft)
end end
function c49674183.spop(e,tp,eg,ep,ev,re,r,rp,c) function c49674183.spop(e,tp,eg,ep,ev,re,r,rp,c)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g=Duel.SelectMatchingCard(tp,c49674183.spfilter,tp,LOCATION_MZONE,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,c49674183.spfilter,tp,LOCATION_MZONE,0,1,1,nil,ft)
Duel.SendtoHand(g,nil,REASON_COST) Duel.SendtoHand(g,nil,REASON_COST)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
......
...@@ -23,12 +23,18 @@ function c49814180.initial_effect(c) ...@@ -23,12 +23,18 @@ function c49814180.initial_effect(c)
e3:SetValue(1) e3:SetValue(1)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
function c49814180.spfilter(c,ft,tp)
return c:IsCode(3810071)
and (ft>0 or (c:IsControler(tp) and c:GetSequence()<5)) and (c:IsControler(tp) or c:IsFaceup())
end
function c49814180.spcon(e,c) function c49814180.spcon(e,c)
if c==nil then return true end if c==nil then return true end
return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>-1 local tp=c:GetControler()
and Duel.CheckReleaseGroup(c:GetControler(),Card.IsCode,1,nil,3810071) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
return ft>-1 and Duel.CheckReleaseGroup(tp,c49814180.spfilter,1,nil,ft,tp)
end end
function c49814180.spop(e,tp,eg,ep,ev,re,r,rp,c) function c49814180.spop(e,tp,eg,ep,ev,re,r,rp,c)
local g=Duel.SelectReleaseGroup(c:GetControler(),Card.IsCode,1,1,nil,3810071) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
local g=Duel.SelectReleaseGroup(tp,c49814180.spfilter,1,1,nil,ft,tp)
Duel.Release(g,REASON_COST) Duel.Release(g,REASON_COST)
end end
...@@ -36,14 +36,35 @@ end ...@@ -36,14 +36,35 @@ end
function c4998619.filter(c) function c4998619.filter(c)
return c:IsFaceup() and c:IsSetCard(0xe3) and c:IsAbleToGraveAsCost() return c:IsFaceup() and c:IsSetCard(0xe3) and c:IsAbleToGraveAsCost()
end end
function c4998619.mzfilter(c)
return c:GetSequence()<5
end
function c4998619.spcon(e,c) function c4998619.spcon(e,c)
if c==nil then return true end if c==nil then return true end
return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>-3 local tp=c:GetControler()
and Duel.IsExistingMatchingCard(c4998619.filter,c:GetControler(),LOCATION_MZONE,0,3,nil) local mg=Duel.GetMatchingGroup(c4998619.filter,tp,LOCATION_MZONE,0,nil)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
local ct=-ft+1
return ft>-3 and mg:GetCount()>2 and (ft>0 or mg:IsExists(c4998619.mzfilter,ct,nil))
end end
function c4998619.spop(e,tp,eg,ep,ev,re,r,rp,c) function c4998619.spop(e,tp,eg,ep,ev,re,r,rp,c)
local mg=Duel.GetMatchingGroup(c4998619.filter,tp,LOCATION_MZONE,0,nil)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
local ct=-ft+1
local g=nil
if ft>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c4998619.filter,tp,LOCATION_MZONE,0,3,3,nil) g=mg:Select(tp,3,3,nil)
elseif ft>-2 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
g=mg:FilterSelect(tp,c4998619.mzfilter,ct,ct,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g2=mg:Select(tp,3-ct,3-ct,g)
g:Merge(g2)
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
g=mg:FilterSelect(tp,c4998619.mzfilter,3,3,nil)
end
Duel.SendtoGrave(g,REASON_COST) Duel.SendtoGrave(g,REASON_COST)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
......
...@@ -33,20 +33,24 @@ function c55063751.initial_effect(c) ...@@ -33,20 +33,24 @@ function c55063751.initial_effect(c)
e3:SetOperation(c55063751.negop) e3:SetOperation(c55063751.negop)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
function c55063751.cfilter(c) function c55063751.spfilter(c,ft)
return c:IsFaceup() and c:IsSetCard(0xd3) return c:IsReleasable() and (ft>0 or c:GetSequence()<5)
end end
function c55063751.spcon(e,c) function c55063751.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()
return Duel.GetLocationCount(1-tp,LOCATION_MZONE)>-1 local ft=Duel.GetLocationCount(1-tp,LOCATION_MZONE)
and Duel.IsExistingMatchingCard(Card.IsReleasable,tp,0,LOCATION_MZONE,1,nil) return ft>-1 and Duel.IsExistingMatchingCard(c55063751.spfilter,tp,0,LOCATION_MZONE,1,nil,ft)
end end
function c55063751.spop(e,tp,eg,ep,ev,re,r,rp,c) function c55063751.spop(e,tp,eg,ep,ev,re,r,rp,c)
local ft=Duel.GetLocationCount(1-tp,LOCATION_MZONE)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g=Duel.SelectMatchingCard(tp,Card.IsReleasable,tp,0,LOCATION_MZONE,1,1,nil) local g=Duel.SelectMatchingCard(tp,c55063751.spfilter,tp,0,LOCATION_MZONE,1,1,nil,ft)
Duel.Release(g,REASON_COST) Duel.Release(g,REASON_COST)
end end
function c55063751.cfilter(c)
return c:IsFaceup() and c:IsSetCard(0xd3)
end
function c55063751.spcon2(e,c) function c55063751.spcon2(e,c)
if c==nil then return true end if c==nil then return true end
local tp=c:GetControler() local tp=c:GetControler()
......
...@@ -30,16 +30,19 @@ function c55204071.initial_effect(c) ...@@ -30,16 +30,19 @@ function c55204071.initial_effect(c)
e3:SetOperation(c55204071.spop3) e3:SetOperation(c55204071.spop3)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
function c55204071.cfilter(c) function c55204071.cfilter(c,ft,tp)
return c:IsFaceup() and c:IsType(TYPE_XYZ) return c:IsFaceup() and c:IsType(TYPE_XYZ)
and (ft>0 or (c:IsControler(tp) and c:GetSequence()<5))
end end
function c55204071.spcon(e,c) function c55204071.spcon(e,c)
if c==nil then return true end if c==nil then return true end
return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>-1 local tp=c:GetControler()
and Duel.CheckReleaseGroup(c:GetControler(),c55204071.cfilter,1,nil) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
return ft>-1 and Duel.CheckReleaseGroup(tp,c55204071.cfilter,1,nil,ft,tp)
end end
function c55204071.spop(e,tp,eg,ep,ev,re,r,rp,c) function c55204071.spop(e,tp,eg,ep,ev,re,r,rp,c)
local g=Duel.SelectReleaseGroup(c:GetControler(),c55204071.cfilter,1,1,nil) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
local g=Duel.SelectReleaseGroup(tp,c55204071.cfilter,1,1,nil,ft,tp)
Duel.Release(g,REASON_COST) Duel.Release(g,REASON_COST)
end end
function c55204071.spcon2(e,tp,eg,ep,ev,re,r,rp) function c55204071.spcon2(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -29,13 +29,19 @@ function c55737443.initial_effect(c) ...@@ -29,13 +29,19 @@ function c55737443.initial_effect(c)
e3:SetOperation(c55737443.damop) e3:SetOperation(c55737443.damop)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
function c55737443.spfilter(c,ft,tp)
return c:IsSetCard(0x5c)
and (ft>0 or (c:IsControler(tp) and c:GetSequence()<5)) and (c:IsControler(tp) or c:IsFaceup())
end
function c55737443.spcon(e,c) function c55737443.spcon(e,c)
if c==nil then return true end if c==nil then return true end
return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>-1 local tp=c:GetControler()
and Duel.CheckReleaseGroup(c:GetControler(),Card.IsSetCard,1,nil,0x5c) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
return ft>-1 and Duel.CheckReleaseGroup(tp,c55737443.spfilter,1,nil,ft,tp)
end end
function c55737443.spop(e,tp,eg,ep,ev,re,r,rp,c) function c55737443.spop(e,tp,eg,ep,ev,re,r,rp,c)
local g=Duel.SelectReleaseGroup(tp,Card.IsSetCard,1,1,nil,0x5c) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
local g=Duel.SelectReleaseGroup(tp,c55737443.spfilter,1,1,nil,ft,tp)
Duel.Release(g,REASON_COST) Duel.Release(g,REASON_COST)
end end
function c55737443.damcon(e,tp,eg,ep,ev,re,r,rp) function c55737443.damcon(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -21,17 +21,20 @@ function c56421754.initial_effect(c) ...@@ -21,17 +21,20 @@ function c56421754.initial_effect(c)
e2:SetCondition(c56421754.actcon) e2:SetCondition(c56421754.actcon)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c56421754.spfilter(c) function c56421754.spfilter(c,ft)
return c:IsFaceup() and c:IsSetCard(0xb2) and not c:IsCode(56421754) and c:IsAbleToHandAsCost() return c:IsFaceup() and c:IsSetCard(0xb2) and not c:IsCode(56421754) and c:IsAbleToHandAsCost()
and (ft>0 or c:GetSequence()<5)
end end
function c56421754.spcon(e,c) function c56421754.spcon(e,c)
if c==nil then return true end if c==nil then return true end
return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>-1 local tp=c:GetControler()
and Duel.IsExistingMatchingCard(c56421754.spfilter,c:GetControler(),LOCATION_MZONE,0,1,nil) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
return ft>-1 and Duel.IsExistingMatchingCard(c56421754.spfilter,tp,LOCATION_MZONE,0,1,nil,ft)
end end
function c56421754.spop(e,tp,eg,ep,ev,re,r,rp,c) function c56421754.spop(e,tp,eg,ep,ev,re,r,rp,c)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g=Duel.SelectMatchingCard(tp,c56421754.spfilter,tp,LOCATION_MZONE,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,c56421754.spfilter,tp,LOCATION_MZONE,0,1,1,nil,ft)
Duel.SendtoHand(g,nil,REASON_COST) Duel.SendtoHand(g,nil,REASON_COST)
end end
function c56421754.aclimit(e,re,tp) function c56421754.aclimit(e,re,tp)
......
...@@ -28,16 +28,19 @@ function c57261568.initial_effect(c) ...@@ -28,16 +28,19 @@ function c57261568.initial_effect(c)
e3:SetOperation(c57261568.synop) e3:SetOperation(c57261568.synop)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
function c57261568.hspfilter(c) function c57261568.hspfilter(c,ft,tp)
return c:IsSetCard(0xe6) and not c:IsCode(57261568) return c:IsSetCard(0xe6) and not c:IsCode(57261568)
and (ft>0 or (c:IsControler(tp) and c:GetSequence()<5)) and (c:IsControler(tp) or c:IsFaceup())
end end
function c57261568.hspcon(e,c) function c57261568.hspcon(e,c)
if c==nil then return true end if c==nil then return true end
return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>-1 local tp=c:GetControler()
and Duel.CheckReleaseGroup(c:GetControler(),c57261568.hspfilter,1,nil) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
return ft>-1 and Duel.CheckReleaseGroup(tp,c57261568.hspfilter,1,nil,ft,tp)
end end
function c57261568.hspop(e,tp,eg,ep,ev,re,r,rp,c) function c57261568.hspop(e,tp,eg,ep,ev,re,r,rp,c)
local g=Duel.SelectReleaseGroup(c:GetControler(),c57261568.hspfilter,1,1,nil) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
local g=Duel.SelectReleaseGroup(tp,c57261568.hspfilter,1,1,nil,ft,tp)
Duel.Release(g,REASON_COST) Duel.Release(g,REASON_COST)
end end
function c57261568.target(e,tp,eg,ep,ev,re,r,rp,chk) function c57261568.target(e,tp,eg,ep,ev,re,r,rp,chk)
......
...@@ -61,13 +61,19 @@ end ...@@ -61,13 +61,19 @@ end
function c58604027.atkval(e,c) function c58604027.atkval(e,c)
return Duel.GetMatchingGroupCount(c58604027.atkfilter,c:GetControler(),LOCATION_GRAVE,0,nil)*1000 return Duel.GetMatchingGroupCount(c58604027.atkfilter,c:GetControler(),LOCATION_GRAVE,0,nil)*1000
end end
function c58604027.spfilter(c,ft,tp)
return c:IsSetCard(0x40)
and (ft>0 or (c:IsControler(tp) and c:GetSequence()<5)) and (c:IsControler(tp) or c:IsFaceup())
end
function c58604027.spcon(e,c) function c58604027.spcon(e,c)
if c==nil then return true end if c==nil then return true end
return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>-1 local tp=c:GetControler()
and Duel.CheckReleaseGroup(c:GetControler(),Card.IsSetCard,1,nil,0x40) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
return ft>-1 and Duel.CheckReleaseGroup(tp,c58604027.spfilter,1,nil,ft,tp)
end end
function c58604027.spop(e,tp,eg,ep,ev,re,r,rp,c) function c58604027.spop(e,tp,eg,ep,ev,re,r,rp,c)
local g=Duel.SelectReleaseGroup(tp,Card.IsSetCard,1,1,nil,0x40) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
local g=Duel.SelectReleaseGroup(tp,c58604027.spfilter,1,1,nil,ft,tp)
Duel.Release(g,REASON_COST) Duel.Release(g,REASON_COST)
end end
function c58604027.efilter(e,te) function c58604027.efilter(e,te)
......
...@@ -26,14 +26,38 @@ function c5861892.initial_effect(c) ...@@ -26,14 +26,38 @@ function c5861892.initial_effect(c)
e3:SetOperation(c5861892.coinop) e3:SetOperation(c5861892.coinop)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
function c5861892.spfilter(c)
return c:IsAbleToGraveAsCost()
end
function c5861892.mzfilter(c)
return c:GetSequence()<5
end
function c5861892.spcon(e,c) function c5861892.spcon(e,c)
if c==nil then return true end if c==nil then return true end
return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>-3 local tp=c:GetControler()
and Duel.IsExistingMatchingCard(Card.IsAbleToGraveAsCost,c:GetControler(),LOCATION_MZONE,0,3,nil) local mg=Duel.GetMatchingGroup(c5861892.spfilter,tp,LOCATION_MZONE,0,nil)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
local ct=-ft+1
return ft>-3 and mg:GetCount()>2 and (ft>0 or mg:IsExists(c5861892.mzfilter,ct,nil))
end end
function c5861892.spop(e,tp,eg,ep,ev,re,r,rp,c) function c5861892.spop(e,tp,eg,ep,ev,re,r,rp,c)
local mg=Duel.GetMatchingGroup(c5861892.spfilter,tp,LOCATION_MZONE,0,nil)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
local ct=-ft+1
local g=nil
if ft>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
g=mg:Select(tp,3,3,nil)
elseif ft>-2 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToGraveAsCost,c:GetControler(),LOCATION_MZONE,0,3,3,nil) g=mg:FilterSelect(tp,c5861892.mzfilter,ct,ct,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g2=mg:Select(tp,3-ct,3-ct,g)
g:Merge(g2)
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
g=mg:FilterSelect(tp,c5861892.mzfilter,3,3,nil)
end
Duel.SendtoGrave(g,REASON_COST) Duel.SendtoGrave(g,REASON_COST)
end end
function c5861892.cointg(e,tp,eg,ep,ev,re,r,rp,chk) function c5861892.cointg(e,tp,eg,ep,ev,re,r,rp,chk)
......
...@@ -32,13 +32,19 @@ c59464593.lvupcount=1 ...@@ -32,13 +32,19 @@ c59464593.lvupcount=1
c59464593.lvup={73879377} c59464593.lvup={73879377}
c59464593.lvdncount=3 c59464593.lvdncount=3
c59464593.lvdn={73879377,46384672,980973} c59464593.lvdn={73879377,46384672,980973}
function c59464593.spfilter(c,ft,tp)
return c:IsCode(73879377)
and (ft>0 or (c:IsControler(tp) and c:GetSequence()<5)) and (c:IsControler(tp) or c:IsFaceup())
end
function c59464593.spcon(e,c) function c59464593.spcon(e,c)
if c==nil then return true end if c==nil then return true end
return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>-1 local tp=c:GetControler()
and Duel.CheckReleaseGroup(c:GetControler(),Card.IsCode,1,nil,73879377) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
return ft>-1 and Duel.CheckReleaseGroup(tp,c59464593.spfilter,1,nil,ft,tp)
end end
function c59464593.spop(e,tp,eg,ep,ev,re,r,rp,c) function c59464593.spop(e,tp,eg,ep,ev,re,r,rp,c)
local g=Duel.SelectReleaseGroup(c:GetControler(),Card.IsCode,1,1,nil,73879377) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
local g=Duel.SelectReleaseGroup(tp,c59464593.spfilter,1,1,nil,ft,tp)
Duel.Release(g,REASON_COST) Duel.Release(g,REASON_COST)
end end
function c59464593.dfilter(c) function c59464593.dfilter(c)
......
...@@ -43,14 +43,19 @@ function c63014935.initial_effect(c) ...@@ -43,14 +43,19 @@ function c63014935.initial_effect(c)
e4:SetOperation(c63014935.spcop) e4:SetOperation(c63014935.spcop)
c:RegisterEffect(e4) c:RegisterEffect(e4)
end end
function c63014935.spfilter(c,ft)
return c:IsReleasable() and (ft>0 or c:GetSequence()<5)
end
function c63014935.spcon(e,c) function c63014935.spcon(e,c)
if c==nil then return true end if c==nil then return true end
return Duel.GetLocationCount(1-c:GetControler(),LOCATION_MZONE)>-1 local tp=c:GetControler()
and Duel.IsExistingMatchingCard(Card.IsReleasable,c:GetControler(),0,LOCATION_MZONE,1,nil) local ft=Duel.GetLocationCount(1-tp,LOCATION_MZONE)
return ft>-1 and Duel.IsExistingMatchingCard(c63014935.spfilter,tp,0,LOCATION_MZONE,1,nil,ft)
end end
function c63014935.spop(e,tp,eg,ep,ev,re,r,rp,c) function c63014935.spop(e,tp,eg,ep,ev,re,r,rp,c)
local ft=Duel.GetLocationCount(1-tp,LOCATION_MZONE)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g=Duel.SelectMatchingCard(tp,Card.IsReleasable,tp,0,LOCATION_MZONE,1,1,nil) local g=Duel.SelectMatchingCard(tp,c63014935.spfilter,tp,0,LOCATION_MZONE,1,1,nil,ft)
Duel.Release(g,REASON_COST) Duel.Release(g,REASON_COST)
end end
function c63014935.damcost(e,tp,eg,ep,ev,re,r,rp,chk) function c63014935.damcost(e,tp,eg,ep,ev,re,r,rp,chk)
......
...@@ -32,20 +32,24 @@ function c63941210.initial_effect(c) ...@@ -32,20 +32,24 @@ function c63941210.initial_effect(c)
e3:SetOperation(c63941210.disop) e3:SetOperation(c63941210.disop)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
function c63941210.cfilter(c) function c63941210.spfilter(c,ft)
return c:IsFaceup() and c:IsSetCard(0xd3) return c:IsReleasable() and (ft>0 or c:GetSequence()<5)
end end
function c63941210.spcon(e,c) function c63941210.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()
return Duel.GetLocationCount(1-tp,LOCATION_MZONE)>-1 local ft=Duel.GetLocationCount(1-tp,LOCATION_MZONE)
and Duel.IsExistingMatchingCard(Card.IsReleasable,tp,0,LOCATION_MZONE,1,nil) return ft>-1 and Duel.IsExistingMatchingCard(c63941210.spfilter,tp,0,LOCATION_MZONE,1,nil,ft)
end end
function c63941210.spop(e,tp,eg,ep,ev,re,r,rp,c) function c63941210.spop(e,tp,eg,ep,ev,re,r,rp,c)
local ft=Duel.GetLocationCount(1-tp,LOCATION_MZONE)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g=Duel.SelectMatchingCard(tp,Card.IsReleasable,tp,0,LOCATION_MZONE,1,1,nil) local g=Duel.SelectMatchingCard(tp,c63941210.spfilter,tp,0,LOCATION_MZONE,1,1,nil,ft)
Duel.Release(g,REASON_COST) Duel.Release(g,REASON_COST)
end end
function c63941210.cfilter(c)
return c:IsFaceup() and c:IsSetCard(0xd3)
end
function c63941210.spcon2(e,c) function c63941210.spcon2(e,c)
if c==nil then return true end if c==nil then return true end
local tp=c:GetControler() local tp=c:GetControler()
......
...@@ -39,12 +39,18 @@ function c64382839.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -39,12 +39,18 @@ function c64382839.spop(e,tp,eg,ep,ev,re,r,rp)
local token=Duel.CreateToken(tp,64382840) local token=Duel.CreateToken(tp,64382840)
Duel.SpecialSummon(token,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(token,0,tp,tp,false,false,POS_FACEUP)
end end
function c64382839.spfilter(c,ft,tp)
return c:IsCode(64382840)
and (ft>0 or (c:IsControler(tp) and c:GetSequence()<5)) and (c:IsControler(tp) or c:IsFaceup())
end
function c64382839.hspcon(e,c) function c64382839.hspcon(e,c)
if c==nil then return true end if c==nil then return true end
return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>-1 local tp=c:GetControler()
and Duel.CheckReleaseGroup(c:GetControler(),Card.IsCode,1,nil,64382840) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
return ft>-1 and Duel.CheckReleaseGroup(tp,c64382839.spfilter,1,nil,ft,tp)
end end
function c64382839.hspop(e,tp,eg,ep,ev,re,r,rp,c) function c64382839.hspop(e,tp,eg,ep,ev,re,r,rp,c)
local g=Duel.SelectReleaseGroup(tp,Card.IsCode,1,1,nil,64382840) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
local g=Duel.SelectReleaseGroup(tp,c64382839.spfilter,1,1,nil,ft,tp)
Duel.Release(g,REASON_COST) Duel.Release(g,REASON_COST)
end end
...@@ -10,17 +10,19 @@ function c65549080.initial_effect(c) ...@@ -10,17 +10,19 @@ function c65549080.initial_effect(c)
e1:SetOperation(c65549080.spop) e1:SetOperation(c65549080.spop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c65549080.spfilter(c) function c65549080.spfilter(c,ft)
return c:IsFaceup() and c:IsSetCard(0x37) and c:IsAbleToHandAsCost() return c:IsFaceup() and c:IsSetCard(0x37) and c:IsAbleToHandAsCost() and (ft>0 or c:GetSequence()<5)
end end
function c65549080.spcon(e,c) function c65549080.spcon(e,c)
if c==nil then return true end if c==nil then return true end
return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>-1 local tp=c:GetControler()
and Duel.IsExistingMatchingCard(c65549080.spfilter,c:GetControler(),LOCATION_MZONE,0,1,nil) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
return ft>-1 and Duel.IsExistingMatchingCard(c65549080.spfilter,tp,LOCATION_MZONE,0,1,nil,ft)
end end
function c65549080.spop(e,tp,eg,ep,ev,re,r,rp,c) function c65549080.spop(e,tp,eg,ep,ev,re,r,rp,c)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g=Duel.SelectMatchingCard(tp,c65549080.spfilter,tp,LOCATION_MZONE,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,c65549080.spfilter,tp,LOCATION_MZONE,0,1,1,nil,ft)
Duel.SendtoHand(g,nil,REASON_COST) Duel.SendtoHand(g,nil,REASON_COST)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
......
...@@ -46,16 +46,19 @@ function c67547370.initial_effect(c) ...@@ -46,16 +46,19 @@ function c67547370.initial_effect(c)
e5:SetOperation(c67547370.atkop) e5:SetOperation(c67547370.atkop)
c:RegisterEffect(e5) c:RegisterEffect(e5)
end end
function c67547370.cfilter(c) function c67547370.cfilter(c,ft,tp)
return c:IsFaceup() and c:GetCounter(0x1039)==10 return c:IsFaceup() and c:GetCounter(0x1039)==10
and (ft>0 or (c:IsControler(tp) and c:GetSequence()<5))
end end
function c67547370.spcon(e,c) function c67547370.spcon(e,c)
if c==nil then return true end if c==nil then return true end
return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>-1 local tp=c:GetControler()
and Duel.CheckReleaseGroup(c:GetControler(),c67547370.cfilter,1,nil) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
return ft>-1 and Duel.CheckReleaseGroup(tp,c67547370.cfilter,1,nil,ft,tp)
end end
function c67547370.spop(e,tp,eg,ep,ev,re,r,rp,c) function c67547370.spop(e,tp,eg,ep,ev,re,r,rp,c)
local g=Duel.SelectReleaseGroup(tp,c67547370.cfilter,1,1,nil) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
local g=Duel.SelectReleaseGroup(tp,c67547370.cfilter,1,1,nil,ft,tp)
Duel.Release(g,REASON_COST) Duel.Release(g,REASON_COST)
end end
function c67547370.countcost(e,tp,eg,ep,ev,re,r,rp,chk) function c67547370.countcost(e,tp,eg,ep,ev,re,r,rp,chk)
......
...@@ -26,14 +26,38 @@ function c69831560.initial_effect(c) ...@@ -26,14 +26,38 @@ function c69831560.initial_effect(c)
e3:SetOperation(c69831560.coinop) e3:SetOperation(c69831560.coinop)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
function c69831560.spfilter(c)
return c:IsAbleToGraveAsCost()
end
function c69831560.mzfilter(c)
return c:GetSequence()<5
end
function c69831560.spcon(e,c) function c69831560.spcon(e,c)
if c==nil then return true end if c==nil then return true end
return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>-3 local tp=c:GetControler()
and Duel.IsExistingMatchingCard(Card.IsAbleToGraveAsCost,c:GetControler(),LOCATION_MZONE,0,3,nil) local mg=Duel.GetMatchingGroup(c69831560.spfilter,tp,LOCATION_MZONE,0,nil)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
local ct=-ft+1
return ft>-3 and mg:GetCount()>2 and (ft>0 or mg:IsExists(c69831560.mzfilter,ct,nil))
end end
function c69831560.spop(e,tp,eg,ep,ev,re,r,rp,c) function c69831560.spop(e,tp,eg,ep,ev,re,r,rp,c)
local mg=Duel.GetMatchingGroup(c69831560.spfilter,tp,LOCATION_MZONE,0,nil)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
local ct=-ft+1
local g=nil
if ft>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
g=mg:Select(tp,3,3,nil)
elseif ft>-2 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToGraveAsCost,c:GetControler(),LOCATION_MZONE,0,3,3,nil) g=mg:FilterSelect(tp,c69831560.mzfilter,ct,ct,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g2=mg:Select(tp,3-ct,3-ct,g)
g:Merge(g2)
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
g=mg:FilterSelect(tp,c69831560.mzfilter,3,3,nil)
end
Duel.SendtoGrave(g,REASON_COST) Duel.SendtoGrave(g,REASON_COST)
end end
function c69831560.cointg(e,tp,eg,ep,ev,re,r,rp,chk) function c69831560.cointg(e,tp,eg,ep,ev,re,r,rp,chk)
......
...@@ -39,13 +39,38 @@ function c69890967.initial_effect(c) ...@@ -39,13 +39,38 @@ function c69890967.initial_effect(c)
e4:SetOperation(c69890967.atop) e4:SetOperation(c69890967.atop)
c:RegisterEffect(e4) c:RegisterEffect(e4)
end end
function c69890967.rfilter(c,tp)
return c:IsRace(RACE_FIEND) and (c:IsControler(tp) or c:IsFaceup())
end
function c69890967.mzfilter(c,tp)
return c:IsControler(tp) and c:GetSequence()<5
end
function c69890967.spcon(e,c) function c69890967.spcon(e,c)
if c==nil then return true end if c==nil then return true end
return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>-3 local tp=c:GetControler()
and Duel.CheckReleaseGroup(c:GetControler(),Card.IsRace,3,nil,RACE_FIEND) local rg=Duel.GetReleaseGroup(tp):Filter(c69890967.rfilter,nil,tp)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
local ct=-ft+1
return ft>-3 and rg:GetCount()>2 and (ft>0 or rg:IsExists(c69890967.mzfilter,ct,nil,tp))
end end
function c69890967.spop(e,tp,eg,ep,ev,re,r,rp,c) function c69890967.spop(e,tp,eg,ep,ev,re,r,rp,c)
local g=Duel.SelectReleaseGroup(c:GetControler(),Card.IsRace,3,3,nil,RACE_FIEND) local rg=Duel.GetReleaseGroup(tp):Filter(c69890967.rfilter,nil,tp)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
local g=nil
if ft>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
g=rg:Select(tp,3,3,nil)
elseif ft>-2 then
local ct=-ft+1
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
g=rg:FilterSelect(tp,c69890967.mzfilter,ct,ct,nil,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g2=rg:Select(tp,3-ct,3-ct,g)
g:Merge(g2)
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
g=rg:FilterSelect(tp,c69890967.mzfilter,3,3,nil,tp)
end
Duel.Release(g,REASON_COST) Duel.Release(g,REASON_COST)
end end
function c69890967.tkcon(e,tp,eg,ep,ev,re,r,rp) function c69890967.tkcon(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -19,13 +19,19 @@ function c70456282.initial_effect(c) ...@@ -19,13 +19,19 @@ function c70456282.initial_effect(c)
e2:SetOperation(c70456282.lvop) e2:SetOperation(c70456282.lvop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c70456282.spfilter(c,ft,tp)
return c:IsSetCard(0x33)
and (ft>0 or (c:IsControler(tp) and c:GetSequence()<5)) and (c:IsControler(tp) or c:IsFaceup())
end
function c70456282.spcon(e,c) function c70456282.spcon(e,c)
if c==nil then return true end if c==nil then return true end
return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>-1 local tp=c:GetControler()
and Duel.CheckReleaseGroup(c:GetControler(),Card.IsSetCard,1,nil,0x33) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
return ft>-1 and Duel.CheckReleaseGroup(tp,c70456282.spfilter,1,nil,ft,tp)
end end
function c70456282.spop(e,tp,eg,ep,ev,re,r,rp,c) function c70456282.spop(e,tp,eg,ep,ev,re,r,rp,c)
local g=Duel.SelectReleaseGroup(tp,Card.IsSetCard,1,1,nil,0x33) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
local g=Duel.SelectReleaseGroup(tp,c70456282.spfilter,1,1,nil,ft,tp)
Duel.Release(g,REASON_COST) Duel.Release(g,REASON_COST)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
......
...@@ -26,17 +26,20 @@ function c71279983.initial_effect(c) ...@@ -26,17 +26,20 @@ function c71279983.initial_effect(c)
e3:SetOperation(c71279983.desop) e3:SetOperation(c71279983.desop)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
function c71279983.spfilter(c) function c71279983.spfilter(c,ft)
return c:IsFaceup() and c:IsSetCard(0xb2) and not c:IsCode(71279983) and c:IsAbleToHandAsCost() return c:IsFaceup() and c:IsSetCard(0xb2) and not c:IsCode(71279983) and c:IsAbleToHandAsCost()
and (ft>0 or c:GetSequence()<5)
end end
function c71279983.spcon(e,c) function c71279983.spcon(e,c)
if c==nil then return true end if c==nil then return true end
return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>-1 local tp=c:GetControler()
and Duel.IsExistingMatchingCard(c71279983.spfilter,c:GetControler(),LOCATION_MZONE,0,1,nil) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
return ft>-1 and Duel.IsExistingMatchingCard(c71279983.spfilter,tp,LOCATION_MZONE,0,1,nil,ft)
end end
function c71279983.spop(e,tp,eg,ep,ev,re,r,rp,c) function c71279983.spop(e,tp,eg,ep,ev,re,r,rp,c)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g=Duel.SelectMatchingCard(tp,c71279983.spfilter,tp,LOCATION_MZONE,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,c71279983.spfilter,tp,LOCATION_MZONE,0,1,1,nil,ft)
Duel.SendtoHand(g,nil,REASON_COST) Duel.SendtoHand(g,nil,REASON_COST)
end end
function c71279983.descon(e,tp,eg,ep,ev,re,r,rp) function c71279983.descon(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -10,12 +10,18 @@ function c71923655.initial_effect(c) ...@@ -10,12 +10,18 @@ function c71923655.initial_effect(c)
e1:SetOperation(c71923655.spop) e1:SetOperation(c71923655.spop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c71923655.spfilter(c,ft,tp)
return c:IsAttribute(ATTRIBUTE_WATER)
and (ft>0 or (c:IsControler(tp) and c:GetSequence()<5)) and (c:IsControler(tp) or c:IsFaceup())
end
function c71923655.spcon(e,c) function c71923655.spcon(e,c)
if c==nil then return true end if c==nil then return true end
return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>-1 local tp=c:GetControler()
and Duel.CheckReleaseGroup(c:GetControler(),Card.IsAttribute,1,nil,ATTRIBUTE_WATER) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
return ft>-1 and Duel.CheckReleaseGroup(tp,c71923655.spfilter,1,nil,ft,tp)
end end
function c71923655.spop(e,tp,eg,ep,ev,re,r,rp,c) function c71923655.spop(e,tp,eg,ep,ev,re,r,rp,c)
local g=Duel.SelectReleaseGroup(c:GetControler(),Card.IsAttribute,1,1,nil,ATTRIBUTE_WATER) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
local g=Duel.SelectReleaseGroup(tp,c71923655.spfilter,1,1,nil,ft,tp)
Duel.Release(g,REASON_COST) Duel.Release(g,REASON_COST)
end end
...@@ -23,17 +23,20 @@ function c72491806.initial_effect(c) ...@@ -23,17 +23,20 @@ function c72491806.initial_effect(c)
e2:SetOperation(c72491806.tsop) e2:SetOperation(c72491806.tsop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c72491806.spfilter(c) function c72491806.spfilter(c,ft)
return c:IsFaceup() and c:IsSetCard(0xb2) and not c:IsCode(72491806) and c:IsAbleToHandAsCost() return c:IsFaceup() and c:IsSetCard(0xb2) and not c:IsCode(72491806) and c:IsAbleToHandAsCost()
and (ft>0 or c:GetSequence()<5)
end end
function c72491806.spcon(e,c) function c72491806.spcon(e,c)
if c==nil then return true end if c==nil then return true end
return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>-1 local tp=c:GetControler()
and Duel.IsExistingMatchingCard(c72491806.spfilter,c:GetControler(),LOCATION_MZONE,0,1,nil) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
return ft>-1 and Duel.IsExistingMatchingCard(c72491806.spfilter,tp,LOCATION_MZONE,0,1,nil,ft)
end end
function c72491806.spop(e,tp,eg,ep,ev,re,r,rp,c) function c72491806.spop(e,tp,eg,ep,ev,re,r,rp,c)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g=Duel.SelectMatchingCard(tp,c72491806.spfilter,tp,LOCATION_MZONE,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,c72491806.spfilter,tp,LOCATION_MZONE,0,1,1,nil,ft)
Duel.SendtoHand(g,nil,REASON_COST) Duel.SendtoHand(g,nil,REASON_COST)
end end
function c72491806.thfilter(c,e,tp,ft) function c72491806.thfilter(c,e,tp,ft)
......
...@@ -33,14 +33,34 @@ end ...@@ -33,14 +33,34 @@ end
function c77387463.filter(c) function c77387463.filter(c)
return c:IsFaceup() and c:IsSetCard(0xe3) and c:IsAbleToGraveAsCost() return c:IsFaceup() and c:IsSetCard(0xe3) and c:IsAbleToGraveAsCost()
end end
function c77387463.mzfilter(c)
return c:GetSequence()<5
end
function c77387463.spcon(e,c) function c77387463.spcon(e,c)
if c==nil then return true end if c==nil then return true end
return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>-2 local tp=c:GetControler()
and Duel.IsExistingMatchingCard(c77387463.filter,c:GetControler(),LOCATION_MZONE,0,2,nil) local mg=Duel.GetMatchingGroup(c77387463.filter,tp,LOCATION_MZONE,0,nil)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
local ct=-ft+1
return ft>-2 and mg:GetCount()>1 and (ft>0 or mg:IsExists(c77387463.mzfilter,ct,nil))
end end
function c77387463.spop(e,tp,eg,ep,ev,re,r,rp,c) function c77387463.spop(e,tp,eg,ep,ev,re,r,rp,c)
local mg=Duel.GetMatchingGroup(c77387463.filter,tp,LOCATION_MZONE,0,nil)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
local g=nil
if ft>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
g=mg:Select(tp,2,2,nil)
elseif ft>-2 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c77387463.filter,tp,LOCATION_MZONE,0,2,2,nil) g=mg:FilterSelect(tp,c77387463.mzfilter,1,1,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g2=mg:Select(tp,1,1,g)
g:Merge(g2)
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
g=mg:FilterSelect(tp,c77387463.mzfilter,2,2,nil)
end
Duel.SendtoGrave(g,REASON_COST) Duel.SendtoGrave(g,REASON_COST)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
......
...@@ -30,14 +30,34 @@ end ...@@ -30,14 +30,34 @@ end
function c78509901.filter(c) function c78509901.filter(c)
return c:IsFaceup() and c:IsSetCard(0xe3) and c:IsAbleToGraveAsCost() return c:IsFaceup() and c:IsSetCard(0xe3) and c:IsAbleToGraveAsCost()
end end
function c78509901.mzfilter(c)
return c:GetSequence()<5
end
function c78509901.spcon(e,c) function c78509901.spcon(e,c)
if c==nil then return true end if c==nil then return true end
return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>-2 local tp=c:GetControler()
and Duel.IsExistingMatchingCard(c78509901.filter,c:GetControler(),LOCATION_MZONE,0,2,nil) local mg=Duel.GetMatchingGroup(c78509901.filter,tp,LOCATION_MZONE,0,nil)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
local ct=-ft+1
return ft>-2 and mg:GetCount()>1 and (ft>0 or mg:IsExists(c78509901.mzfilter,ct,nil))
end end
function c78509901.spop(e,tp,eg,ep,ev,re,r,rp,c) function c78509901.spop(e,tp,eg,ep,ev,re,r,rp,c)
local mg=Duel.GetMatchingGroup(c78509901.filter,tp,LOCATION_MZONE,0,nil)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
local g=nil
if ft>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
g=mg:Select(tp,2,2,nil)
elseif ft>-2 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c78509901.filter,tp,LOCATION_MZONE,0,2,2,nil) g=mg:FilterSelect(tp,c78509901.mzfilter,1,1,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g2=mg:Select(tp,1,1,g)
g:Merge(g2)
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
g=mg:FilterSelect(tp,c78509901.mzfilter,2,2,nil)
end
Duel.SendtoGrave(g,REASON_COST) Duel.SendtoGrave(g,REASON_COST)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
......
...@@ -33,13 +33,19 @@ function c80887952.initial_effect(c) ...@@ -33,13 +33,19 @@ function c80887952.initial_effect(c)
e4:SetOperation(c80887952.spop) e4:SetOperation(c80887952.spop)
c:RegisterEffect(e4) c:RegisterEffect(e4)
end end
function c80887952.hspfilter(c,ft,tp)
return c:IsCode(54493213)
and (ft>0 or (c:IsControler(tp) and c:GetSequence()<5)) and (c:IsControler(tp) or c:IsFaceup())
end
function c80887952.hspcon(e,c) function c80887952.hspcon(e,c)
if c==nil then return true end if c==nil then return true end
return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>-1 local tp=c:GetControler()
and Duel.CheckReleaseGroup(c:GetControler(),Card.IsCode,1,nil,54493213) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
return ft>-1 and Duel.CheckReleaseGroup(tp,c80887952.hspfilter,1,nil,ft,tp)
end end
function c80887952.hspop(e,tp,eg,ep,ev,re,r,rp,c) function c80887952.hspop(e,tp,eg,ep,ev,re,r,rp,c)
local g=Duel.SelectReleaseGroup(tp,Card.IsCode,1,1,nil,54493213) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
local g=Duel.SelectReleaseGroup(tp,c80887952.hspfilter,1,1,nil,ft,tp)
Duel.Release(g,REASON_COST) Duel.Release(g,REASON_COST)
end end
function c80887952.filter(c) function c80887952.filter(c)
......
...@@ -24,15 +24,18 @@ function c81434470.initial_effect(c) ...@@ -24,15 +24,18 @@ function c81434470.initial_effect(c)
e3:SetTargetRange(0,LOCATION_HAND) e3:SetTargetRange(0,LOCATION_HAND)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
function c81434470.rfilter(c) function c81434470.spfilter(c,ft,tp)
return c:IsCode(45045866) return c:IsCode(45045866)
and (ft>0 or (c:IsControler(tp) and c:GetSequence()<5)) and (c:IsControler(tp) or c:IsFaceup())
end end
function c81434470.spcon(e,c) function c81434470.spcon(e,c)
if c==nil then return true end if c==nil then return true end
return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>-1 local tp=c:GetControler()
and Duel.CheckReleaseGroup(c:GetControler(),c81434470.rfilter,1,nil) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
return ft>-1 and Duel.CheckReleaseGroup(tp,c81434470.spfilter,1,nil,ft,tp)
end end
function c81434470.spop(e,tp,eg,ep,ev,re,r,rp,c) function c81434470.spop(e,tp,eg,ep,ev,re,r,rp,c)
local g=Duel.SelectReleaseGroup(c:GetControler(),c81434470.rfilter,1,1,nil) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
local g=Duel.SelectReleaseGroup(tp,c81434470.spfilter,1,1,nil,ft,tp)
Duel.Release(g,REASON_COST) Duel.Release(g,REASON_COST)
end end
...@@ -25,17 +25,20 @@ function c82419869.initial_effect(c) ...@@ -25,17 +25,20 @@ function c82419869.initial_effect(c)
e2:SetOperation(c82419869.disop) e2:SetOperation(c82419869.disop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c82419869.spfilter(c) function c82419869.spfilter(c,ft)
return c:IsFaceup() and c:IsSetCard(0xb2) and not c:IsCode(82419869) and c:IsAbleToHandAsCost() return c:IsFaceup() and c:IsSetCard(0xb2) and not c:IsCode(82419869) and c:IsAbleToHandAsCost()
and (ft>0 or c:GetSequence()<5)
end end
function c82419869.spcon(e,c) function c82419869.spcon(e,c)
if c==nil then return true end if c==nil then return true end
return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>-1 local tp=c:GetControler()
and Duel.IsExistingMatchingCard(c82419869.spfilter,c:GetControler(),LOCATION_MZONE,0,1,nil) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
return ft>-1 and Duel.IsExistingMatchingCard(c82419869.spfilter,tp,LOCATION_MZONE,0,1,nil,ft)
end end
function c82419869.spop(e,tp,eg,ep,ev,re,r,rp,c) function c82419869.spop(e,tp,eg,ep,ev,re,r,rp,c)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g=Duel.SelectMatchingCard(tp,c82419869.spfilter,tp,LOCATION_MZONE,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,c82419869.spfilter,tp,LOCATION_MZONE,0,1,1,nil,ft)
Duel.SendtoHand(g,nil,REASON_COST) Duel.SendtoHand(g,nil,REASON_COST)
end end
function c82419869.discon(e,tp,eg,ep,ev,re,r,rp) function c82419869.discon(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -38,17 +38,38 @@ function c83965310.initial_effect(c) ...@@ -38,17 +38,38 @@ function c83965310.initial_effect(c)
e4:SetCode(EFFECT_DISABLE) e4:SetCode(EFFECT_DISABLE)
c:RegisterEffect(e4) c:RegisterEffect(e4)
end end
function c83965310.mzfilter(c,tp)
return c:IsControler(tp) and c:GetSequence()<5
end
function c83965310.spcon(e,c) function c83965310.spcon(e,c)
if c==nil then return true end if c==nil then return true end
return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>-3 local tp=c:GetControler()
and Duel.CheckReleaseGroup(c:GetControler(),nil,3,nil) local rg=Duel.GetReleaseGroup(tp)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
local ct=-ft+1
return ft>-3 and rg:GetCount()>2 and (ft>0 or rg:IsExists(c83965310.mzfilter,ct,nil,tp))
end end
function c83965310.spop(e,tp,eg,ep,ev,re,r,rp,c) function c83965310.spop(e,tp,eg,ep,ev,re,r,rp,c)
local g=Duel.SelectReleaseGroup(c:GetControler(),nil,3,3,nil) local rg=Duel.GetReleaseGroup(tp)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
local g=nil
if ft>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
g=rg:Select(tp,3,3,nil)
elseif ft>-2 then
local ct=-ft+1
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
g=rg:FilterSelect(tp,c83965310.mzfilter,ct,ct,nil,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g2=rg:Select(tp,3-ct,3-ct,g)
g:Merge(g2)
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
g=rg:FilterSelect(tp,c83965310.mzfilter,3,3,nil,tp)
end
Duel.Release(g,REASON_COST) Duel.Release(g,REASON_COST)
end end
function c83965310.eqcon(e,tp,eg,ep,ev,re,r,rp) function c83965310.eqcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local ec=e:GetLabelObject() local ec=e:GetLabelObject()
return ec==nil or ec:GetFlagEffect(83965310)==0 return ec==nil or ec:GetFlagEffect(83965310)==0
end end
......
...@@ -14,15 +14,18 @@ end ...@@ -14,15 +14,18 @@ end
function c87756343.eqfilter(c) function c87756343.eqfilter(c)
return c:IsCode(40240595) and c:GetTurnCounter()>=2 return c:IsCode(40240595) and c:GetTurnCounter()>=2
end end
function c87756343.rfilter(c) function c87756343.rfilter(c,ft,tp)
return c:IsCode(58192742) and c:GetEquipGroup():FilterCount(c87756343.eqfilter,nil)>0 return c:IsCode(58192742) and c:GetEquipGroup():FilterCount(c87756343.eqfilter,nil)>0
and (ft>0 or (c:IsControler(tp) and c:GetSequence()<5)) and (c:IsControler(tp) or c:IsFaceup())
end end
function c87756343.spcon(e,c) function c87756343.spcon(e,c)
if c==nil then return true end if c==nil then return true end
return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>-1 local tp=c:GetControler()
and Duel.CheckReleaseGroup(c:GetControler(),c87756343.rfilter,1,nil) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
return ft>-1 and Duel.CheckReleaseGroup(tp,c87756343.rfilter,1,nil,ft,tp)
end end
function c87756343.spop(e,tp,eg,ep,ev,re,r,rp,c) function c87756343.spop(e,tp,eg,ep,ev,re,r,rp,c)
local g=Duel.SelectReleaseGroup(c:GetControler(),c87756343.rfilter,1,1,nil) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
local g=Duel.SelectReleaseGroup(tp,c87756343.rfilter,1,1,nil,ft,tp)
Duel.Release(g,REASON_COST) Duel.Release(g,REASON_COST)
end end
...@@ -20,17 +20,20 @@ function c88264978.initial_effect(c) ...@@ -20,17 +20,20 @@ function c88264978.initial_effect(c)
e2:SetOperation(c88264978.spop) e2:SetOperation(c88264978.spop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c88264978.spfilter(c) function c88264978.spfilter(c,ft)
return c:IsFaceup() and c:IsRace(RACE_DRAGON) and c:IsAbleToRemoveAsCost() return c:IsFaceup() and c:IsRace(RACE_DRAGON) and c:IsAbleToRemoveAsCost()
and (ft>0 or c:GetSequence()<5)
end end
function c88264978.hspcon(e,c) function c88264978.hspcon(e,c)
if c==nil then return true end if c==nil then return true end
return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>-1 local tp=c:GetControler()
and Duel.IsExistingMatchingCard(c88264978.spfilter,c:GetControler(),LOCATION_MZONE,0,1,nil) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
return ft>-1 and Duel.IsExistingMatchingCard(c88264978.spfilter,tp,LOCATION_MZONE,0,1,nil,ft)
end end
function c88264978.hspop(e,tp,eg,ep,ev,re,r,rp,c) function c88264978.hspop(e,tp,eg,ep,ev,re,r,rp,c)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c88264978.spfilter,c:GetControler(),LOCATION_MZONE,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,c88264978.spfilter,tp,LOCATION_MZONE,0,1,1,nil,ft)
Duel.Remove(g,POS_FACEUP,REASON_COST) Duel.Remove(g,POS_FACEUP,REASON_COST)
end end
function c88264978.filter(c,e,tp) function c88264978.filter(c,e,tp)
......
...@@ -10,13 +10,19 @@ function c88559132.initial_effect(c) ...@@ -10,13 +10,19 @@ function c88559132.initial_effect(c)
e1:SetOperation(c88559132.spop) e1:SetOperation(c88559132.spop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c88559132.spfilter(c,ft,tp)
return c:IsRace(RACE_WARRIOR)
and (ft>0 or (c:IsControler(tp) and c:GetSequence()<5)) and (c:IsControler(tp) or c:IsFaceup())
end
function c88559132.spcon(e,c) function c88559132.spcon(e,c)
if c==nil then return true end if c==nil then return true end
return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>-1 local tp=c:GetControler()
and Duel.CheckReleaseGroup(c:GetControler(),Card.IsRace,1,nil,RACE_WARRIOR) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
return ft>-1 and Duel.CheckReleaseGroup(tp,c88559132.spfilter,1,nil,ft,tp)
end end
function c88559132.spop(e,tp,eg,ep,ev,re,r,rp,c) function c88559132.spop(e,tp,eg,ep,ev,re,r,rp,c)
local g=Duel.SelectReleaseGroup(c:GetControler(),Card.IsRace,1,1,nil,RACE_WARRIOR) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
local g=Duel.SelectReleaseGroup(tp,c88559132.spfilter,1,1,nil,ft,tp)
Duel.Release(g,REASON_COST) Duel.Release(g,REASON_COST)
local atk=g:GetFirst():GetBaseAttack() local atk=g:GetFirst():GetBaseAttack()
if atk<0 then return end if atk<0 then return end
......
...@@ -28,16 +28,19 @@ function c89818984.initial_effect(c) ...@@ -28,16 +28,19 @@ function c89818984.initial_effect(c)
e3:SetOperation(c89818984.synop) e3:SetOperation(c89818984.synop)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
function c89818984.hspfilter(c) function c89818984.hspfilter(c,ft,tp)
return c:IsSetCard(0xe6) and c:GetLevel()==11 and not c:IsCode(89818984) return c:IsSetCard(0xe6) and c:GetLevel()==11 and not c:IsCode(89818984)
and (ft>0 or (c:IsControler(tp) and c:GetSequence()<5)) and (c:IsControler(tp) or c:IsFaceup())
end end
function c89818984.hspcon(e,c) function c89818984.hspcon(e,c)
if c==nil then return true end if c==nil then return true end
return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>-1 local tp=c:GetControler()
and Duel.CheckReleaseGroup(c:GetControler(),c89818984.hspfilter,1,nil) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
return ft>-1 and Duel.CheckReleaseGroup(tp,c89818984.hspfilter,1,nil,ft,tp)
end end
function c89818984.hspop(e,tp,eg,ep,ev,re,r,rp,c) function c89818984.hspop(e,tp,eg,ep,ev,re,r,rp,c)
local g=Duel.SelectReleaseGroup(c:GetControler(),c89818984.hspfilter,1,1,nil) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
local g=Duel.SelectReleaseGroup(tp,c89818984.hspfilter,1,1,nil,ft,tp)
Duel.Release(g,REASON_COST) Duel.Release(g,REASON_COST)
end end
function c89818984.target(e,tp,eg,ep,ev,re,r,rp,chk) function c89818984.target(e,tp,eg,ep,ev,re,r,rp,chk)
......
...@@ -30,20 +30,24 @@ function c93332803.initial_effect(c) ...@@ -30,20 +30,24 @@ function c93332803.initial_effect(c)
e3:SetOperation(c93332803.desop) e3:SetOperation(c93332803.desop)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
function c93332803.cfilter(c) function c93332803.spfilter(c,ft)
return c:IsFaceup() and c:IsSetCard(0xd3) return c:IsReleasable() and (ft>0 or c:GetSequence()<5)
end end
function c93332803.spcon(e,c) function c93332803.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()
return Duel.GetLocationCount(1-tp,LOCATION_MZONE)>-1 local ft=Duel.GetLocationCount(1-tp,LOCATION_MZONE)
and Duel.IsExistingMatchingCard(Card.IsReleasable,tp,0,LOCATION_MZONE,1,nil) return ft>-1 and Duel.IsExistingMatchingCard(c93332803.spfilter,tp,0,LOCATION_MZONE,1,nil,ft)
end end
function c93332803.spop(e,tp,eg,ep,ev,re,r,rp,c) function c93332803.spop(e,tp,eg,ep,ev,re,r,rp,c)
local ft=Duel.GetLocationCount(1-tp,LOCATION_MZONE)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g=Duel.SelectMatchingCard(tp,Card.IsReleasable,tp,0,LOCATION_MZONE,1,1,nil) local g=Duel.SelectMatchingCard(tp,c93332803.spfilter,tp,0,LOCATION_MZONE,1,1,nil,ft)
Duel.Release(g,REASON_COST) Duel.Release(g,REASON_COST)
end end
function c93332803.cfilter(c)
return c:IsFaceup() and c:IsSetCard(0xd3)
end
function c93332803.spcon2(e,c) function c93332803.spcon2(e,c)
if c==nil then return true end if c==nil then return true end
local tp=c:GetControler() local tp=c:GetControler()
......
...@@ -20,16 +20,19 @@ function c94388754.initial_effect(c) ...@@ -20,16 +20,19 @@ function c94388754.initial_effect(c)
e2:SetOperation(c94388754.operation) e2:SetOperation(c94388754.operation)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c94388754.hspfilter(c) function c94388754.hspfilter(c,ft,tp)
return c:IsSetCard(0xe6) and not c:IsCode(94388754) return c:IsSetCard(0xe6) and not c:IsCode(94388754)
and (ft>0 or (c:IsControler(tp) and c:GetSequence()<5)) and (c:IsControler(tp) or c:IsFaceup())
end end
function c94388754.hspcon(e,c) function c94388754.hspcon(e,c)
if c==nil then return true end if c==nil then return true end
return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>-1 local tp=c:GetControler()
and Duel.CheckReleaseGroup(c:GetControler(),c94388754.hspfilter,1,nil) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
return ft>-1 and Duel.CheckReleaseGroup(tp,c94388754.hspfilter,1,nil,ft,tp)
end end
function c94388754.hspop(e,tp,eg,ep,ev,re,r,rp,c) function c94388754.hspop(e,tp,eg,ep,ev,re,r,rp,c)
local g=Duel.SelectReleaseGroup(c:GetControler(),c94388754.hspfilter,1,1,nil) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
local g=Duel.SelectReleaseGroup(tp,c94388754.hspfilter,1,1,nil,ft,tp)
Duel.Release(g,REASON_COST) Duel.Release(g,REASON_COST)
end end
function c94388754.target(e,tp,eg,ep,ev,re,r,rp,chk) function c94388754.target(e,tp,eg,ep,ev,re,r,rp,chk)
......
...@@ -23,17 +23,20 @@ function c9485511.initial_effect(c) ...@@ -23,17 +23,20 @@ function c9485511.initial_effect(c)
e2:SetOperation(c9485511.indop) e2:SetOperation(c9485511.indop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c9485511.spfilter(c) function c9485511.spfilter(c,ft)
return c:IsFaceup() and c:IsSetCard(0xb2) and not c:IsCode(9485511) and c:IsAbleToHandAsCost() return c:IsFaceup() and c:IsSetCard(0xb2) and not c:IsCode(9485511) and c:IsAbleToHandAsCost()
and (ft>0 or c:GetSequence()<5)
end end
function c9485511.spcon(e,c) function c9485511.spcon(e,c)
if c==nil then return true end if c==nil then return true end
return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>-1 local tp=c:GetControler()
and Duel.IsExistingMatchingCard(c9485511.spfilter,c:GetControler(),LOCATION_MZONE,0,1,nil) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
return ft>-1 and Duel.IsExistingMatchingCard(c9485511.spfilter,c:GetControler(),LOCATION_MZONE,0,1,nil,ft)
end end
function c9485511.spop(e,tp,eg,ep,ev,re,r,rp,c) function c9485511.spop(e,tp,eg,ep,ev,re,r,rp,c)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g=Duel.SelectMatchingCard(tp,c9485511.spfilter,tp,LOCATION_MZONE,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,c9485511.spfilter,tp,LOCATION_MZONE,0,1,1,nil,ft)
Duel.SendtoHand(g,nil,REASON_COST) Duel.SendtoHand(g,nil,REASON_COST)
end end
function c9485511.filter(c) function c9485511.filter(c)
......
...@@ -51,17 +51,34 @@ end ...@@ -51,17 +51,34 @@ end
function c95403418.filter(c) function c95403418.filter(c)
return c:IsFaceup() and c:IsSetCard(0x80) and c:IsAbleToGraveAsCost() return c:IsFaceup() and c:IsSetCard(0x80) and c:IsAbleToGraveAsCost()
end end
function c95403418.mzfilter(c)
return c:GetSequence()<5
end
function c95403418.spcon(e,c) function c95403418.spcon(e,c)
if c==nil then return true end if c==nil then return true end
local ft=Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE) local tp=c:GetControler()
if ft<=0 then ft=-ft+1 else ft=1 end local mg=Duel.GetMatchingGroup(c95403418.filter,tp,LOCATION_MZONE,0,nil)
return Duel.IsExistingMatchingCard(c95403418.filter,c:GetControler(),LOCATION_MZONE,0,ft,nil) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
local ct=-ft+1
return mg:GetCount()>0 and (ft>0 or mg:IsExists(c95403418.mzfilter,ct,nil))
end end
function c95403418.spop(e,tp,eg,ep,ev,re,r,rp,c) function c95403418.spop(e,tp,eg,ep,ev,re,r,rp,c)
local mg=Duel.GetMatchingGroup(c95403418.filter,tp,LOCATION_MZONE,0,nil)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if ft<=0 then ft=-ft+1 else ft=1 end local g=nil
if ft>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
g=mg:Select(tp,1,7,nil)
else
local ct=-ft+1
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
g=mg:FilterSelect(tp,c95403418.mzfilter,ct,ct,nil)
if mg:GetCount()>ct and Duel.SelectYesNo(tp,210) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c95403418.filter,tp,LOCATION_MZONE,0,ft,5,nil) local g2=mg:Select(tp,1,7,g)
g:Merge(g2)
end
end
local ct=Duel.SendtoGrave(g,REASON_COST) local ct=Duel.SendtoGrave(g,REASON_COST)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
......
...@@ -28,15 +28,18 @@ end ...@@ -28,15 +28,18 @@ end
function c96561011.val(e,c) function c96561011.val(e,c)
return Duel.GetMatchingGroupCount(Card.IsRace,c:GetControler(),LOCATION_GRAVE,0,nil,RACE_DRAGON)*300 return Duel.GetMatchingGroupCount(Card.IsRace,c:GetControler(),LOCATION_GRAVE,0,nil,RACE_DRAGON)*300
end end
function c96561011.rfilter(c) function c96561011.rfilter(c,ft,tp)
return c:IsCode(74677422) return c:IsCode(74677422)
and (ft>0 or (c:IsControler(tp) and c:GetSequence()<5)) and (c:IsControler(tp) or c:IsFaceup())
end end
function c96561011.spcon(e,c) function c96561011.spcon(e,c)
if c==nil then return true end if c==nil then return true end
return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>-1 local tp=c:GetControler()
and Duel.CheckReleaseGroup(c:GetControler(),c96561011.rfilter,1,nil) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
return ft>-1 and Duel.CheckReleaseGroup(tp,c96561011.rfilter,1,nil,ft,tp)
end end
function c96561011.spop(e,tp,eg,ep,ev,re,r,rp,c) function c96561011.spop(e,tp,eg,ep,ev,re,r,rp,c)
local g=Duel.SelectReleaseGroup(c:GetControler(),c96561011.rfilter,1,1,nil) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
local g=Duel.SelectReleaseGroup(tp,c96561011.rfilter,1,1,nil,ft,tp)
Duel.Release(g,REASON_COST) Duel.Release(g,REASON_COST)
end end
...@@ -20,17 +20,20 @@ function c98229575.initial_effect(c) ...@@ -20,17 +20,20 @@ function c98229575.initial_effect(c)
e2:SetOperation(c98229575.atkop) e2:SetOperation(c98229575.atkop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c98229575.spfilter(c) function c98229575.spfilter(c,ft)
return c:IsFaceup() and c:IsSetCard(0xb2) and not c:IsCode(98229575) and c:IsAbleToHandAsCost() return c:IsFaceup() and c:IsSetCard(0xb2) and not c:IsCode(98229575) and c:IsAbleToHandAsCost()
and (ft>0 or c:GetSequence()<5)
end end
function c98229575.spcon(e,c) function c98229575.spcon(e,c)
if c==nil then return true end if c==nil then return true end
return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>-1 local tp=c:GetControler()
and Duel.IsExistingMatchingCard(c98229575.spfilter,c:GetControler(),LOCATION_MZONE,0,1,nil) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
return ft>-1 and Duel.IsExistingMatchingCard(c98229575.spfilter,c:GetControler(),LOCATION_MZONE,0,1,nil,ft)
end end
function c98229575.spop(e,tp,eg,ep,ev,re,r,rp,c) function c98229575.spop(e,tp,eg,ep,ev,re,r,rp,c)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g=Duel.SelectMatchingCard(tp,c98229575.spfilter,tp,LOCATION_MZONE,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,c98229575.spfilter,tp,LOCATION_MZONE,0,1,1,nil,ft)
Duel.SendtoHand(g,nil,REASON_COST) Duel.SendtoHand(g,nil,REASON_COST)
end end
function c98229575.atkcon(e,tp,eg,ep,ev,re,r,rp) function c98229575.atkcon(e,tp,eg,ep,ev,re,r,rp)
......
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