Commit c78faa87 authored by wind2009's avatar wind2009

Fix

parent 900b2356
Pipeline #40502 passed with stages
in 3 minutes and 27 seconds
...@@ -46,8 +46,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -46,8 +46,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp) local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp)
if g:GetCount()>0 and Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)~=0 if g:GetCount()>0 and Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)~=0
and c:IsRelateToChain() and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and c:IsRelateToChain() and c:IsCanBeSpecialSummoned(e,0,tp,false,false) then
and c:IsCanBeSpecialSummoned(e,0,tp,false,false) then
Duel.BreakEffect() Duel.BreakEffect()
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end end
......
...@@ -24,14 +24,14 @@ function s.initial_effect(c) ...@@ -24,14 +24,14 @@ function s.initial_effect(c)
e2:SetCode(EVENT_FREE_CHAIN) e2:SetCode(EVENT_FREE_CHAIN)
e2:SetCountLimit(1,id+o) e2:SetCountLimit(1,id+o)
e2:SetHintTiming(0,TIMING_END_PHASE) e2:SetHintTiming(0,TIMING_END_PHASE)
e2:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_GRAVE)
e2:SetCondition(s.spcon) e2:SetCondition(s.spcon)
e2:SetTarget(s.sptg) e2:SetTarget(s.sptg)
e2:SetOperation(s.spop) e2:SetOperation(s.spop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function s.lcheck(g,lc) function s.lcheck(g,lc)
return g:GetClassCount(Card.GetLinkRace)==g:GetCount() return not aux.SameValueCheck(g,Card.GetLinkRace)
end end
function s.setcon(e,tp,eg,ep,ev,re,r,rp) function s.setcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK) return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK)
......
...@@ -25,7 +25,7 @@ function s.initial_effect(c) ...@@ -25,7 +25,7 @@ function s.initial_effect(c)
e3:SetTarget(s.thtg) e3:SetTarget(s.thtg)
e3:SetOperation(s.thop) e3:SetOperation(s.thop)
c:RegisterEffect(e3) c:RegisterEffect(e3)
-- --special summon
local e4=Effect.CreateEffect(c) local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(id,1)) e4:SetDescription(aux.Stringid(id,1))
e4:SetCategory(CATEGORY_SPECIAL_SUMMON) e4:SetCategory(CATEGORY_SPECIAL_SUMMON)
...@@ -56,6 +56,7 @@ function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -56,6 +56,7 @@ function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,0,tp,1) Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,0,tp,1)
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
end end
function s.thop(e,tp,eg,ep,ev,re,r,rp) function s.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
...@@ -63,6 +64,7 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp) ...@@ -63,6 +64,7 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp)
if g:GetCount()>0 and Duel.SendtoHand(g,nil,REASON_EFFECT)~=0 and g:GetFirst():IsLocation(LOCATION_HAND) then if g:GetCount()>0 and Duel.SendtoHand(g,nil,REASON_EFFECT)~=0 and g:GetFirst():IsLocation(LOCATION_HAND) then
Duel.ConfirmCards(1-tp,g) Duel.ConfirmCards(1-tp,g)
Duel.BreakEffect() Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD)
local dg=Duel.SelectMatchingCard(tp,aux.TRUE,tp,LOCATION_HAND,0,1,1,nil) local dg=Duel.SelectMatchingCard(tp,aux.TRUE,tp,LOCATION_HAND,0,1,1,nil)
Duel.ShuffleHand(tp) Duel.ShuffleHand(tp)
Duel.SendtoGrave(dg,REASON_EFFECT+REASON_DISCARD) Duel.SendtoGrave(dg,REASON_EFFECT+REASON_DISCARD)
...@@ -83,8 +85,10 @@ function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -83,8 +85,10 @@ function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
end end
function s.spop(e,tp,eg,ep,ev,re,r,rp) function s.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp) local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
if g:GetCount()>0 then if g:GetCount()>0 then
......
...@@ -7,6 +7,7 @@ function s.initial_effect(c) ...@@ -7,6 +7,7 @@ function s.initial_effect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,id) e1:SetCountLimit(1,id)
e1:SetHintTiming(0,TIMING_END_PHASE)
e1:SetCondition(s.condition) e1:SetCondition(s.condition)
e1:SetTarget(s.target) e1:SetTarget(s.target)
e1:SetOperation(s.activate) e1:SetOperation(s.activate)
...@@ -21,7 +22,7 @@ function s.initial_effect(c) ...@@ -21,7 +22,7 @@ function s.initial_effect(c)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function s.condition(e,tp,eg,ep,ev,re,r,rp) function s.condition(e,tp,eg,ep,ev,re,r,rp)
return not Duel.IsExistingMatchingCard(aux.TRUE,tp,LOCATION_MZONE,0,1,nil) return not Duel.IsExistingMatchingCard(nil,tp,LOCATION_MZONE,0,1,nil)
end end
function s.spfilter(c,e,tp) function s.spfilter(c,e,tp)
return c:IsSetCard(0x114) and c:IsLevelBelow(4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsSetCard(0x114) and c:IsLevelBelow(4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
...@@ -38,15 +39,14 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -38,15 +39,14 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp) local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
if g:GetCount()>0 and Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)~=0 then if g:GetCount()>0 and Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)~=0
if Duel.IsExistingMatchingCard(aux.TRUE,tp,0,LOCATION_MZONE,2,nil) and Duel.IsExistingMatchingCard(aux.TRUE,tp,0,LOCATION_MZONE,2,nil)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp)
and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then
Duel.BreakEffect() Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g2=Duel.SelectMatchingCard(tp,s.spfilter2,tp,LOCATION_DECK,0,1,1,nil,e,tp) local g2=Duel.SelectMatchingCard(tp,s.spfilter2,tp,LOCATION_DECK,0,1,1,nil,e,tp)
Duel.SpecialSummon(g2,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(g2,0,tp,tp,false,false,POS_FACEUP)
end
end end
end end
\ No newline at end of file
...@@ -7,6 +7,7 @@ function s.initial_effect(c) ...@@ -7,6 +7,7 @@ function s.initial_effect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetHintTiming(0,TIMING_END_PHASE)
e1:SetCountLimit(1,id) e1:SetCountLimit(1,id)
e1:SetTarget(s.target) e1:SetTarget(s.target)
e1:SetOperation(s.activate) e1:SetOperation(s.activate)
...@@ -36,9 +37,7 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -36,9 +37,7 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local ct=g:GetClassCount(Card.GetCode) local ct=g:GetClassCount(Card.GetCode)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local sg=Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,ct,e:GetHandler()) local sg=Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,ct,e:GetHandler())
if not (g:GetCount()==g:FilterCount(Card.IsAbleToRemove,nil) if sg:IsExists(aux.NOT(Card.IsAbleToRemove),1,nil) then
and Duel.IsExistingMatchingCard(s.cfilter1,tp,LOCATION_MZONE,0,1,nil)
and Duel.IsExistingMatchingCard(s.cfilter2,tp,LOCATION_MZONE,0,1,nil)) then
Duel.SetOperationInfo(0,CATEGORY_DESTROY,sg,sg:GetCount(),0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,sg,sg:GetCount(),0,0)
end end
end end
...@@ -50,7 +49,7 @@ function s.cfilter2(c) ...@@ -50,7 +49,7 @@ function s.cfilter2(c)
end end
function s.activate(e,tp,eg,ep,ev,re,r,rp) function s.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToChain,nil) local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToChain,nil)
if g:GetCount()==g:FilterCount(Card.IsAbleToRemove,nil) if not g:IsExists(aux.NOT(Card.IsAbleToRemove),1,nil)
and Duel.IsExistingMatchingCard(s.cfilter1,tp,LOCATION_MZONE,0,1,nil) and Duel.IsExistingMatchingCard(s.cfilter1,tp,LOCATION_MZONE,0,1,nil)
and Duel.IsExistingMatchingCard(s.cfilter2,tp,LOCATION_MZONE,0,1,nil) and Duel.IsExistingMatchingCard(s.cfilter2,tp,LOCATION_MZONE,0,1,nil)
and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then
...@@ -72,7 +71,7 @@ function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -72,7 +71,7 @@ function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
end end
function s.thop(e,tp,eg,ep,ev,re,r,rp) function s.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if c:IsRelateToChain() then if c:IsRelateToChain() and aux.NecroValleyFilter()(c) then
Duel.SendtoHand(c,nil,REASON_EFFECT) Duel.SendtoHand(c,nil,REASON_EFFECT)
end end
end end
\ No newline at end of file
...@@ -48,7 +48,7 @@ function c1527418.cfilter(c,e,tp) ...@@ -48,7 +48,7 @@ function c1527418.cfilter(c,e,tp)
if c:IsLocation(LOCATION_HAND) then if c:IsLocation(LOCATION_HAND) then
return c:IsSetCard(0x114) and c:IsDiscardable() return c:IsSetCard(0x114) and c:IsDiscardable()
else else
return e:GetHandler():IsSetCard(0x114) and c:IsAbleToRemove() and c:IsHasEffect(101303062,tp) return e:GetHandler():IsSetCard(0x114) and c:IsAbleToRemoveAsCost() and c:IsHasEffect(101303062,tp)
end end
end end
function c1527418.negcost(e,tp,eg,ep,ev,re,r,rp,chk) function c1527418.negcost(e,tp,eg,ep,ev,re,r,rp,chk)
......
...@@ -61,7 +61,7 @@ function c38916526.cfilter(c,e,tp) ...@@ -61,7 +61,7 @@ function c38916526.cfilter(c,e,tp)
if c:IsLocation(LOCATION_HAND) then if c:IsLocation(LOCATION_HAND) then
return c:IsSetCard(0x114) and c:IsDiscardable() return c:IsSetCard(0x114) and c:IsDiscardable()
else else
return e:GetHandler():IsSetCard(0x114) and c:IsAbleToRemove() and c:IsHasEffect(101303062,tp) return e:GetHandler():IsSetCard(0x114) and c:IsAbleToRemoveAsCost() and c:IsHasEffect(101303062,tp)
end end
end end
function c38916526.negcost(e,tp,eg,ep,ev,re,r,rp,chk) function c38916526.negcost(e,tp,eg,ep,ev,re,r,rp,chk)
......
...@@ -51,7 +51,7 @@ function c67466547.drcfilter(c,e,tp) ...@@ -51,7 +51,7 @@ function c67466547.drcfilter(c,e,tp)
if c:IsLocation(LOCATION_HAND) then if c:IsLocation(LOCATION_HAND) then
return c:IsSetCard(0x114) and c:IsDiscardable() return c:IsSetCard(0x114) and c:IsDiscardable()
else else
return e:GetHandler():IsSetCard(0x114) and c:IsAbleToRemove() and c:IsHasEffect(101303062,tp) return e:GetHandler():IsSetCard(0x114) and c:IsAbleToRemoveAsCost() and c:IsHasEffect(101303062,tp)
end end
end end
function c67466547.drcost(e,tp,eg,ep,ev,re,r,rp,chk) function c67466547.drcost(e,tp,eg,ep,ev,re,r,rp,chk)
......
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