--霊水鳥シレーヌ・オルカ function c405110.initial_effect(c) --lv local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(405110,0)) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e1:SetCode(EVENT_SPSUMMON_SUCCESS) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetCountLimit(1,405110) e1:SetTarget(c405110.lvtg) e1:SetOperation(c405110.lvop) c:RegisterEffect(e1) local e2=e1:Clone() e2:SetCode(EVENT_SUMMON_SUCCESS) c:RegisterEffect(e2) local e3=Effect.CreateEffect(c) e3:SetDescription(aux.Stringid(405110,1)) e3:SetCategory(CATEGORY_DISABLE) e3:SetType(EFFECT_TYPE_QUICK_O) e3:SetRange(LOCATION_GRAVE) e3:SetProperty(EFFECT_FLAG_CARD_TARGET) e3:SetCode(EVENT_FREE_CHAIN) e3:SetCondition(c405110.negcon) e3:SetCost(c405110.negcost) e3:SetTarget(c405110.target) e3:SetOperation(c405110.activate) c:RegisterEffect(e3) end function c405110.lvfilter(c) return c:IsFaceup() and c:IsSetCard(0x55) or c:IsSetCard(0x7b) end function c405110.lvtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and c405110.lvfilter(chkc) end if chk==0 then return Duel.IsExistingTarget(c405110.lvfilter,tp,LOCATION_MZONE,0,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) Duel.SelectTarget(tp,c405110.lvfilter,tp,LOCATION_MZONE,0,1,1,nil) end function c405110.lvfilter2(c) return c:IsFaceup() and c:IsSetCard(0x55) or c:IsSetCard(0x7b) and not c:IsType(TYPE_XYZ) end function c405110.lvop(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() if not tc:IsRelateToEffect(e) or tc:IsFacedown() then return end local g=Duel.GetMatchingGroup(c405110.lvfilter2,tp,LOCATION_MZONE,0,tc) local lc=g:GetFirst() local lv=tc:GetLevel() while lc~=nil do local e1=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_CHANGE_LEVEL) e1:SetValue(lv) e1:SetReset(RESET_EVENT+0x1fe0000) lc:RegisterEffect(e1) lc=g:GetNext() end local e2=Effect.CreateEffect(e:GetHandler()) e2:SetType(EFFECT_TYPE_FIELD) e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e2:SetTargetRange(1,0) e2:SetTarget(c405110.splimit) e2:SetReset(RESET_PHASE+PHASE_END) Duel.RegisterEffect(e2,tp) end function c405110.splimit(e,c) return not c:IsSetCard(0x107b) end function c405110.negcon(e,tp,eg,ep,ev,re,r,rp) local ph=Duel.GetCurrentPhase() return aux.exccon(e) and ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE end function c405110.negcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST) end function c405110.cfilter(c) return c:IsFaceup() and c:IsType(TYPE_EFFECT) and not c:IsDisabled() end function c405110.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and c405110.cfilter(chkc) end if chk==0 then return Duel.IsExistingTarget(c405110.cfilter,tp,0,LOCATION_MZONE,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) Duel.SelectTarget(tp,c405110.cfilter,tp,0,LOCATION_MZONE,1,1,nil) end function c405110.activate(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() local tc=Duel.GetFirstTarget() if tc:IsRelateToEffect(e) and tc:IsFaceup() and not tc:IsDisabled() and tc:IsControler(1-tp) and tc:IsType(TYPE_EFFECT) then Duel.NegateRelatedChain(tc,RESET_TURN_SET) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_DISABLE) e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_BATTLE) tc:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE) e2:SetCode(EFFECT_DISABLE_EFFECT) e2:SetValue(RESET_TURN_SET) e2:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_BATTLE) tc:RegisterEffect(e2) end end