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)
end
function s.xyzop(e,tp,eg,ep,ev,re,r,rp)
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)
local sg=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,c:GetLevel())
local sc=sg:GetFirst()
......
......@@ -17,6 +17,7 @@ function s.initial_effect(c)
c:RegisterEffect(e2)
local e3=e1:Clone()
e3:SetCode(EVENT_DESTROYED)
e3:SetCondition(s.thcon)
c:RegisterEffect(e3)
--spsummon
local e4=Effect.CreateEffect(c)
......@@ -31,6 +32,9 @@ function s.initial_effect(c)
e4:SetOperation(s.xyzop)
c:RegisterEffect(e4)
end
function s.thcon(e,tp,eg,ep,ev,re,r,rp,chk)
return e:GetHandler():IsReason(REASON_EFFECT)
end
function s.thfilter(c)
return c:IsSetCard(0x2d3) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
......@@ -61,7 +65,8 @@ function s.xyztg(e,tp,eg,ep,ev,re,r,rp,chk)
end
function s.xyzop(e,tp,eg,ep,ev,re,r,rp)
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)
local sg=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,c:GetLevel())
local sc=sg:GetFirst()
......
......@@ -16,6 +16,7 @@ function s.initial_effect(c)
c:RegisterEffect(e2)
local e3=e1:Clone()
e3:SetCode(EVENT_DESTROYED)
e3:SetCondition(s.thcon)
c:RegisterEffect(e3)
--spsummon
local e4=Effect.CreateEffect(c)
......@@ -30,6 +31,9 @@ function s.initial_effect(c)
e4:SetOperation(s.xyzop)
c:RegisterEffect(e4)
end
function s.thcon(e,tp,eg,ep,ev,re,r,rp,chk)
return e:GetHandler():IsReason(REASON_EFFECT)
end
function s.setfilter(c)
return c:IsSetCard(0x2d3) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsSSetable()
end
......@@ -61,7 +65,8 @@ function s.xyztg(e,tp,eg,ep,ev,re,r,rp,chk)
end
function s.xyzop(e,tp,eg,ep,ev,re,r,rp)
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)
local sg=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,c:GetLevel())
local sc=sg:GetFirst()
......
......@@ -38,7 +38,7 @@ function s.splimit(e,c)
return not c:IsType(TYPE_XYZ) and c:IsLocation(LOCATION_EXTRA)
end
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 aux.MustMaterialCheck(c,tp,EFFECT_MUST_BE_XMATERIAL)
end
......
......@@ -39,13 +39,13 @@ function s.thfilter(c,e,tp,ec)
end
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
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)
end
function s.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
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
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPERATECARD)
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