Commit 9ad7c9a8 authored by wind2009's avatar wind2009

Fix

parent f553386f
Pipeline #42674 canceled with stages
in 10 seconds
...@@ -11,6 +11,7 @@ function s.initial_effect(c) ...@@ -11,6 +11,7 @@ function s.initial_effect(c)
e1:SetCode(EVENT_SPSUMMON_SUCCESS) e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY) e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,id) e1:SetCountLimit(1,id)
e1:SetCondition(s.mtcon)
e1:SetTarget(s.mttg) e1:SetTarget(s.mttg)
e1:SetOperation(s.mtop) e1:SetOperation(s.mtop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
...@@ -35,6 +36,9 @@ function s.initial_effect(c) ...@@ -35,6 +36,9 @@ function s.initial_effect(c)
e1:SetOperation(s.rmop) e1:SetOperation(s.rmop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function s.mtcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_XYZ)
end
function s.mtfilter(c,e) function s.mtfilter(c,e)
return c:IsType(TYPE_MONSTER) return c:IsType(TYPE_MONSTER)
and c:IsCanOverlay() and not (e and c:IsImmuneToEffect(e)) and c:IsCanOverlay() and not (e and c:IsImmuneToEffect(e))
...@@ -42,10 +46,11 @@ end ...@@ -42,10 +46,11 @@ end
function s.mttg(e,tp,eg,ep,ev,re,r,rp,chk) function s.mttg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsType(TYPE_XYZ) if chk==0 then return e:GetHandler():IsType(TYPE_XYZ)
and Duel.IsExistingMatchingCard(s.mtfilter,tp,LOCATION_DECK,0,1,nil) end and Duel.IsExistingMatchingCard(s.mtfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
end end
function s.mtop(e,tp,eg,ep,ev,re,r,rp) function s.mtop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end if not c:IsRelateToChain() then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL)
local g=Duel.SelectMatchingCard(tp,s.mtfilter,tp,LOCATION_DECK,0,1,1,nil,e) local g=Duel.SelectMatchingCard(tp,s.mtfilter,tp,LOCATION_DECK,0,1,1,nil,e)
if g:GetCount()>0 then if g:GetCount()>0 then
...@@ -65,6 +70,7 @@ function s.rmtg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -65,6 +70,7 @@ function s.rmtg(e,tp,eg,ep,ev,re,r,rp,chk)
if e:GetHandler():GetOverlayCount()==0 then if e:GetHandler():GetOverlayCount()==0 then
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,tp,3000) Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,tp,3000)
end end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
end end
function s.rmop(e,tp,eg,ep,ev,re,r,rp) function s.rmop(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_EFFECT) and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then if e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_EFFECT) and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then
...@@ -72,4 +78,4 @@ function s.rmop(e,tp,eg,ep,ev,re,r,rp) ...@@ -72,4 +78,4 @@ function s.rmop(e,tp,eg,ep,ev,re,r,rp)
else else
Duel.Damage(tp,3000,REASON_EFFECT) Duel.Damage(tp,3000,REASON_EFFECT)
end end
end end
\ No newline at end of file
...@@ -42,12 +42,13 @@ function s.thfilter(c) ...@@ -42,12 +42,13 @@ function s.thfilter(c)
return c:IsSetCard(0x2dd) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand() return c:IsSetCard(0x2dd) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end end
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK+LOCATION_GRAVE,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+LOCATION_GRAVE) Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
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)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.thfilter),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g) Duel.ConfirmCards(1-tp,g)
...@@ -62,7 +63,6 @@ function s.filter2(c,e,tp,m,f,chkf) ...@@ -62,7 +63,6 @@ function s.filter2(c,e,tp,m,f,chkf)
end end
function s.fsptg(e,tp,eg,ep,ev,re,r,rp,chk) function s.fsptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then if chk==0 then
local c=e:GetHandler()
local chkf=tp local chkf=tp
local mg1=Duel.GetFusionMaterial(tp):Filter(s.filter1,nil,e) local mg1=Duel.GetFusionMaterial(tp):Filter(s.filter1,nil,e)
local res=Duel.IsExistingMatchingCard(s.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,chkf) local res=Duel.IsExistingMatchingCard(s.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,chkf)
...@@ -77,6 +77,7 @@ function s.fsptg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -77,6 +77,7 @@ function s.fsptg(e,tp,eg,ep,ev,re,r,rp,chk)
end end
return res return res
end end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end end
function s.fspop(e,tp,eg,ep,ev,re,r,rp) function s.fspop(e,tp,eg,ep,ev,re,r,rp)
...@@ -129,4 +130,4 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp) ...@@ -129,4 +130,4 @@ function s.atkop(e,tp,eg,ep,ev,re,r,rp)
e1:SetReset(RESET_EVENT+RESETS_STANDARD) e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1) tc:RegisterEffect(e1)
end end
end end
\ No newline at end of file
...@@ -3,6 +3,7 @@ local s,id,o=GetID() ...@@ -3,6 +3,7 @@ local s,id,o=GetID()
function s.initial_effect(c) function s.initial_effect(c)
--Activate --Activate
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON+CATEGORY_DECKDES) e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON+CATEGORY_DECKDES)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
...@@ -11,7 +12,7 @@ function s.initial_effect(c) ...@@ -11,7 +12,7 @@ function s.initial_effect(c)
e1:SetOperation(s.activate) e1:SetOperation(s.activate)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function s.cfilter1(c) function s.cfilter1(c,tp)
return c:IsSetCard(0x2dd) and c:IsType(TYPE_MONSTER) return c:IsSetCard(0x2dd) and c:IsType(TYPE_MONSTER)
and Duel.IsExistingMatchingCard(s.cfilter2,tp,LOCATION_DECK,0,1,c,tp) and Duel.IsExistingMatchingCard(s.cfilter2,tp,LOCATION_DECK,0,1,c,tp)
end end
...@@ -22,14 +23,14 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -22,14 +23,14 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then if chk==0 then
return Duel.IsExistingMatchingCard(s.cfilter1,tp,LOCATION_DECK,0,1,nil,tp) and Duel.IsPlayerCanDiscardDeck(tp,2) return Duel.IsExistingMatchingCard(s.cfilter1,tp,LOCATION_DECK,0,1,nil,tp) and Duel.IsPlayerCanDiscardDeck(tp,2)
end end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,LOCATION_EXTRA)
end end
function s.filter2(c,e,tp,m,f,chkf) function s.filter2(c,e,tp,m,f,chkf)
return c:IsType(TYPE_FUSION) and c:IsSetCard(0x2dd) and (not f or f(c)) return c:IsType(TYPE_FUSION) and c:IsSetCard(0x2dd) and (not f or f(c))
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial(m,nil,chkf) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial(m,nil,chkf)
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 g1=Duel.GetMatchingGroup(s.cfilter1,tp,LOCATION_DECK,0,nil) local g1=Duel.GetMatchingGroup(s.cfilter1,tp,LOCATION_DECK,0,nil,tp)
local dcount=Duel.GetFieldGroupCount(tp,LOCATION_DECK,0) local dcount=Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)
local seq1=-1 local seq1=-1
local spcard1=nil local spcard1=nil
...@@ -56,7 +57,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -56,7 +57,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp)
if seq2<seq1 then seq1=seq2 end if seq2<seq1 then seq1=seq2 end
Duel.ConfirmDecktop(tp,dcount-seq1) Duel.ConfirmDecktop(tp,dcount-seq1)
Duel.SetLP(tp,Duel.GetLP(tp)-(dcount-seq1)*400) Duel.SetLP(tp,Duel.GetLP(tp)-(dcount-seq1)*400)
local mg=Duel.GetDecktopGroup(p,dcount-seq1) local mg=Duel.GetDecktopGroup(tp,dcount-seq1)
local chkf=tp local chkf=tp
local sg1=Duel.GetMatchingGroup(s.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg,nil,chkf) local sg1=Duel.GetMatchingGroup(s.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg,nil,chkf)
local mg2=nil local mg2=nil
...@@ -77,6 +78,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -77,6 +78,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp)
if sg1:IsContains(tc) and (sg2==nil or not sg2:IsContains(tc) or ce and not Duel.SelectYesNo(tp,ce:GetDescription())) then if sg1:IsContains(tc) and (sg2==nil or not sg2:IsContains(tc) or ce and not Duel.SelectYesNo(tp,ce:GetDescription())) then
local mat1=Duel.SelectFusionMaterial(tp,tc,mg,nil,chkf) local mat1=Duel.SelectFusionMaterial(tp,tc,mg,nil,chkf)
tc:SetMaterial(mat1) tc:SetMaterial(mat1)
Duel.BreakEffect()
Duel.SendtoGrave(mat1,REASON_EFFECT+REASON_MATERIAL+REASON_FUSION) Duel.SendtoGrave(mat1,REASON_EFFECT+REASON_MATERIAL+REASON_FUSION)
Duel.BreakEffect() Duel.BreakEffect()
Duel.SpecialSummon(tc,SUMMON_TYPE_FUSION,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(tc,SUMMON_TYPE_FUSION,tp,tp,false,false,POS_FACEUP)
...@@ -86,6 +88,6 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -86,6 +88,6 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp)
fop(ce,e,tp,tc,mat2) fop(ce,e,tp,tc,mat2)
end end
tc:CompleteProcedure() tc:CompleteProcedure()
Duel.ShuffleDeck(tp)
end end
end Duel.ShuffleDeck(tp)
\ No newline at end of file end
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