Commit 051472d7 authored by 聖園ミカ's avatar 聖園ミカ 🐟

520

parent d52c8dbd
--守护天使的团结 --守护天使的团结
local m=12017020 local m=12017020
local cm=_G["c"..m] local cm=_G["c"..m]
Duel.LoadScript("c12000000.lua") --Duel.LoadScript("c12017020.lua")
function cm.initial_effect(c) function cm.initial_effect(c)
--activate --activate
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
...@@ -19,29 +19,29 @@ function cm.initial_effect(c) ...@@ -19,29 +19,29 @@ function cm.initial_effect(c)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetType(EFFECT_TYPE_ACTIVATE) e2:SetType(EFFECT_TYPE_ACTIVATE)
e2:SetCode(EVENT_FREE_CHAIN) e2:SetCode(EVENT_FREE_CHAIN)
e2:SetTarget(cm.target) e2:SetTarget(cm.target1)
e2:SetOperation(cm.operation) e2:SetOperation(cm.operation1)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function cm.filter(c,kd) function cm.filter(c)
return c:IsSetCard(0x6fa6) and c:IsType(TYPE_PENDULUM) and not c:IsForbidden() and not c:GetLeftScale()==kd return c:IsSetCard(0x6fa6) and c:IsType(TYPE_PENDULUM) and not c:IsForbidden()
end end
function cm.filter1(c) function cm.filter1(c)
return c:IsSetCard(0x6fa6) and c:IsType(TYPE_PENDULUM) and not c:IsForbidden() and Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_DECK,0,1,c,c:GetLeftScale()) return c:IsSetCard(0x6fa6) and c:IsType(TYPE_PENDULUM) and not c:IsForbidden() and Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_DECK,0,1,c,c:GetLeftScale())
end end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk) function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
local mg if chk==0 then return Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_DECK,0,1,nil) end
if chk==0 then return Duel.IsExistingMatchingCard(cm.filter1,tp,LOCATION_DECK,0,1,nil) and Duel.CheckLocation(tp,LOCATION_PZONE,0) and Duel.CheckLocation(tp,LOCATION_PZONE,1) end Duel.SetOperationInfo(0,CATEGORY_TOEXTRA,nil,1,tp,LOCATION_DECK)
end end
function cm.activate(e,tp,eg,ep,ev,re,r,rp) function cm.activate(e,tp,eg,ep,ev,re,r,rp)
if not (Duel.CheckLocation(tp,LOCATION_PZONE,0) or not Duel.CheckLocation(tp,LOCATION_PZONE,1)) then return end if not (Duel.CheckLocation(tp,LOCATION_PZONE,0) or not Duel.CheckLocation(tp,LOCATION_PZONE,1)) then return end
DDuel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD)
local g1=Duel.SelectMatchingCard(tp,cm.filter1,tp,LOCATION_DECK,0,1,1,nil) local g1=Duel.SelectMatchingCard(tp,cm.filter,tp,LOCATION_DECK,0,1,1,nil)
if g1:GetCount()>0 then if g1:GetCount()>0 then
Duel.MoveToField(g1:GetFirst(),tp,tp,LOCATION_PZONE,POS_FACEUP,true) Duel.MoveToField(g1:GetFirst(),tp,tp,LOCATION_PZONE,POS_FACEUP,true)
end end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD)
local g=Duel.SelectMatchingCard(tp,cm.filter,tp,LOCATION_DECK,0,1,1,nil,g:GetFirst():GetLeftScale()) local g=Duel.SelectMatchingCard(tp,cm.filter1,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.MoveToField(g:GetFirst(),tp,tp,LOCATION_PZONE,POS_FACEUP,true) Duel.MoveToField(g:GetFirst(),tp,tp,LOCATION_PZONE,POS_FACEUP,true)
end end
......
...@@ -52,7 +52,7 @@ function cm.initial_effect(c) ...@@ -52,7 +52,7 @@ function cm.initial_effect(c)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function cm.mfilter(c) function cm.mfilter(c)
return srre.check_set_ALSTYE(c) return srre.check_set_ALSTYE(c) and re:GetHandler():IsCode(12086001,12086002,12086003,12086004)
end end
function cm.spfilter(c,fc,tp) function cm.spfilter(c,fc,tp)
return srre.check_set_ALSTYE(c) and c:IsReleasable() and Duel.GetLocationCountFromEx(tp,tp,c,fc)>0 and c:IsCanBeFusionMaterial(fc,SUMMON_TYPE_SPECIAL) return srre.check_set_ALSTYE(c) and c:IsReleasable() and Duel.GetLocationCountFromEx(tp,tp,c,fc)>0 and c:IsCanBeFusionMaterial(fc,SUMMON_TYPE_SPECIAL)
...@@ -60,10 +60,10 @@ end ...@@ -60,10 +60,10 @@ end
function cm.spcon(e,c) function cm.spcon(e,c)
if c==nil then return true end if c==nil then return true end
local tp=c:GetControler() local tp=c:GetControler()
return Duel.CheckReleaseGroup(REASON_COST,tp,cm.spfilter,1,nil,c,tp) return Duel.CheckReleaseGroup(tp,cm.spfilter,1,nil,c,tp)
end end
function cm.spop(e,tp,eg,ep,ev,re,r,rp,c) function cm.spop(e,tp,eg,ep,ev,re,r,rp,c)
local g=Duel.SelectReleaseGroup(REASON_COST,tp,cm.spfilter,1,1,nil,c,tp) local g=Duel.SelectReleaseGroup(tp,cm.spfilter,1,1,nil,c,tp)
c:SetMaterial(g) c:SetMaterial(g)
Duel.Release(g,REASON_COST) Duel.Release(g,REASON_COST)
c:CompleteProcedure() c:CompleteProcedure()
......
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