Commit 39c82b4d authored by GuGu's avatar GuGu

Update c15066.lua

parent d7332ba2
Pipeline #33231 passed with stage
in 8 seconds
...@@ -6,8 +6,9 @@ function c15066.initial_effect(c) ...@@ -6,8 +6,9 @@ function c15066.initial_effect(c)
e1:SetCode(EFFECT_SPSUMMON_PROC) e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_HAND) e1:SetRange(LOCATION_HAND)
e1:SetValue(1) e1:SetValue(15066)
e1:SetCondition(c15066.spcon) e1:SetCondition(c15066.spcon)
e1:SetTarget(c15066.sptg)
e1:SetOperation(c15066.spop) e1:SetOperation(c15066.spop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--search --search
...@@ -32,33 +33,35 @@ end ...@@ -32,33 +33,35 @@ end
function c15066.spfilter(c) function c15066.spfilter(c)
return c:IsSetCard(0x150) and c:IsAbleToGraveAsCost() and c:IsType(TYPE_MONSTER) return c:IsSetCard(0x150) and c:IsAbleToGraveAsCost() and c:IsType(TYPE_MONSTER)
end end
function c15066.fantasyspfilter(c) function c15066.fantasyspfilter(sg,tp)
return c:IsAttribute(ATTRIBUTE_DARK) and c:IsSetCard(0x150) and c:IsAbleToGraveAsCost() return Duel.GetMZoneCount(tp,sg,tp)>0 and sg:IsExists(Card.IsAttribute,1,nil,ATTRIBUTE_DARK)
and sg:IsExists(Card.IsLocation,1,nil,LOCATION_HAND)
and sg:IsExists(Card.IsLocation,1,nil,LOCATION_DECK)
and sg:IsExists(Card.IsLocation,1,nil,LOCATION_MZONE)
end end
function c15066.spcon(e,c) function c15066.spcon(e,c)
if c==nil then return true end if c==nil then return true end
local tp=c:GetControler() local tp=c:GetControler()
return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 local mg=Duel.GetMatchingGroup(c15066.spfilter,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_MZONE,0,c,tp)
and Duel.IsExistingMatchingCard(c15066.fantasyspfilter,tp,0x7,0,1,c) return mg:CheckSubGroup(c15066.fantasyspfilter,3,3,tp)
and Duel.IsExistingMatchingCard(c15066.spfilter,tp,LOCATION_HAND,0,1,c)
and Duel.IsExistingMatchingCard(c15066.spfilter,tp,LOCATION_DECK,0,1,c)
and Duel.IsExistingMatchingCard(c15066.spfilter,tp,LOCATION_ONFIELD,0,1,c)
end end
function c15066.spop(e,tp,eg,ep,ev,re,r,rp,c) function c15066.sptg(e,tp,eg,ep,ev,re,r,rp,chk,c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) local g=Duel.GetMatchingGroup(c15066.spfilter,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_MZONE,0,c,tp)
local g1=Duel.SelectMatchingCard(tp,c15066.fantasyspfilter,tp,0x7,0,1,1,c)
local ll=g1:GetFirst():GetLocation()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g2=Duel.SelectMatchingCard(tp,c15066.spfilter,tp,0x7-ll,0,1,1,c)
local lll=g2:GetFirst():GetLocation()
g1:Merge(g2)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g3=Duel.SelectMatchingCard(tp,c15066.spfilter,tp,0x7-ll-lll,0,1,1,c) local sg=g:SelectSubGroup(tp,c15066.fantasyspfilter,true,3,3,tp)
g1:Merge(g3) if sg then
Duel.SendtoGrave(g1,REASON_COST) sg:KeepAlive()
e:SetLabelObject(sg)
return true
else return false end
end
function c15066.spop(e,tp,eg,ep,ev,re,r,rp,c)
local g=e:GetLabelObject()
Duel.SendtoGrave(g,REASON_SPSUMMON)
g:DeleteGroup()
end end
function c15066.thcon(e,tp,eg,ep,ev,re,r,rp) function c15066.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetSummonType()==SUMMON_TYPE_SPECIAL+1 return e:GetHandler():GetSummonType()==SUMMON_TYPE_SPECIAL+15066
end end
function c15066.cost(e,tp,eg,ep,ev,re,r,rp,chk) function c15066.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local fa=Duel.GetFlagEffect(tp,15000) local fa=Duel.GetFlagEffect(tp,15000)
......
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