--Shya Traveler function c11000504.initial_effect(c) --atklimit local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CANNOT_DIRECT_ATTACK) c:RegisterEffect(e1) --add local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(11000504,0)) e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e2:SetCode(EVENT_TO_GRAVE) e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP) e2:SetCountLimit(1,11000504) e2:SetCondition(c11000504.condition) e2:SetTarget(c11000504.target) e2:SetOperation(c11000504.activate) c:RegisterEffect(e2) end function c11000504.condition(e,tp,eg,ep,ev,re,r,rp) return (e:GetHandler():IsReason(REASON_COST) and (re:GetHandler():IsSetCard(0x1FD) or re:GetHandler():IsCode(11000525))) or ((re:GetHandler():IsSetCard(0x1FD) or re:GetHandler():IsCode(11000525)) and bit.band(r,REASON_EFFECT)~=0) and not e:GetHandler():IsReason(REASON_BATTLE) end function c11000504.filter(c) return c:IsSetCard(0x1FD) and c:IsAbleToHand() end function c11000504.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(c11000504.filter,tp,LOCATION_DECK,0,1,nil) end Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) end function c11000504.activate(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) local g=Duel.SelectMatchingCard(tp,c11000504.filter,tp,LOCATION_DECK,0,1,1,nil) if g:GetCount()>0 then Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end end