--Seatector Brigadier --Keddy was here~ local cod,id=GetID() function cod.initial_effect(c) aux.EnableUnionAttribute(c,cod.eqlimit) --Equip local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetCategory(CATEGORY_EQUIP) e1:SetType(EFFECT_TYPE_IGNITION) e1:SetRange(LOCATION_MZONE) e1:SetTarget(cod.eqtg) e1:SetOperation(cod.eqop) c:RegisterEffect(e1) --Unequip local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,1)) e2:SetCategory(CATEGORY_SPECIAL_SUMMON) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_SZONE) e2:SetTarget(cod.sptg) e2:SetOperation(cod.spop) c:RegisterEffect(e2) --Destroy local e5=Effect.CreateEffect(c) e5:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) e5:SetCategory(CATEGORY_DESTROY) e5:SetCode(EVENT_BATTLE_START) e5:SetRange(LOCATION_SZONE) e5:SetCondition(cod.descon) e5:SetTarget(cod.destg) e5:SetOperation(cod.desop) c:RegisterEffect(e5) --Equip 2 local e6=Effect.CreateEffect(c) e6:SetDescription(aux.Stringid(id,2)) e6:SetCategory(CATEGORY_TOHAND+CATEGORY_EQUIP+CATEGORY_GRAVE_ACTION) e6:SetType(EFFECT_TYPE_IGNITION) e6:SetProperty(EFFECT_FLAG_CARD_TARGET) e6:SetRange(LOCATION_MZONE) e6:SetCountLimit(1,id) e6:SetTarget(cod.eqtg2) e6:SetOperation(cod.eqop2) c:RegisterEffect(e6) --Special Summon 2 local e7=Effect.CreateEffect(c) e7:SetDescription(aux.Stringid(id,3)) e7:SetCategory(CATEGORY_SPECIAL_SUMMON) e7:SetType(EFFECT_TYPE_IGNITION) e7:SetRange(LOCATION_HAND) e7:SetCost(cod.spcost) e7:SetTarget(cod.sptg2) e7:SetOperation(cod.spop) c:RegisterEffect(e7) end --Equip function cod.filter(c) local ct1,ct2=c:GetUnionCount() return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_WATER) and ct2==0 end function cod.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 cod.filter(chkc) end if chk==0 then return e:GetHandler():GetFlagEffect(id)==0 and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 and Duel.IsExistingTarget(cod.filter,tp,LOCATION_MZONE,0,1,c) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) local g=Duel.SelectTarget(tp,cod.filter,tp,LOCATION_MZONE,0,1,1,c) Duel.SetOperationInfo(0,CATEGORY_EQUIP,g,1,0,0) c:RegisterFlagEffect(id,RESET_EVENT+0x7e0000+RESET_PHASE+PHASE_END,0,1) end function cod.eqop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() local tc=Duel.GetFirstTarget() if not c:IsRelateToEffect(e) or c:IsFacedown() then return end if not tc:IsRelateToEffect(e) or not cod.filter(tc) then Duel.SendtoGrave(c,REASON_EFFECT) return end if not Duel.Equip(tp,c,tc,false) then return end aux.SetUnionState(c) end --Special Summon function cod.sptg(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() if chk==0 then return c:GetFlagEffect(id)==0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and e:GetHandler():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 cod.spop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if not c:IsRelateToEffect(e) then return end if Duel.SpecialSummon(c,0,tp,tp,true,false,POS_FACEUP)==0 and Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 and c:IsCanBeSpecialSummoned(e,0,tp,true,false) then Duel.SendtoGrave(c,REASON_RULE) end end --Replace Value function cod.repval(e,re,r,rp) return bit.band(r,REASON_BATTLE)~=0 or bit.band(r,REASON_EFFECT)~=0 end --Equip Limit function cod.eqlimit(e,c) return (c:IsAttribute(ATTRIBUTE_WATER) or e:GetHandler():GetEquipTarget()==c) end --Destroy function cod.descon(e,tp,eg,ep,ev,re,r,rp) local tg=e:GetHandler():GetEquipTarget() return tg and (Duel.GetAttacker()==tg or Duel.GetAttackTarget()==tg) end function cod.destg(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() local tc=c:GetEquipTarget():GetBattleTarget() if chk==0 then return tc and tc:IsControler(1-tp) end local g=Group.FromCards(tc,c) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) end function cod.desop(e,tp,eg,ep,ev,re,r,rp) local c=e:GetHandler() if not c:IsRelateToEffect(e) then return end local tc=c:GetEquipTarget():GetBattleTarget() if tc:IsRelateToBattle() then Duel.Destroy(tc,REASON_EFFECT) end end --Swap function cod.ecfilter1(c) return c:IsType(TYPE_EQUIP) and c:IsFaceup() and c:GetEquipTarget() end function cod.ecfilter2(c,tp) return c:IsType(TYPE_MONSTER) and c:IsSetCard(0x33f) and c:CheckUniqueOnField(tp) and not c:IsForbidden() and Duel.IsExistingMatchingCard(cod.mfilter,tp,LOCATION_MZONE,0,1,nil,c) end function cod.mfilter(c,ec) return c:IsFaceup() and aux.CheckUnionEquip(ec,c) and ec:CheckUnionTarget(c) end function cod.eqtg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_SZONE) and chkc:IsControler(tp) and cod.ecfilter1(chkc) end if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 and Duel.IsExistingTarget(cod.ecfilter1,tp,LOCATION_SZONE,0,1,nil,tp) and Duel.IsExistingMatchingCard(cod.ecfilter2,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,tp) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) local g=Duel.SelectTarget(tp,cod.ecfilter1,tp,LOCATION_SZONE,0,1,1,nil,tp) Duel.SetOperationInfo(0,CATEGORY_EQUIP,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE) end function cod.eqop2(e,tp,eg,ep,ev,re,r,rp) local tc=Duel.GetFirstTarget() local eg=Duel.GetMatchingGroup(aux.NecroValleyFilter(cod.ecfilter2),tp,LOCATION_HAND+LOCATION_GRAVE,0,nil,tp) if tc and tc:IsRelateToEffect(e) and Duel.SendtoHand(tc,nil,REASON_EFFECT)>0 and tc:IsLocation(LOCATION_HAND) and eg:GetCount()>0 then Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(id,2)) local eqc=eg:Select(tp,1,1,nil):GetFirst() if not eqc then return end local g=Duel.GetMatchingGroup(cod.mfilter,tp,LOCATION_MZONE,0,nil,eqc) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) local sc=g:Select(tp,1,1,nil):GetFirst() if not sc then return end if not Duel.Equip(tp,eqc,sc) then return end aux.SetUnionState(eqc) end end --Special Summon 2 function cod.cfilter(c) return c:IsSetCard(0x33F) and c:IsDestructable() and c:GetEquipTarget() end function cod.spcost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return Duel.IsExistingMatchingCard(cod.cfilter,tp,LOCATION_SZONE,0,1,nil) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) local g=Duel.SelectMatchingCard(tp,cod.cfilter,tp,LOCATION_SZONE,0,1,1,nil) Duel.Destroy(g,REASON_COST) end function cod.sptg2(e,tp,eg,ep,ev,re,r,rp,chk) local c=e:GetHandler() if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,true,false) end Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0) end