--Chimera Mermaid function c11000520.initial_effect(c) --pendulum summon aux.EnablePendulumAttribute(c) --gain LP local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(11000520,0)) e2:SetCategory(CATEGORY_RECOVER) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_PZONE) e2:SetCountLimit(1) e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetTarget(c11000520.rctg) e2:SetOperation(c11000520.rcop) c:RegisterEffect(e2) --tohand local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(11000520,1)) e3:SetCategory(CATEGORY_TOHAND) e3:SetType(EFFECT_TYPE_IGNITION) e3:SetRange(LOCATION_PZONE) e3:SetCountLimit(1,11000520) e3:SetTarget(c11000520.thtg) e3:SetOperation(c11000520.thop) c:RegisterEffect(e3) --Set a scale local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(11000520,2)) e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e3:SetCode(EVENT_SPSUMMON_SUCCESS) e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY) e3:SetCountLimit(1,11001520) e3:SetTarget(c11000520.pctg) e3:SetOperation(c11000520.pcop) c:RegisterEffect(e3) end function c11000520.rcfilter(c) return c:IsFaceup() and (c:IsSetCard(0x1FD) or c:IsSetCard(0x1F3)) and c:GetAttack()>0 end function c11000520.rctg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and c11000520.rcfilter(chkc) end if chk==0 then return Duel.IsExistingTarget(c11000520.rcfilter,tp,LOCATION_MZONE,0,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) local g=Duel.SelectTarget(tp,c11000520.rcfilter,tp,LOCATION_MZONE,0,1,1,nil) Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,g:GetFirst():GetAttack()) end function c11000520.rcop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() if e:GetHandler():IsRelateToEffect(e) and tc:IsFaceup() and tc:IsRelateToEffect(e) then Duel.Recover(tp,tc:GetAttack(),REASON_EFFECT) end end function c11000520.thfilter(c) return c:IsFaceup() and c:IsSetCard(0x11FD) and c:IsType(TYPE_PENDULUM) and c:IsAbleToHand() end function c11000520.thtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(c11000520.thfilter,tp,LOCATION_EXTRA,0,1,nil) end Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_EXTRA) end function c11000520.thop(e,tp,eg,ep,ev,re,r,rp) if not e:GetHandler():IsRelateToEffect(e) then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) local g=Duel.SelectMatchingCard(tp,c11000520.thfilter,tp,LOCATION_EXTRA,0,1,1,nil) if g:GetCount()>0 then Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,g) end end function c11000520.penfilter(c) return c:IsSetCard(0x11FD) and c:IsType(TYPE_PENDULUM) end function c11000520.pctg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(c11000520.penfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) and (Duel.CheckLocation(tp,LOCATION_PZONE,0) or Duel.CheckLocation(tp,LOCATION_PZONE,1)) end end function c11000520.pcop(e,tp,eg,ep,ev,re,r,rp) if not e:GetHandler():IsRelateToEffect(e) then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD) local g=Duel.SelectMatchingCard(tp,c11000520.penfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil) local tc=g:GetFirst() if tc then Duel.MoveToField(tc,tp,tp,LOCATION_PZONE,POS_FACEUP,true) end end