Commit 5443d9a2 authored by GuGu's avatar GuGu

Update c20229.lua 更新召唤手续

parent d1da37ef
Pipeline #35284 passed with stage
in 16 seconds
--白玉潇潇✿魂魄妖梦 --白玉潇潇✿魂魄妖梦
function c20229.initial_effect(c) function c20229.initial_effect(c)
--synchro summon --synchro summon
aux.AddSynchroProcedure(c,nil,aux.NonTuner(Card.IsSetCard,0x208),1)
c:EnableReviveLimit() c:EnableReviveLimit()
--synchro summon aux.AddSynchroMixProcedure(c,c20229.matfilter1,nil,nil,c20229.matfilter2,1,99)
local e0=Effect.CreateEffect(c) local e0=Effect.CreateEffect(c)
e0:SetDescription(aux.Stringid(20229,0))
e0:SetType(EFFECT_TYPE_FIELD) e0:SetType(EFFECT_TYPE_FIELD)
e0:SetCode(EFFECT_SPSUMMON_PROC) e0:SetCode(EFFECT_SYNCHRO_LEVEL_EX)
e0:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_IGNORE_IMMUNE) e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_IGNORE_IMMUNE)
e0:SetRange(LOCATION_EXTRA) e0:SetRange(LOCATION_EXTRA)
e0:SetCondition(c20229.spcon) e0:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e0:SetOperation(c20229.spop) e0:SetTarget(c20229.syntg)
e0:SetValue(SUMMON_TYPE_SYNCHRO) e0:SetValue(c20229.synval)
c:RegisterEffect(e0) c:RegisterEffect(e0)
--wan jian gui zong ! --wan jian gui zong !
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
...@@ -38,28 +36,21 @@ function c20229.initial_effect(c) ...@@ -38,28 +36,21 @@ function c20229.initial_effect(c)
e3:SetOperation(c20229.spop2) e3:SetOperation(c20229.spop2)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
function c20229.sprfilter1(c,tp,syn) function c20229.matfilter1(c,syncard)
return c:IsFaceup() and c:IsType(TYPE_TUNER) and c:GetSynchroLevel(syn)==2 return c:IsTuner(syncard) or c:IsType(TYPE_LINK) and c:IsSetCard(0x713)
and Duel.IsExistingMatchingCard(c20229.sprfilter2,tp,LOCATION_MZONE,0,1,c,syn) and c:IsCanBeSynchroMaterial(syn)
end end
function c20229.sprfilter2(c,syn) function c20229.matfilter2(c,syncard)
return c:IsFaceup() and c:IsType(TYPE_LINK) and c:IsSetCard(0x713) return (c:IsNotTuner(syncard) or c:IsType(TYPE_LINK) and c:IsSetCard(0x713)) and c:IsSetCard(0x208)
end end
function c20229.spcon(e,c) function c20229.syntg(e,c)
if c==nil then return true end return c:IsType(TYPE_LINK) and c:IsSetCard(0x713)
local tp=c:GetControler()
return Duel.GetLocationCount(tp,LOCATION_MZONE)>-2
and Duel.IsExistingMatchingCard(c20229.sprfilter1,tp,LOCATION_MZONE,0,1,nil,tp,c)
end end
function c20229.spop(e,tp,eg,ep,ev,re,r,rp,c) function c20229.synval(e,syncard)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) if e:GetHandler()==syncard then
local g1=Duel.SelectMatchingCard(tp,c20229.sprfilter1,tp,LOCATION_MZONE,0,1,1,nil,tp,c) return 4
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) else
local g2=Duel.SelectMatchingCard(tp,c20229.sprfilter2,tp,LOCATION_MZONE,0,1,1,g1,c) return 0
g1:Merge(g2) end
Duel.SendtoGrave(g1,REASON_COST+REASON_SYNCHRO)
c:SetMaterial(g1)
c:CompleteProcedure()
end end
function c20229.cost(e,tp,eg,ep,ev,re,r,rp,chk) function c20229.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end
...@@ -80,12 +71,12 @@ end ...@@ -80,12 +71,12 @@ end
function c20229.eqop(e,tp,eg,ep,ev,re,r,rp) function c20229.eqop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() then if tc:IsRelateToEffect(e) and tc:IsFaceup() then
local sg=Duel.SelectMatchingCard(tp, c20229.eqfilter, tp, LOCATION_SZONE, LOCATION_SZONE, 1, 12, nil, tc) local sg=Duel.SelectMatchingCard(tp, c20229.eqfilter, tp, LOCATION_SZONE, LOCATION_SZONE, 1, 12, nil, tc)
local ec=sg:GetFirst() local ec=sg:GetFirst()
while ec and ec:CheckEquipTarget(tc) do while ec and ec:CheckEquipTarget(tc) do
Duel.Equip(tp,ec,tc) Duel.Equip(tp,ec,tc)
ec=sg:GetNext() ec=sg:GetNext()
end end
end end
end end
function c20229.cfilter2(c) function c20229.cfilter2(c)
......
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