--created by LeonDuvall, coded by Lyris --Exodice Feesh local s,id,o=GetID() function s.initial_effect(c) aux.EnableUnionAttribute(c,aux.FilterBoolFunction(Card.IsAttribute,ATTRIBUTE_WATER)) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e2:SetCode(EVENT_SPSUMMON_SUCCESS) e2:HOPT() e2:SetProperty(EFFECT_FLAG_DELAY) e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_EQUIP+CATEGORY_DRAW) e2:SetTarget(s.sqtg) e2:SetOperation(s.sqop) c:RegisterEffect(e2) local e2=Effect.CreateEffect(c) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) e2:SetCode(EVENT_LEAVE_FIELD) e2:SetCategory(CATEGORY_DAMAGE+CATEGORY_SPECIAL_SUMMON) e2:SetCondition(s.spcon) e2:SetTarget(s.sptg) e2:SetOperation(s.spop) c:RegisterEffect(e2) end function s.filter(c) return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_WATER) end function s.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) local c=e:GetHandler() if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.filter(chkc) and chkc~=c end if chk==0 then return c:GetFlagEffect(id)<1 and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 and Duel.IsExistingTarget(s.filter,tp,LOCATION_MZONE,0,1,c) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) Duel.SetOperationInfo(0,CATEGORY_EQUIP,Duel.SelectTarget(tp,s.filter,tp,LOCATION_MZONE,0,1,1,c),1,0,0) c:RegisterFlagEffect(id,RESET_EVENT+0x7e0000+RESET_PHASE+PHASE_END,0,1) end function s.eqreg(c,tc) local e1=Effect.CreateEffect(c) e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_SZONE) e1:SetTarget(s.spstg) e1:SetOperation(s.spsop) e1:SetReset(RESET_EVENT+RESETS_STANDARD) c:RegisterEffect(e1) local e4=Effect.CreateEffect(c) e4:SetType(EFFECT_TYPE_SINGLE) e4:SetCode(EFFECT_EQUIP_LIMIT) e4:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e4:SetValue(s.eqlimit) e4:SetReset(RESET_EVENT+RESETS_STANDARD) e4:SetLabelObject(tc) c:RegisterEffect(e4) end function s.eqop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() local tc=Duel.GetFirstTarget() if not c:IsRelateToChain() or c:IsFacedown() then return end if not tc:IsRelateToChain() or tc:IsFacedown() then Duel.SendtoGrave(c,REASON_EFFECT) return end if not Duel.Equip(tp,c,tc,false) then return end s.eqreg(c,tc) end function s.eqlimit(e,c) return c==e:GetLabelObject() end function s.spstg(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() if chk==0 then return c:GetFlagEffect(id)<1 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and c:IsCanBeSpecialSummoned(e,0,tp,true,false) end Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0) c:RegisterFlagEffect(id,RESET_EVENT+0x7e0000+RESET_PHASE+PHASE_END,0,1) end function s.spsop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if c:IsRelateToChain() then Duel.SpecialSummon(c,0,tp,tp,true,false,POS_FACEUP) end end function s.sfilter(c,e,tp) return c:IsSetCard(0xd18) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end function s.sqtg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 and Duel.IsExistingMatchingCard(s.sfilter,tp,LOCATION_HAND,0,1,nil,e,tp) and Duel.IsPlayerCanDraw(tp,1) end Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) Duel.SetOperationInfo(0,CATEGORY_EQUIP,nil,1,tp,0) Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) end function s.sqop(e,tp,eg,ep,ev,re,r,rp) if Duel.GetLocationCount(tp,LOCATION_MZONE)<1 then return end local c=e:GetHandler() Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) local tc=Duel.SelectMatchingCard(tp,s.sfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp):GetFirst() if not (tc and Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)>0 and Duel.Equip(tp,c,tc)) then return end s.eqreg(e,tp) Duel.BreakEffect() Duel.Draw(tp,1,REASON_EFFECT) end function s.spcon(e,tp,eg,ep,ev,re,r,rp) return rp==1-tp end function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return true end Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,100) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) end function s.sfilter(c,e,tp) return c:IsSetCard(0xd18) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and not c:IsCode(id) end function s.spop(e,tp) if Duel.Damage(1-tp,100,REASON_EFFECT)<1 or Duel.GetLocationCount(tp,LOCATION_MZONE)<1 then return end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.SpecialSummon(Duel.SelectMatchingCard(tp,s.sfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp),0,tp,tp,false,false,POS_FACEUP) end