Commit 71b8fabe authored by nekrozar's avatar nekrozar Committed by VanillaSalt

new (#870)

parent 704d3eec
--リンク・ディサイプル
function c32995276.initial_effect(c)
--link summon
c:EnableReviveLimit()
aux.AddLinkProcedure(c,c32995276.matfilter,1,1)
--draw
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(32995276,0))
e1:SetCategory(CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,32995276)
e1:SetCost(c32995276.cost)
e1:SetTarget(c32995276.target)
e1:SetOperation(c32995276.operation)
c:RegisterEffect(e1)
end
function c32995276.matfilter(c)
return c:IsLevelBelow(4) and c:IsRace(RACE_CYBERS)
end
function c32995276.cfilter(c,g)
return g:IsContains(c)
end
function c32995276.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local lg=e:GetHandler():GetLinkedGroup()
if chk==0 then return Duel.CheckReleaseGroup(tp,c32995276.cfilter,1,nil,lg) end
local g=Duel.SelectReleaseGroup(tp,c32995276.cfilter,1,1,nil,lg)
Duel.Release(g,REASON_COST)
end
function c32995276.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(1)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function c32995276.operation(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
if Duel.Draw(p,d,REASON_EFFECT)==0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToDeck,tp,LOCATION_HAND,0,1,1,nil)
if g:GetCount()>0 then
Duel.BreakEffect()
Duel.SendtoDeck(g,nil,1,REASON_EFFECT)
end
end
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