Commit c9de72fe authored by Momobako's avatar Momobako

Auto Push by Miyuki

parent 157974e1
This diff is collapsed.
--库拉丽丝-怨念 --库拉丽丝-怨念
function c57300010.initial_effect(c) function c57300010.initial_effect(c)
c:EnableReviveLimit() xpcall(function() require("expansions/script/c57300000") end,function() require("script/c57300000") end)
local e1=Effect.CreateEffect(c) miyuki.AddXyzProcedureClariS(c,2)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetRange(LOCATION_EXTRA)
e1:SetLabel(2)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetCondition(c57300010.xyzcon)
e1:SetOperation(c57300010.xyzop)
e1:SetValue(SUMMON_TYPE_XYZ)
c:RegisterEffect(e1)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(57300010,0)) e1:SetDescription(aux.Stringid(57300010,0))
e1:SetCategory(CATEGORY_DISABLE) e1:SetCategory(CATEGORY_DISABLE)
...@@ -25,80 +16,6 @@ function c57300010.initial_effect(c) ...@@ -25,80 +16,6 @@ function c57300010.initial_effect(c)
e1:SetOperation(c57300010.operation) e1:SetOperation(c57300010.operation)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c57300010.mfilter(c,xyzc)
return c:IsFaceup() and c:IsSetCard(0x570) and c:IsCanBeXyzMaterial(xyzc) and c:IsXyzLevel(xyzc,2)
end
function c57300010.xyzfilter(c,mg,sg,ct,min,max,tp,xyzc)
sg:AddCard(c)
local i=sg:GetCount()
local res=(i>=min and c57300010.xyzgoal(sg,ct,tp,xyzc))
or (i<max and mg:IsExists(c57300010.xyzfilter,1,sg,mg,sg,ct,min,max,tp,xyzc))
sg:RemoveCard(c)
return res
end
function c57300010.xyzgoal(g,ct,tp,xyzc)
local i=g:GetCount()
if not g:CheckWithSumEqual(c57300010.xyzval,ct,i,i) then return false end
--to be changed in mr4
--return Duel.GetLocationCountFromEx(tp,tp,g,xyzc)>0
return Duel.GetLocationCountFromEx(tp,tp,g,xyzc)>0
end
function c57300010.xyzval(c)
local v=1
if c:IsHasEffect(57300021) then v=v+0x20000 end
return v
end
function c57300010.xyzcon(e,c,og,min,max)
if c==nil then return true end
local tp=c:GetControler()
local mg=nil
if og then
mg=og:Filter(c57300010.mfilter,nil,c)
else
mg=Duel.GetMatchingGroup(c57300010.mfilter,tp,LOCATION_MZONE,0,nil,c)
end
local ct=e:GetLabel()
local sg=Group.CreateGroup()
local min=min or 1
local max=max and math.min(max,ct) or ct
return min<=max and mg:IsExists(c57300010.xyzfilter,1,sg,mg,sg,ct,min,max,tp,c)
end
function c57300010.xyzop(e,tp,eg,ep,ev,re,r,rp,c,og,min,max)
local mg=nil
if og then
if not min then
local tg=Group.CreateGroup()
for tc in aux.Next(og) do
tg:Merge(tc:GetOverlayGroup())
end
c:SetMaterial(og)
Duel.SendtoGrave(tg,REASON_RULE)
Duel.Overlay(c,og)
return
end
mg=og:Filter(c57300010.mfilter,nil,c)
else
mg=Duel.GetMatchingGroup(c57300010.mfilter,tp,LOCATION_MZONE,0,nil,c)
end
local ct=e:GetLabel()
local sg=Group.CreateGroup()
local min=min or 1
local max=max and math.min(max,ct) or ct
local i=sg:GetCount()
repeat
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL)
local g=mg:FilterSelect(tp,c57300010.xyzfilter,1,1,sg,mg,sg,ct,min,max,tp,c)
sg:Merge(g)
i=sg:GetCount()
until i>=max or (i>=min and c57300010.xyzgoal(sg,ct,tp,xyzc) and not (mg:IsExists(c57300010.xyzfilter,1,sg,mg,sg,ct,min,max,tp,c) and Duel.SelectYesNo(tp,210)))
local tg=Group.CreateGroup()
for tc in aux.Next(sg) do
tg:Merge(tc:GetOverlayGroup())
end
c:SetMaterial(sg)
Duel.SendtoGrave(tg,REASON_RULE)
Duel.Overlay(c,sg)
end
function c57300010.tdcost(e,tp,eg,ep,ev,re,r,rp,chk) function c57300010.tdcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
......
--库拉丽丝-尝试 --库拉丽丝-尝试
function c57300011.initial_effect(c) function c57300011.initial_effect(c)
c:EnableReviveLimit() xpcall(function() require("expansions/script/c57300000") end,function() require("script/c57300000") end)
local e1=Effect.CreateEffect(c) miyuki.AddXyzProcedureClariS(c,2)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetRange(LOCATION_EXTRA)
e1:SetLabel(2)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetCondition(c57300011.xyzcon)
e1:SetOperation(c57300011.xyzop)
e1:SetValue(SUMMON_TYPE_XYZ)
c:RegisterEffect(e1)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_ATKCHANGE) e1:SetCategory(CATEGORY_ATKCHANGE)
e1:SetDescription(aux.Stringid(57300011,0)) e1:SetDescription(aux.Stringid(57300011,0))
...@@ -24,80 +15,6 @@ function c57300011.initial_effect(c) ...@@ -24,80 +15,6 @@ function c57300011.initial_effect(c)
e1:SetOperation(c57300011.operation) e1:SetOperation(c57300011.operation)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c57300011.mfilter(c,xyzc)
return c:IsFaceup() and c:IsSetCard(0x570) and c:IsCanBeXyzMaterial(xyzc) and c:IsXyzLevel(xyzc,2)
end
function c57300011.xyzfilter(c,mg,sg,ct,min,max,tp,xyzc)
sg:AddCard(c)
local i=sg:GetCount()
local res=(i>=min and c57300011.xyzgoal(sg,ct,tp,xyzc))
or (i<max and mg:IsExists(c57300011.xyzfilter,1,sg,mg,sg,ct,min,max,tp,xyzc))
sg:RemoveCard(c)
return res
end
function c57300011.xyzgoal(g,ct,tp,xyzc)
local i=g:GetCount()
if not g:CheckWithSumEqual(c57300011.xyzval,ct,i,i) then return false end
--to be changed in mr4
--return Duel.GetLocationCountFromEx(tp,tp,g,xyzc)>0
return Duel.GetLocationCountFromEx(tp,tp,g,xyzc)>0
end
function c57300011.xyzval(c)
local v=1
if c:IsHasEffect(57300021) then v=v+0x20000 end
return v
end
function c57300011.xyzcon(e,c,og,min,max)
if c==nil then return true end
local tp=c:GetControler()
local mg=nil
if og then
mg=og:Filter(c57300011.mfilter,nil,c)
else
mg=Duel.GetMatchingGroup(c57300011.mfilter,tp,LOCATION_MZONE,0,nil,c)
end
local ct=e:GetLabel()
local sg=Group.CreateGroup()
local min=min or 1
local max=max and math.min(max,ct) or ct
return min<=max and mg:IsExists(c57300011.xyzfilter,1,sg,mg,sg,ct,min,max,tp,c)
end
function c57300011.xyzop(e,tp,eg,ep,ev,re,r,rp,c,og,min,max)
local mg=nil
if og then
if not min then
local tg=Group.CreateGroup()
for tc in aux.Next(og) do
tg:Merge(tc:GetOverlayGroup())
end
c:SetMaterial(og)
Duel.SendtoGrave(tg,REASON_RULE)
Duel.Overlay(c,og)
return
end
mg=og:Filter(c57300011.mfilter,nil,c)
else
mg=Duel.GetMatchingGroup(c57300011.mfilter,tp,LOCATION_MZONE,0,nil,c)
end
local ct=e:GetLabel()
local sg=Group.CreateGroup()
local min=min or 1
local max=max and math.min(max,ct) or ct
local i=sg:GetCount()
repeat
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL)
local g=mg:FilterSelect(tp,c57300011.xyzfilter,1,1,sg,mg,sg,ct,min,max,tp,c)
sg:Merge(g)
i=sg:GetCount()
until i>=max or (i>=min and c57300011.xyzgoal(sg,ct,tp,xyzc) and not (mg:IsExists(c57300011.xyzfilter,1,sg,mg,sg,ct,min,max,tp,c) and Duel.SelectYesNo(tp,210)))
local tg=Group.CreateGroup()
for tc in aux.Next(sg) do
tg:Merge(tc:GetOverlayGroup())
end
c:SetMaterial(sg)
Duel.SendtoGrave(tg,REASON_RULE)
Duel.Overlay(c,sg)
end
function c57300011.cost(e,tp,eg,ep,ev,re,r,rp,chk) function c57300011.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
......
--库拉丽丝-心配 --库拉丽丝-心配
function c57300012.initial_effect(c) function c57300012.initial_effect(c)
c:EnableReviveLimit() xpcall(function() require("expansions/script/c57300000") end,function() require("script/c57300000") end)
local e1=Effect.CreateEffect(c) miyuki.AddXyzProcedureClariS(c,3)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetRange(LOCATION_EXTRA)
e1:SetLabel(3)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetCondition(c57300012.xyzcon)
e1:SetOperation(c57300012.xyzop)
e1:SetValue(SUMMON_TYPE_XYZ)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(57300012,0)) e2:SetDescription(aux.Stringid(57300012,0))
e2:SetCategory(CATEGORY_REMOVE) e2:SetCategory(CATEGORY_REMOVE)
...@@ -32,81 +23,6 @@ function c57300012.initial_effect(c) ...@@ -32,81 +23,6 @@ function c57300012.initial_effect(c)
e4:SetOperation(c57300012.tdop) e4:SetOperation(c57300012.tdop)
c:RegisterEffect(e4) c:RegisterEffect(e4)
end end
function c57300012.mfilter(c,xyzc)
return c:IsFaceup() and c:IsSetCard(0x570) and c:IsCanBeXyzMaterial(xyzc) and c:IsXyzLevel(xyzc,2)
end
function c57300012.xyzfilter(c,mg,sg,ct,min,max,tp,xyzc)
sg:AddCard(c)
local i=sg:GetCount()
local res=(i>=min and c57300012.xyzgoal(sg,ct,tp,xyzc))
or (i<max and mg:IsExists(c57300012.xyzfilter,1,sg,mg,sg,ct,min,max,tp,xyzc))
sg:RemoveCard(c)
return res
end
function c57300012.xyzgoal(g,ct,tp,xyzc)
local i=g:GetCount()
if not g:CheckWithSumEqual(c57300012.xyzval,ct,i,i) then return false end
--to be changed in mr4
--return Duel.GetLocationCountFromEx(tp,tp,g,xyzc)>0
return Duel.GetLocationCountFromEx(tp,tp,g,xyzc)>0
end
function c57300012.xyzval(c)
local v=1
if c:IsHasEffect(57300021) then v=v+0x20000 end
return v
end
function c57300012.xyzcon(e,c,og,min,max)
if c==nil then return true end
local tp=c:GetControler()
local mg=nil
if og then
mg=og:Filter(c57300012.mfilter,nil,c)
else
mg=Duel.GetMatchingGroup(c57300012.mfilter,tp,LOCATION_MZONE,0,nil,c)
end
local ct=e:GetLabel()
local sg=Group.CreateGroup()
local min=min or 1
local max=max and math.min(max,ct) or ct
return min<=max and mg:IsExists(c57300012.xyzfilter,1,sg,mg,sg,ct,min,max,tp,c)
end
function c57300012.xyzop(e,tp,eg,ep,ev,re,r,rp,c,og,min,max)
local mg=nil
if og then
if not min then
local tg=Group.CreateGroup()
for tc in aux.Next(og) do
tg:Merge(tc:GetOverlayGroup())
end
c:SetMaterial(og)
Duel.SendtoGrave(tg,REASON_RULE)
Duel.Overlay(c,og)
return
end
mg=og:Filter(c57300012.mfilter,nil,c)
else
mg=Duel.GetMatchingGroup(c57300012.mfilter,tp,LOCATION_MZONE,0,nil,c)
end
local ct=e:GetLabel()
local sg=Group.CreateGroup()
local min=min or 1
local max=max and math.min(max,ct) or ct
local i=sg:GetCount()
repeat
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL)
local g=mg:FilterSelect(tp,c57300012.xyzfilter,1,1,sg,mg,sg,ct,min,max,tp,c)
sg:Merge(g)
i=sg:GetCount()
until i>=max or (i>=min and c57300012.xyzgoal(sg,ct,tp,xyzc) and not (mg:IsExists(c57300012.xyzfilter,1,sg,mg,sg,ct,min,max,tp,c) and Duel.SelectYesNo(tp,210)))
local tg=Group.CreateGroup()
for tc in aux.Next(sg) do
tg:Merge(tc:GetOverlayGroup())
end
c:SetMaterial(sg)
Duel.SendtoGrave(tg,REASON_RULE)
Duel.Overlay(c,sg)
Duel.Hint(11,0,aux.Stringid(57300012,1))
end
function c57300012.tdcost(e,tp,eg,ep,ev,re,r,rp,chk) function c57300012.tdcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
......
--库拉丽丝-初梦 --库拉丽丝-初梦
function c57300013.initial_effect(c) function c57300013.initial_effect(c)
c:EnableReviveLimit() xpcall(function() require("expansions/script/c57300000") end,function() require("script/c57300000") end)
local e1=Effect.CreateEffect(c) miyuki.AddXyzProcedureClariS(c,3)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetRange(LOCATION_EXTRA)
e1:SetLabel(3)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetCondition(c57300013.xyzcon)
e1:SetOperation(c57300013.xyzop)
e1:SetValue(SUMMON_TYPE_XYZ)
c:RegisterEffect(e1)
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE) e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET) e3:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
...@@ -27,80 +18,6 @@ function c57300013.initial_effect(c) ...@@ -27,80 +18,6 @@ function c57300013.initial_effect(c)
e5:SetOperation(c57300013.desop) e5:SetOperation(c57300013.desop)
c:RegisterEffect(e5) c:RegisterEffect(e5)
end end
function c57300013.mfilter(c,xyzc)
return c:IsFaceup() and c:IsSetCard(0x570) and c:IsCanBeXyzMaterial(xyzc) and c:IsXyzLevel(xyzc,2)
end
function c57300013.xyzfilter(c,mg,sg,ct,min,max,tp,xyzc)
sg:AddCard(c)
local i=sg:GetCount()
local res=(i>=min and c57300013.xyzgoal(sg,ct,tp,xyzc))
or (i<max and mg:IsExists(c57300013.xyzfilter,1,sg,mg,sg,ct,min,max,tp,xyzc))
sg:RemoveCard(c)
return res
end
function c57300013.xyzgoal(g,ct,tp,xyzc)
local i=g:GetCount()
if not g:CheckWithSumEqual(c57300013.xyzval,ct,i,i) then return false end
--to be changed in mr4
--return Duel.GetLocationCountFromEx(tp,tp,g,xyzc)>0
return Duel.GetLocationCountFromEx(tp,tp,g,xyzc)>0
end
function c57300013.xyzval(c)
local v=1
if c:IsHasEffect(57300021) then v=v+0x20000 end
return v
end
function c57300013.xyzcon(e,c,og,min,max)
if c==nil then return true end
local tp=c:GetControler()
local mg=nil
if og then
mg=og:Filter(c57300013.mfilter,nil,c)
else
mg=Duel.GetMatchingGroup(c57300013.mfilter,tp,LOCATION_MZONE,0,nil,c)
end
local ct=e:GetLabel()
local sg=Group.CreateGroup()
local min=min or 1
local max=max and math.min(max,ct) or ct
return min<=max and mg:IsExists(c57300013.xyzfilter,1,sg,mg,sg,ct,min,max,tp,c)
end
function c57300013.xyzop(e,tp,eg,ep,ev,re,r,rp,c,og,min,max)
local mg=nil
if og then
if not min then
local tg=Group.CreateGroup()
for tc in aux.Next(og) do
tg:Merge(tc:GetOverlayGroup())
end
c:SetMaterial(og)
Duel.SendtoGrave(tg,REASON_RULE)
Duel.Overlay(c,og)
return
end
mg=og:Filter(c57300013.mfilter,nil,c)
else
mg=Duel.GetMatchingGroup(c57300013.mfilter,tp,LOCATION_MZONE,0,nil,c)
end
local ct=e:GetLabel()
local sg=Group.CreateGroup()
local min=min or 1
local max=max and math.min(max,ct) or ct
local i=sg:GetCount()
repeat
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL)
local g=mg:FilterSelect(tp,c57300013.xyzfilter,1,1,sg,mg,sg,ct,min,max,tp,c)
sg:Merge(g)
i=sg:GetCount()
until i>=max or (i>=min and c57300013.xyzgoal(sg,ct,tp,xyzc) and not (mg:IsExists(c57300013.xyzfilter,1,sg,mg,sg,ct,min,max,tp,c) and Duel.SelectYesNo(tp,210)))
local tg=Group.CreateGroup()
for tc in aux.Next(sg) do
tg:Merge(tc:GetOverlayGroup())
end
c:SetMaterial(sg)
Duel.SendtoGrave(tg,REASON_RULE)
Duel.Overlay(c,sg)
end
function c57300013.descon(e,tp,eg,ep,ev,re,r,rp) function c57300013.descon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local bc=c:GetBattleTarget() local bc=c:GetBattleTarget()
......
--库拉丽丝-终曲 --库拉丽丝-终曲
function c57300014.initial_effect(c) function c57300014.initial_effect(c)
c:EnableReviveLimit() xpcall(function() require("expansions/script/c57300000") end,function() require("script/c57300000") end)
--xs miyuki.AddXyzProcedureClariS(c,2,true)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetRange(LOCATION_EXTRA)
e1:SetLabel(2)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetCondition(c57300014.xyzcon)
e1:SetOperation(c57300014.xyzop)
e1:SetValue(SUMMON_TYPE_XYZ)
c:RegisterEffect(e1)
--material --material
local e4=Effect.CreateEffect(c) local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE) e4:SetType(EFFECT_TYPE_SINGLE)
...@@ -42,78 +32,6 @@ function c57300014.initial_effect(c) ...@@ -42,78 +32,6 @@ function c57300014.initial_effect(c)
e3:SetOperation(c57300014.disop) e3:SetOperation(c57300014.disop)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
function c57300014.mfilter(c,xyzc)
return c:IsFaceup() and c:IsSetCard(0x570) and c:IsXyzType(TYPE_XYZ) and c:IsCanBeXyzMaterial(xyzc) and c:GetRank()==2
end
function c57300014.xyzfilter(c,mg,sg,ct,min,max,tp,xyzc)
sg:AddCard(c)
local i=sg:GetCount()
local res=(i>=min and c57300014.xyzgoal(sg,ct,tp,xyzc))
or (i<max and mg:IsExists(c57300014.xyzfilter,1,sg,mg,sg,ct,min,max,tp,xyzc))
sg:RemoveCard(c)
return res
end
function c57300014.xyzgoal(g,ct,tp,xyzc)
local i=g:GetCount()
if not g:CheckWithSumEqual(c57300014.xyzval,ct,i,i) then return false end
return Duel.GetLocationCountFromEx(tp,tp,g,xyzc)>0
end
function c57300014.xyzval(c)
local v=1
if c:IsHasEffect(57300021) then v=v+0x20000 end
return v
end
function c57300014.xyzcon(e,c,og,min,max)
if c==nil then return true end
local tp=c:GetControler()
local mg=nil
if og then
mg=og:Filter(c57300014.mfilter,nil,c)
else
mg=Duel.GetMatchingGroup(c57300014.mfilter,tp,LOCATION_MZONE,0,nil,c)
end
local ct=e:GetLabel()
local sg=Group.CreateGroup()
local min=min or 1
local max=max and math.min(max,ct) or ct
return min<=max and mg:IsExists(c57300014.xyzfilter,1,sg,mg,sg,ct,min,max,tp,c)
end
function c57300014.xyzop(e,tp,eg,ep,ev,re,r,rp,c,og,min,max)
local mg=nil
if og then
if not min then
local tg=Group.CreateGroup()
for tc in aux.Next(og) do
tg:Merge(tc:GetOverlayGroup())
end
c:SetMaterial(og)
Duel.SendtoGrave(tg,REASON_RULE)
Duel.Overlay(c,og)
return
end
mg=og:Filter(c57300014.mfilter,nil,c)
else
mg=Duel.GetMatchingGroup(c57300014.mfilter,tp,LOCATION_MZONE,0,nil,c)
end
local ct=e:GetLabel()
local sg=Group.CreateGroup()
local min=min or 1
local max=max and math.min(max,ct) or ct
local i=sg:GetCount()
repeat
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL)
local g=mg:FilterSelect(tp,c57300014.xyzfilter,1,1,sg,mg,sg,ct,min,max,tp,c)
sg:Merge(g)
i=sg:GetCount()
until i>=max or (i>=min and c57300014.xyzgoal(sg,ct,tp,xyzc) and not (mg:IsExists(c57300014.xyzfilter,1,sg,mg,sg,ct,min,max,tp,c) and Duel.SelectYesNo(tp,210)))
local tg=Group.CreateGroup()
for tc in aux.Next(sg) do
tg:Merge(tc:GetOverlayGroup())
end
c:SetMaterial(sg)
Duel.SendtoGrave(tg,REASON_RULE)
Duel.Overlay(c,sg)
end
function c57300014.filter(c,tp) function c57300014.filter(c,tp)
return not c:IsType(TYPE_TOKEN) and (c:IsControler(tp) or c:IsAbleToChangeControler()) return not c:IsType(TYPE_TOKEN) and (c:IsControler(tp) or c:IsAbleToChangeControler())
end end
......
--Approved·樱野美雪 --Approved·樱野美雪
xpcall(function() require("expansions/script/c57300000") end,function() require("script/c57300000") end) xpcall(function() require("expansions/script/c57300000") end,function() require("script/c57300000") end)
function c57300019.initial_effect(c) function c57300019.initial_effect(c)
miyuki.rxyz1(c,nil,nil,3,3) miyuki.AddXyzProcedureRank(c,nil,nil,3,3)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
......
--终焉的物语·物凄 --终焉的物语·物凄
xpcall(function() require("expansions/script/c57300000") end,function() require("script/c57300000") end) xpcall(function() require("expansions/script/c57300000") end,function() require("script/c57300000") end)
function c57300020.initial_effect(c) function c57300020.initial_effect(c)
miyuki.rxyz1(c,nil,nil,2,63) miyuki.AddXyzProcedureRank(c,nil,nil,2,63)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC) e1:SetCode(EFFECT_SPSUMMON_PROC)
......
--库拉丽丝-银莲 --库拉丽丝-银莲
function c57300022.initial_effect(c) function c57300022.initial_effect(c)
c:EnableReviveLimit() xpcall(function() require("expansions/script/c57300000") end,function() require("script/c57300000") end)
local e1=Effect.CreateEffect(c) miyuki.AddXyzProcedureClariS(c,3)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetRange(LOCATION_EXTRA)
e1:SetLabel(3)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetCondition(c57300022.xyzcon)
e1:SetOperation(c57300022.xyzop)
e1:SetValue(SUMMON_TYPE_XYZ)
c:RegisterEffect(e1)
local ex=Effect.CreateEffect(c) local ex=Effect.CreateEffect(c)
ex:SetType(EFFECT_TYPE_SINGLE) ex:SetType(EFFECT_TYPE_SINGLE)
ex:SetCode(57300022) ex:SetCode(57300022)
...@@ -96,81 +87,7 @@ function c57300022.rcon(con,tc,copyt) ...@@ -96,81 +87,7 @@ function c57300022.rcon(con,tc,copyt)
copyt[tc]=nil copyt[tc]=nil
return false return false
end end
return not con or con(e,tp,eg,ep,ev,re,r,rp) if not con or con(e,tp,eg,ep,ev,re,r,rp) then return true end
return e:IsHasType(0x7e0) and c:GetFlagEffect(m)>0
end end
end
function c57300022.mfilter(c,xyzc)
return c:IsFaceup() and c:IsSetCard(0x570) and c:IsCanBeXyzMaterial(xyzc) and c:IsXyzLevel(xyzc,2)
end
function c57300022.xyzfilter(c,mg,sg,ct,min,max,tp,xyzc)
sg:AddCard(c)
local i=sg:GetCount()
local res=(i>=min and c57300022.xyzgoal(sg,ct,tp,xyzc))
or (i<max and mg:IsExists(c57300022.xyzfilter,1,sg,mg,sg,ct,min,max,tp,xyzc))
sg:RemoveCard(c)
return res
end
function c57300022.xyzgoal(g,ct,tp,xyzc)
local i=g:GetCount()
if not g:CheckWithSumEqual(c57300022.xyzval,ct,i,i) then return false end
--to be changed in mr4
--return Duel.GetLocationCountFromEx(tp,tp,g,xyzc)>0
return Duel.GetLocationCountFromEx(tp,tp,g,xyzc)>0
end
function c57300022.xyzval(c)
local v=1
if c:IsHasEffect(57300021) then v=v+0x20000 end
return v
end
function c57300022.xyzcon(e,c,og,min,max)
if c==nil then return true end
local tp=c:GetControler()
local mg=nil
if og then
mg=og:Filter(c57300022.mfilter,nil,c)
else
mg=Duel.GetMatchingGroup(c57300022.mfilter,tp,LOCATION_MZONE,0,nil,c)
end
local ct=e:GetLabel()
local sg=Group.CreateGroup()
local min=min or 1
local max=max and math.min(max,ct) or ct
return min<=max and mg:IsExists(c57300022.xyzfilter,1,sg,mg,sg,ct,min,max,tp,c)
end
function c57300022.xyzop(e,tp,eg,ep,ev,re,r,rp,c,og,min,max)
local mg=nil
if og then
if not min then
local tg=Group.CreateGroup()
for tc in aux.Next(og) do
tg:Merge(tc:GetOverlayGroup())
end
c:SetMaterial(og)
Duel.SendtoGrave(tg,REASON_RULE)
Duel.Overlay(c,og)
return
end
mg=og:Filter(c57300022.mfilter,nil,c)
else
mg=Duel.GetMatchingGroup(c57300022.mfilter,tp,LOCATION_MZONE,0,nil,c)
end
local ct=e:GetLabel()
local sg=Group.CreateGroup()
local min=min or 1
local max=max and math.min(max,ct) or ct
local i=sg:GetCount()
repeat
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL)
local g=mg:FilterSelect(tp,c57300022.xyzfilter,1,1,sg,mg,sg,ct,min,max,tp,c)
sg:Merge(g)
i=sg:GetCount()
until i>=max or (i>=min and c57300022.xyzgoal(sg,ct,tp,xyzc) and not (mg:IsExists(c57300022.xyzfilter,1,sg,mg,sg,ct,min,max,tp,c) and Duel.SelectYesNo(tp,210)))
local tg=Group.CreateGroup()
for tc in aux.Next(sg) do
tg:Merge(tc:GetOverlayGroup())
end
c:SetMaterial(sg)
Duel.SendtoGrave(tg,REASON_RULE)
Duel.Overlay(c,sg)
Duel.Hint(11,0,aux.Stringid(57300022,0))
end end
\ No newline at end of file
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