Commit 3dfb76af authored by GuGu's avatar GuGu

Update c999311.lua

parent 1aa4ba52
Pipeline #40884 passed with stage
in 8 seconds
......@@ -5,6 +5,8 @@ function M.initial_effect(c)
--fusion material
c:EnableReviveLimit()
Fus.AddFusionProcFun2(c, M.ffilter1, M.ffilter2, false)
--special summon rule
aux.AddContactFusionProcedure(c,aux.FilterBoolFunction(Card.IsReleasable,REASON_SPSUMMON),LOCATION_MZONE,0,Duel.Release,REASON_SPSUMMON+REASON_MATERIAL)
--spsummon condition
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
......@@ -12,15 +14,6 @@ function M.initial_effect(c)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetValue(M.splimit)
c:RegisterEffect(e1)
--special summon rule
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_SPSUMMON_PROC)
e2:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e2:SetRange(LOCATION_EXTRA)
e2:SetCondition(M.spcon)
e2:SetOperation(M.spop)
c:RegisterEffect(e2)
--equip
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(999311,0))
......@@ -46,35 +39,6 @@ function M.splimit(e,se,sp,st)
return bit.band(st,SUMMON_TYPE_FUSION)==SUMMON_TYPE_FUSION
end
function M.spfilter1(c, tp)
local flag = Duel.GetLocationCountFromEx(tp, tp, c, TYPE_FUSION) < 1
return (c:IsCode(999301) or c:IsCode(23001)) and c:IsCanBeFusionMaterial()
and Duel.CheckReleaseGroup(tp, M.spfilter2, 1, c, tp, flag)
end
function M.spfilter2(c, tp, flag)
if flag and Duel.GetLocationCountFromEx(tp, tp, c, TYPE_FUSION) < 1 then return false end
return (c:IsCode(999302) or c:IsCode(23004)) and c:IsCanBeFusionMaterial()
end
function M.spcon(e, c)
if c==nil then return true end
local tp=c:GetControler()
return Duel.CheckReleaseGroup(tp, M.spfilter1, 1, nil, tp)
end
function M.spop(e,tp,eg,ep,ev,re,r,rp,c)
local g1 = Duel.SelectReleaseGroup(tp, M.spfilter1, 1, 1, nil, tp)
local c1 = g1:GetFirst()
local flag = Duel.GetLocationCountFromEx(tp, tp, c1, TYPE_FUSION) < 1
local g2 = Duel.SelectReleaseGroup(tp, M.spfilter2, 1, 1, c1, tp, flag)
g1:Merge(g2)
c:SetMaterial(g1)
Duel.Release(g1,REASON_COST)
end
function M.eqfilter(c)
local code=c:GetOriginalCode()
local mt=_G["c" .. code]
......
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