Commit 5f4bb1b5 authored by wind2009's avatar wind2009

Fix 原質の炉心貫通

parent 4b358ce1
...@@ -36,8 +36,10 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -36,8 +36,10 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>5 end if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>5 end
end end
function s.activate(e,tp,eg,ep,ev,re,r,rp) function s.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>5 then Duel.ConfirmDecktop(tp,6)
Duel.SortDecktop(tp,tp,6) local g=Duel.GetDecktopGroup(tp,6)
if g:GetCount()>0 then
Duel.SortDecktop(tp,tp,g:GetCount())
end end
end end
function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
...@@ -45,12 +47,13 @@ function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -45,12 +47,13 @@ function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.PayLPCost(tp,1500) Duel.PayLPCost(tp,1500)
end end
function s.filter1(c,e,tp) function s.filter1(c,e,tp)
return c:IsFaceup() and c:IsLevel(3) and c:IsType(TYPE_NORMAL) return c:IsFaceup() and c:IsLevel(3) and c:IsAllTypes(TYPE_NORMAL+TYPE_MONSTER)
and Duel.IsExistingMatchingCard(s.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,c) and Duel.IsExistingMatchingCard(s.filter2,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
function s.filter2(c,e,tp,mc) function s.filter2(c,e,tp,mc)
return c:IsSetCard(0x160) and c:IsType(TYPE_XYZ) and mc:IsCanBeXyzMaterial(c) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,mc,c)>0 return c:IsSetCard(0x160) and c:IsType(TYPE_XYZ) and mc:IsCanBeXyzMaterial(c)
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,mc,c)>0
end end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingMatchingCard(s.filter1,tp,LOCATION_MZONE,0,1,nil,e,tp) end if chk==0 then return Duel.IsExistingMatchingCard(s.filter1,tp,LOCATION_MZONE,0,1,nil,e,tp) end
...@@ -60,19 +63,22 @@ end ...@@ -60,19 +63,22 @@ end
function s.spop(e,tp,eg,ep,ev,re,r,rp) function s.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local tc=Duel.SelectMatchingCard(tp,s.filter1,tp,LOCATION_MZONE,0,1,1,nil,e,tp):GetFirst() local mg=Duel.SelectMatchingCard(tp,s.filter1,tp,LOCATION_MZONE,0,1,1,nil,e,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) if #mg>0 then
local g=Duel.SelectMatchingCard(tp,s.filter2,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,tc) local mc=mg:GetFirst()
local sc=g:GetFirst() Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
if sc then local g=Duel.SelectMatchingCard(tp,s.filter2,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,mc)
local mg=tc:GetOverlayGroup() local sc=g:GetFirst()
if mg:GetCount()~=0 then if sc then
Duel.Overlay(sc,mg) local og=mc:GetOverlayGroup()
if og:GetCount()~=0 then
Duel.Overlay(sc,og)
end
sc:SetMaterial(Group.FromCards(mc))
Duel.Overlay(sc,Group.FromCards(mc))
Duel.SpecialSummon(sc,SUMMON_TYPE_XYZ,tp,tp,false,false,POS_FACEUP)
sc:CompleteProcedure()
end end
sc:SetMaterial(Group.FromCards(tc))
Duel.Overlay(sc,Group.FromCards(tc))
Duel.SpecialSummon(sc,SUMMON_TYPE_XYZ,tp,tp,false,false,POS_FACEUP)
sc:CompleteProcedure()
end end
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
...@@ -101,7 +107,6 @@ function s.ovtg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -101,7 +107,6 @@ function s.ovtg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription()) Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
end end
function s.ovop(e,tp,eg,ep,ev,re,r,rp) function s.ovop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetDecktopGroup(tp,1) local g=Duel.GetDecktopGroup(tp,1)
if g:GetCount()==1 then if g:GetCount()==1 then
local tc=g:GetFirst() local tc=g:GetFirst()
...@@ -109,6 +114,7 @@ function s.ovop(e,tp,eg,ep,ev,re,r,rp) ...@@ -109,6 +114,7 @@ function s.ovop(e,tp,eg,ep,ev,re,r,rp)
if Duel.IsExistingMatchingCard(s.matfilter,tp,LOCATION_MZONE,0,1,nil) and tc:IsCanOverlay() then if Duel.IsExistingMatchingCard(s.matfilter,tp,LOCATION_MZONE,0,1,nil) and tc:IsCanOverlay() then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local sg=Duel.SelectMatchingCard(tp,s.matfilter,tp,LOCATION_MZONE,0,1,1,nil) local sg=Duel.SelectMatchingCard(tp,s.matfilter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.HintSelection(sg)
Duel.Overlay(sg:GetFirst(),Group.FromCards(tc)) Duel.Overlay(sg:GetFirst(),Group.FromCards(tc))
else else
Duel.SendtoGrave(g,REASON_RULE) Duel.SendtoGrave(g,REASON_RULE)
......
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