Commit 22fd48e5 authored by wind2009's avatar wind2009

Fix

parent 3ba55989
Pipeline #31686 failed with stages
in 1 minute and 44 seconds
No preview for this file type
#created by ygomobile #created by ygomobile
100229001
100229002
100229019 100229019
100229020 100229020
100229033 100229033
......
...@@ -28,7 +28,7 @@ function s.initial_effect(c) ...@@ -28,7 +28,7 @@ function s.initial_effect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_PHASE+PHASE_BATTLE) e3:SetCode(EVENT_PHASE+PHASE_BATTLE)
e3:SetRange(LOCATION_MZONE) e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,id+id) e3:SetCountLimit(1,id+o)
e3:SetTarget(s.sptg2) e3:SetTarget(s.sptg2)
e3:SetOperation(s.spop2) e3:SetOperation(s.spop2)
c:RegisterEffect(e3) c:RegisterEffect(e3)
......
--ドラゴンメイド・ラティス --ドラゴンメイド・ラティス
local s,id,o=GetID() local s,id,o=GetID()
function s.initial_effect(c) function s.initial_effect(c)
aux.AddFusionProcFunRep(c,s.ffilter,3,false) aux.AddFusionProcFunRep(c,s.ffilter,2,false)
c:EnableReviveLimit() c:EnableReviveLimit()
--cannot special summon --cannot special summon
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
...@@ -42,7 +42,6 @@ function s.initial_effect(c) ...@@ -42,7 +42,6 @@ function s.initial_effect(c)
e4:SetOperation(s.fspop) e4:SetOperation(s.fspop)
c:RegisterEffect(e4) c:RegisterEffect(e4)
end end
s.fusion_effect=true
function s.ffilter(c,fc,sub,mg,sg) function s.ffilter(c,fc,sub,mg,sg)
if not c:IsFusionSetCard(0x133) then return false end if not c:IsFusionSetCard(0x133) then return false end
if not sg then return true end if not sg then return true end
...@@ -53,10 +52,10 @@ function s.splimit(e,se,sp,st) ...@@ -53,10 +52,10 @@ function s.splimit(e,se,sp,st)
return not e:GetHandler():IsLocation(LOCATION_EXTRA) return not e:GetHandler():IsLocation(LOCATION_EXTRA)
end end
function s.fusfilter(c) function s.fusfilter(c)
return c:IsSetCard(0x133) and c:IsAbleToRemoveAsCost() return c:IsSetCard(0x133) and c:IsType(TYPE_MONSTER) and c:IsAbleToRemoveAsCost()
end end
function s.fselect(g) function s.fselect(g)
return g:GetClassCount(Card.GetLevel)==2 and g:GetClassCount(Card.GetAttribute)==1 and g:IsExists(Card.IsLocation,1,nil,LOCATION_ONFIELD) and g:IsExists(Card.IsLocation,1,nil,LOCATION_GRAVE) return g:GetClassCount(Card.GetLevel)==2 and aux.SameValueCheck(g,Card.GetFusionAttribute) and g:IsExists(Card.IsLocation,1,nil,LOCATION_ONFIELD) and g:IsExists(Card.IsLocation,1,nil,LOCATION_GRAVE)
end end
function s.spcon(e,c) function s.spcon(e,c)
if c==nil then return true end if c==nil then return true end
...@@ -87,7 +86,7 @@ function s.spop1(e,tp,eg,ep,ev,re,r,rp) ...@@ -87,7 +86,7 @@ function s.spop1(e,tp,eg,ep,ev,re,r,rp)
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end end
end end
function s.filter0(c) function s.filter0(c,e)
return c:IsLocation(LOCATION_MZONE) and c:IsCanBeFusionMaterial() and c:IsAbleToDeck() and not c:IsImmuneToEffect(e) return c:IsLocation(LOCATION_MZONE) and c:IsCanBeFusionMaterial() and c:IsAbleToDeck() and not c:IsImmuneToEffect(e)
end end
function s.filter1(c,e) function s.filter1(c,e)
...@@ -101,7 +100,7 @@ function s.fsptg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -101,7 +100,7 @@ function s.fsptg(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):Filter(Card.IsOnField,nil) local mg1=Duel.GetFusionMaterial(tp):Filter(Card.IsOnField,nil)
local mg2=Duel.GetMatchingGroup(s.filter1,tp,LOCATION_REMOVED,0,nil) local mg2=Duel.GetMatchingGroup(s.filter1,tp,LOCATION_REMOVED,0,nil,e)
mg1:Merge(mg2) mg1:Merge(mg2)
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)
if not res then if not res then
...@@ -116,12 +115,12 @@ function s.fsptg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -116,12 +115,12 @@ function s.fsptg(e,tp,eg,ep,ev,re,r,rp,chk)
return res return res
end end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,tp,LOCATION_GRAVE+LOCATION_REMOVED) Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,tp,LOCATION_ONFIELD+LOCATION_REMOVED)
end end
function s.fspop(e,tp,eg,ep,ev,re,r,rp) function s.fspop(e,tp,eg,ep,ev,re,r,rp)
local chkf=tp local chkf=tp
local mg1=Duel.GetFusionMaterial(tp):Filter(s.filter0,nil,e) local mg1=Duel.GetFusionMaterial(tp):Filter(s.filter0,nil,e)
local mg2=Duel.GetMatchingGroup(aux.NecroValleyFilter(s.filter1),tp,LOCATION_GRAVE+LOCATION_REMOVED,0,nil,e) local mg2=Duel.GetMatchingGroup(aux.NecroValleyFilter(s.filter1),tp,LOCATION_ONFIELD+LOCATION_REMOVED,0,nil,e)
mg1:Merge(mg2) mg1:Merge(mg2)
local sg1=Duel.GetMatchingGroup(s.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg1,nil,chkf) local sg1=Duel.GetMatchingGroup(s.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg1,nil,chkf)
local mg3=nil local mg3=nil
...@@ -136,11 +135,13 @@ function s.fspop(e,tp,eg,ep,ev,re,r,rp) ...@@ -136,11 +135,13 @@ function s.fspop(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 not Duel.SelectYesNo(tp,ce:GetDescription())) then if sg1:IsContains(tc) and (sg2==nil or not sg2:IsContains(tc) or ce~=nil and not 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
tc:SetMaterial(mat) tc:SetMaterial(mat)
if mat:IsExists(Card.IsFacedown,1,nil) then if mat:IsExists(Card.IsFacedown,1,nil) then
local cg=mat:Filter(Card.IsFacedown,nil) local cg=mat:Filter(Card.IsFacedown,nil)
...@@ -153,8 +154,9 @@ function s.fspop(e,tp,eg,ep,ev,re,r,rp) ...@@ -153,8 +154,9 @@ function s.fspop(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoDeck(mat,nil,SEQ_DECKSHUFFLE,REASON_EFFECT+REASON_MATERIAL+REASON_FUSION) Duel.SendtoDeck(mat,nil,SEQ_DECKSHUFFLE,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~=nil then
local mat2=Duel.SelectFusionMaterial(tp,tc,mg3,nil,chkf) local mat2=Duel.SelectFusionMaterial(tp,tc,mg3,nil,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
......
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