--Automate ID local s,id=GetID() function s.initial_effect(c) c:SetUniqueOnField(1,0,id) --Activate local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetCode(EVENT_FREE_CHAIN) c:RegisterEffect(e1) --draw local e2=Effect.CreateEffect(c) e2:SetCategory(CATEGORY_DRAW) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e2:SetProperty(EFFECT_FLAG_DELAY) e2:SetCode(EVENT_SPSUMMON_SUCCESS) e2:SetRange(LOCATION_SZONE) e2:SetCondition(s.condition) e2:SetCost(s.cost) e2:SetTarget(s.target) e2:SetOperation(s.operation) c:RegisterEffect(e2) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_FIELD) e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) e2:SetProperty(EFFECT_FLAG_SET_AVAILABLE) e2:SetRange(LOCATION_SZONE) e2:SetTargetRange(LOCATION_ONFIELD,0) e2:SetTarget(s.indes) e2:SetValue(1) c:RegisterEffect(e2) --lv change local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(70908596,0)) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_SZONE) e1:SetCountLimit(2) e1:SetTarget(s.target1) e1:SetOperation(s.operation1) c:RegisterEffect(e1) end function s.cfilter(c,tp) return c:IsAttribute(ATTRIBUTE_WATER) and c:IsSummonType(SUMMON_TYPE_XYZ) end function s.condition(e,tp,eg,ep,ev,re,r,rp) return eg:IsExists(s.cfilter,1,nil,tp) and re and re:GetHandler():IsSetCard(0x95) end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.CheckLPCost(tp,1000) end Duel.PayLPCost(tp,1000) end function s.thfilter(c) return (c:IsSetCard(0x95) or (c:IsAttribute(ATTRIBUTE_WATER) and c:GetLevel()<=5 and c:IsType(TYPE_MONSTER))) and c:IsAbleToHand() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) end function s.operation(e,tp,eg,ep,ev,re,r,rp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) local g=Duel.SelectMatchingCard(tp,s.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 function s.indes(e,c) local tp=e:GetHandlerPlayer() if not (Duel.GetLP(tp)>Duel.GetLP(1-tp)) then return end return c:IsSetCard(0x6969) or (c:IsAttribute(ATTRIBUTE_WATER) and c:IsType(TYPE_XYZ)) and c:IsFaceup() end function s.filter(c) return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_WATER) and c:GetLevel()>0 end function s.target1(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_MZONE) and s.filter(chkc) end if chk==0 then return Duel.IsExistingTarget(s.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) local g=Duel.SelectTarget(tp,s.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) local tc=g:GetFirst() local op=0 if tc:IsLevel(1) then op=Duel.SelectOption(tp,aux.Stringid(70908596,1)) else op=Duel.SelectOption(tp,aux.Stringid(70908596,1),aux.Stringid(70908596,2)) end e:SetLabel(op) end function s.operation1(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() local tc=Duel.GetFirstTarget() if tc:IsFaceup() and tc:IsRelateToEffect(e) then local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_SINGLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetCode(EFFECT_UPDATE_LEVEL) e1:SetReset(RESET_EVENT+RESETS_STANDARD) if e:GetLabel()==0 then e1:SetValue(1) else e1:SetValue(-1) end tc:RegisterEffect(e1) end end