--ピアニッシモ function c400014.initial_effect(c) --activate local e1=Effect.CreateEffect(c) e1:SetCategory(CATEGORY_ATKCHANGE) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetCode(EVENT_FREE_CHAIN) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetHintTiming(TIMING_DAMAGE_STEP) e1:SetCondition(c400014.condition) e1:SetTarget(c400014.target) e1:SetOperation(c400014.activate) e1:SetCountLimit(1,400014+EFFECT_COUNT_CODE_OATH) c:RegisterEffect(e1) end function c400014.condition(e,tp,eg,ep,ev,re,r,rp) return Duel.IsExistingMatchingCard(function(c)return c:IsFaceup() and c:IsSetCard(0x246) end,tp,LOCATION_MZONE,0,1,nil) end function c400014.filter(c) return c:IsFaceup() and c:IsSetCard(0x246) end function c400014.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c400014.filter(chkc) end if chk==0 then return Duel.IsExistingTarget(c400014.filter,tp,LOCATION_MZONE,0,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) Duel.SelectTarget(tp,c400014.filter,tp,LOCATION_MZONE,0,1,1,nil) end function c400014.activate(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() if tc:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsType(TYPE_MONSTER) then local e2=Effect.CreateEffect(e:GetHandler()) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) e2:SetValue(1) e2:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) tc:RegisterEffect(e2) local e3=e2:Clone() e3:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) tc:RegisterEffect(e3) if Duel.IsExistingMatchingCard(c400014.thfilter,tp,LOCATION_DECK,0,1,nil) and Duel.IsExistingMatchingCard(function(c)return c:IsSetCard(0x246) and c:IsType(TYPE_QUICKPLAY) and c:GetCode()~=400014 end,tp,LOCATION_GRAVE,0,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(400013,0)) then Duel.BreakEffect() Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) local g=Duel.SelectMatchingCard(tp,c400014.thfilter,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 end end function c400014.thfilter(c) return c:IsSetCard(0x246) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand() end