Commit 53fa67cc authored by wind2009's avatar wind2009

Fix アルトメギア・マスターワーク-継承-

parent ad9d5cee
Pipeline #34829 passed with stages
in 1 minute and 32 seconds
No preview for this file type
...@@ -87,17 +87,20 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -87,17 +87,20 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp)
if sg1:GetCount()>0 or (sg2~=nil and sg2:GetCount()>0) then if sg1:GetCount()>0 or (sg2~=nil and sg2:GetCount()>0) then
local sg=sg1:Clone() local sg=sg1:Clone()
if sg2 then sg:Merge(sg2) end if sg2 then sg:Merge(sg2) end
::cancel::
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=sg:Select(tp,1,1,nil) local tg=sg:Select(tp,1,1,nil)
local tc=tg:GetFirst() local tc=tg:GetFirst()
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,mg1,c,chkf) local mat1=Duel.SelectFusionMaterial(tp,tc,mg1,c,chkf)
if #mat1==0 then goto cancel end
tc:SetMaterial(mat1) tc:SetMaterial(mat1)
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)
elseif ce then elseif ce then
local mat2=Duel.SelectFusionMaterial(tp,tc,mg2,c,chkf) local mat2=Duel.SelectFusionMaterial(tp,tc,mg2,c,chkf)
if #mat2==0 then goto cancel end
local fop=ce:GetOperation() local fop=ce:GetOperation()
fop(ce,e,tp,tc,mat2) fop(ce,e,tp,tc,mat2)
end end
......
--アルトメギア・マスターワーク-継承- --アルトメギア・マスターワーク-継承-
local s,id,o=GetID() local s,id,o=GetID()
function s.initial_effect(c) function s.initial_effect(c)
--Activate --Activate
...@@ -26,8 +26,7 @@ function s.initial_effect(c) ...@@ -26,8 +26,7 @@ function s.initial_effect(c)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function s.fscon(e,tp,eg,ep,ev,re,r,rp) function s.fscon(e,tp,eg,ep,ev,re,r,rp)
local ph=Duel.GetCurrentPhase() return Duel.IsMainPhase()
return ph==PHASE_MAIN1 or ph==PHASE_MAIN2
end end
function s.filter(c,e,tp,m,f,chkf) function s.filter(c,e,tp,m,f,chkf)
return c:IsType(TYPE_FUSION) and (not f or f(c)) return c:IsType(TYPE_FUSION) and (not f or f(c))
...@@ -39,7 +38,7 @@ end ...@@ -39,7 +38,7 @@ end
function s.fstg(e,tp,eg,ep,ev,re,r,rp,chk) function s.fstg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then if chk==0 then
local chkf=tp local chkf=tp
local mg1=Duel.GetFusionMaterial(tp) local mg1=Duel.GetFusionMaterial(tp):Filter(aux.NOT(Card.IsImmuneToEffect),nil,e)
aux.FCheckAdditional=s.check aux.FCheckAdditional=s.check
local res=Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,chkf) local res=Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,chkf)
if not res then if not res then
...@@ -75,15 +74,14 @@ function s.fsop(e,tp,eg,ep,ev,re,r,rp) ...@@ -75,15 +74,14 @@ function s.fsop(e,tp,eg,ep,ev,re,r,rp)
::cancel:: ::cancel::
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tc=sg:Select(tp,1,1,nil):GetFirst() local tc=sg:Select(tp,1,1,nil):GetFirst()
if sg1:IsContains(tc) and (sg2==nil or not (sg2:IsContains(tc) if sg1:IsContains(tc) and (sg2==nil or not sg2:IsContains(tc) or ce and not Duel.SelectYesNo(tp,ce:GetDescription())) then
and Duel.SelectYesNo(tp,ce:GetDescription()))) then
local mat=Duel.SelectFusionMaterial(tp,tc,mg1,nil,chkf) local mat=Duel.SelectFusionMaterial(tp,tc,mg1,nil,chkf)
if #mat==0 then goto cancel end if #mat==0 then goto cancel end
tc:SetMaterial(mat) tc:SetMaterial(mat)
Duel.SendtoGrave(mat,REASON_EFFECT+REASON_MATERIAL+REASON_FUSION) Duel.SendtoGrave(mat,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)
else elseif ce then
local mat=Duel.SelectFusionMaterial(tp,tc,mg2,nil,chkf) local mat=Duel.SelectFusionMaterial(tp,tc,mg2,nil,chkf)
if #mat==0 then goto cancel end if #mat==0 then goto cancel end
local fop=ce:GetOperation() local fop=ce:GetOperation()
...@@ -91,6 +89,7 @@ function s.fsop(e,tp,eg,ep,ev,re,r,rp) ...@@ -91,6 +89,7 @@ function s.fsop(e,tp,eg,ep,ev,re,r,rp)
end end
tc:CompleteProcedure() tc:CompleteProcedure()
if Duel.IsExistingMatchingCard(aux.TRUE,tp,LOCATION_FZONE,LOCATION_FZONE,1,nil) then if Duel.IsExistingMatchingCard(aux.TRUE,tp,LOCATION_FZONE,LOCATION_FZONE,1,nil) then
Duel.BreakEffect()
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetCode(EFFECT_UPDATE_ATTACK)
...@@ -114,7 +113,7 @@ function s.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -114,7 +113,7 @@ function s.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,g:GetCount(),0,0) Duel.SetOperationInfo(0,CATEGORY_TODECK,g,g:GetCount(),0,0)
end end
function s.tdop(e,tp,eg,ep,ev,re,r,rp) function s.tdop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetTargetsRelateToChain() local g=Duel.GetTargetsRelateToChain():Filter(aux.NecroValleyFilter(),nil)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)
end 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