Commit 924bd242 authored by GuGu's avatar GuGu

Update c86379797.lua

parent ac223dc5
Pipeline #33200 passed with stage
in 15 seconds
......@@ -5,9 +5,10 @@ function c86379797.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_HAND)
e1:SetCondition(c86379797.spcon)
e1:SetTarget(c86379797.sptg)
e1:SetOperation(c86379797.spop)
c:RegisterEffect(e1)
--synchro effect
......@@ -43,24 +44,29 @@ function c86379797.initial_effect(c)
end
--
function c86379797.spfilter1(c,tp)
return c:IsSetCard(0x214a) and c:IsAbleToRemoveAsCost() and Duel.IsExistingMatchingCard(c86379797.spfilter2,tp,LOCATION_GRAVE,0,1,c)
end
function c86379797.spfilter2(c)
return c:IsSetCard(0x514a) and c:IsAbleToRemoveAsCost()
return c:IsSetCard(0x214a,0x514a) and c:IsAbleToRemoveAsCost()
end
function c86379797.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
local g=Duel.GetMatchingGroup(c86379797.spfilter1,tp,LOCATION_GRAVE,0,nil)
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c86379797.spfilter1,tp,LOCATION_GRAVE,0,1,nil,tp)
and g:CheckSubGroup(aux.gfcheck,2,2,Card.IsSetCard,0x214a,0x514a)
end
function c86379797.spop(e,tp,eg,ep,ev,re,r,rp,c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g1=Duel.SelectMatchingCard(tp,c86379797.spfilter1,tp,LOCATION_GRAVE,0,1,1,nil,tp)
function c86379797.sptg(e,tp,eg,ep,ev,re,r,rp,chk,c)
local g=Duel.GetMatchingGroup(c86379797.spfilter1,tp,LOCATION_GRAVE,0,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g2=Duel.SelectMatchingCard(tp,c86379797.spfilter2,tp,LOCATION_GRAVE,0,1,1,g1)
g1:Merge(g2)
Duel.Remove(g1,POS_FACEUP,REASON_COST)
local sg=g:SelectSubGroup(tp,aux.gfcheck,true,2,2,Card.IsSetCard,0x214a,0x514a)
if sg then
sg:KeepAlive()
e:SetLabelObject(sg)
return true
else return false end
end
function c86379797.spop(e,tp,eg,ep,ev,re,r,rp,c)
local g=e:GetLabelObject()
Duel.Remove(g,POS_FACEUP,REASON_SPSUMMON)
g:DeleteGroup()
end
--
function c86379797.sccon(e,tp,eg,ep,ev,re,r,rp)
......
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