Commit b8285c35 authored by VanillaSalt's avatar VanillaSalt

update

parent 3091cdbf
--水晶機巧-グリオンガンド --水晶機巧-グリオンガンド
--Effect is not fully implemented
function c13455674.initial_effect(c) function c13455674.initial_effect(c)
c:EnableReviveLimit() c:EnableReviveLimit()
--synchro summon --synchro summon
...@@ -9,7 +8,6 @@ function c13455674.initial_effect(c) ...@@ -9,7 +8,6 @@ function c13455674.initial_effect(c)
e1:SetCode(EFFECT_SPSUMMON_PROC) e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetRange(LOCATION_EXTRA) e1:SetRange(LOCATION_EXTRA)
e1:SetCondition(c13455674.syncon) e1:SetCondition(c13455674.syncon)
e1:SetTarget(c13455674.syntg)
e1:SetOperation(c13455674.synop) e1:SetOperation(c13455674.synop)
e1:SetValue(SUMMON_TYPE_SYNCHRO) e1:SetValue(SUMMON_TYPE_SYNCHRO)
c:RegisterEffect(e1) c:RegisterEffect(e1)
...@@ -48,17 +46,11 @@ end ...@@ -48,17 +46,11 @@ end
function c13455674.matfilter2(c,syncard) function c13455674.matfilter2(c,syncard)
return c:IsNotTuner() and c:IsFaceup() and c:IsCanBeSynchroMaterial(syncard) return c:IsNotTuner() and c:IsFaceup() and c:IsCanBeSynchroMaterial(syncard)
end end
function c13455674.synfilter(c,syncard,lv,g2) function c13455674.synfilter(c,syncard,lv,g1,pg,ct)
local tlv=c:GetSynchroLevel(syncard) local g=Group.FromCards(c)
if lv-tlv<=0 then return false end g:Merge(pg)
g2:RemoveCard(c) Duel.SetSelectedCard(g)
return g2:CheckWithSumEqual(Card.GetSynchroLevel,lv-tlv,2,63,syncard) return g1:CheckWithSumEqual(Card.GetSynchroLevel,lv,ct,63,syncard)
end
function c13455674.synfilter2(c,syncard,lv,g2)
local tlv=c:GetSynchroLevel(syncard)
if lv-tlv<=0 then return false end
g2:RemoveCard(c)
return g2:CheckWithSumEqual(Card.GetSynchroLevel,lv-tlv,1,63,syncard)
end end
function c13455674.syncon(e,c,tuner,mg) function c13455674.syncon(e,c,tuner,mg)
if c==nil then return true end if c==nil then return true end
...@@ -67,78 +59,60 @@ function c13455674.syncon(e,c,tuner,mg) ...@@ -67,78 +59,60 @@ function c13455674.syncon(e,c,tuner,mg)
local g1=nil local g1=nil
local g2=nil local g2=nil
if mg then if mg then
g1=mg:Filter(c13455674.matfilter2,nil,c) g1=mg:Filter(c13455674.matfilter1,nil,c)
g2=mg:Filter(c13455674.matfilter1,nil,c) g2=mg:Filter(c13455674.matfilter2,nil,c)
else else
g1=Duel.GetMatchingGroup(c13455674.matfilter2,tp,LOCATION_MZONE,LOCATION_MZONE,nil,c) g1=Duel.GetMatchingGroup(c13455674.matfilter1,tp,LOCATION_MZONE,LOCATION_MZONE,nil,c)
g2=Duel.GetMatchingGroup(c13455674.matfilter1,tp,LOCATION_MZONE,LOCATION_MZONE,nil,c) g2=Duel.GetMatchingGroup(c13455674.matfilter2,tp,LOCATION_MZONE,LOCATION_MZONE,nil,c)
end end
local pe=Duel.IsPlayerAffectedByEffect(tp,EFFECT_MUST_BE_SMATERIAL) local pe=Duel.IsPlayerAffectedByEffect(tp,EFFECT_MUST_BE_SMATERIAL)
local lv=c:GetLevel() local lv=c:GetLevel()
local pg=Group.CreateGroup()
local ct=2
if tuner then if tuner then
local tlv=tuner:GetSynchroLevel(c) pg:AddCard(tuner)
if lv-tlv<=0 then return false end ct=ct-1
if not pe then
return g1:IsExists(c13455674.synfilter2,1,nil,c,lv-tlv,g2)
else
return c13455674.synfilter2(pe:GetOwner(),c,lv-tlv,g2)
end
end end
if not pe then if pe then
return g1:IsExists(c13455674.synfilter,1,nil,c,lv,g2) pg:AddCard(pe:GetOwner())
else ct=ct-1
return c13455674.synfilter(pe:GetOwner(),c,lv,g2)
end end
return g2:IsExists(c13455674.synfilter,1,nil,c,lv,g1,pg,ct)
end end
function c13455674.syntg(e,tp,eg,ep,ev,re,r,rp,chk,c,tuner,mg) function c13455674.synop(e,tp,eg,ep,ev,re,r,rp,c,tuner,mg)
local g=Group.CreateGroup() local g=Group.CreateGroup()
local g1=nil local g1=nil
local g2=nil local g2=nil
if mg then if mg then
g1=mg:Filter(c13455674.matfilter2,nil,c) g1=mg:Filter(c13455674.matfilter1,nil,c)
g2=mg:Filter(c13455674.matfilter1,nil,c) g2=mg:Filter(c13455674.matfilter2,nil,c)
else else
g1=Duel.GetMatchingGroup(c13455674.matfilter2,tp,LOCATION_MZONE,LOCATION_MZONE,nil,c) g1=Duel.GetMatchingGroup(c13455674.matfilter1,tp,LOCATION_MZONE,LOCATION_MZONE,nil,c)
g2=Duel.GetMatchingGroup(c13455674.matfilter1,tp,LOCATION_MZONE,LOCATION_MZONE,nil,c) g2=Duel.GetMatchingGroup(c13455674.matfilter2,tp,LOCATION_MZONE,LOCATION_MZONE,nil,c)
end end
local pe=Duel.IsPlayerAffectedByEffect(tp,EFFECT_MUST_BE_SMATERIAL) local pe=Duel.IsPlayerAffectedByEffect(tp,EFFECT_MUST_BE_SMATERIAL)
local lv=c:GetLevel() local lv=c:GetLevel()
local ct=2
if tuner then if tuner then
g:AddCard(tuner) g:AddCard(tuner)
local lv1=tuner:GetSynchroLevel(c) ct=ct-1
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SMATERIAL) end
local m1=g1:FilterSelect(tp,c13455674.synfilter2,1,1,nil,c,lv-lv1,g2) if pe then
local lv2=m1:GetFirst():GetSynchroLevel(c) local pc=pe:GetOwner()
local m2=g2:SelectWithSumEqual(tp,Card.GetSynchroLevel,lv-lv1-lv2,1,63,c)
g:Merge(m1)
g:Merge(m2)
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SMATERIAL)
local tuner=nil
if not pe then
local t1=g1:FilterSelect(tp,c13455674.synfilter,1,1,nil,c,lv,g2)
tuner=t1:GetFirst()
else
tuner=pe:GetOwner()
Group.FromCards(tuner):Select(tp,1,1,nil)
end
g:AddCard(tuner)
local lv1=tuner:GetSynchroLevel(c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SMATERIAL) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SMATERIAL)
local m2=g2:SelectWithSumEqual(tp,Card.GetSynchroLevel,lv-lv1,2,63,c) Group.FromCards(pc):Select(tp,1,1,nil)
g:Merge(m2) g:AddCard(pc)
ct=ct-1
end end
if g then Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SMATERIAL)
g:KeepAlive() local m2=g2:FilterSelect(tp,c13455674.synfilter,1,1,nil,c,lv,g1,g,ct)
e:SetLabelObject(g) g:Merge(m2)
return true Duel.SetSelectedCard(g)
else return false end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SMATERIAL)
end local m1=g1:SelectWithSumEqual(tp,Card.GetSynchroLevel,lv,ct,63,c)
function c13455674.synop(e,tp,eg,ep,ev,re,r,rp,c,tuner,mg) g:Merge(m1)
local g=e:GetLabelObject()
c:SetMaterial(g) c:SetMaterial(g)
Duel.SendtoGrave(g,REASON_MATERIAL+REASON_SYNCHRO) Duel.SendtoGrave(g,REASON_MATERIAL+REASON_SYNCHRO)
g:DeleteGroup()
end end
function c13455674.rmcon(e,tp,eg,ep,ev,re,r,rp) function c13455674.rmcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetSummonType()==SUMMON_TYPE_SYNCHRO return e:GetHandler():GetSummonType()==SUMMON_TYPE_SYNCHRO
......
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