function c81493156.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCost(c81493156.cost)
e1:SetTarget(c81493156.target)
e1:SetOperation(c81493156.operation)
c:RegisterEffect(e1)
end
function c81493156.cfilter(c)
return c:IsCode(86445415) and c:IsAbleToDeckAsCost() and return c:IsCode(13839120) and c:IsAbleToDeckAsCost() and return c:IsCode(41172955) and c:IsAbleToDeckAsCost() end
function c81493156.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return if chk==0 then return Duel.GetFlagEffect(tp,81493156)==0 and Duel.IsExistingMatchingCard(c81493156.cfilter,tp,LOCATION_GRAVE,0,1,nil)
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,c81493156.cfilter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.SendtoDeck(g,nil,2,REASON_COST)
Duel.RegisterFlagEffect(tp,81493156,RESET_PHASE+PHASE_END,EFFECT_FLAG_OATH,1)
end
function c81493156.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 c81493156.operation(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Draw(p,d,REASON_EFFECT)
end
Man, I really hope I didn't turn your card into a trap card....
Anyway, I'm really not sure how to script the "return to deck" part, so I simpy set 3 returns in the filter... I hope it's correct... Better try the card out before you thank me^^°