--ペイントレディ・カツシカ local cid,id=GetID() function cid.initial_effect(c) c:EnableReviveLimit() aux.AddOrigConjointType(c) aux.EnableConjointAttribute(c,1) aux.AddOrigEvoluteType(c) aux.AddEvoluteProc(c,nil,4,aux.OR(cid.filter1,cid.filter2),1,99) --atk up local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_FIELD) e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetRange(LOCATION_MZONE) e1:SetTargetRange(LOCATION_MZONE,0) e1:SetTarget(cid.tg) e1:SetValue(cid.val) c:RegisterEffect(e1) --to hand local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) e2:SetCategory(CATEGORY_DESTROY+CATEGORY_TOHAND) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetRange(LOCATION_MZONE) e2:SetCost(cid.drcost) e2:SetCountLimit(1,id) e2:SetTarget(cid.destg) e2:SetOperation(cid.desop) c:RegisterEffect(e2) end function cid.thfilter(c) return c:IsFaceup() and c:IsType(TYPE_PENDULUM) and c:IsSetCard(0xc50) and c:IsAbleToHand() end function cid.filter1(c,ec,tp) return c:IsAttribute(ATTRIBUTE_LIGHT) end function cid.filter2(c,ec,tp) return c:IsRace(RACE_FAIRY) end function cid.drcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return e:GetHandler():IsCanRemoveEC(tp,2,REASON_COST) end e:GetHandler():RemoveEC(tp,2,REASON_COST) end function cid.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) local c=e:GetHandler() if chkc then return chkc:IsOnField() and chkc:IsControler(tp) and chkc:IsFaceup() and chkc~=c end if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_ONFIELD,0,1,c) and Duel.IsExistingMatchingCard(cid.thfilter,tp,LOCATION_EXTRA+LOCATION_GRAVE,0,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) local g=Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_ONFIELD,0,1,1,c) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_EXTRA+LOCATION_GRAVE) end function cid.desop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() local tc=Duel.GetFirstTarget() if tc:IsRelateToEffect(e) and Duel.Destroy(tc,REASON_EFFECT)~=0 then Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) local g=Duel.SelectMatchingCard(tp,cid.thfilter,tp,LOCATION_EXTRA+LOCATION_GRAVE,0,1,1,nil) if g:GetCount()>0 then Duel.BreakEffect() Duel.SendtoHand(g,tp,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_FIELD) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) e1:SetTargetRange(1,0) e1:SetTarget(cid.sumlimit) e1:SetReset(RESET_PHASE+PHASE_END) Duel.RegisterEffect(e1,tp) end end end function cid.sumlimit(e,c,sump,sumtype,sumpos,targetp) return c:IsLocation(LOCATION_EXTRA) and not ( c:IsSetCard(0xc50) or not c:IsType(TYPE_EFFECT)) end function cid.tg(e,c) return c:IsSetCard(0xc50) end function cid.filter(c) return c:IsFaceup() and c:IsType(TYPE_PENDULUM) and not c:IsType(TYPE_EFFECT) end function cid.val(e,c) return Duel.GetMatchingGroupCount(cid.filter,c:GetControler(),LOCATION_EXTRA,0,nil)*100 end