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

520

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