Commit dbbdd29f authored by Aephiex's avatar Aephiex Committed by nanahira

misc update (#1034)

* Update utility.lua

* update

* Update c11366199.lua

* Update utility.lua

* Update utility.lua

* Update utility.lua

* Update utility.lua
parent 553675f9
...@@ -51,8 +51,6 @@ function c10485110.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -51,8 +51,6 @@ function c10485110.target(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g,g:GetCount(),0,0) Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g,g:GetCount(),0,0)
end end
function c10485110.operation(e,tp,eg,ep,ev,re,r,rp) function c10485110.operation(e,tp,eg,ep,ev,re,r,rp)
local exc=e:GetHandler() local g=Duel.GetMatchingGroup(aux.TRUE,tp,0xe,0xe,aux.ExceptThisCard(e))
if not exc:IsRelateToEffect(e) then exc=nil end
local g=Duel.GetMatchingGroup(aux.TRUE,tp,0xe,0xe,exc)
Duel.SendtoGrave(g,REASON_EFFECT) Duel.SendtoGrave(g,REASON_EFFECT)
end end
...@@ -28,7 +28,7 @@ function c11052544.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -28,7 +28,7 @@ function c11052544.target(e,tp,eg,ep,ev,re,r,rp,chk)
end end
function c11052544.activate(e,tp,eg,ep,ev,re,r,rp) function c11052544.activate(e,tp,eg,ep,ev,re,r,rp)
local ct=Duel.GetMatchingGroupCount(c11052544.cfilter,tp,LOCATION_MZONE,0,nil) local ct=Duel.GetMatchingGroupCount(c11052544.cfilter,tp,LOCATION_MZONE,0,nil)
local g=Duel.GetMatchingGroup(c11052544.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,e:GetHandler()) local g=Duel.GetMatchingGroup(c11052544.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,aux.ExceptThisCard(e))
if g:GetCount()>=ct then if g:GetCount()>=ct then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local sg=g:Select(tp,ct,ct,nil) local sg=g:Select(tp,ct,ct,nil)
......
...@@ -46,6 +46,6 @@ function c11264180.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -46,6 +46,6 @@ function c11264180.activate(e,tp,eg,ep,ev,re,r,rp)
e2:SetValue(tc:GetDefense()/2) e2:SetValue(tc:GetDefense()/2)
tc:RegisterEffect(e2) tc:RegisterEffect(e2)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local dg=Duel.SelectMatchingCard(tp,c11264180.dfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,e:GetHandler()) local dg=Duel.SelectMatchingCard(tp,c11264180.dfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,aux.ExceptThisCard(e))
Duel.Destroy(dg,REASON_EFFECT) Duel.Destroy(dg,REASON_EFFECT)
end end
...@@ -8,21 +8,16 @@ function c11366199.initial_effect(c) ...@@ -8,21 +8,16 @@ function c11366199.initial_effect(c)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetValue(ATTRIBUTE_WIND) e1:SetValue(ATTRIBUTE_WIND)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--special summon(hand) --special summon
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(11366199,0)) e2:SetDescription(aux.Stringid(11366199,0))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON) e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION) e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_HAND) e2:SetRange(LOCATION_HAND+LOCATION_GRAVE)
e2:SetCost(c11366199.spcost1) e2:SetCost(c11366199.spcost)
e2:SetTarget(c11366199.sptg) e2:SetTarget(c11366199.sptg)
e2:SetOperation(c11366199.spop) e2:SetOperation(c11366199.spop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--special summon(grave)
local e3=e2:Clone()
e3:SetRange(LOCATION_GRAVE)
e3:SetCost(c11366199.spcost2)
c:RegisterEffect(e3)
--cannot set --cannot set
local e4=Effect.CreateEffect(c) local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD) e4:SetType(EFFECT_TYPE_FIELD)
...@@ -46,28 +41,34 @@ end ...@@ -46,28 +41,34 @@ end
function c11366199.sumlimit(e,c,sump,sumtype,sumpos,targetp) function c11366199.sumlimit(e,c,sump,sumtype,sumpos,targetp)
return bit.band(sumpos,POS_FACEDOWN)>0 return bit.band(sumpos,POS_FACEDOWN)>0
end end
function c11366199.spfilter(c,att) function c11366199.spcostfilter(c)
return c:IsAttribute(att) and c:IsAbleToRemoveAsCost() return c:IsAbleToRemoveAsCost() and c:IsAttribute(ATTRIBUTE_WIND+ATTRIBUTE_DARK)
end end
function c11366199.spcost1(e,tp,eg,ep,ev,re,r,rp,chk) function c11366199.spcost_selector(c,tp,g,sg,i)
if chk==0 then return Duel.IsExistingMatchingCard(c11366199.spfilter,tp,LOCATION_GRAVE,0,1,nil,ATTRIBUTE_WIND) sg:AddCard(c)
and Duel.IsExistingMatchingCard(c11366199.spfilter,tp,LOCATION_GRAVE,0,1,nil,ATTRIBUTE_DARK) end g:RemoveCard(c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) local flag=false
local g1=Duel.SelectMatchingCard(tp,c11366199.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,ATTRIBUTE_WIND) if i<2 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) flag=g:IsExists(c11366199.spcost_selector,1,nil,tp,g,sg,i+1)
local g2=Duel.SelectMatchingCard(tp,c11366199.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,ATTRIBUTE_DARK) else
g1:Merge(g2) flag=sg:FilterCount(Card.IsAttribute,nil,ATTRIBUTE_WIND)>0
Duel.Remove(g1,POS_FACEUP,REASON_COST) and sg:FilterCount(Card.IsAttribute,nil,ATTRIBUTE_DARK)>0
end
sg:RemoveCard(c)
g:AddCard(c)
return flag
end end
function c11366199.spcost2(e,tp,eg,ep,ev,re,r,rp,chk) function c11366199.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c11366199.spfilter,tp,LOCATION_HAND,0,1,nil,ATTRIBUTE_WIND) local g=Duel.GetMatchingGroup(c11366199.spcostfilter,tp,LOCATION_HAND+LOCATION_GRAVE-e:GetHandler():GetLocation(),0,nil)
and Duel.IsExistingMatchingCard(c11366199.spfilter,tp,LOCATION_HAND,0,1,nil,ATTRIBUTE_DARK) end local sg=Group.CreateGroup()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) if chk==0 then return g:IsExists(c11366199.spcost_selector,1,nil,tp,g,sg,1) end
local g1=Duel.SelectMatchingCard(tp,c11366199.spfilter,tp,LOCATION_HAND,0,1,1,nil,ATTRIBUTE_WIND) for i=1,2 do
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g2=Duel.SelectMatchingCard(tp,c11366199.spfilter,tp,LOCATION_HAND,0,1,1,nil,ATTRIBUTE_DARK) local g1=g:FilterSelect(tp,c11366199.spcost_selector,1,1,nil,tp,g,sg,i)
g1:Merge(g2) sg:Merge(g1)
Duel.Remove(g1,POS_FACEUP,REASON_COST) g:Sub(g1)
end
Duel.Remove(sg,POS_FACEUP,REASON_COST)
end end
function c11366199.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c11366199.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
......
...@@ -30,6 +30,6 @@ function c11596936.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -30,6 +30,6 @@ function c11596936.target(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,sg,sg:GetCount(),0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,sg,sg:GetCount(),0,0)
end end
function c11596936.activate(e,tp,eg,ep,ev,re,r,rp) function c11596936.activate(e,tp,eg,ep,ev,re,r,rp)
local sg=Duel.GetMatchingGroup(c11596936.filter,tp,0,LOCATION_ONFIELD,e:GetHandler()) local sg=Duel.GetMatchingGroup(c11596936.filter,tp,0,LOCATION_ONFIELD,aux.ExceptThisCard(e))
Duel.Destroy(sg,REASON_EFFECT) Duel.Destroy(sg,REASON_EFFECT)
end end
...@@ -23,6 +23,6 @@ function c1224927.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -23,6 +23,6 @@ function c1224927.target(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,sg,sg:GetCount(),0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,sg,sg:GetCount(),0,0)
end end
function c1224927.activate(e,tp,eg,ep,ev,re,r,rp) function c1224927.activate(e,tp,eg,ep,ev,re,r,rp)
local sg=Duel.GetMatchingGroup(c1224927.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,e:GetHandler()) local sg=Duel.GetMatchingGroup(c1224927.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,aux.ExceptThisCard(e))
Duel.Destroy(sg,REASON_EFFECT) Duel.Destroy(sg,REASON_EFFECT)
end end
...@@ -58,7 +58,7 @@ end ...@@ -58,7 +58,7 @@ end
function c13035077.desop(e,tp,eg,ep,ev,re,r,rp) function c13035077.desop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end if not e:GetHandler():IsRelateToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectMatchingCard(tp,nil,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,1,e:GetHandler()) local g=Duel.SelectMatchingCard(tp,nil,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,1,aux.ExceptThisCard(e))
if g:GetCount()>0 and Duel.Destroy(g,REASON_EFFECT)~=0 then if g:GetCount()>0 and Duel.Destroy(g,REASON_EFFECT)~=0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c13035077.thfilter,tp,LOCATION_DECK,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,c13035077.thfilter,tp,LOCATION_DECK,0,1,1,nil)
......
...@@ -23,7 +23,7 @@ function c13210191.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -23,7 +23,7 @@ function c13210191.target(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g1,ct1+((ct1>ct2) and ct2 or ct1),0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g1,ct1+((ct1>ct2) and ct2 or ct1),0,0)
end end
function c13210191.activate(e,tp,eg,ep,ev,re,r,rp) function c13210191.activate(e,tp,eg,ep,ev,re,r,rp)
local g1=Duel.GetMatchingGroup(c13210191.filter,tp,LOCATION_ONFIELD,0,e:GetHandler()) local g1=Duel.GetMatchingGroup(c13210191.filter,tp,LOCATION_ONFIELD,0,aux.ExceptThisCard(e))
local ct1=Duel.Destroy(g1,REASON_EFFECT) local ct1=Duel.Destroy(g1,REASON_EFFECT)
if ct1==0 then return end if ct1==0 then return end
local g2=Duel.GetMatchingGroup(c13210191.filter,tp,0,LOCATION_ONFIELD,nil) local g2=Duel.GetMatchingGroup(c13210191.filter,tp,0,LOCATION_ONFIELD,nil)
......
...@@ -92,7 +92,7 @@ end ...@@ -92,7 +92,7 @@ end
function c13893596.winop(e,tp,eg,ep,ev,re,r,rp) function c13893596.winop(e,tp,eg,ep,ev,re,r,rp)
local WIN_REASON_EXODIUS = 0x14 local WIN_REASON_EXODIUS = 0x14
local c=e:GetHandler() local c=e:GetHandler()
local g=Duel.GetMatchingGroup(c13893596.filter,tp,LOCATION_GRAVE,0,nil,c) local g=Duel.GetMatchingGroup(c13893596.filter,tp,LOCATION_GRAVE,0,nil,aux.ExceptThisCard(e))
if g:GetClassCount(Card.GetCode)==5 then if g:GetClassCount(Card.GetCode)==5 then
Duel.Win(tp,WIN_REASON_EXODIUS) Duel.Win(tp,WIN_REASON_EXODIUS)
end end
......
...@@ -22,7 +22,7 @@ function c14644902.filter(c,e,tp) ...@@ -22,7 +22,7 @@ function c14644902.filter(c,e,tp)
end end
function c14644902.operation(e,tp,eg,ep,ev,re,r,rp) function c14644902.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local rg=Duel.SelectReleaseGroup(tp,c14644902.rfilter,1,1,c,e,tp) local rg=Duel.SelectReleaseGroup(tp,c14644902.rfilter,1,1,aux.ExceptThisCard(e),e,tp)
if Duel.Release(rg,REASON_EFFECT)>0 then if Duel.Release(rg,REASON_EFFECT)>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=Duel.SelectMatchingCard(tp,c14644902.filter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp) local sg=Duel.SelectMatchingCard(tp,c14644902.filter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp)
......
...@@ -98,9 +98,7 @@ function c14799437.destg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -98,9 +98,7 @@ function c14799437.destg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0)
end end
function c14799437.desop(e,tp,eg,ep,ev,re,r,rp) function c14799437.desop(e,tp,eg,ep,ev,re,r,rp)
local exc=e:GetHandler() local g=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_MZONE,LOCATION_MZONE,aux.ExceptThisCard(e))
if not exc:IsRelateToEffect(e) then exc=nil end
local g=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_MZONE,LOCATION_MZONE,exc)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.Destroy(g,REASON_EFFECT) Duel.Destroy(g,REASON_EFFECT)
end end
......
...@@ -38,7 +38,7 @@ function c15256925.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -38,7 +38,7 @@ function c15256925.target(e,tp,eg,ep,ev,re,r,rp,chk)
end end
function c15256925.activate(e,tp,eg,ep,ev,re,r,rp) function c15256925.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c15256925.rmfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,e:GetHandler()) local g=Duel.SelectMatchingCard(tp,c15256925.rmfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,aux.ExceptThisCard(e))
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.HintSelection(g) Duel.HintSelection(g)
Duel.Remove(g,POS_FACEDOWN,REASON_EFFECT) Duel.Remove(g,POS_FACEDOWN,REASON_EFFECT)
......
...@@ -22,35 +22,40 @@ function c15574615.initial_effect(c) ...@@ -22,35 +22,40 @@ function c15574615.initial_effect(c)
e2:SetOperation(c15574615.operation) e2:SetOperation(c15574615.operation)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c15574615.sprfilter(c) function c15574615.spcostfilter(c)
return (c:IsLocation(LOCATION_HAND) or c:IsFaceup()) and c:IsAbleToGraveAsCost() return (c:IsLocation(LOCATION_HAND) or c:IsFaceup()) and c:IsAbleToGraveAsCost()
and c:IsCode(80208158,16796157,43791861,79185500) and c:IsCode(80208158,16796157,43791861,79185500)
end end
c15574615.spcost_list={80208158,16796157,43791861,79185500}
function c15574615.spcost_selector(c,tp,g,sg,i)
if not c:IsCode(c15574615.spcost_list[i]) then return false end
sg:AddCard(c)
g:RemoveCard(c)
local flag=false
if i<4 then
flag=g:IsExists(c4335427.spcost_selector,1,nil,tp,g,sg,i+1)
else
flag=Duel.GetMZoneCount(tp,sg,tp)>0
end
sg:RemoveCard(c)
g:AddCard(c)
return flag
end
function c15574615.spcon(e,c) function c15574615.spcon(e,c)
if c==nil then return true end if c==nil then return true end
local tp=c:GetControler() local tp=c:GetControler()
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) local g=Duel.GetMatchingGroup(c15574615.spcostfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,nil)
local ct=-ft+1 local sg=Group.CreateGroup()
local mg=Duel.GetMatchingGroup(c15574615.sprfilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,nil) return g:IsExists(c15574615.spcost_selector,1,nil,tp,g,sg,1)
return mg:GetClassCount(Card.GetCode)==4
and mg:Filter(Card.IsLocation,nil,LOCATION_MZONE):GetClassCount(Card.GetCode)>=ct
end end
function c15574615.spop(e,tp,eg,ep,ev,re,r,rp,c) function c15574615.spop(e,tp,eg,ep,ev,re,r,rp,c)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) local g=Duel.GetMatchingGroup(c15574615.spcostfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,nil)
local ct=-ft+1 local sg=Group.CreateGroup()
local mg=Duel.GetMatchingGroup(c15574615.sprfilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,nil)
local g=Group.CreateGroup()
for i=1,4 do for i=1,4 do
local tc=nil
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
if ct>0 then local g1=g:FilterSelect(tp,c15574615.spcost_selector,1,1,nil,tp,g,sg,i)
tc=mg:FilterSelect(tp,Card.IsLocation,1,1,nil,LOCATION_MZONE):GetFirst() sg:Merge(g1)
ct=ct-1 g:Sub(g1)
else
tc=mg:Select(tp,1,1,nil):GetFirst()
end
mg:Remove(Card.IsCode,nil,tc:GetCode())
g:AddCard(tc)
end end
Duel.SendtoGrave(g,REASON_COST) Duel.SendtoGrave(g,REASON_COST)
end end
...@@ -58,29 +63,37 @@ function c15574615.cost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -58,29 +63,37 @@ function c15574615.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsReleasable() end if chk==0 then return e:GetHandler():IsReleasable() end
Duel.Release(e:GetHandler(),REASON_COST) Duel.Release(e:GetHandler(),REASON_COST)
end end
function c15574615.spfilter(c,e,tp,code) function c15574615.spfilter(c,e,tp)
return c:IsCode(code) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsCode(80208158,16796157,43791861,79185500) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c15574615.sptarget_selector(c,tp,g,sg,i)
if not c:IsCode(c15574615.spcost_list[i]) then return false end
if i<4 then
sg:AddCard(c)
g:RemoveCard(c)
local flag=g:IsExists(c4335427.sptarget_selector,1,nil,tp,g,sg,i+1)
sg:RemoveCard(c)
g:AddCard(c)
return flag
else
return true
end
end end
function c15574615.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c15574615.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return false end if chkc then return false end
local g=Duel.GetMatchingGroup(c15574615.spfilter,tp,LOCATION_GRAVE,0,nil,e,tp)
local sg=Group.CreateGroup()
if chk==0 then return not Duel.IsPlayerAffectedByEffect(tp,59822133) if chk==0 then return not Duel.IsPlayerAffectedByEffect(tp,59822133)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>=3 and Duel.GetLocationCount(tp,LOCATION_MZONE)>=3
and Duel.IsExistingTarget(c15574615.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp,80208158) and g:IsExists(c15574615.sptarget_selector,1,nil,tp,g,sg,1)
and Duel.IsExistingTarget(c15574615.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp,16796157) end
and Duel.IsExistingTarget(c15574615.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp,43791861) for i=1,4 do
and Duel.IsExistingTarget(c15574615.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp,79185500) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) local g1=g:FilterSelect(tp,c15574615.sptarget_selector,1,1,nil,tp,g,sg,i)
local g1=Duel.SelectTarget(tp,c15574615.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp,80208158) sg:Merge(g1)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) g:Sub(g1)
local g2=Duel.SelectTarget(tp,c15574615.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp,16796157) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,4,0,0)
local g3=Duel.SelectTarget(tp,c15574615.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp,43791861)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g4=Duel.SelectTarget(tp,c15574615.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp,79185500)
g1:Merge(g2)
g1:Merge(g3)
g1:Merge(g4)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g1,4,0,0)
end end
function c15574615.operation(e,tp,eg,ep,ev,re,r,rp) function c15574615.operation(e,tp,eg,ep,ev,re,r,rp)
if Duel.IsPlayerAffectedByEffect(tp,59822133) then return end if Duel.IsPlayerAffectedByEffect(tp,59822133) then return end
......
...@@ -48,9 +48,7 @@ function c16172067.destg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -48,9 +48,7 @@ function c16172067.destg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0)
end end
function c16172067.desop(e,tp,eg,ep,ev,re,r,rp) function c16172067.desop(e,tp,eg,ep,ev,re,r,rp)
local exc=e:GetHandler() local g=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,aux.ExceptThisCard(e))
if not exc:IsRelateToEffect(e) then exc=nil end
local g=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,exc)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.Destroy(g,REASON_EFFECT) Duel.Destroy(g,REASON_EFFECT)
end end
......
...@@ -26,7 +26,7 @@ function c16272453.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -26,7 +26,7 @@ function c16272453.target(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,2) Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,2)
end end
function c16272453.activate(e,tp,eg,ep,ev,re,r,rp) function c16272453.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c16272453.dfilter,tp,LOCATION_ONFIELD,0,e:GetHandler()) local g=Duel.GetMatchingGroup(c16272453.dfilter,tp,LOCATION_ONFIELD,0,aux.ExceptThisCard(e))
local ct=Duel.Destroy(g,REASON_EFFECT) local ct=Duel.Destroy(g,REASON_EFFECT)
if ct>0 then if ct>0 then
Duel.BreakEffect() Duel.BreakEffect()
......
...@@ -163,9 +163,7 @@ function c16306932.tdtg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -163,9 +163,7 @@ function c16306932.tdtg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,g:GetCount(),0,0) Duel.SetOperationInfo(0,CATEGORY_TODECK,g,g:GetCount(),0,0)
end end
function c16306932.tdop(e,tp,eg,ep,ev,re,r,rp) function c16306932.tdop(e,tp,eg,ep,ev,re,r,rp)
local exc=e:GetHandler() local g=Duel.GetMatchingGroup(Card.IsAbleToDeck,tp,LOCATION_ONFIELD+LOCATION_GRAVE,LOCATION_ONFIELD+LOCATION_GRAVE,aux.ExceptThisCard(e))
if not exc:IsRelateToEffect(e) then exc=nil end
local g=Duel.GetMatchingGroup(Card.IsAbleToDeck,tp,LOCATION_ONFIELD+LOCATION_GRAVE,LOCATION_ONFIELD+LOCATION_GRAVE,exc)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.SendtoDeck(g,nil,2,REASON_EFFECT) Duel.SendtoDeck(g,nil,2,REASON_EFFECT)
end end
......
...@@ -19,6 +19,6 @@ function c18144506.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -19,6 +19,6 @@ function c18144506.target(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,sg,sg:GetCount(),0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,sg,sg:GetCount(),0,0)
end end
function c18144506.activate(e,tp,eg,ep,ev,re,r,rp) function c18144506.activate(e,tp,eg,ep,ev,re,r,rp)
local sg=Duel.GetMatchingGroup(c18144506.filter,tp,0,LOCATION_ONFIELD,e:GetHandler()) local sg=Duel.GetMatchingGroup(c18144506.filter,tp,0,LOCATION_ONFIELD,aux.ExceptThisCard(e))
Duel.Destroy(sg,REASON_EFFECT) Duel.Destroy(sg,REASON_EFFECT)
end end
...@@ -20,6 +20,6 @@ function c18591904.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -20,6 +20,6 @@ function c18591904.target(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0)
end end
function c18591904.activate(e,tp,eg,ep,ev,re,r,rp) function c18591904.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,e:GetHandler()) local g=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,aux.ExceptThisCard(e))
Duel.Destroy(g,REASON_EFFECT) Duel.Destroy(g,REASON_EFFECT)
end end
...@@ -15,38 +15,39 @@ function c19028307.initial_effect(c) ...@@ -15,38 +15,39 @@ function c19028307.initial_effect(c)
e2:SetCode(EFFECT_NO_BATTLE_DAMAGE) e2:SetCode(EFFECT_NO_BATTLE_DAMAGE)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c19028307.spfilter(c,rac) function c19028307.spcostfilter(c)
return c:IsRace(rac) and c:IsAbleToRemoveAsCost() and (not c:IsLocation(LOCATION_MZONE) or c:IsFaceup()) return c:IsAbleToRemoveAsCost() and c:IsRace(RACE_BEASTWARRIOR+RACE_MACHINE) and (not c:IsLocation(LOCATION_MZONE) or c:IsFaceup())
end
function c19028307.spcost_selector(c,tp,g,sg,i)
sg:AddCard(c)
g:RemoveCard(c)
local flag=false
if i<2 then
flag=g:IsExists(c19028307.spcost_selector,1,nil,tp,g,sg,i+1)
else
flag=Duel.GetMZoneCount(tp,sg,tp)>0
and sg:FilterCount(Card.IsRace,nil,RACE_BEASTWARRIOR)>0
and sg:FilterCount(Card.IsRace,nil,RACE_MACHINE)>0
end
sg:RemoveCard(c)
g:AddCard(c)
return flag
end end
function c19028307.spcon(e,c) function c19028307.spcon(e,c)
if c==nil then return true end if c==nil then return true end
local tp=c:GetControler() local tp=c:GetControler()
local n=0 local g=Duel.GetMatchingGroup(c19028307.spcostfilter,tp,LOCATION_MZONE+LOCATION_HAND+LOCATION_GRAVE,0,nil)
if Duel.IsExistingMatchingCard(c19028307.spfilter,tp,LOCATION_MZONE,0,1,c,RACE_BEASTWARRIOR) then n=n-1 end local sg=Group.CreateGroup()
if Duel.IsExistingMatchingCard(c19028307.spfilter,tp,LOCATION_MZONE,0,1,c,RACE_MACHINE) then n=n-1 end return g:IsExists(c19028307.spcost_selector,1,nil,tp,g,sg,1)
return Duel.GetLocationCount(tp,LOCATION_MZONE)>n
and Duel.IsExistingMatchingCard(c19028307.spfilter,tp,0x16,0,1,c,RACE_BEASTWARRIOR)
and Duel.IsExistingMatchingCard(c19028307.spfilter,tp,0x16,0,1,c,RACE_MACHINE)
end end
function c19028307.spop(e,tp,eg,ep,ev,re,r,rp,c) function c19028307.spop(e,tp,eg,ep,ev,re,r,rp,c)
local g1=nil local g=Duel.GetMatchingGroup(c19028307.spcostfilter,tp,LOCATION_MZONE+LOCATION_HAND+LOCATION_GRAVE,0,nil)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) local sg=Group.CreateGroup()
if ft~=0 then for i=1,2 do
local loc=0x16
if ft<0 then loc=LOCATION_MZONE end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
g1=Duel.SelectMatchingCard(tp,c19028307.spfilter,tp,loc,0,1,1,c,RACE_BEASTWARRIOR)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g2=Duel.SelectMatchingCard(tp,c19028307.spfilter,tp,loc,0,1,1,c,RACE_MACHINE)
g1:Merge(g2)
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
g1=Duel.SelectMatchingCard(tp,c19028307.spfilter,tp,LOCATION_MZONE,0,1,1,c,RACE_BEASTWARRIOR+RACE_MACHINE)
local rc=RACE_BEASTWARRIOR
if g1:GetFirst():IsRace(RACE_BEASTWARRIOR) then rc=RACE_MACHINE end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g2=Duel.SelectMatchingCard(tp,c19028307.spfilter,tp,0x16,0,1,1,c,rc) local g1=g:FilterSelect(tp,c19028307.spcost_selector,1,1,nil,tp,g,sg,i)
g1:Merge(g2) sg:Merge(g1)
g:Sub(g1)
end end
Duel.Remove(g1,POS_FACEUP,REASON_COST) Duel.Remove(sg,POS_FACEUP,REASON_COST)
end end
...@@ -19,6 +19,6 @@ function c19613556.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -19,6 +19,6 @@ function c19613556.target(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,sg,sg:GetCount(),0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,sg,sg:GetCount(),0,0)
end end
function c19613556.activate(e,tp,eg,ep,ev,re,r,rp) function c19613556.activate(e,tp,eg,ep,ev,re,r,rp)
local sg=Duel.GetMatchingGroup(c19613556.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,e:GetHandler()) local sg=Duel.GetMatchingGroup(c19613556.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,aux.ExceptThisCard(e))
Duel.Destroy(sg,REASON_EFFECT) Duel.Destroy(sg,REASON_EFFECT)
end end
...@@ -29,8 +29,6 @@ function c19684740.chlimit(e,ep,tp) ...@@ -29,8 +29,6 @@ function c19684740.chlimit(e,ep,tp)
return tp==ep return tp==ep
end end
function c19684740.thop(e,tp,eg,ep,ev,re,r,rp) function c19684740.thop(e,tp,eg,ep,ev,re,r,rp)
local exc=e:GetHandler() local g=Duel.GetMatchingGroup(Card.IsAbleToHand,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,aux.ExceptThisCard(e))
if not exc:IsRelateToEffect(e) then exc=nil end
local g=Duel.GetMatchingGroup(Card.IsAbleToHand,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,exc)
Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.SendtoHand(g,nil,REASON_EFFECT)
end end
...@@ -61,7 +61,7 @@ function c19959563.filter(c) ...@@ -61,7 +61,7 @@ function c19959563.filter(c)
end end
function c19959563.target(e,tp,eg,ep,ev,re,r,rp,chk) function c19959563.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c19959563.filter,tp,LOCATION_GRAVE+LOCATION_REMOVED,LOCATION_GRAVE+LOCATION_REMOVED,1,e:GetHandler()) end if chk==0 then return Duel.IsExistingMatchingCard(c19959563.filter,tp,LOCATION_GRAVE+LOCATION_REMOVED,LOCATION_GRAVE+LOCATION_REMOVED,1,e:GetHandler()) end
local g=Duel.GetMatchingGroup(c19959563.filter,tp,LOCATION_GRAVE+LOCATION_REMOVED,LOCATION_GRAVE+LOCATION_REMOVED,e:GetHandler()) local g=Duel.GetMatchingGroup(c19959563.filter,tp,LOCATION_GRAVE+LOCATION_REMOVED,LOCATION_GRAVE+LOCATION_REMOVED,nil)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,g:GetCount(),0,0) Duel.SetOperationInfo(0,CATEGORY_TODECK,g,g:GetCount(),0,0)
end end
function c19959563.operation(e,tp,eg,ep,ev,re,r,rp) function c19959563.operation(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -61,8 +61,6 @@ function c20073910.thtg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -61,8 +61,6 @@ function c20073910.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,g:GetCount(),0,0) Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,g:GetCount(),0,0)
end end
function c20073910.thop(e,tp,eg,ep,ev,re,r,rp) function c20073910.thop(e,tp,eg,ep,ev,re,r,rp)
local exc=e:GetHandler() local g=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,aux.ExceptThisCard(e))
if not exc:IsRelateToEffect(e) then exc=nil end
local g=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,exc)
Duel.Remove(g,POS_FACEUP,REASON_EFFECT) Duel.Remove(g,POS_FACEUP,REASON_EFFECT)
end end
...@@ -20,6 +20,6 @@ function c20727787.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -20,6 +20,6 @@ function c20727787.target(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0)
end end
function c20727787.activate(e,tp,eg,ep,ev,re,r,rp) function c20727787.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c20727787.filter,tp,LOCATION_SZONE,LOCATION_SZONE,e:GetHandler()) local g=Duel.GetMatchingGroup(c20727787.filter,tp,LOCATION_SZONE,LOCATION_SZONE,aux.ExceptThisCard(e))
Duel.Destroy(g,REASON_EFFECT) Duel.Destroy(g,REASON_EFFECT)
end end
...@@ -87,9 +87,7 @@ function c21105106.rmtg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -87,9 +87,7 @@ function c21105106.rmtg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,g:GetCount(),0,0) Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,g:GetCount(),0,0)
end end
function c21105106.rmop(e,tp,eg,ep,ev,re,r,rp) function c21105106.rmop(e,tp,eg,ep,ev,re,r,rp)
local exc=e:GetHandler() local g=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,LOCATION_ONFIELD+LOCATION_GRAVE,LOCATION_ONFIELD+LOCATION_GRAVE,aux.ExceptThisCard(e))
if not exc:IsRelateToEffect(e) then exc=nil end
local g=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,LOCATION_ONFIELD+LOCATION_GRAVE,LOCATION_ONFIELD+LOCATION_GRAVE,exc)
Duel.Remove(g,POS_FACEUP,REASON_EFFECT) Duel.Remove(g,POS_FACEUP,REASON_EFFECT)
end end
function c21105106.filter(c,tp) function c21105106.filter(c,tp)
......
...@@ -11,22 +11,35 @@ function c22666164.initial_effect(c) ...@@ -11,22 +11,35 @@ function c22666164.initial_effect(c)
e1:SetOperation(c22666164.operation) e1:SetOperation(c22666164.operation)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c22666164.cfilter(c,code) function c22666164.spcostfilter(c)
return c:IsFaceup() and c:IsCode(code) and c:IsAbleToGraveAsCost() return c:IsFaceup() and c:IsAbleToGraveAsCost() and c:IsCode(60999392,23782705,96384007)
end
c22666164.spcost_list={60999392,23782705,96384007}
function c22666164.spcost_selector(c,tp,g,sg,i)
if not c:IsCode(c22666164.spcost_list[i]) then return false end
sg:AddCard(c)
g:RemoveCard(c)
local flag=false
if i<3 then
flag=g:IsExists(c22666164.spcost_selector,1,nil,tp,g,sg,i+1)
else
flag=Duel.GetMZoneCount(tp,sg,tp)>0
end
sg:RemoveCard(c)
g:AddCard(c)
return flag
end end
function c22666164.cost(e,tp,eg,ep,ev,re,r,rp,chk) function c22666164.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c22666164.cfilter,tp,LOCATION_ONFIELD,0,1,nil,60999392) local g=Duel.GetMatchingGroup(c22666164.spcostfilter,tp,LOCATION_ONFIELD,0,nil)
and Duel.IsExistingMatchingCard(c22666164.cfilter,tp,LOCATION_ONFIELD,0,1,nil,23782705) local sg=Group.CreateGroup()
and Duel.IsExistingMatchingCard(c22666164.cfilter,tp,LOCATION_ONFIELD,0,1,nil,96384007) end if chk==0 then return g:IsExists(c22666164.spcost_selector,1,nil,tp,g,sg,1) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) for i=1,3 do
local g1=Duel.SelectMatchingCard(tp,c22666164.cfilter,tp,LOCATION_ONFIELD,0,1,1,nil,60999392) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) local g1=g:FilterSelect(tp,c22666164.spcost_selector,1,1,nil,tp,g,sg,i)
local g2=Duel.SelectMatchingCard(tp,c22666164.cfilter,tp,LOCATION_ONFIELD,0,1,1,nil,23782705) sg:Merge(g1)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) g:Sub(g1)
local g3=Duel.SelectMatchingCard(tp,c22666164.cfilter,tp,LOCATION_ONFIELD,0,1,1,nil,96384007) end
g1:Merge(g2) Duel.SendtoGrave(sg,REASON_COST)
g1:Merge(g3)
Duel.SendtoGrave(g1,REASON_COST)
end end
function c22666164.filter(c,e,tp) function c22666164.filter(c,e,tp)
return c:IsCode(58054262) and c:IsCanBeSpecialSummoned(e,0,tp,true,false) return c:IsCode(58054262) and c:IsCanBeSpecialSummoned(e,0,tp,true,false)
......
...@@ -74,9 +74,7 @@ function c23015896.destg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -74,9 +74,7 @@ function c23015896.destg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0)
end end
function c23015896.desop(e,tp,eg,ep,ev,re,r,rp) function c23015896.desop(e,tp,eg,ep,ev,re,r,rp)
local exc=e:GetHandler() local g=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_MZONE,LOCATION_MZONE,aux.ExceptThisCard(e))
if not exc:IsRelateToEffect(e) then exc=nil end
local g=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_MZONE,LOCATION_MZONE,exc)
Duel.Destroy(g,REASON_EFFECT) Duel.Destroy(g,REASON_EFFECT)
end end
function c23015896.spcon2(e,tp,eg,ep,ev,re,r,rp) function c23015896.spcon2(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -27,6 +27,6 @@ function c2314238.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -27,6 +27,6 @@ function c2314238.target(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,sg,sg:GetCount(),0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,sg,sg:GetCount(),0,0)
end end
function c2314238.activate(e,tp,eg,ep,ev,re,r,rp) function c2314238.activate(e,tp,eg,ep,ev,re,r,rp)
local sg=Duel.GetMatchingGroup(c2314238.filter,tp,0,LOCATION_ONFIELD,e:GetHandler()) local sg=Duel.GetMatchingGroup(c2314238.filter,tp,0,LOCATION_ONFIELD,aux.ExceptThisCard(e))
Duel.Destroy(sg,REASON_EFFECT) Duel.Destroy(sg,REASON_EFFECT)
end end
...@@ -27,9 +27,7 @@ function c2407234.negfilter(c) ...@@ -27,9 +27,7 @@ function c2407234.negfilter(c)
end end
function c2407234.negop(e,tp,eg,ep,ev,re,r,rp) function c2407234.negop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local exc=c local g=Duel.GetMatchingGroup(c2407234.negfilter,tp,LOCATION_MZONE,LOCATION_MZONE,aux.ExceptThisCard(e))
if not exc:IsRelateToEffect(e) then exc=nil end
local g=Duel.GetMatchingGroup(c2407234.negfilter,tp,LOCATION_MZONE,LOCATION_MZONE,exc)
local tc=g:GetFirst() local tc=g:GetFirst()
while tc do while tc do
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
......
...@@ -22,23 +22,41 @@ function c25460258.initial_effect(c) ...@@ -22,23 +22,41 @@ function c25460258.initial_effect(c)
e2:SetOperation(c25460258.rmop) e2:SetOperation(c25460258.rmop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c25460258.spfilter(c,att) function c25460258.spcostfilter(c)
return c:IsAttribute(att) and c:IsAbleToRemoveAsCost() return c:IsAbleToRemoveAsCost() and c:IsAttribute(ATTRIBUTE_LIGHT+ATTRIBUTE_DARK)
end
function c25460258.spcost_selector(c,tp,g,sg,i)
sg:AddCard(c)
g:RemoveCard(c)
local flag=false
if i<2 then
flag=g:IsExists(c25460258.spcost_selector,1,nil,tp,g,sg,i+1)
else
flag=sg:FilterCount(Card.IsAttribute,nil,ATTRIBUTE_LIGHT)>0
and sg:FilterCount(Card.IsAttribute,nil,ATTRIBUTE_DARK)>0
end
sg:RemoveCard(c)
g:AddCard(c)
return flag
end end
function c25460258.spcon(e,c) function c25460258.spcon(e,c)
if c==nil then return true end if c==nil then return true end
if Duel.GetMZoneCount(tp)<=0 then return false end
local tp=c:GetControler() local tp=c:GetControler()
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 local g=Duel.GetMatchingGroup(c25460258.spcostfilter,tp,LOCATION_GRAVE,0,nil)
and Duel.IsExistingMatchingCard(c25460258.spfilter,tp,LOCATION_GRAVE,0,1,nil,ATTRIBUTE_LIGHT) local sg=Group.CreateGroup()
and Duel.IsExistingMatchingCard(c25460258.spfilter,tp,LOCATION_GRAVE,0,1,nil,ATTRIBUTE_DARK) return g:IsExists(c25460258.spcost_selector,1,nil,tp,g,sg,1)
end end
function c25460258.spop(e,tp,eg,ep,ev,re,r,rp,c) function c25460258.spop(e,tp,eg,ep,ev,re,r,rp,c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) local g=Duel.GetMatchingGroup(c25460258.spcostfilter,tp,LOCATION_GRAVE,0,nil)
local g1=Duel.SelectMatchingCard(tp,c25460258.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,ATTRIBUTE_LIGHT) local sg=Group.CreateGroup()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) for i=1,2 do
local g2=Duel.SelectMatchingCard(tp,c25460258.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,ATTRIBUTE_DARK) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
g1:Merge(g2) local g1=g:FilterSelect(tp,c25460258.spcost_selector,1,1,nil,tp,g,sg,i)
Duel.Remove(g1,POS_FACEUP,REASON_COST) sg:Merge(g1)
g:Sub(g1)
end
Duel.Remove(sg,POS_FACEUP,REASON_COST)
end end
function c25460258.cfilter(c) function c25460258.cfilter(c)
return c:IsRace(RACE_DRAGON) and c:IsAbleToGraveAsCost() return c:IsRace(RACE_DRAGON) and c:IsAbleToGraveAsCost()
......
...@@ -27,7 +27,7 @@ function c28596933.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -27,7 +27,7 @@ function c28596933.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.SelectMatchingCard(tp,c28596933.filter,tp,LOCATION_MZONE,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,c28596933.filter,tp,LOCATION_MZONE,0,1,1,nil)
local tc=g:GetFirst() local tc=g:GetFirst()
if tc and Duel.SendtoHand(tc,nil,REASON_EFFECT)~=0 and tc:IsLocation(LOCATION_HAND) then if tc and Duel.SendtoHand(tc,nil,REASON_EFFECT)~=0 and tc:IsLocation(LOCATION_HAND) then
local sg=Duel.GetMatchingGroup(c28596933.dfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,e:GetHandler()) local sg=Duel.GetMatchingGroup(c28596933.dfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,aux.ExceptThisCard(e))
Duel.Destroy(sg,REASON_EFFECT) Duel.Destroy(sg,REASON_EFFECT)
end end
end end
...@@ -80,8 +80,6 @@ function c29146185.destg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -80,8 +80,6 @@ function c29146185.destg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0)
end end
function c29146185.desop(e,tp,eg,ep,ev,re,r,rp) function c29146185.desop(e,tp,eg,ep,ev,re,r,rp)
local exc=e:GetHandler() local g=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,aux.ExceptThisCard(e))
if not exc:IsRelateToEffect(e) then exc=nil end
local g=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,exc)
Duel.Destroy(g,REASON_EFFECT) Duel.Destroy(g,REASON_EFFECT)
end end
...@@ -36,7 +36,7 @@ function c31222701.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -36,7 +36,7 @@ function c31222701.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoHand(shg1,nil,REASON_EFFECT) Duel.SendtoHand(shg1,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,shg1) Duel.ConfirmCards(1-tp,shg1)
end end
local rg=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,e:GetHandler()) local rg=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,aux.ExceptThisCard(e))
if ct>=3 and rg:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(31222701,1)) then if ct>=3 and rg:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(31222701,1)) then
Duel.BreakEffect() Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
......
...@@ -55,6 +55,6 @@ function c32391631.destg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -55,6 +55,6 @@ function c32391631.destg(e,tp,eg,ep,ev,re,r,rp,chk)
end end
function c32391631.desop(e,tp,eg,ep,ev,re,r,rp) function c32391631.desop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end if not e:GetHandler():IsRelateToEffect(e) then return end
local g=Duel.GetMatchingGroup(c32391631.desfilter,Duel.GetTurnPlayer(),LOCATION_MZONE,0,e:GetHandler()) local g=Duel.GetMatchingGroup(c32391631.desfilter,Duel.GetTurnPlayer(),LOCATION_MZONE,0,aux.ExceptThisCard(e))
Duel.Destroy(g,REASON_EFFECT) Duel.Destroy(g,REASON_EFFECT)
end end
...@@ -90,6 +90,6 @@ function c32750510.destg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -90,6 +90,6 @@ function c32750510.destg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0)
end end
function c32750510.desop(e,tp,eg,ep,ev,re,r,rp) function c32750510.desop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c32750510.desfilter,tp,LOCATION_MZONE,LOCATION_MZONE,e:GetHandler()) local g=Duel.GetMatchingGroup(c32750510.desfilter,tp,LOCATION_MZONE,LOCATION_MZONE,aux.ExceptThisCard(e))
Duel.Destroy(g,REASON_EFFECT) Duel.Destroy(g,REASON_EFFECT)
end end
...@@ -57,6 +57,6 @@ function c33093439.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -57,6 +57,6 @@ function c33093439.target(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g,g:GetCount(),0,0) Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g,g:GetCount(),0,0)
end end
function c33093439.operation(e,tp,eg,ep,ev,re,r,rp) function c33093439.operation(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,e:GetHandler()) local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,aux.ExceptThisCard(e))
Duel.SendtoGrave(g,REASON_EFFECT) Duel.SendtoGrave(g,REASON_EFFECT)
end end
...@@ -20,7 +20,7 @@ function c34370473.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -20,7 +20,7 @@ function c34370473.target(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,g:GetCount()*500) Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,g:GetCount()*500)
end end
function c34370473.activate(e,tp,eg,ep,ev,re,r,rp) function c34370473.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c34370473.filter,tp,LOCATION_ONFIELD,0,e:GetHandler()) local g=Duel.GetMatchingGroup(c34370473.filter,tp,LOCATION_ONFIELD,0,aux.ExceptThisCard(e))
local ct=Duel.Destroy(g,REASON_EFFECT) local ct=Duel.Destroy(g,REASON_EFFECT)
Duel.Recover(tp,ct*500,REASON_EFFECT) Duel.Recover(tp,ct*500,REASON_EFFECT)
end end
...@@ -13,25 +13,32 @@ function c34898052.initial_effect(c) ...@@ -13,25 +13,32 @@ function c34898052.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c34898052.rfilter(c,att) function c34898052.rfilter(c,att)
return c:IsAttribute(att) and c:IsType(TYPE_MONSTER) and c:IsAbleToRemoveAsCost() return (not att or c:IsAttribute(att)) and c:IsType(TYPE_MONSTER) and c:IsAbleToRemoveAsCost()
end
c34898052.cost_table={ATTRIBUTE_EARTH,ATTRIBUTE_WATER,ATTRIBUTE_FIRE,ATTRIBUTE_WIND}
function c34898052.rcostselector(c,g,sg,i)
if not c:IsAttribute(c34898052.cost_table[i]) then return false end
if i<4 then
g:RemoveCard(c)
sg:AddCard(c)
local flag=g:IsExists(c34898052.rcostselector,1,nil,g,sg,i+1)
g:AddCard(c)
sg:RemoveCard(c)
return flag
else
return true
end
end end
function c34898052.cost(e,tp,eg,ep,ev,re,r,rp,chk) function c34898052.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c34898052.rfilter,tp,LOCATION_GRAVE,0,1,nil,ATTRIBUTE_EARTH) local g=Duel.GetMatchingGroup(c34898052.rfilter,tp,LOCATION_GRAVE,0,nil)
and Duel.IsExistingMatchingCard(c34898052.rfilter,tp,LOCATION_GRAVE,0,1,nil,ATTRIBUTE_WATER) local sg=Group.CreateGroup()
and Duel.IsExistingMatchingCard(c34898052.rfilter,tp,LOCATION_GRAVE,0,1,nil,ATTRIBUTE_FIRE) if chk==0 then return g:IsExists(c34898052.rcostselector,1,nil,g,sg,1) end
and Duel.IsExistingMatchingCard(c34898052.rfilter,tp,LOCATION_GRAVE,0,1,nil,ATTRIBUTE_WIND) for i=1,4 do
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g1=g:FilterSelect(tp,c34898052.rcostselector,1,1,nil,g,sg,i)
g:Sub(g1)
sg:Merge(g1)
end end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c34898052.rfilter,tp,LOCATION_GRAVE,0,1,1,nil,ATTRIBUTE_EARTH)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g1=Duel.SelectMatchingCard(tp,c34898052.rfilter,tp,LOCATION_GRAVE,0,1,1,nil,ATTRIBUTE_WATER)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g2=Duel.SelectMatchingCard(tp,c34898052.rfilter,tp,LOCATION_GRAVE,0,1,1,nil,ATTRIBUTE_FIRE)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g3=Duel.SelectMatchingCard(tp,c34898052.rfilter,tp,LOCATION_GRAVE,0,1,1,nil,ATTRIBUTE_WIND)
g:Merge(g1)
g:Merge(g2)
g:Merge(g3)
Duel.Remove(g,POS_FACEUP,REASON_COST) Duel.Remove(g,POS_FACEUP,REASON_COST)
end end
function c34898052.target(e,tp,eg,ep,ev,re,r,rp,chk) function c34898052.target(e,tp,eg,ep,ev,re,r,rp,chk)
...@@ -41,7 +48,7 @@ function c34898052.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -41,7 +48,7 @@ function c34898052.target(e,tp,eg,ep,ev,re,r,rp,chk)
end end
function c34898052.activate(e,tp,eg,ep,ev,re,r,rp) function c34898052.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToDeck,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,e:GetHandler()) local g=Duel.SelectMatchingCard(tp,Card.IsAbleToDeck,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,aux.ExceptThisCard(e))
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.HintSelection(g) Duel.HintSelection(g)
Duel.SendtoDeck(g,nil,2,REASON_EFFECT) Duel.SendtoDeck(g,nil,2,REASON_EFFECT)
......
...@@ -22,14 +22,14 @@ function c3493058.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -22,14 +22,14 @@ function c3493058.activate(e,tp,eg,ep,ev,re,r,rp)
if dc==1 or dc==6 then if dc==1 or dc==6 then
Duel.Damage(tp,1000,REASON_EFFECT) Duel.Damage(tp,1000,REASON_EFFECT)
elseif dc==5 then elseif dc==5 then
local g=Duel.GetMatchingGroup(c3493058.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,e:GetHandler()) local g=Duel.GetMatchingGroup(c3493058.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,aux.ExceptThisCard(e))
if g:GetCount()<2 then return end if g:GetCount()<2 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local dg=g:Select(tp,2,2,nil) local dg=g:Select(tp,2,2,nil)
Duel.Destroy(dg,REASON_EFFECT) Duel.Destroy(dg,REASON_EFFECT)
else else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectMatchingCard(tp,c3493058.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,e:GetHandler()) local g=Duel.SelectMatchingCard(tp,c3493058.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,aux.ExceptThisCard(e))
Duel.Destroy(g,REASON_EFFECT) Duel.Destroy(g,REASON_EFFECT)
end end
end end
...@@ -54,7 +54,7 @@ end ...@@ -54,7 +54,7 @@ end
function c35984222.spop(e,tp,eg,ep,ev,re,r,rp) function c35984222.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,1,tp,tp,false,false,POS_FACEUP)~=0 then if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,1,tp,tp,false,false,POS_FACEUP)~=0 then
local g=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_MZONE,0,c) local g=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_MZONE,0,aux.ExceptThisCard(e))
Duel.Destroy(g,REASON_EFFECT) Duel.Destroy(g,REASON_EFFECT)
end end
end end
...@@ -71,9 +71,7 @@ function c36956512.atktg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -71,9 +71,7 @@ function c36956512.atktg(e,tp,eg,ep,ev,re,r,rp,chk)
end end
function c36956512.atkop(e,tp,eg,ep,ev,re,r,rp) function c36956512.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local exc=c local tg=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,aux.ExceptThisCard(e))
if not exc:IsRelateToEffect(e) then exc=nil end
local tg=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,exc)
local tc=tg:GetFirst() local tc=tg:GetFirst()
while tc do while tc do
local atk=tc:GetAttack() local atk=tc:GetAttack()
......
...@@ -28,7 +28,7 @@ function c37318031.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -28,7 +28,7 @@ function c37318031.target(e,tp,eg,ep,ev,re,r,rp,chk)
end end
function c37318031.activate(e,tp,eg,ep,ev,re,r,rp) function c37318031.activate(e,tp,eg,ep,ev,re,r,rp)
local ct=Duel.GetMatchingGroupCount(c37318031.cfilter,tp,LOCATION_MZONE,0,nil) local ct=Duel.GetMatchingGroupCount(c37318031.cfilter,tp,LOCATION_MZONE,0,nil)
local g=Duel.GetMatchingGroup(c37318031.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,e:GetHandler()) local g=Duel.GetMatchingGroup(c37318031.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,aux.ExceptThisCard(e))
if g:GetCount()>=ct then if g:GetCount()>=ct then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local sg=g:Select(tp,ct,ct,nil) local sg=g:Select(tp,ct,ct,nil)
......
...@@ -26,8 +26,6 @@ function c37721209.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -26,8 +26,6 @@ function c37721209.target(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0)
end end
function c37721209.operation(e,tp,eg,ep,ev,re,r,rp) function c37721209.operation(e,tp,eg,ep,ev,re,r,rp)
local exc=e:GetHandler() local g=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,aux.ExceptThisCard(e))
if not exc:IsRelateToEffect(e) then exc=nil end
local g=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,exc)
Duel.Destroy(g,REASON_EFFECT) Duel.Destroy(g,REASON_EFFECT)
end end
...@@ -34,6 +34,6 @@ function c38049934.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -34,6 +34,6 @@ function c38049934.target(e,tp,eg,ep,ev,re,r,rp,chk)
end end
function c38049934.activate(e,tp,eg,ep,ev,re,r,rp) function c38049934.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectMatchingCard(tp,aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,e:GetLabel(),e:GetHandler()) local g=Duel.SelectMatchingCard(tp,aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,e:GetLabel(),aux.ExceptThisCard(e))
Duel.Destroy(g,REASON_EFFECT) Duel.Destroy(g,REASON_EFFECT)
end end
...@@ -11,27 +11,39 @@ function c38179121.initial_effect(c) ...@@ -11,27 +11,39 @@ function c38179121.initial_effect(c)
e1:SetOperation(c38179121.activate) e1:SetOperation(c38179121.activate)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c38179121.costfilter1(c) function c38179121.spcostfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsRace(RACE_DINOSAUR) and c:IsAbleToRemoveAsCost() return c:IsAbleToRemoveAsCost() and c:IsType(TYPE_MONSTER)
end end
function c38179121.costfilter2(c) function c38179121.spcost_selector(c,tp,g,sg,i)
return c:IsType(TYPE_MONSTER) and not c:IsRace(RACE_DINOSAUR) and c:IsAbleToRemoveAsCost() sg:AddCard(c)
g:RemoveCard(c)
local flag=false
if i<2 then
flag=g:IsExists(c38179121.spcost_selector,1,nil,tp,g,sg,i+1)
else
flag=sg:FilterCount(Card.IsRace,nil,RACE_DINOSAUR)==1
end
sg:RemoveCard(c)
g:AddCard(c)
return flag
end end
function c38179121.filter(c,e,tp) function c38179121.filter(c,e,tp)
return c:IsRace(RACE_DINOSAUR) and c:IsLevelAbove(7) and c:IsType(TYPE_MONSTER) and c:IsCanBeSpecialSummoned(e,0,tp,true,false) return c:IsRace(RACE_DINOSAUR) and c:IsLevelAbove(7) and c:IsType(TYPE_MONSTER) and c:IsCanBeSpecialSummoned(e,0,tp,true,false)
end end
function c38179121.cost(e,tp,eg,ep,ev,re,r,rp,chk) function c38179121.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(c38179121.filter,tp,LOCATION_DECK+LOCATION_HAND,0,nil,e,tp) local g=Duel.GetMatchingGroup(c38179121.filter,tp,LOCATION_DECK+LOCATION_HAND,0,nil,e,tp)
local tc=nil local exc=nil
if g:GetCount()==1 and g:GetFirst():IsLocation(LOCATION_HAND) then tc=g:GetFirst() end if g:GetCount()==1 and g:GetFirst():IsLocation(LOCATION_HAND) then exc=g:GetFirst() end
if chk==0 then return Duel.IsExistingMatchingCard(c38179121.costfilter1,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,tc) local rg=Duel.GetMatchingGroup(c38179121.spcostfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,exc)
and Duel.IsExistingMatchingCard(c38179121.costfilter2,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,tc) end local sg=Group.CreateGroup()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) if chk==0 then return rg:IsExists(c38179121.spcost_selector,1,nil,tp,rg,sg,1) end
local g1=Duel.SelectMatchingCard(tp,c38179121.costfilter1,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,tc) for i=1,2 do
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g2=Duel.SelectMatchingCard(tp,c38179121.costfilter2,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,tc) local g1=rg:FilterSelect(tp,c38179121.spcost_selector,1,1,nil,tp,rg,sg,i)
g1:Merge(g2) sg:Merge(g1)
Duel.Remove(g1,POS_FACEUP,REASON_COST) rg:Sub(g1)
end
Duel.Remove(sg,POS_FACEUP,REASON_COST)
end end
function c38179121.target(e,tp,eg,ep,ev,re,r,rp,chk) function c38179121.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
......
...@@ -80,16 +80,35 @@ end ...@@ -80,16 +80,35 @@ end
function c38695361.cfilter(c,att) function c38695361.cfilter(c,att)
return c:IsAttribute(att) and c:IsAbleToRemoveAsCost() return c:IsAttribute(att) and c:IsAbleToRemoveAsCost()
end end
function c38695361.spcostfilter(c)
return c:IsAbleToRemoveAsCost() and c:IsAttribute(ATTRIBUTE_LIGHT+ATTRIBUTE_DARK)
end
function c38695361.spcost_selector(c,tp,g,sg,i)
sg:AddCard(c)
g:RemoveCard(c)
local flag=false
if i<2 then
flag=g:IsExists(c38695361.spcost_selector,1,nil,tp,g,sg,i+1)
else
flag=sg:FilterCount(Card.IsAttribute,nil,ATTRIBUTE_LIGHT)>0
and sg:FilterCount(Card.IsAttribute,nil,ATTRIBUTE_DARK)>0
end
sg:RemoveCard(c)
g:AddCard(c)
return flag
end
function c38695361.thcost(e,tp,eg,ep,ev,re,r,rp,chk) function c38695361.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(c38695361.cfilter,tp,LOCATION_GRAVE,0,1,c,ATTRIBUTE_LIGHT) local g=Duel.GetMatchingGroup(c38695361.spcostfilter,tp,LOCATION_GRAVE,0,c)
and Duel.IsExistingMatchingCard(c38695361.cfilter,tp,LOCATION_GRAVE,0,1,c,ATTRIBUTE_DARK) end local sg=Group.CreateGroup()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) if chk==0 then return g:IsExists(c38695361.spcost_selector,1,nil,tp,g,sg,1) end
local g1=Duel.SelectMatchingCard(tp,c38695361.cfilter,tp,LOCATION_GRAVE,0,1,1,c,ATTRIBUTE_LIGHT) for i=1,2 do
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g2=Duel.SelectMatchingCard(tp,c38695361.cfilter,tp,LOCATION_GRAVE,0,1,1,c,ATTRIBUTE_DARK) local g1=g:FilterSelect(tp,c38695361.spcost_selector,1,1,nil,tp,g,sg,i)
g1:Merge(g2) sg:Merge(g1)
Duel.Remove(g1,POS_FACEUP,REASON_COST) g:Sub(g1)
end
Duel.Remove(sg,POS_FACEUP,REASON_COST)
end end
function c38695361.thtg(e,tp,eg,ep,ev,re,r,rp,chk) function c38695361.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToHand() end if chk==0 then return e:GetHandler():IsAbleToHand() end
......
...@@ -42,9 +42,7 @@ function c39272762.negcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -42,9 +42,7 @@ function c39272762.negcon(e,tp,eg,ep,ev,re,r,rp)
end end
function c39272762.negop(e,tp,eg,ep,ev,re,r,rp) function c39272762.negop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local exc=c local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,aux.ExceptThisCard(e))
if not exc:IsRelateToEffect(e) then exc=nil end
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,exc)
local tc=g:GetFirst() local tc=g:GetFirst()
while tc do while tc do
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
......
...@@ -43,8 +43,6 @@ function c39765958.destg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -43,8 +43,6 @@ function c39765958.destg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,sg,sg:GetCount(),0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,sg,sg:GetCount(),0,0)
end end
function c39765958.desop(e,tp,eg,ep,ev,re,r,rp) function c39765958.desop(e,tp,eg,ep,ev,re,r,rp)
local exc=e:GetHandler() local sg=Duel.GetMatchingGroup(c39765958.dfilter,tp,LOCATION_MZONE,LOCATION_MZONE,aux.ExceptThisCard(e))
if not exc:IsRelateToEffect(e) then exc=nil end
local sg=Duel.GetMatchingGroup(c39765958.dfilter,tp,LOCATION_MZONE,LOCATION_MZONE,exc)
Duel.Destroy(sg,REASON_EFFECT) Duel.Destroy(sg,REASON_EFFECT)
end end
...@@ -77,9 +77,7 @@ function c41753322.postg2(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -77,9 +77,7 @@ function c41753322.postg2(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_POSITION,g,g:GetCount(),0,0) Duel.SetOperationInfo(0,CATEGORY_POSITION,g,g:GetCount(),0,0)
end end
function c41753322.posop2(e,tp,eg,ep,ev,re,r,rp) function c41753322.posop2(e,tp,eg,ep,ev,re,r,rp)
local exc=e:GetHandler() local g=Duel.GetMatchingGroup(Card.IsCanTurnSet,tp,LOCATION_MZONE,LOCATION_MZONE,aux.ExceptThisCard(e))
if not exc:IsRelateToEffect(e) then exc=nil end
local g=Duel.GetMatchingGroup(Card.IsCanTurnSet,tp,LOCATION_MZONE,LOCATION_MZONE,exc)
Duel.ChangePosition(g,POS_FACEDOWN_DEFENSE) Duel.ChangePosition(g,POS_FACEDOWN_DEFENSE)
end end
function c41753322.dcon(e,tp,eg,ep,ev,re,r,rp) function c41753322.dcon(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -24,6 +24,6 @@ function c42175079.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -24,6 +24,6 @@ function c42175079.target(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0)
end end
function c42175079.activate(e,tp,eg,ep,ev,re,r,rp) function c42175079.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,e:GetHandler()) local g=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,aux.ExceptThisCard(e))
Duel.Destroy(g,REASON_EFFECT) Duel.Destroy(g,REASON_EFFECT)
end end
...@@ -103,9 +103,7 @@ function c42589641.thtg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -103,9 +103,7 @@ function c42589641.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,g:GetCount(),0,0) Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,g:GetCount(),0,0)
end end
function c42589641.thop(e,tp,eg,ep,ev,re,r,rp) function c42589641.thop(e,tp,eg,ep,ev,re,r,rp)
local exc=e:GetHandler() local g=Duel.GetMatchingGroup(Card.IsAbleToHand,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,aux.ExceptThisCard(e))
if not exc:IsRelateToEffect(e) then exc=nil end
local g=Duel.GetMatchingGroup(Card.IsAbleToHand,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,exc)
Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.SendtoHand(g,nil,REASON_EFFECT)
end end
function c42589641.hdcost(e,tp,eg,ep,ev,re,r,rp,chk) function c42589641.hdcost(e,tp,eg,ep,ev,re,r,rp,chk)
......
...@@ -19,6 +19,6 @@ function c42703248.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -19,6 +19,6 @@ function c42703248.target(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,sg,sg:GetCount(),0,0) Duel.SetOperationInfo(0,CATEGORY_TOHAND,sg,sg:GetCount(),0,0)
end end
function c42703248.activate(e,tp,eg,ep,ev,re,r,rp) function c42703248.activate(e,tp,eg,ep,ev,re,r,rp)
local sg=Duel.GetMatchingGroup(c42703248.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,e:GetHandler()) local sg=Duel.GetMatchingGroup(c42703248.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,aux.ExceptThisCard(e))
Duel.SendtoHand(sg,nil,REASON_EFFECT) Duel.SendtoHand(sg,nil,REASON_EFFECT)
end end
...@@ -31,53 +31,42 @@ function c42901635.initial_effect(c) ...@@ -31,53 +31,42 @@ function c42901635.initial_effect(c)
e3:SetOperation(c42901635.spop2) e3:SetOperation(c42901635.spop2)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
function c42901635.cfilter(c) function c42901635.spcostfilter(c)
return (c:IsLocation(LOCATION_HAND+LOCATION_GRAVE) or c:IsFaceup()) and c:IsAbleToRemoveAsCost() return (c:IsLocation(LOCATION_HAND+LOCATION_GRAVE) or c:IsFaceup())
and c:IsAbleToRemoveAsCost() and c:IsCode(42023223,79418928,15502037)
end end
function c42901635.sprfilter1(c,mg,ft) c42901635.spcost_list={42023223,79418928,15502037}
local mg2=mg:Clone() function c42901635.spcost_selector(c,tp,g,sg,i)
local ct=ft if not c:IsCode(c42901635.spcost_list[i]) then return false end
if c:IsLocation(LOCATION_MZONE) then ct=ct+1 end sg:AddCard(c)
mg2:RemoveCard(c) g:RemoveCard(c)
return c:IsCode(42023223) and mg2:IsExists(c42901635.sprfilter2,1,nil,mg2,ct) local flag=false
end if i<3 then
function c42901635.sprfilter2(c,mg,ft) flag=g:IsExists(c42901635.spcost_selector,1,nil,tp,g,sg,i+1)
local mg2=mg:Clone() else
local ct=ft flag=Duel.GetMZoneCount(tp,sg,tp)>0
if c:IsLocation(LOCATION_MZONE) then ct=ct+1 end end
mg2:RemoveCard(c) sg:RemoveCard(c)
return c:IsCode(79418928) and mg2:IsExists(c42901635.sprfilter3,1,nil,ct) g:AddCard(c)
end return flag
function c42901635.sprfilter3(c,ft)
local ct=ft
if c:IsLocation(LOCATION_MZONE) then ct=ct+1 end
return c:IsCode(15502037) and ct>0
end end
function c42901635.spcon(e,c) function c42901635.spcon(e,c)
if c==nil then return true end if c==nil then return true end
local tp=c:GetControler() local tp=c:GetControler()
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) local g=Duel.GetMatchingGroup(c42901635.spcostfilter,tp,LOCATION_GRAVE,0,nil)
local mg=Duel.GetMatchingGroup(c42901635.cfilter,tp,LOCATION_HAND+LOCATION_ONFIELD+LOCATION_GRAVE,0,nil) local sg=Group.CreateGroup()
return mg:IsExists(c42901635.sprfilter1,1,nil,mg,ft) return g:IsExists(c42901635.spcost_selector,1,nil,tp,g,sg,1)
end end
function c42901635.spop(e,tp,eg,ep,ev,re,r,rp,c) function c42901635.spop(e,tp,eg,ep,ev,re,r,rp,c)
local mg=Duel.GetMatchingGroup(c42901635.cfilter,tp,LOCATION_HAND+LOCATION_ONFIELD+LOCATION_GRAVE,0,nil) local g=Duel.GetMatchingGroup(c42901635.spcostfilter,tp,LOCATION_GRAVE,0,nil)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) local sg=Group.CreateGroup()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) for i=1,3 do
local g1=mg:FilterSelect(tp,c42901635.sprfilter1,1,1,nil,mg,ft) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local tc1=g1:GetFirst() local g1=g:FilterSelect(tp,c42901635.spcost_selector,1,1,nil,tp,g,sg,i)
mg:RemoveCard(tc1) sg:Merge(g1)
if tc1:IsLocation(LOCATION_MZONE) then ft=ft+1 end g:Sub(g1)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) end
local g2=mg:FilterSelect(tp,c42901635.sprfilter2,1,1,nil,mg,ft) Duel.Remove(sg,POS_FACEUP,REASON_COST)
local tc2=g2:GetFirst()
if tc2:IsLocation(LOCATION_MZONE) then ft=ft+1 end
mg:RemoveCard(tc2)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g3=mg:FilterSelect(tp,c42901635.sprfilter3,1,1,nil,ft)
g1:Merge(g2)
g1:Merge(g3)
Duel.Remove(g1,POS_FACEUP,REASON_COST)
end end
function c42901635.costfilter(c) function c42901635.costfilter(c)
return c:IsType(TYPE_MONSTER) and (c:IsSetCard(0x2066) or c:IsCode(99785935,39256679,11549357)) and c:IsLevelBelow(4) and c:IsAbleToRemoveAsCost() return c:IsType(TYPE_MONSTER) and (c:IsSetCard(0x2066) or c:IsCode(99785935,39256679,11549357)) and c:IsLevelBelow(4) and c:IsAbleToRemoveAsCost()
...@@ -106,26 +95,39 @@ function c42901635.spcon2(e,tp,eg,ep,ev,re,r,rp) ...@@ -106,26 +95,39 @@ function c42901635.spcon2(e,tp,eg,ep,ev,re,r,rp)
return c:IsReason(REASON_BATTLE) return c:IsReason(REASON_BATTLE)
or (rp~=tp and c:IsReason(REASON_EFFECT) and c:GetPreviousControler()==tp) or (rp~=tp and c:IsReason(REASON_EFFECT) and c:GetPreviousControler()==tp)
end end
function c42901635.spfilter(c,e,tp,code) function c42901635.spfilter(c,e,tp)
return c:IsFaceup() and c:IsCode(code) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsFaceup() and c:IsCode(99785935,39256679,11549357)
and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and c:IsCanBeEffectTarget(e)
end
function c42901635.sptarget_selector(c,tp,g,sg,i)
if not c:IsCode(c42901635.spcost_list[i]) then return false end
if i<3 then
sg:AddCard(c)
g:RemoveCard(c)
local flag=g:IsExists(c42901635.sptarget_selector,1,nil,tp,g,sg,i+1)
sg:RemoveCard(c)
g:AddCard(c)
return flag
else
return true
end
end end
function c42901635.sptg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c42901635.sptg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return false end if chkc then return false end
local g=Duel.GetMatchingGroup(c42901635.spfilter,tp,LOCATION_REMOVED,0,nil,e,tp)
local sg=Group.CreateGroup()
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>2 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>2
and Duel.IsExistingTarget(c42901635.spfilter,tp,LOCATION_REMOVED,0,1,nil,e,tp,42023223) and not Duel.IsPlayerAffectedByEffect(tp,59822133)
and Duel.IsExistingTarget(c42901635.spfilter,tp,LOCATION_REMOVED,0,1,nil,e,tp,79418928) and g:IsExists(c42901635.sptarget_selector,1,nil,tp,g,sg,1) end
and Duel.IsExistingTarget(c42901635.spfilter,tp,LOCATION_REMOVED,0,1,nil,e,tp,15502037) for i=1,3 do
and not Duel.IsPlayerAffectedByEffect(tp,59822133) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) local g1=g:FilterSelect(tp,c42901635.sptarget_selector,1,1,nil,tp,g,sg,i)
local g1=Duel.SelectMatchingCard(tp,c42901635.spfilter,tp,LOCATION_REMOVED,0,1,1,nil,e,tp,42023223) sg:Merge(g1)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) g:Sub(g1)
local g2=Duel.SelectMatchingCard(tp,c42901635.spfilter,tp,LOCATION_REMOVED,0,1,1,nil,e,tp,79418928) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.SetTargetCard(g)
local g3=Duel.SelectMatchingCard(tp,c42901635.spfilter,tp,LOCATION_REMOVED,0,1,1,nil,e,tp,15502037) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,3,0,0)
g1:Merge(g2)
g1:Merge(g3)
Duel.SetTargetCard(g1)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g1,3,0,0)
end end
function c42901635.spop2(e,tp,eg,ep,ev,re,r,rp) function c42901635.spop2(e,tp,eg,ep,ev,re,r,rp)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
......
...@@ -74,8 +74,6 @@ function c4335427.rmtg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -74,8 +74,6 @@ function c4335427.rmtg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetChainLimit(aux.FALSE) Duel.SetChainLimit(aux.FALSE)
end end
function c4335427.rmop(e,tp,eg,ep,ev,re,r,rp) function c4335427.rmop(e,tp,eg,ep,ev,re,r,rp)
local exc=e:GetHandler() local g=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,0x1e,0x1e,aux.ExceptThisCard(e))
if not exc:IsRelateToEffect(e) then exc=nil end
local g=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,0x1e,0x1e,exc)
Duel.Remove(g,POS_FACEUP,REASON_EFFECT) Duel.Remove(g,POS_FACEUP,REASON_EFFECT)
end end
...@@ -37,9 +37,7 @@ function c45960523.rmtg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -37,9 +37,7 @@ function c45960523.rmtg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,g:GetCount(),0,0) Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,g:GetCount(),0,0)
end end
function c45960523.rmop(e,tp,eg,ep,ev,re,r,rp) function c45960523.rmop(e,tp,eg,ep,ev,re,r,rp)
local exc=e:GetHandler() local g=Duel.GetMatchingGroup(c45960523.rmfilter,tp,LOCATION_MZONE,LOCATION_MZONE,aux.ExceptThisCard(e))
if not exc:IsRelateToEffect(e) then exc=nil end
local g=Duel.GetMatchingGroup(c45960523.rmfilter,tp,LOCATION_MZONE,LOCATION_MZONE,exc)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.Remove(g,POS_FACEUP,REASON_EFFECT) Duel.Remove(g,POS_FACEUP,REASON_EFFECT)
end end
......
...@@ -52,8 +52,6 @@ function c46772449.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -52,8 +52,6 @@ function c46772449.operation(e,tp,eg,ep,ev,re,r,rp)
e2:SetCode(EFFECT_NO_EFFECT_DAMAGE) e2:SetCode(EFFECT_NO_EFFECT_DAMAGE)
e2:SetReset(RESET_PHASE+PHASE_END) e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp) Duel.RegisterEffect(e2,tp)
local exc=e:GetHandler() local g=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,aux.ExceptThisCard(e))
if not exc:IsRelateToEffect(e) then exc=nil end
local g=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,exc)
Duel.Destroy(g,REASON_EFFECT) Duel.Destroy(g,REASON_EFFECT)
end end
...@@ -76,9 +76,7 @@ function c4779091.destg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -76,9 +76,7 @@ function c4779091.destg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0)
end end
function c4779091.desop(e,tp,eg,ep,ev,re,r,rp) function c4779091.desop(e,tp,eg,ep,ev,re,r,rp)
local exc=e:GetHandler() local g=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_MZONE,LOCATION_MZONE,aux.ExceptThisCard(e))
if not exc:IsRelateToEffect(e) then exc=nil end
local g=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_MZONE,LOCATION_MZONE,exc)
Duel.Destroy(g,REASON_EFFECT) Duel.Destroy(g,REASON_EFFECT)
end end
function c4779091.spcon(e,tp,eg,ep,ev,re,r,rp) function c4779091.spcon(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -25,6 +25,6 @@ function c50215517.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -25,6 +25,6 @@ function c50215517.target(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,sg,sg:GetCount(),0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,sg,sg:GetCount(),0,0)
end end
function c50215517.activate(e,tp,eg,ep,ev,re,r,rp) function c50215517.activate(e,tp,eg,ep,ev,re,r,rp)
local sg=Duel.GetMatchingGroup(c50215517.filter,tp,0,LOCATION_ONFIELD,e:GetHandler()) local sg=Duel.GetMatchingGroup(c50215517.filter,tp,0,LOCATION_ONFIELD,aux.ExceptThisCard(e))
Duel.Destroy(sg,REASON_EFFECT) Duel.Destroy(sg,REASON_EFFECT)
end end
...@@ -29,7 +29,7 @@ function c52098461.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -29,7 +29,7 @@ function c52098461.activate(e,tp,eg,ep,ev,re,r,rp)
if tc:IsRelateToEffect(e) and c52098461.filter(tc) if tc:IsRelateToEffect(e) and c52098461.filter(tc)
and Duel.SendtoDeck(tc,nil,2,REASON_EFFECT)~=0 and tc:IsLocation(LOCATION_DECK) then and Duel.SendtoDeck(tc,nil,2,REASON_EFFECT)~=0 and tc:IsLocation(LOCATION_DECK) then
Duel.BreakEffect() Duel.BreakEffect()
local g=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,e:GetHandler()) local g=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,aux.ExceptThisCard(e))
Duel.Destroy(g,REASON_EFFECT) Duel.Destroy(g,REASON_EFFECT)
end end
end end
...@@ -44,9 +44,7 @@ function c52512994.rfilter(c) ...@@ -44,9 +44,7 @@ function c52512994.rfilter(c)
end end
function c52512994.tdop(e,tp,eg,ep,ev,re,r,rp) function c52512994.tdop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local exc=c local g=Duel.GetMatchingGroup(Card.IsAbleToDeck,tp,LOCATION_MZONE,LOCATION_MZONE,aux.ExceptThisCard(e))
if not exc:IsRelateToEffect(e) then exc=nil end
local g=Duel.GetMatchingGroup(Card.IsAbleToDeck,tp,LOCATION_MZONE,LOCATION_MZONE,exc)
Duel.SendtoDeck(g,nil,2,REASON_EFFECT) Duel.SendtoDeck(g,nil,2,REASON_EFFECT)
local rt=Duel.GetOperatedGroup():FilterCount(c52512994.rfilter,nil) local rt=Duel.GetOperatedGroup():FilterCount(c52512994.rfilter,nil)
if rt>0 and c:IsFaceup() and c:IsRelateToEffect(e) then if rt>0 and c:IsFaceup() and c:IsRelateToEffect(e) then
......
...@@ -25,7 +25,7 @@ function c52971673.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -25,7 +25,7 @@ function c52971673.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c52971673.cfilter,tp,LOCATION_MZONE,0,nil) local g=Duel.GetMatchingGroup(c52971673.cfilter,tp,LOCATION_MZONE,0,nil)
local dt=Duel.Destroy(g,REASON_EFFECT) local dt=Duel.Destroy(g,REASON_EFFECT)
if dt==0 then return end if dt==0 then return end
local dg=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,e:GetHandler()) local dg=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,aux.ExceptThisCard(e))
if dg:GetCount()>0 then if dg:GetCount()>0 then
Duel.BreakEffect() Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
......
...@@ -22,6 +22,6 @@ function c5479217.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -22,6 +22,6 @@ function c5479217.target(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0)
end end
function c5479217.activate(e,tp,eg,ep,ev,re,r,rp) function c5479217.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,e:GetHandler()) local g=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,aux.ExceptThisCard(e))
Duel.Destroy(g,REASON_EFFECT) Duel.Destroy(g,REASON_EFFECT)
end end
...@@ -26,6 +26,6 @@ function c5577649.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -26,6 +26,6 @@ function c5577649.target(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0)
end end
function c5577649.operation(e,tp,eg,ep,ev,re,r,rp) function c5577649.operation(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c5577649.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,e:GetHandler()) local g=Duel.GetMatchingGroup(c5577649.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,aux.ExceptThisCard(e))
Duel.Destroy(g,REASON_EFFECT) Duel.Destroy(g,REASON_EFFECT)
end end
...@@ -60,9 +60,7 @@ function c57774843.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -60,9 +60,7 @@ function c57774843.target(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,sg,sg:GetCount(),0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,sg,sg:GetCount(),0,0)
end end
function c57774843.operation(e,tp,eg,ep,ev,re,r,rp) function c57774843.operation(e,tp,eg,ep,ev,re,r,rp)
local exc=e:GetHandler() local sg=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,aux.ExceptThisCard(e))
if not exc:IsRelateToEffect(e) then exc=nil end
local sg=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,exc)
Duel.Destroy(sg,REASON_EFFECT) Duel.Destroy(sg,REASON_EFFECT)
end end
function c57774843.condition2(e,tp,eg,ep,ev,re,r,rp) function c57774843.condition2(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -32,7 +32,7 @@ function c57831349.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -32,7 +32,7 @@ function c57831349.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.NegateActivation(ev) and ec:IsRelateToEffect(re) then if Duel.NegateActivation(ev) and ec:IsRelateToEffect(re) then
ec:CancelToGrave() ec:CancelToGrave()
if Duel.SendtoDeck(ec,nil,2,REASON_EFFECT)~=0 and ec:IsLocation(LOCATION_DECK+LOCATION_EXTRA) then if Duel.SendtoDeck(ec,nil,2,REASON_EFFECT)~=0 and ec:IsLocation(LOCATION_DECK+LOCATION_EXTRA) then
local g=Duel.GetMatchingGroup(c57831349.desfilter,tp,LOCATION_ONFIELD,0,e:GetHandler()) local g=Duel.GetMatchingGroup(c57831349.desfilter,tp,LOCATION_ONFIELD,0,aux.ExceptThisCard(e))
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.BreakEffect() Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
......
...@@ -39,23 +39,38 @@ end ...@@ -39,23 +39,38 @@ end
function c58054262.filter(c,code,e,tp) function c58054262.filter(c,code,e,tp)
return c:IsCode(code) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsCode(code) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function c58054262.sptargetfilter(c,e,tp)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsCode(60999392,23782705,96384007)
end
c58054262.sptarget_list={60999392,23782705,96384007}
function c58054262.sptarget_selector(c,tp,g,sg,i)
if not c:IsCode(c58054262.sptarget_list[i]) then return false end
if i<3 then
sg:AddCard(c)
g:RemoveCard(c)
local flag=g:IsExists(c58054262.sptarget_selector,1,nil,tp,g,sg,i+1)
sg:RemoveCard(c)
g:AddCard(c)
return flag
else
return true
end
end
function c58054262.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c58054262.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return false end if chkc then return false end
local g=Duel.GetMatchingGroup(c22666164.sptargetfilter,tp,LOCATION_GRAVE,0,nil,e,tp)
local sg=Group.CreateGroup()
if chk==0 then return not Duel.IsPlayerAffectedByEffect(tp,59822133) if chk==0 then return not Duel.IsPlayerAffectedByEffect(tp,59822133)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>=2 and Duel.GetLocationCount(tp,LOCATION_MZONE)>=2
and Duel.IsExistingTarget(c58054262.filter,tp,LOCATION_GRAVE,0,1,nil,60999392,e,tp) and g:IsExists(c22666164.sptarget_selector,1,nil,tp,g,sg,1)
and Duel.IsExistingTarget(c58054262.filter,tp,LOCATION_GRAVE,0,1,nil,23782705,e,tp) end
and Duel.IsExistingTarget(c58054262.filter,tp,LOCATION_GRAVE,0,1,nil,96384007,e,tp) for i=1,3 do
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g1=g:FilterSelect(tp,c58054262.sptarget_selector,1,1,nil,tp,g,sg,i)
sg:Merge(g1)
g:Sub(g1)
end end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,sg,3,0,0)
local g1=Duel.SelectTarget(tp,c58054262.filter,tp,LOCATION_GRAVE,0,1,1,nil,60999392,e,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g2=Duel.SelectTarget(tp,c58054262.filter,tp,LOCATION_GRAVE,0,1,1,nil,23782705,e,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g3=Duel.SelectTarget(tp,c58054262.filter,tp,LOCATION_GRAVE,0,1,1,nil,96384007,e,tp)
g1:Merge(g2)
g1:Merge(g3)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g1,3,0,0)
end end
function c58054262.spop(e,tp,eg,ep,ev,re,r,rp) function c58054262.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.IsPlayerAffectedByEffect(tp,59822133) then return end if Duel.IsPlayerAffectedByEffect(tp,59822133) then return end
......
...@@ -91,16 +91,14 @@ function c58330108.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -91,16 +91,14 @@ function c58330108.target(e,tp,eg,ep,ev,re,r,rp,chk)
end end
end end
function c58330108.operation(e,tp,eg,ep,ev,re,r,rp) function c58330108.operation(e,tp,eg,ep,ev,re,r,rp)
local exc=e:GetHandler()
if not exc:IsRelateToEffect(e) then exc=nil end
local gc=Duel.GetMatchingGroup(c58330108.filter,tp,LOCATION_GRAVE,0,nil):GetClassCount(Card.GetCode) local gc=Duel.GetMatchingGroup(c58330108.filter,tp,LOCATION_GRAVE,0,nil):GetClassCount(Card.GetCode)
if gc==1 then if gc==1 then
local g=Duel.GetMatchingGroup(nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,exc) local g=Duel.GetMatchingGroup(nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,aux.ExceptThisCard(e))
Duel.Destroy(g,REASON_EFFECT) Duel.Destroy(g,REASON_EFFECT)
else else
local loc=LOCATION_ONFIELD local loc=LOCATION_ONFIELD
if gc>2 then loc=LOCATION_ONFIELD+LOCATION_GRAVE end if gc>2 then loc=LOCATION_ONFIELD+LOCATION_GRAVE end
local g=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,loc,loc,exc) local g=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,loc,loc,aux.ExceptThisCard(e))
Duel.Remove(g,POS_FACEUP,REASON_EFFECT) Duel.Remove(g,POS_FACEUP,REASON_EFFECT)
end end
end end
...@@ -17,8 +17,6 @@ function c58760121.postg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -17,8 +17,6 @@ function c58760121.postg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_POSITION,g,g:GetCount(),0,0) Duel.SetOperationInfo(0,CATEGORY_POSITION,g,g:GetCount(),0,0)
end end
function c58760121.posop(e,tp,eg,ep,ev,re,r,rp) function c58760121.posop(e,tp,eg,ep,ev,re,r,rp)
local exc=e:GetHandler() local g=Duel.GetMatchingGroup(c58760121.filter,tp,LOCATION_MZONE,0,aux.ExceptThisCard(e))
if not exc:IsRelateToEffect(e) then exc=nil end
local g=Duel.GetMatchingGroup(c58760121.filter,tp,LOCATION_MZONE,0,exc)
Duel.ChangePosition(g,POS_FACEDOWN_DEFENSE,0,POS_FACEDOWN_DEFENSE,0) Duel.ChangePosition(g,POS_FACEDOWN_DEFENSE,0,POS_FACEDOWN_DEFENSE,0)
end end
...@@ -71,7 +71,7 @@ function c59913418.destg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -71,7 +71,7 @@ function c59913418.destg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,ct*200) Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,ct*200)
end end
function c59913418.desop(e,tp,eg,ep,ev,re,r,rp) function c59913418.desop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,e:GetHandler()) local g=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,aux.ExceptThisCard(e))
Duel.Destroy(g,REASON_EFFECT) Duel.Destroy(g,REASON_EFFECT)
local ct=Duel.GetOperatedGroup():FilterCount(Card.IsControler,nil,1-tp) local ct=Duel.GetOperatedGroup():FilterCount(Card.IsControler,nil,1-tp)
if ct>0 then if ct>0 then
......
...@@ -43,8 +43,6 @@ function c60258960.destg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -43,8 +43,6 @@ function c60258960.destg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0)
end end
function c60258960.desop(e,tp,eg,ep,ev,re,r,rp) function c60258960.desop(e,tp,eg,ep,ev,re,r,rp)
local exc=e:GetHandler() local g=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_MZONE,LOCATION_MZONE,aux.ExceptThisCard(e))
if not exc:IsRelateToEffect(e) then exc=nil end
local g=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_MZONE,LOCATION_MZONE,exc)
Duel.Destroy(g,REASON_EFFECT) Duel.Destroy(g,REASON_EFFECT)
end end
...@@ -39,8 +39,6 @@ function c64599569.sucop(e,tp,eg,ep,ev,re,r,rp) ...@@ -39,8 +39,6 @@ function c64599569.sucop(e,tp,eg,ep,ev,re,r,rp)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
function c64599569.tgop(e,tp,eg,ep,ev,re,r,rp) function c64599569.tgop(e,tp,eg,ep,ev,re,r,rp)
local exc=e:GetHandler() local g=Duel.GetMatchingGroup(nil,tp,LOCATION_ONFIELD,0,aux.ExceptThisCard(e))
if not exc:IsRelateToEffect(e) then exc=nil end
local g=Duel.GetMatchingGroup(nil,tp,LOCATION_ONFIELD,0,exc)
Duel.SendtoGrave(g,REASON_EFFECT) Duel.SendtoGrave(g,REASON_EFFECT)
end end
...@@ -52,11 +52,9 @@ function c64681432.destg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -52,11 +52,9 @@ function c64681432.destg(e,tp,eg,ep,ev,re,r,rp,chk)
end end
function c64681432.desop(e,tp,eg,ep,ev,re,r,rp) function c64681432.desop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local exc=c local sg=Duel.GetMatchingGroup(nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,aux.ExceptThisCard(e))
if not exc:IsRelateToEffect(e) then exc=nil end
local sg=Duel.GetMatchingGroup(nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,exc)
local ct=Duel.Destroy(sg,REASON_EFFECT,LOCATION_REMOVED) local ct=Duel.Destroy(sg,REASON_EFFECT,LOCATION_REMOVED)
if ct>0 and c:IsFaceup() and exc~=nil then if ct>0 and c:IsFaceup() and c:IsRelateToEffect(e) then
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetCode(EFFECT_UPDATE_ATTACK)
......
...@@ -19,6 +19,6 @@ function c64697431.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -19,6 +19,6 @@ function c64697431.target(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,sg,sg:GetCount(),0,0) Duel.SetOperationInfo(0,CATEGORY_TOHAND,sg,sg:GetCount(),0,0)
end end
function c64697431.activate(e,tp,eg,ep,ev,re,r,rp) function c64697431.activate(e,tp,eg,ep,ev,re,r,rp)
local sg=Duel.GetMatchingGroup(c64697431.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,e:GetHandler()) local sg=Duel.GetMatchingGroup(c64697431.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,aux.ExceptThisCard(e))
Duel.SendtoHand(sg,nil,REASON_EFFECT) Duel.SendtoHand(sg,nil,REASON_EFFECT)
end end
...@@ -48,7 +48,7 @@ function c67231737.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -48,7 +48,7 @@ function c67231737.target(e,tp,eg,ep,ev,re,r,rp,chk)
end end
function c67231737.operation(e,tp,eg,ep,ev,re,r,rp) function c67231737.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local gc=Duel.GetMatchingGroupCount(Card.IsType,tp,LOCATION_MZONE,0,c,TYPE_LINK) local gc=Duel.GetMatchingGroupCount(Card.IsType,tp,LOCATION_MZONE,0,aux.ExceptThisCard(e),TYPE_LINK)
if gc==0 then return end if gc==0 then return end
local a=Duel.GetAttacker() local a=Duel.GetAttacker()
if a:IsRelateToBattle() and a:IsFaceup() then if a:IsRelateToBattle() and a:IsFaceup() then
......
...@@ -51,9 +51,7 @@ function c68299524.cost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -51,9 +51,7 @@ function c68299524.cost(e,tp,eg,ep,ev,re,r,rp,chk)
end end
function c68299524.operation(e,tp,eg,ep,ev,re,r,rp) function c68299524.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local exc=c local g=Duel.GetMatchingGroup(c68299524.filter,tp,LOCATION_MZONE,LOCATION_MZONE,aux.ExceptThisCard(e))
if not exc:IsRelateToEffect(e) then exc=nil end
local g=Duel.GetMatchingGroup(c68299524.filter,tp,LOCATION_MZONE,LOCATION_MZONE,exc)
local tc=g:GetFirst() local tc=g:GetFirst()
local val=e:GetLabel() local val=e:GetLabel()
while tc do while tc do
......
...@@ -33,9 +33,7 @@ function c68396121.filter(c) ...@@ -33,9 +33,7 @@ function c68396121.filter(c)
end end
function c68396121.negop(e,tp,eg,ep,ev,re,r,rp) function c68396121.negop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local exc=c local g=Duel.GetMatchingGroup(c68396121.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,aux.ExceptThisCard(e))
if not exc:IsRelateToEffect(e) then exc=nil end
local g=Duel.GetMatchingGroup(c68396121.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,exc)
local tc=g:GetFirst() local tc=g:GetFirst()
while tc do while tc do
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
......
...@@ -20,23 +20,37 @@ function c6890729.initial_effect(c) ...@@ -20,23 +20,37 @@ function c6890729.initial_effect(c)
e2:SetOperation(c6890729.thop) e2:SetOperation(c6890729.thop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c6890729.cfilter(c,code) function c6890729.spcostfilter(c)
return c:IsCode(code) and c:IsAbleToDeckAsCost() return c:IsAbleToDeckAsCost() and c:IsCode(43017476,22587018,58071123)
end
c6890729.spcost_list={43017476,22587018,58071123}
function c6890729.spcost_selector(c,tp,g,sg,i)
if not c:IsCode(c6890729.spcost_list[i]) then return false end
if i<3 then
sg:AddCard(c)
g:RemoveCard(c)
local flag=g:IsExists(c6890729.spcost_selector,1,nil,tp,g,sg,i+1)
sg:RemoveCard(c)
g:AddCard(c)
return flag
else
return true
end
end end
function c6890729.cost(e,tp,eg,ep,ev,re,r,rp,chk) function c6890729.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c6890729.cfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,43017476) local g=Duel.GetMatchingGroup(c6890729.spcostfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,nil)
and Duel.IsExistingMatchingCard(c6890729.cfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,22587018) local sg=Group.CreateGroup()
and Duel.IsExistingMatchingCard(c6890729.cfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,58071123) end if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) and g:IsExists(c6890729.spcost_selector,1,nil,tp,g,sg,1)
local g1=Duel.SelectMatchingCard(tp,c6890729.cfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,43017476) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) for i=1,3 do
local g2=Duel.SelectMatchingCard(tp,c6890729.cfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,22587018) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) local g1=g:FilterSelect(tp,c6890729.spcost_selector,1,1,nil,tp,g,sg,i)
local g3=Duel.SelectMatchingCard(tp,c6890729.cfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,58071123) sg:Merge(g1)
g1:Merge(g2) g:Sub(g1)
g1:Merge(g3) end
Duel.ConfirmCards(1-tp,g1) Duel.ConfirmCards(1-tp,sg)
Duel.SendtoDeck(g1,nil,2,REASON_COST) Duel.SendtoDeck(sg,nil,2,REASON_COST)
end end
function c6890729.filter(c,e,tp) function c6890729.filter(c,e,tp)
return c:IsCode(6022371) and c:IsCanBeSpecialSummoned(e,0,tp,true,true) return c:IsCode(6022371) and c:IsCanBeSpecialSummoned(e,0,tp,true,true)
......
...@@ -25,8 +25,6 @@ function c698785.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -25,8 +25,6 @@ function c698785.target(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0)
end end
function c698785.operation(e,tp,eg,ep,ev,re,r,rp) function c698785.operation(e,tp,eg,ep,ev,re,r,rp)
local exc=e:GetHandler() local g=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_MZONE,LOCATION_MZONE,aux.ExceptThisCard(e))
if not exc:IsRelateToEffect(e) then exc=nil end
local g=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_MZONE,LOCATION_MZONE,exc)
Duel.Destroy(g,REASON_EFFECT) Duel.Destroy(g,REASON_EFFECT)
end end
...@@ -54,6 +54,6 @@ function c70902743.target2(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -54,6 +54,6 @@ function c70902743.target2(e,tp,eg,ep,ev,re,r,rp,chk)
end end
function c70902743.operation2(e,tp,eg,ep,ev,re,r,rp) function c70902743.operation2(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) or e:GetHandler():IsFacedown() then return end if not e:GetHandler():IsRelateToEffect(e) or e:GetHandler():IsFacedown() then return end
local g=Duel.GetMatchingGroup(c70902743.filter2,tp,LOCATION_MZONE,0,e:GetHandler()) local g=Duel.GetMatchingGroup(c70902743.filter2,tp,LOCATION_MZONE,0,aux.ExceptThisCard(e))
Duel.Destroy(g,REASON_EFFECT) Duel.Destroy(g,REASON_EFFECT)
end end
...@@ -42,7 +42,7 @@ function c71172240.tdtg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -42,7 +42,7 @@ function c71172240.tdtg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,g:GetCount(),0,0) Duel.SetOperationInfo(0,CATEGORY_TODECK,g,g:GetCount(),0,0)
end end
function c71172240.tdop(e,tp,eg,ep,ev,re,r,rp) function c71172240.tdop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c71172240.tdfilter,tp,LOCATION_MZONE,LOCATION_MZONE,e:GetHandler()) local g=Duel.GetMatchingGroup(c71172240.tdfilter,tp,LOCATION_MZONE,LOCATION_MZONE,aux.ExceptThisCard(e))
Duel.SendtoDeck(g,nil,2,REASON_EFFECT) Duel.SendtoDeck(g,nil,2,REASON_EFFECT)
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
......
...@@ -41,9 +41,7 @@ function c71525232.filter(c) ...@@ -41,9 +41,7 @@ function c71525232.filter(c)
end end
function c71525232.operation(e,tp,eg,ep,ev,re,r,rp) function c71525232.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local exc=c local g=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_MZONE,LOCATION_MZONE,aux.ExceptThisCard(e))
if not exc:IsRelateToEffect(e) then exc=nil end
local g=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_MZONE,LOCATION_MZONE,exc)
if g:GetCount()>0 and Duel.Destroy(g,REASON_EFFECT)~=0 then if g:GetCount()>0 and Duel.Destroy(g,REASON_EFFECT)~=0 then
local og=Duel.GetOperatedGroup() local og=Duel.GetOperatedGroup()
local mg,atk=og:GetMaxGroup(c71525232.filter) local mg,atk=og:GetMaxGroup(c71525232.filter)
......
...@@ -37,7 +37,7 @@ function c72355272.rmtg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -37,7 +37,7 @@ function c72355272.rmtg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,g:GetCount(),0,0) Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,g:GetCount(),0,0)
end end
function c72355272.rmop(e,tp,eg,ep,ev,re,r,rp) function c72355272.rmop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c72355272.rmfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,e:GetHandler()) local g=Duel.GetMatchingGroup(c72355272.rmfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,aux.ExceptThisCard(e))
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.Remove(g,POS_FACEUP,REASON_EFFECT) Duel.Remove(g,POS_FACEUP,REASON_EFFECT)
end end
......
...@@ -45,7 +45,7 @@ function c72370114.destg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -45,7 +45,7 @@ function c72370114.destg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end end
function c72370114.desop(e,tp,eg,ep,ev,re,r,rp) function c72370114.desop(e,tp,eg,ep,ev,re,r,rp)
local ct=Duel.GetMatchingGroupCount(c72370114.cfilter,tp,LOCATION_MZONE,0,e:GetHandler()) local ct=Duel.GetMatchingGroupCount(c72370114.cfilter,tp,LOCATION_MZONE,0,aux.ExceptThisCard(e))
local g=Duel.GetMatchingGroup(c72370114.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil) local g=Duel.GetMatchingGroup(c72370114.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
if ct>0 and g:GetCount()>0 then if ct>0 and g:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
......
...@@ -23,6 +23,6 @@ function c72426662.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -23,6 +23,6 @@ function c72426662.target(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,sg,sg:GetCount(),0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,sg,sg:GetCount(),0,0)
end end
function c72426662.operation(e,tp,eg,ep,ev,re,r,rp) function c72426662.operation(e,tp,eg,ep,ev,re,r,rp)
local sg=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,e:GetHandler()) local sg=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,aux.ExceptThisCard(e))
Duel.Destroy(sg,REASON_EFFECT) Duel.Destroy(sg,REASON_EFFECT)
end end
...@@ -32,23 +32,41 @@ function c72989439.initial_effect(c) ...@@ -32,23 +32,41 @@ function c72989439.initial_effect(c)
e3:SetOperation(c72989439.atop) e3:SetOperation(c72989439.atop)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
function c72989439.spfilter(c,att) function c72989439.spcostfilter(c)
return c:IsAttribute(att) and c:IsAbleToRemoveAsCost() return c:IsAbleToRemoveAsCost() and c:IsAttribute(ATTRIBUTE_LIGHT+ATTRIBUTE_DARK)
end
function c72989439.spcost_selector(c,tp,g,sg,i)
sg:AddCard(c)
g:RemoveCard(c)
local flag=false
if i<2 then
flag=g:IsExists(c72989439.spcost_selector,1,nil,tp,g,sg,i+1)
else
flag=sg:FilterCount(Card.IsAttribute,nil,ATTRIBUTE_LIGHT)>0
and sg:FilterCount(Card.IsAttribute,nil,ATTRIBUTE_DARK)>0
end
sg:RemoveCard(c)
g:AddCard(c)
return flag
end end
function c72989439.spcon(e,c) function c72989439.spcon(e,c)
if c==nil then return true end if c==nil then return true end
if Duel.GetMZoneCount(tp)<=0 then return false end
local tp=c:GetControler() local tp=c:GetControler()
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 local g=Duel.GetMatchingGroup(c72989439.spcostfilter,tp,LOCATION_GRAVE,0,nil)
and Duel.IsExistingMatchingCard(c72989439.spfilter,tp,LOCATION_GRAVE,0,1,nil,ATTRIBUTE_LIGHT) local sg=Group.CreateGroup()
and Duel.IsExistingMatchingCard(c72989439.spfilter,tp,LOCATION_GRAVE,0,1,nil,ATTRIBUTE_DARK) return g:IsExists(c72989439.spcost_selector,1,nil,tp,g,sg,1)
end end
function c72989439.spop(e,tp,eg,ep,ev,re,r,rp,c) function c72989439.spop(e,tp,eg,ep,ev,re,r,rp,c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) local g=Duel.GetMatchingGroup(c72989439.spcostfilter,tp,LOCATION_GRAVE,0,nil)
local g1=Duel.SelectMatchingCard(tp,c72989439.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,ATTRIBUTE_LIGHT) local sg=Group.CreateGroup()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) for i=1,2 do
local g2=Duel.SelectMatchingCard(tp,c72989439.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,ATTRIBUTE_DARK) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
g1:Merge(g2) local g1=g:FilterSelect(tp,c72989439.spcost_selector,1,1,nil,tp,g,sg,i)
Duel.Remove(g1,POS_FACEUP,REASON_COST) sg:Merge(g1)
g:Sub(g1)
end
Duel.Remove(sg,POS_FACEUP,REASON_COST)
end end
function c72989439.rmcost(e,tp,eg,ep,ev,re,r,rp,chk) function c72989439.rmcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
......
...@@ -21,7 +21,7 @@ function c73507661.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -21,7 +21,7 @@ function c73507661.target(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,PLAYER_ALL,sg:GetCount()*300) Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,PLAYER_ALL,sg:GetCount()*300)
end end
function c73507661.activate(e,tp,eg,ep,ev,re,r,rp) function c73507661.activate(e,tp,eg,ep,ev,re,r,rp)
local sg=Duel.GetMatchingGroup(c73507661.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,e:GetHandler()) local sg=Duel.GetMatchingGroup(c73507661.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,aux.ExceptThisCard(e))
local ct=Duel.Destroy(sg,REASON_EFFECT) local ct=Duel.Destroy(sg,REASON_EFFECT)
Duel.Damage(tp,ct*300,REASON_EFFECT,true) Duel.Damage(tp,ct*300,REASON_EFFECT,true)
Duel.Damage(1-tp,ct*300,REASON_EFFECT,true) Duel.Damage(1-tp,ct*300,REASON_EFFECT,true)
......
...@@ -74,9 +74,7 @@ function c74530899.thtg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -74,9 +74,7 @@ function c74530899.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,g:GetCount()*300) Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,g:GetCount()*300)
end end
function c74530899.thop(e,tp,eg,ep,ev,re,r,rp) function c74530899.thop(e,tp,eg,ep,ev,re,r,rp)
local exc=e:GetHandler() local g=Duel.GetMatchingGroup(Card.IsAbleToHand,tp,LOCATION_MZONE,LOCATION_MZONE,aux.ExceptThisCard(e))
if not exc:IsRelateToEffect(e) then exc=nil end
local g=Duel.GetMatchingGroup(Card.IsAbleToHand,tp,LOCATION_MZONE,LOCATION_MZONE,exc)
if g:GetCount()==0 then return end if g:GetCount()==0 then return end
Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.SendtoHand(g,nil,REASON_EFFECT)
local og=Duel.GetOperatedGroup() local og=Duel.GetOperatedGroup()
......
...@@ -34,9 +34,7 @@ function c75433814.cttg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -34,9 +34,7 @@ function c75433814.cttg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,e:GetHandler()) end if chk==0 then return Duel.IsExistingMatchingCard(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,e:GetHandler()) end
end end
function c75433814.ctop(e,tp,eg,ep,ev,re,r,rp) function c75433814.ctop(e,tp,eg,ep,ev,re,r,rp)
local exc=e:GetHandler() local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,aux.ExceptThisCard(e))
if not exc:IsRelateToEffect(e) then exc=nil end
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,exc)
local tc=g:GetFirst() local tc=g:GetFirst()
while tc do while tc do
tc:AddCounter(0x1024,1) tc:AddCounter(0x1024,1)
......
...@@ -39,9 +39,7 @@ function c77336644.destg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -39,9 +39,7 @@ function c77336644.destg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0)
end end
function c77336644.desop(e,tp,eg,ep,ev,re,r,rp) function c77336644.desop(e,tp,eg,ep,ev,re,r,rp)
local exc=e:GetHandler() local g=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_MZONE,LOCATION_MZONE,aux.ExceptThisCard(e))
if not exc:IsRelateToEffect(e) then exc=nil end
local g=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_MZONE,LOCATION_MZONE,exc)
Duel.Destroy(g,REASON_EFFECT) Duel.Destroy(g,REASON_EFFECT)
end end
function c77336644.spcon(e,tp,eg,ep,ev,re,r,rp) function c77336644.spcon(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -20,8 +20,6 @@ function c77428945.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -20,8 +20,6 @@ function c77428945.target(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_POSITION,g,g:GetCount(),0,0) Duel.SetOperationInfo(0,CATEGORY_POSITION,g,g:GetCount(),0,0)
end end
function c77428945.operation(e,tp,eg,ep,ev,re,r,rp) function c77428945.operation(e,tp,eg,ep,ev,re,r,rp)
local exc=e:GetHandler() local g=Duel.GetMatchingGroup(c77428945.filter,tp,LOCATION_MZONE,LOCATION_MZONE,aux.ExceptThisCard(e))
if not exc:IsRelateToEffect(e) then exc=nil end
local g=Duel.GetMatchingGroup(c77428945.filter,tp,LOCATION_MZONE,LOCATION_MZONE,exc)
Duel.ChangePosition(g,POS_FACEDOWN_DEFENSE) Duel.ChangePosition(g,POS_FACEDOWN_DEFENSE)
end end
...@@ -50,6 +50,6 @@ function c77778835.desfilter(c,rc) ...@@ -50,6 +50,6 @@ function c77778835.desfilter(c,rc)
return rc:IsHasCardTarget(c) return rc:IsHasCardTarget(c)
end end
function c77778835.desop(e,tp,eg,ep,ev,re,r,rp) function c77778835.desop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c77778835.desfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil,e:GetHandler()) local g=Duel.GetMatchingGroup(c77778835.desfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil,aux.ExceptThisCard(e))
Duel.Destroy(g,REASON_EFFECT) Duel.Destroy(g,REASON_EFFECT)
end end
...@@ -29,7 +29,7 @@ function c79337169.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -29,7 +29,7 @@ function c79337169.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c79337169.filter,tp,LOCATION_MZONE,0,1,e:GetHandler()) end if chk==0 then return Duel.IsExistingMatchingCard(c79337169.filter,tp,LOCATION_MZONE,0,1,e:GetHandler()) end
end end
function c79337169.operation(e,tp,eg,ep,ev,re,r,rp) function c79337169.operation(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c79337169.filter,tp,LOCATION_MZONE,0,e:GetHandler()) local g=Duel.GetMatchingGroup(c79337169.filter,tp,LOCATION_MZONE,0,aux.ExceptThisCard(e))
local tc=g:GetFirst() local tc=g:GetFirst()
local c=e:GetHandler() local c=e:GetHandler()
while tc do while tc do
......
...@@ -35,7 +35,7 @@ end ...@@ -35,7 +35,7 @@ end
function c80666118.desop(e,tp,eg,ep,ev,re,r,rp) function c80666118.desop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if not c:IsRelateToEffect(e) or c:IsFacedown() then return end if not c:IsRelateToEffect(e) or c:IsFacedown() then return end
local g=Duel.GetMatchingGroup(c80666118.filter,tp,LOCATION_MZONE,LOCATION_MZONE,c,c:GetAttack()) local g=Duel.GetMatchingGroup(c80666118.filter,tp,LOCATION_MZONE,LOCATION_MZONE,aux.ExceptThisCard(e),c:GetAttack())
local ct=Duel.Destroy(g,REASON_EFFECT) local ct=Duel.Destroy(g,REASON_EFFECT)
if ct>0 then if ct>0 then
Duel.BreakEffect() Duel.BreakEffect()
......
...@@ -44,7 +44,7 @@ function c81146288.distg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -44,7 +44,7 @@ function c81146288.distg(e,tp,eg,ep,ev,re,r,rp,chk)
end end
function c81146288.disop(e,tp,eg,ep,ev,re,r,rp) function c81146288.disop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local g=Duel.GetMatchingGroup(aux.disfilter1,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,c) local g=Duel.GetMatchingGroup(aux.disfilter1,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,aux.ExceptThisCard(e))
local tc=g:GetFirst() local tc=g:GetFirst()
while tc do while tc do
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
......
...@@ -30,23 +30,41 @@ function c82301904.initial_effect(c) ...@@ -30,23 +30,41 @@ function c82301904.initial_effect(c)
c:RegisterEffect(e3) c:RegisterEffect(e3)
Duel.AddCustomActivityCounter(82301904,ACTIVITY_CHAIN,aux.FALSE) Duel.AddCustomActivityCounter(82301904,ACTIVITY_CHAIN,aux.FALSE)
end end
function c82301904.spfilter(c,att) function c82301904.spcostfilter(c)
return c:IsAttribute(att) and c:IsAbleToRemoveAsCost() return c:IsAbleToRemoveAsCost() and c:IsAttribute(ATTRIBUTE_LIGHT+ATTRIBUTE_DARK)
end
function c82301904.spcost_selector(c,tp,g,sg,i)
sg:AddCard(c)
g:RemoveCard(c)
local flag=false
if i<2 then
flag=g:IsExists(c82301904.spcost_selector,1,nil,tp,g,sg,i+1)
else
flag=sg:FilterCount(Card.IsAttribute,nil,ATTRIBUTE_LIGHT)>0
and sg:FilterCount(Card.IsAttribute,nil,ATTRIBUTE_DARK)>0
end
sg:RemoveCard(c)
g:AddCard(c)
return flag
end end
function c82301904.spcon(e,c) function c82301904.spcon(e,c)
if c==nil then return true end if c==nil then return true end
if Duel.GetMZoneCount(tp)<=0 then return false end
local tp=c:GetControler() local tp=c:GetControler()
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 local g=Duel.GetMatchingGroup(c82301904.spcostfilter,tp,LOCATION_GRAVE,0,nil)
and Duel.IsExistingMatchingCard(c82301904.spfilter,tp,LOCATION_GRAVE,0,1,nil,ATTRIBUTE_LIGHT) local sg=Group.CreateGroup()
and Duel.IsExistingMatchingCard(c82301904.spfilter,tp,LOCATION_GRAVE,0,1,nil,ATTRIBUTE_DARK) return g:IsExists(c82301904.spcost_selector,1,nil,tp,g,sg,1)
end end
function c82301904.spop(e,tp,eg,ep,ev,re,r,rp,c) function c82301904.spop(e,tp,eg,ep,ev,re,r,rp,c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) local g=Duel.GetMatchingGroup(c82301904.spcostfilter,tp,LOCATION_GRAVE,0,nil)
local g1=Duel.SelectMatchingCard(tp,c82301904.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,ATTRIBUTE_LIGHT) local sg=Group.CreateGroup()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) for i=1,2 do
local g2=Duel.SelectMatchingCard(tp,c82301904.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,ATTRIBUTE_DARK) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
g1:Merge(g2) local g1=g:FilterSelect(tp,c82301904.spcost_selector,1,1,nil,tp,g,sg,i)
Duel.Remove(g1,POS_FACEUP,REASON_COST) sg:Merge(g1)
g:Sub(g1)
end
Duel.Remove(sg,POS_FACEUP,REASON_COST)
end end
function c82301904.sgcost(e,tp,eg,ep,ev,re,r,rp,chk) function c82301904.sgcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLPCost(tp,1000) and Duel.GetCustomActivityCount(82301904,tp,ACTIVITY_CHAIN)==0 end if chk==0 then return Duel.CheckLPCost(tp,1000) and Duel.GetCustomActivityCount(82301904,tp,ACTIVITY_CHAIN)==0 end
......
...@@ -51,9 +51,7 @@ function c82308875.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -51,9 +51,7 @@ function c82308875.operation(e,tp,eg,ep,ev,re,r,rp)
elseif not b1 and b2 and b3 then op=Duel.SelectOption(tp,aux.Stringid(82308875,2),aux.Stringid(82308875,3))+1 elseif not b1 and b2 and b3 then op=Duel.SelectOption(tp,aux.Stringid(82308875,2),aux.Stringid(82308875,3))+1
else op=Duel.SelectOption(tp,aux.Stringid(82308875,1),aux.Stringid(82308875,2),aux.Stringid(82308875,3)) end else op=Duel.SelectOption(tp,aux.Stringid(82308875,1),aux.Stringid(82308875,2),aux.Stringid(82308875,3)) end
if op==0 then if op==0 then
local exc=c local g=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,aux.ExceptThisCard(e))
if not exc:IsRelateToEffect(e) then exc=nil end
local g=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,exc)
Duel.SendtoGrave(g,REASON_EFFECT) Duel.SendtoGrave(g,REASON_EFFECT)
elseif op==1 then elseif op==1 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
......
...@@ -46,9 +46,7 @@ function c82697249.ctfilter(c) ...@@ -46,9 +46,7 @@ function c82697249.ctfilter(c)
end end
function c82697249.desop(e,tp,eg,ep,ev,re,r,rp) function c82697249.desop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local exc=e:GetHandler() local g=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_ONFIELD,0,aux.ExceptThisCard(e))
if not exc:IsRelateToEffect(e) then exc=nil end
local g=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_ONFIELD,0,exc)
if Duel.Destroy(g,REASON_EFFECT)~=0 then if Duel.Destroy(g,REASON_EFFECT)~=0 then
local ct=Duel.GetOperatedGroup():FilterCount(c82697249.ctfilter,nil) local ct=Duel.GetOperatedGroup():FilterCount(c82697249.ctfilter,nil)
if ct>0 and c:IsFaceup() and c:IsRelateToEffect(e) then if ct>0 and c:IsFaceup() and c:IsRelateToEffect(e) then
......
...@@ -41,9 +41,7 @@ function c84417082.target1(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -41,9 +41,7 @@ function c84417082.target1(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0)
end end
function c84417082.operation1(e,tp,eg,ep,ev,re,r,rp) function c84417082.operation1(e,tp,eg,ep,ev,re,r,rp)
local exc=e:GetHandler() local g=Duel.GetMatchingGroup(c84417082.filter1,tp,LOCATION_MZONE,LOCATION_MZONE,aux.ExceptThisCard(e))
if not exc:IsRelateToEffect(e) then exc=nil end
local g=Duel.GetMatchingGroup(c84417082.filter1,tp,LOCATION_MZONE,LOCATION_MZONE,exc)
Duel.Destroy(g,REASON_EFFECT) Duel.Destroy(g,REASON_EFFECT)
end end
function c84417082.cost2(e,tp,eg,ep,ev,re,r,rp,chk) function c84417082.cost2(e,tp,eg,ep,ev,re,r,rp,chk)
......
...@@ -54,9 +54,7 @@ function c84488827.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -54,9 +54,7 @@ function c84488827.target(e,tp,eg,ep,ev,re,r,rp,chk)
end end
function c84488827.operation(e,tp,eg,ep,ev,re,r,rp) function c84488827.operation(e,tp,eg,ep,ev,re,r,rp)
if e:GetLabel()==1 then if e:GetLabel()==1 then
local exc=e:GetHandler() local g=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_MZONE,LOCATION_MZONE,aux.ExceptThisCard(e))
if not exc:IsRelateToEffect(e) then exc=nil end
local g=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_MZONE,LOCATION_MZONE,exc)
Duel.Destroy(g,REASON_EFFECT) Duel.Destroy(g,REASON_EFFECT)
elseif e:GetLabel()==2 then elseif e:GetLabel()==2 then
local g=Duel.GetMatchingGroup(c84488827.sfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil) local g=Duel.GetMatchingGroup(c84488827.sfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
......
...@@ -33,8 +33,6 @@ function c86099788.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -33,8 +33,6 @@ function c86099788.target(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0)
end end
function c86099788.operation(e,tp,eg,ep,ev,re,r,rp) function c86099788.operation(e,tp,eg,ep,ev,re,r,rp)
local exc=e:GetHandler() local g=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_MZONE,0,aux.ExceptThisCard(e))
if not exc:IsRelateToEffect(e) then exc=nil end
local g=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_MZONE,0,exc)
Duel.Destroy(g,REASON_EFFECT) Duel.Destroy(g,REASON_EFFECT)
end end
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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