Commit 3e2a3df4 authored by Grajade's avatar Grajade

Update c20056.lua

parent 8344c038
...@@ -61,8 +61,56 @@ function c20056.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -61,8 +61,56 @@ function c20056.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return #sg>=3 and c20056.MultiSpecialSummonLocationCheck(sg,tp,tp,3) end if chk==0 then return #sg>=3 and c20056.MultiSpecialSummonLocationCheck(sg,tp,tp,3) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,3,tp,LOCATION_EXTRA+LOCATION_GRAVE) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,3,tp,LOCATION_EXTRA+LOCATION_GRAVE)
end end
function c20056.ExFilter(c)
return c:IsLocation(LOCATION_EXTRA) and c:IsType(TYPE_LINK+TYPE_PENDULUM)
end
function c20056.OperationCheck(ft1,ft2,ft3,ft)
return function(g)
local ExLinkG=g:Filter(c20056.ExFilter,nil,LOCATION_EXTRA)
local mg=g-ExLinkG
local ExOtherG=mg:Filter(Card.IsLocation,nil,LOCATION_EXTRA)
local mg2=mg-ExOtherG
return #g<=ft and #ExLinkG<=ft3 and #ExOtherG<=ft2 and #mg2<=ft1
end
end
function c20056.Lily_IMMUNE(c,e)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
e1:SetOperation(c20056.desop)
c:RegisterEffect(e1)
end
function c20056.activate(e,tp,eg,ep,ev,re,r,rp) function c20056.activate(e,tp,eg,ep,ev,re,r,rp)
local sg=Duel.GetMatchingGroup(c20056.filter,tp,LOCATION_GRAVE|LOCATION_EXTRA,0,nil,e,tp) local sg=Duel.GetMatchingGroup(c20056.filter,tp,LOCATION_GRAVE|LOCATION_EXTRA,0,nil,e,tp)
local ft=Duel.GetUsableMZoneCount(tp)
local ft1=Duel.GetLocationCount(tp,LOCATION_MZONE)
local ft2=Duel.GetLocationCountFromEx(tp,tp,nil,TYPE_XYZ)
local ft3=Duel.GetLocationCountFromEx(tp,tp,nil,TYPE_PENDULUM)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
Auxiliary.GCheckAdditional=c20056.OperationCheck(ft1,ft2,ft3,ft)
local mg=sg:SelectSubGroup(tp,aux.TRUE,false,3,3)
Auxiliary.GCheckAdditional=nil
if mg:GetCount()<3 then return end
local lg=mg:Filter(c20056.ExFilter,nil)
if lg:GetCount()>0 then
mg:Sub(lg)
for tc in aux.Next(lg) do
Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP)
c20056.Lily_IMMUNE(tc,e)
end
end
if mg:GetCount()>0 then
for tc in aux.Next(mg) do
Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP)
c20056.Lily_IMMUNE(tc,e)
end
end
Duel.SpecialSummonComplete()
--[[
if #sg>=3 then if #sg>=3 then
local spc,spg=c20056.MultiSpecialSummon(sg,tp,tp,3) local spc,spg=c20056.MultiSpecialSummon(sg,tp,tp,3)
local tc=spg:GetFirst() local tc=spg:GetFirst()
...@@ -79,6 +127,7 @@ function c20056.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -79,6 +127,7 @@ function c20056.activate(e,tp,eg,ep,ev,re,r,rp)
tc=spg:GetNext() tc=spg:GetNext()
end end
end end
]]--
end end
function c20056.desop(e,tp,eg,ep,ev,re,r,rp) function c20056.desop(e,tp,eg,ep,ev,re,r,rp)
Duel.Destroy(e:GetHandler(),nil,REASON_EFFECT) Duel.Destroy(e:GetHandler(),nil,REASON_EFFECT)
......
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