Commit 1aa4ba52 authored by GuGu's avatar GuGu

Update c26078.lua

parent 0d76d927
Pipeline #40883 passed with stage
in 8 seconds
......@@ -4,15 +4,8 @@ function c26078.initial_effect(c)
c:EnableReviveLimit()
aux.AddFusionProcFun2(c,c26078.ffilter,aux.FilterBoolFunction(Card.IsFusionType,TYPE_FLIP),true)
--special summon rule
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_FIELD)
e0:SetCode(EFFECT_SPSUMMON_PROC)
e0:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e0:SetRange(LOCATION_EXTRA)
e0:SetCondition(c26078.spcon)
e0:SetOperation(c26078.spop)
local e0=aux.AddContactFusionProcedure(c,aux.FilterBoolFunction(Card.IsReleasable,REASON_FUSION),LOCATION_MZONE,0,Duel.Release,REASON_FUSION+REASON_MATERIAL)
e0:SetValue(SUMMON_TYPE_FUSION)
c:RegisterEffect(e0)
--destroy
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(26078,1))
......@@ -36,6 +29,7 @@ function c26078.initial_effect(c)
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(26078,2))
e5:SetCategory(CATEGORY_HANDES)
e5:SetProperty(EFFECT_FLAG_CARD_TARGET)
e5:SetType(EFFECT_TYPE_IGNITION)
e5:SetCountLimit(1)
e5:SetRange(LOCATION_MZONE)
......@@ -50,47 +44,6 @@ aux.FilterBoolFunction(Card.IsFusionType,TYPE_FLIP),
function c26078.ffilter(c)
return c:IsFusionSetCard(0x229)
end
function c26078.spfilter1(c,tp)
return c:IsSetCard(0x229) and c:IsCanBeFusionMaterial() and Duel.CheckReleaseGroup(tp,c26078.spfilter2,1,c)
end
function c26078.spfilter2(c)
return c:IsType(TYPE_FLIP) and c:IsCanBeFusionMaterial()
end
function c26078.exfilter(c,tp,sc)
return Duel.GetLocationCountFromEx( tp, tp, c,sc)>0
end
function c26078.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
local g=Duel.GetMatchingGroup(c26078.spfilter1,tp,LOCATION_MZONE,0,nil,tp)
local g2=Duel.GetMatchingGroup(c26078.spfilter2,tp,LOCATION_MZONE,0,nil)
g:Merge(g2)
return g:FilterCount(c26078.exfilter,nil,tp,c)>0 and Duel.CheckReleaseGroup(tp,c26078.spfilter1,1,nil,tp)
end
function c26078.spop(e,tp,eg,ep,ev,re,r,rp,c)
local g0=Duel.GetReleaseGroup(tp)
local g1=g0:Filter(c26078.spfilter1,nil,tp)
local g2=g0:Filter(c26078.spfilter2,nil)
local rg1=nil
local rg2=nil
if Duel.GetLocationCountFromEx(tp)<=0 then
local exg1=g1:Filter(c26078.exfilter,nil,tp,c)
local exg2=g2:Filter(c26078.exfilter,nil,tp,c)
if g1:GetCount()>0 then
rg1=exg1:Select(tp,1,1,nil)
rg2=g2:Select(tp,1,1,rg1)
else
rg1=exg2:Select(tp,1,1,nil)
rg2=g1:Select(tp,1,1,rg1)
end
else
rg1=Duel.SelectReleaseGroup(tp,c26078.spfilter1,1,1,nil,tp)
rg2=Duel.SelectReleaseGroup(tp,c26078.spfilter2,1,1,rg1)
end
rg1:Merge(rg2)
c:SetMaterial(rg1)
Duel.Release(rg1,REASON_SPSUMMON)
end
function c26078.filter(c)
return c:IsDestructable() and c:IsFacedown()
end
......@@ -138,5 +91,5 @@ function c26078.ditg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,0,tp,1)
end
function c26078.diop(e,tp,eg,ep,ev,re,r,rp)
Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_EFFECT+REASON_DISCARD,nil)
Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_EFFECT,nil)
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