Commit a3b48b81 authored by VanillaSalt's avatar VanillaSalt

update

parent da5e7c6b
...@@ -6,8 +6,8 @@ function c16114248.initial_effect(c) ...@@ -6,8 +6,8 @@ function c16114248.initial_effect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_FUSION_MATERIAL) e1:SetCode(EFFECT_FUSION_MATERIAL)
e1:SetCondition(c16114248.fscondition) e1:SetCondition(c16114248.fscon)
e1:SetOperation(c16114248.fsoperation) e1:SetOperation(c16114248.fsop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--direct attack --direct attack
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
...@@ -15,22 +15,32 @@ function c16114248.initial_effect(c) ...@@ -15,22 +15,32 @@ function c16114248.initial_effect(c)
e2:SetCode(EFFECT_DIRECT_ATTACK) e2:SetCode(EFFECT_DIRECT_ATTACK)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c16114248.filter(c,fc)
return c:IsRace(RACE_MACHINE) and c:IsCanBeFusionMaterial(fc)
end
function c16114248.spfilter(c,mg) function c16114248.spfilter(c,mg)
return c:IsRace(RACE_MACHINE) and mg:IsExists(c16114248.spfilter2,1,c,c:GetCode()) return mg:IsExists(c16114248.spfilter2,1,c,c)
end end
function c16114248.spfilter2(c,code) function c16114248.spfilter2(c,mc)
return c:IsRace(RACE_MACHINE) and c:IsCode(code) return c:IsFusionCode(mc:GetFusionCode())
end end
function c16114248.fscondition(e,mg,gc) function c16114248.fscon(e,g,gc)
if mg==nil then return true end if g==nil then return true end
if gc then return false end local mg=g:Filter(c16114248.filter,gc,e:GetHandler())
if gc then return c16114248.filter(gc,e:GetHandler()) and c16114248.spfilter(gc,mg) end
return mg:IsExists(c16114248.spfilter,1,nil,mg) return mg:IsExists(c16114248.spfilter,1,nil,mg)
end end
function c16114248.fsoperation(e,tp,eg,ep,ev,re,r,rp,gc) function c16114248.fsop(e,tp,eg,ep,ev,re,r,rp,gc)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FMATERIAL) local mg=eg:Filter(c16114248.filter,gc,e:GetHandler())
local g1=eg:FilterSelect(tp,c16114248.spfilter,1,1,nil,eg) local g1=nil
local mc=gc
if not gc then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FMATERIAL)
g1=mg:FilterSelect(tp,c16114248.spfilter,1,1,nil,mg)
mc=g1:GetFirst()
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FMATERIAL) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FMATERIAL)
local g2=eg:FilterSelect(tp,c16114248.spfilter2,1,1,g1:GetFirst(),g1:GetFirst():GetCode()) local g2=mg:FilterSelect(tp,c16114248.spfilter2,1,1,mc,mc)
g1:Merge(g2) if g1 then g2:Merge(g1) end
Duel.SetFusionMaterial(g1) Duel.SetFusionMaterial(g2)
end end
\ No newline at end of file
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