--created by Xeno, coded by Lyris local s,id=GetID() function s.initial_effect(c) c:EnableReviveLimit() aux.AddSynchroProcedure(c,aux.FilterBoolFunction(Card.IsAttribute,ATTRIBUTE_WATER),aux.NonTuner(Card.IsAttribute,ATTRIBUTE_WATER),1) local e1=Effect.CreateEffect(c) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetCountLimit(1,id) e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN) e1:SetLabel(0) e1:SetCost(s.cost) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e2:SetCode(EVENT_TO_GRAVE) e2:SetCountLimit(1,id+6) e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY) e2:SetCategory(CATEGORY_DRAW+CATEGORY_HANDES) e2:SetCondition(function(e) return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) end) e2:SetCost(s.dcost) e2:SetTarget(s.dtg) e2:SetOperation(s.dop) c:RegisterEffect(e2) end function s.cfilter(c) return c:IsLevelAbove(5) and c:IsAttribute(ATTRIBUTE_WATER) end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) e:SetLabel(1) if chk==0 then return Duel.CheckReleaseGroup(tp,s.cfilter,1,nil) end Duel.Release(Duel.SelectReleaseGroup(tp,s.cfilter,1,1,nil),REASON_COST) end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) local ft=e:GetLabel()==1 and -1 or 0 if chk==0 then e:SetLabel(0) return Duel.GetLocationCount(tp,LOCATION_MZONE)>ft and Duel.IsPlayerCanSpecialSummonMonster(tp,id//100,0,0x4011,1200,800,3,RACE_SEASERPENT,ATTRIBUTE_WATER) end Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0) end function s.operation(e,tp,eg,ep,ev,re,r,rp) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) if ft>2 then ft=2 end if ft<=0 or not Duel.IsPlayerCanSpecialSummonMonster(tp,id//100,0,0x4011,1200,800,3,RACE_SEASERPENT,ATTRIBUTE_WATER) then return end local ctn=true while ft>0 and ctn do Duel.SpecialSummonStep(Duel.CreateToken(tp,id//100),0,tp,tp,false,false,POS_FACEUP) ft=ft-1 if ft<=0 or not Duel.SelectYesNo(tp,aux.Stringid(id//100,0)) then ctn=false end end Duel.SpecialSummonComplete() end function s.dfilter(c) return c:IsAttribute(ATTRIBUTE_WATER) and c:IsAbleToRemoveAsCost() end function s.dcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return aux.bfgcost(e,tp,eg,ep,ev,re,r,rp,0) and Duel.IsExistingMatchingCard(aux.Tuner(s.dfilter),tp,LOCATION_GRAVE,0,1,e:GetHandler()) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) Duel.Remove(Duel.SelectMatchingCard(tp,aux.Tuner(s.dfilter),tp,LOCATION_GRAVE,0,1,1,e:GetHandler())+e:GetHandler(),POS_FACEUP,REASON_COST) end function s.dtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsPlayerCanDraw(tp,2) end Duel.SetTargetPlayer(tp) Duel.SetTargetParam(2) Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,2) Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,0,tp,1) end function s.dop(e,tp,eg,ep,ev,re,r,rp) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) if Duel.Draw(p,d,REASON_EFFECT)==2 then Duel.ShuffleHand(p) Duel.BreakEffect() Duel.DiscardHand(p,nil,1,1,REASON_EFFECT+REASON_DISCARD) end end