Commit a941b17a authored by zengsxing's avatar zengsxing

fix

parent ca1d623f
Pipeline #41531 passed with stages
in 3 minutes and 19 seconds
......@@ -7,7 +7,7 @@ function s.initial_effect(c)
--summon success
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_SPECIAL_SUMMON)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_SPECIAL_SUMMON+CATEGORY_GRAVE_SPSUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCountLimit(1,id)
......@@ -28,7 +28,6 @@ function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local ct=c:GetMaterialCount()
if chk==0 then return ct>0 end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,LOCATION_GRAVE)
end
function s.thfilter(c)
return c:IsSetCard(0xc0) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToHand()
......@@ -38,14 +37,14 @@ function s.spfilter(c,e,tp)
end
function s.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local ct=c:GetMaterial():GetClassCount(Card.GetOriginalRace)
local ct=c:GetMaterial():GetClassCount(Card.GetOriginalAttribute)
if ct<=0 then return end
if ct>4 then ct=4 end
for i=1,ct do
local b1=c:IsRelateToEffect(e) and c:IsFaceup()
local b2=Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil)
local b3=Duel.IsExistingMatchingCard(Card.IsAbleToHand,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil)
local b4=Duel.IsExistingMatchingCard(aux.NecroValleyFilter(s.spfilter),tp,LOCATION_GRAVE,0,1,nil,e,tp)
local b4=Duel.IsExistingMatchingCard(aux.NecroValleyFilter(s.spfilter),tp,LOCATION_GRAVE,0,1,nil,e,tp) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
if not b1 and not b2 and not b3 and not b4 then break end
local op=aux.SelectFromOptions(tp,
{b1,aux.Stringid(id,1)},
......
......@@ -25,15 +25,15 @@ function s.initial_effect(c)
c:RegisterEffect(e2)
end
function s.thfilter(c)
return c:IsSetCard(0xbf) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
return c:IsSetCard(0xbf) and c:IsType(TYPE_MONSTER) and c:IsFaceupEx() and c:IsAbleToHand()
end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(s.thfilter,tp,LOCATION_DECK,0,nil)
local g=Duel.GetMatchingGroup(s.thfilter,tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_REMOVED,0,nil)
if chk==0 then return g:GetClassCount(Card.GetAttribute)>=4 end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,4,tp,LOCATION_DECK)
end
function s.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(s.thfilter,tp,LOCATION_DECK,0,nil)
local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(s.thfilter),tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_REMOVED,0,nil)
if g:GetClassCount(Card.GetAttribute)<4 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=g:SelectSubGroup(tp,aux.dabcheck,false,4,4)
......@@ -45,10 +45,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp)
end
end
function s.filter0(c,e)
return c:IsType(TYPE_MONSTER) and c:IsCanBeFusionMaterial() and c:IsImmuneToEffect(e) and c:IsSetCard(0xbf,0xc0)
end
function s.filter1(c,e)
return not c:IsImmuneToEffect(e) and c:IsOnField() and c:IsSetCard(0xbf,0xc0)
return c:IsType(TYPE_MONSTER) and c:IsCanBeFusionMaterial() and not c:IsImmuneToEffect(e) and c:IsSetCard(0xbf,0xc0)
end
function s.filter2(c,e,tp,m,f,chkf)
return c:IsType(TYPE_FUSION) and (not f or f(c))
......
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