Commit ef354dba authored by Tianchenglipu's avatar Tianchenglipu

Update c14733538.lua

parent 4bed8e2d
......@@ -10,27 +10,23 @@ function c14733538.initial_effect(c)
e1:SetOperation(c14733538.activate)
c:RegisterEffect(e1)
end
function c14733538.filter1(c,e,tp,b1)
return c:IsSetCard(0xc7) and c:IsType(TYPE_PENDULUM) and not c:IsForbidden()
and (b1 or c:IsCanBeSpecialSummoned(e,0,tp,false,false))
end
function c14733538.filter2(c,e,tp,b1)
return c:IsSetCard(0xda) and c:IsType(TYPE_PENDULUM) and not c:IsForbidden()
function c14733538.filter(c,e,tp,b1,setcode)
return c:IsSetCard(setcode) and c:IsType(TYPE_PENDULUM) and not c:IsForbidden()
and (b1 or c:IsCanBeSpecialSummoned(e,0,tp,false,false))
end
function c14733538.target(e,tp,eg,ep,ev,re,r,rp,chk)
local b1=Duel.CheckLocation(tp,LOCATION_SZONE,6) or Duel.CheckLocation(tp,LOCATION_SZONE,7)
local b2=Duel.GetLocationCount(tp,LOCATION_MZONE)>0
if chk==0 then return (b1 or b2)
and Duel.IsExistingMatchingCard(c14733538.filter1,tp,LOCATION_DECK,0,1,nil,e,tp,b1)
and Duel.IsExistingMatchingCard(c14733538.filter2,tp,LOCATION_DECK,0,1,nil,e,tp,b1) end
and Duel.IsExistingMatchingCard(c14733538.filter,tp,LOCATION_DECK,0,1,nil,e,tp,b1,0xc7)
and Duel.IsExistingMatchingCard(c14733538.filter,tp,LOCATION_DECK,0,1,nil,e,tp,b1,0xda) end
end
function c14733538.activate(e,tp,eg,ep,ev,re,r,rp)
local b1=Duel.CheckLocation(tp,LOCATION_SZONE,6) or Duel.CheckLocation(tp,LOCATION_SZONE,7)
local b2=Duel.GetLocationCount(tp,LOCATION_MZONE)>0
if not b1 and not b2 then return end
local g1=Duel.GetMatchingGroup(c14733538.filter1,tp,LOCATION_DECK,0,nil,e,tp,b1)
local g2=Duel.GetMatchingGroup(c14733538.filter2,tp,LOCATION_DECK,0,nil,e,tp,b1)
local g1=Duel.GetMatchingGroup(c14733538.filter,tp,LOCATION_DECK,0,nil,e,tp,b1,0xc7)
local g2=Duel.GetMatchingGroup(c14733538.filter,tp,LOCATION_DECK,0,nil,e,tp,b1,0xda)
if g1:GetCount()==0 or g2:GetCount()==0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM)
local sg1=g1:Select(tp,1,1,nil)
......
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