--Paintress Uccelliami local s,id=GetID() function s.initial_effect(c) --pendulum summon aux.EnablePendulumAttribute(c) local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_TOHAND) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e1:SetProperty(EFFECT_FLAG_DELAY) e1:SetCode(EVENT_DESTROYED) e1:SetRange(LOCATION_PZONE) e1:SetCountLimit(1,id) e1:SetCondition(s.thcon) e1:SetTarget(s.thtg) e1:SetOperation(s.thop) c:RegisterEffect(e1) --indes local e4=Effect.CreateEffect(c) e4:SetType(EFFECT_TYPE_FIELD) e4:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET) e4:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) e4:SetRange(LOCATION_PZONE) e4:SetTargetRange(LOCATION_MZONE,0) e4:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0xc50)) e4:SetValue(aux.tgoval) c:RegisterEffect(e4) end function s.cfilter(c,tp) return c:IsReason(REASON_EFFECT) and c:IsPreviousControler(tp) and c:IsPreviousLocation(LOCATION_ONFIELD) end function s.thcon(e,tp,eg,ep,ev,re,r,rp) return eg:IsExists(s.cfilter,1,nil,tp) end function s.thfilter(c) return c:IsSetCard(0xc50) and c:IsFaceup() and c:IsAbleToHand() and not c:IsCode(id) end function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_GRAVE+LOCATION_EXTRA,0,1,nil) end Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE+LOCATION_EXTRA) end function s.thop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if not c:IsRelateToEffect(e) or Duel.Destroy(c,REASON_EFFECT)==0 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_EXTRA,0,1,1,nil) if #g>0 then Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end end