--Majestic Feather function c249000787.initial_effect(c) --Activate local e1=Effect.CreateEffect(c) e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetCode(EVENT_FREE_CHAIN) e1:SetTarget(c249000787.target) e1:SetOperation(c249000787.activate) c:RegisterEffect(e1) --negate attack local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(82593786,0)) e2:SetType(EFFECT_TYPE_QUICK_O) e2:SetCode(EVENT_FREE_CHAIN) e2:SetHintTiming(TIMING_BATTLE_PHASE) e2:SetRange(LOCATION_GRAVE) e2:SetCountLimit(1,82593786+EFFECT_COUNT_CODE_DUEL) e2:SetCondition(c249000787.condition) e2:SetCost(aux.bfgcost) e2:SetOperation(c249000787.operation) c:RegisterEffect(e2) end function c249000787.filter(c) return c:IsSetCard(0x103F) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand() end function c249000787.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(c249000787.filter,tp,LOCATION_DECK,0,1,nil) end Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) end function c249000787.activate(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) local g=Duel.SelectMatchingCard(tp,c249000787.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 function c249000787.condition(e,tp,eg,ep,ev,re,r,rp) return Duel.GetAttacker()~=nil end function c249000787.operation(e,tp,eg,ep,ev,re,r,rp) Duel.NegateAttack() end