Commit 6dddb019 authored by Momobako's avatar Momobako

Auto Push by Miyuki

parent b4e84b1e
......@@ -2,16 +2,6 @@
xpcall(function() require("expansions/script/c57300000") end,function() require("script/c57300000") end)
function c57300020.initial_effect(c)
miyuki.AddXyzProcedureRank(c,nil,nil,2,63)
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)
--atk
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(57300020,0))
......
--库拉丽丝-连系
function c57300023.initial_effect(c)
c:EnableReviveLimit()
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(c57300023.xyzcon)
e1:SetOperation(c57300023.xyzop)
e1:SetValue(SUMMON_TYPE_XYZ)
c:RegisterEffect(e1)
xpcall(function() require("expansions/script/c57300000") end,function() require("script/c57300000") end)
miyuki.AddXyzProcedureClariS(c,2)
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_HANDES)
e1:SetDescription(aux.Stringid(57300023,0))
......@@ -27,103 +19,7 @@ function c57300023.initial_effect(c)
end)
c:RegisterEffect(e1)
end
function c57300023.mfilter(c,xyzc)
return c:IsFaceup() and c:IsSetCard(0x570) and c:IsCanBeXyzMaterial(xyzc) and c:IsXyzLevel(xyzc,2)
end
function c57300023.xyzfilter(c,mg,sg,ct,min,max,tp,xyzc)
sg:AddCard(c)
local i=sg:GetCount()
local res=(i>=min and c57300023.xyzgoal(sg,ct,tp,xyzc))
or (i<max and mg:IsExists(c57300023.xyzfilter,1,sg,mg,sg,ct,min,max,tp,xyzc))
sg:RemoveCard(c)
return res
end
function c57300023.xyzgoal(g,ct,tp,xyzc)
local i=g:GetCount()
if not g:CheckWithSumEqual(c57300023.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 c57300023.xyzval(c)
local v=1
if c:IsHasEffect(57300021) then v=v+0x20000 end
return v
end
function c57300023.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(c57300023.mfilter,nil,c)
else
mg=Duel.GetMatchingGroup(c57300023.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(c57300023.xyzfilter,1,sg,mg,sg,ct,min,max,tp,c)
end
function c57300023.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(c57300023.mfilter,nil,c)
else
mg=Duel.GetMatchingGroup(c57300023.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,c57300023.xyzfilter,1,1,sg,mg,sg,ct,min,max,tp,c)
sg:Merge(g)
i=sg:GetCount()
until i>=max or (i>=min and c57300023.xyzgoal(sg,ct,tp,xyzc) and not (mg:IsExists(c57300023.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(57300023,1))
end
function c57300023.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end
function c57300023.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and c:IsFaceup() then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_ATTACK_FINAL)
e1:SetValue(c:GetBaseAttack()*2)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
c:RegisterEffect(e1)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CANNOT_DISABLE)
e3:SetRange(LOCATION_MZONE)
e3:SetCode(EFFECT_IMMUNE_EFFECT)
e3:SetValue(function(e,te)
return te:GetOwner()~=e:GetOwner()
end)
e3:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
c:RegisterEffect(e3)
end
end
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment