Commit 103305b8 authored by VanillaSalt's avatar VanillaSalt

fix

parent ecb7c4b9
......@@ -10,23 +10,42 @@ function c80033124.initial_effect(c)
c:RegisterEffect(e1)
end
function c80033124.ffilter0(c)
return c:IsCode(41230939,77625948,3019642) and c:IsCanBeFusionMaterial() and c:IsAbleToDeck()
return c:IsFusionCode(41230939,77625948,3019642) and c:IsCanBeFusionMaterial() and c:IsAbleToDeck()
end
function c80033124.ffilter(c,e)
return c:IsCode(41230939,77625948,3019642) and c:IsCanBeFusionMaterial() and c:IsAbleToDeck()
return c:IsFusionCode(41230939,77625948,3019642) and c:IsCanBeFusionMaterial() and c:IsAbleToDeck()
and not c:IsImmuneToEffect(e)
end
function c80033124.spfilter(c,e,tp)
return c:IsCode(40418351) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false)
end
function c80033124.fcheck(c,sg,g,code,...)
if not c:IsFusionCode(code) then return false end
if ... then
g:AddCard(c)
local res=sg:IsExists(c80033124.fcheck,1,g,sg,g,...)
g:RemoveCard(c)
return res
else return true end
end
function c80033124.fselect(c,tp,mg,sg,...)
sg:AddCard(c)
local res=false
if sg:GetCount()<3 then
res=mg:IsExists(c80033124.fselect,1,sg,tp,mg,sg,...)
elseif Duel.GetLocationCountFromEx(tp,tp,sg)>0 then
local g=Group.CreateGroup()
res=sg:IsExists(c80033124.fcheck,1,nil,sg,g,...)
end
sg:RemoveCard(c)
return res
end
function c80033124.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
if not Duel.IsExistingMatchingCard(c80033124.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp) then return false end
local g=Duel.GetMatchingGroup(c80033124.ffilter0,tp,0x1e,0,nil)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 and not g:IsExists(Card.IsLocation,1,nil,LOCATION_MZONE) then return false end
return g:IsExists(Card.IsCode,1,nil,41230939)
and g:IsExists(Card.IsCode,1,nil,77625948)
and g:IsExists(Card.IsCode,1,nil,3019642)
local mg=Duel.GetMatchingGroup(c80033124.ffilter0,tp,LOCATION_HAND+LOCATION_ONFIELD+LOCATION_GRAVE,0,nil)
local sg=Group.CreateGroup()
return mg:IsExists(c80033124.fselect,1,nil,tp,mg,sg,41230939,77625948,3019642)
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
......@@ -34,31 +53,21 @@ function c80033124.cfilter(c)
return c:IsLocation(LOCATION_HAND) or (c:IsOnField() and c:IsFacedown())
end
function c80033124.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(c80033124.ffilter),tp,0x1e,0,nil,e)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if (ft<=0 and not g:IsExists(Card.IsLocation,1,nil,LOCATION_MZONE))
or not g:IsExists(Card.IsCode,1,nil,41230939)
or not g:IsExists(Card.IsCode,1,nil,77625948)
or not g:IsExists(Card.IsCode,1,nil,3019642) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
if ft<=0 then g1=g:FilterSelect(tp,Card.IsLocation,1,1,nil,LOCATION_MZONE)
else g1=g:Select(tp,1,1,nil) end
g:Remove(Card.IsCode,nil,g1:GetFirst():GetCode())
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g2=g:Select(tp,1,1,nil)
g:Remove(Card.IsCode,nil,g2:GetFirst():GetCode())
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g3=g:Select(tp,1,1,nil)
g1:Merge(g2)
g1:Merge(g3)
local cg=g1:Filter(c80033124.cfilter,nil)
local mg=Duel.GetMatchingGroup(aux.NecroValleyFilter(c80033124.ffilter),tp,LOCATION_HAND+LOCATION_ONFIELD+LOCATION_GRAVE,0,nil,e)
local sg=Group.CreateGroup()
while sg:GetCount()<3 do
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=mg:FilterSelect(tp,c80033124.fselect,1,1,sg,tp,mg,sg,41230939,77625948,3019642)
sg:Merge(g)
end
local cg=sg:Filter(c80033124.cfilter,nil)
if cg:GetCount()>0 then
Duel.ConfirmCards(1-tp,cg)
Duel.ShuffleHand(tp)
end
Duel.SendtoDeck(g1,nil,2,REASON_EFFECT)
Duel.SendtoDeck(sg,nil,2,REASON_EFFECT)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=Duel.SelectMatchingCard(tp,c80033124.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp)
Duel.SpecialSummon(sg,SUMMON_TYPE_FUSION,tp,tp,false,false,POS_FACEUP)
sg:GetFirst():CompleteProcedure()
local g=Duel.SelectMatchingCard(tp,c80033124.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp)
Duel.SpecialSummon(g,SUMMON_TYPE_FUSION,tp,tp,false,false,POS_FACEUP)
g:GetFirst():CompleteProcedure()
end
......@@ -33,8 +33,7 @@ function c93600443.chkfilter(c,tc)
end
function c93600443.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c93600443.chkfilter(chkc,e:GetLabelObject()) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1
and Duel.IsExistingTarget(c93600443.filter,tp,LOCATION_MZONE,0,1,nil,e,tp) end
if chk==0 then return Duel.IsExistingTarget(c93600443.filter,tp,LOCATION_MZONE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectTarget(tp,c93600443.filter,tp,LOCATION_MZONE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g,1,0,0)
......
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