Commit 540c0afb authored by Amiya's avatar Amiya

修复

parent d9b9027b
...@@ -73,7 +73,8 @@ function s.xyztg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -73,7 +73,8 @@ function s.xyztg(e,tp,eg,ep,ev,re,r,rp,chk)
end end
function s.xyzop(e,tp,eg,ep,ev,re,r,rp) function s.xyzop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if not c:IsRelateToChain() then return end if not c:IsRelateToChain() or c:IsFacedown() then return end
if not aux.MustMaterialCheck(tc,tp,EFFECT_MUST_BE_XMATERIAL) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,c:GetLevel()) local sg=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,c:GetLevel())
local sc=sg:GetFirst() local sc=sg:GetFirst()
......
...@@ -17,6 +17,7 @@ function s.initial_effect(c) ...@@ -17,6 +17,7 @@ function s.initial_effect(c)
c:RegisterEffect(e2) c:RegisterEffect(e2)
local e3=e1:Clone() local e3=e1:Clone()
e3:SetCode(EVENT_DESTROYED) e3:SetCode(EVENT_DESTROYED)
e3:SetCondition(s.thcon)
c:RegisterEffect(e3) c:RegisterEffect(e3)
--spsummon --spsummon
local e4=Effect.CreateEffect(c) local e4=Effect.CreateEffect(c)
...@@ -31,6 +32,9 @@ function s.initial_effect(c) ...@@ -31,6 +32,9 @@ function s.initial_effect(c)
e4:SetOperation(s.xyzop) e4:SetOperation(s.xyzop)
c:RegisterEffect(e4) c:RegisterEffect(e4)
end end
function s.thcon(e,tp,eg,ep,ev,re,r,rp,chk)
return e:GetHandler():IsReason(REASON_EFFECT)
end
function s.thfilter(c) function s.thfilter(c)
return c:IsSetCard(0x2d3) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand() return c:IsSetCard(0x2d3) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end end
...@@ -61,7 +65,8 @@ function s.xyztg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -61,7 +65,8 @@ function s.xyztg(e,tp,eg,ep,ev,re,r,rp,chk)
end end
function s.xyzop(e,tp,eg,ep,ev,re,r,rp) function s.xyzop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if not c:IsRelateToChain() then return end if not c:IsRelateToChain() or c:IsFacedown() then return end
if not aux.MustMaterialCheck(tc,tp,EFFECT_MUST_BE_XMATERIAL) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,c:GetLevel()) local sg=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,c:GetLevel())
local sc=sg:GetFirst() local sc=sg:GetFirst()
......
...@@ -16,6 +16,7 @@ function s.initial_effect(c) ...@@ -16,6 +16,7 @@ function s.initial_effect(c)
c:RegisterEffect(e2) c:RegisterEffect(e2)
local e3=e1:Clone() local e3=e1:Clone()
e3:SetCode(EVENT_DESTROYED) e3:SetCode(EVENT_DESTROYED)
e3:SetCondition(s.thcon)
c:RegisterEffect(e3) c:RegisterEffect(e3)
--spsummon --spsummon
local e4=Effect.CreateEffect(c) local e4=Effect.CreateEffect(c)
...@@ -30,6 +31,9 @@ function s.initial_effect(c) ...@@ -30,6 +31,9 @@ function s.initial_effect(c)
e4:SetOperation(s.xyzop) e4:SetOperation(s.xyzop)
c:RegisterEffect(e4) c:RegisterEffect(e4)
end end
function s.thcon(e,tp,eg,ep,ev,re,r,rp,chk)
return e:GetHandler():IsReason(REASON_EFFECT)
end
function s.setfilter(c) function s.setfilter(c)
return c:IsSetCard(0x2d3) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsSSetable() return c:IsSetCard(0x2d3) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsSSetable()
end end
...@@ -61,7 +65,8 @@ function s.xyztg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -61,7 +65,8 @@ function s.xyztg(e,tp,eg,ep,ev,re,r,rp,chk)
end end
function s.xyzop(e,tp,eg,ep,ev,re,r,rp) function s.xyzop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if not c:IsRelateToChain() then return end if not c:IsRelateToChain() or c:IsFacedown() then return end
if not aux.MustMaterialCheck(tc,tp,EFFECT_MUST_BE_XMATERIAL) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,c:GetLevel()) local sg=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,c:GetLevel())
local sc=sg:GetFirst() local sc=sg:GetFirst()
......
...@@ -38,7 +38,7 @@ function s.splimit(e,c) ...@@ -38,7 +38,7 @@ function s.splimit(e,c)
return not c:IsType(TYPE_XYZ) and c:IsLocation(LOCATION_EXTRA) return not c:IsType(TYPE_XYZ) and c:IsLocation(LOCATION_EXTRA)
end end
function s.cfilter(c,e,tp) function s.cfilter(c,e,tp)
return c:IsFaceup() and c:IsLevelAbove(1) return c:IsFaceup() and c:IsLevelAbove(1) and c:IsType(TYPE_EFFECT)
and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,c) and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,c)
and aux.MustMaterialCheck(c,tp,EFFECT_MUST_BE_XMATERIAL) and aux.MustMaterialCheck(c,tp,EFFECT_MUST_BE_XMATERIAL)
end end
......
...@@ -39,13 +39,13 @@ function s.thfilter(c,e,tp,ec) ...@@ -39,13 +39,13 @@ function s.thfilter(c,e,tp,ec)
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.cfilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,e:GetHandler(),e,tp) end if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,e:GetHandler(),e,tp) end
local g=Duel.GetMatchingGroup(s.dfilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,e:GetHandler(),e,tp) local g=Duel.GetMatchingGroup(s.cfilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,e:GetHandler(),e,tp)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
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()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local dg=Duel.SelectMatchingCard(tp,s.dfilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,1,aux.ExceptThisCard(e),e,tp) local dg=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,1,aux.ExceptThisCard(e),e,tp)
if dg:GetCount()>0 and Duel.Destroy(dg,REASON_EFFECT)~=0 then if dg:GetCount()>0 and Duel.Destroy(dg,REASON_EFFECT)~=0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPERATECARD) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPERATECARD)
local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp,nil) local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp,nil)
......
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