--Seatector Biomech --Keddy was here~ local cod,id=GetID() function cod.initial_effect(c) --Synchro Summon c:EnableReviveLimit() aux.AddSynchroProcedure(c,aux.FilterBoolFunction(Card.IsAttribute,ATTRIBUTE_WATER),aux.NonTuner(Card.IsAttribute,ATTRIBUTE_WATER),1) --Equip local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(id,0)) e1:SetCategory(CATEGORY_EQUIP+CATEGORY_TOHAND+CATEGORY_GRAVE_ACTION) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e1:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL) e1:SetCode(EVENT_SPSUMMON_SUCCESS) e1:SetCountLimit(1,id) e1:SetCondition(cod.eqcon) e1:SetTarget(cod.eqtg) e1:SetOperation(cod.eqop) c:RegisterEffect(e1) --Add to Hand local e2=Effect.CreateEffect(c) e2:SetDescription(aux.Stringid(id,2)) e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) e2:SetType(EFFECT_TYPE_IGNITION) e2:SetRange(LOCATION_MZONE) e2:SetCountLimit(1,83013278) e2:SetTarget(cod.target) e2:SetOperation(cod.operation) c:RegisterEffect(e2) end --Equip function cod.eqcon(e,tp,eg,ep,ev,re,r,rp) return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO) end function cod.cfilter(c,tp,tc) return c:IsType(TYPE_UNION) and aux.CheckUnionEquip(c,tc) and c:CheckUnionTarget(tc) and c:CheckUniqueOnField(tp) and not c:IsForbidden() end function cod.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and cod.cfilter(chkc,tp,e:GetHandler()) end if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 and Duel.IsExistingTarget(cod.cfilter,tp,LOCATION_GRAVE,0,1,nil,tp,e:GetHandler()) end Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) local g=Duel.SelectTarget(tp,aux.NecroValleyFilter(cod.cfilter),tp,LOCATION_GRAVE,0,1,1,nil,tp,e:GetHandler()) Duel.SetOperationInfo(0,CATEGORY_EQUIP,g,#g,0,0) end function cod.thf(c) return c:IsMonster() and c:IsType(TYPE_UNION) and c:IsAbleToHand() 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 or not tc:IsRelateToEffect(e) or not cod.cfilter(tc,tp,c) then return end if not Duel.Equip(tp,tc,c,false) then return end aux.SetUnionState(tc) local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(cod.thf),tp,LOCATION_GRAVE,0,nil) if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) local sg=g:Select(tp,1,1,nil) if sg:GetCount()==0 then return end Duel.Search(sg,tp) end end --Add to Hand function cod.filter(c) return c:IsAttribute(ATTRIBUTE_WATER) and c:IsType(TYPE_UNION) and c:IsAbleToHand() end function cod.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then local g=Duel.GetMatchingGroup(cod.filter,tp,LOCATION_DECK,0,nil) return g:GetClassCount(Card.GetCode)>=3 end Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,0,LOCATION_DECK) end function cod.operation(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetMatchingGroup(cod.filter,tp,LOCATION_DECK,0,nil) if g:GetClassCount(Card.GetCode)>=3 then Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM) local sg1=g:Select(tp,1,1,nil) g:Remove(Card.IsCode,nil,sg1:GetFirst():GetCode()) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM) local sg2=g:Select(tp,1,1,nil) g:Remove(Card.IsCode,nil,sg2:GetFirst():GetCode()) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM) local sg3=g:Select(tp,1,1,nil) sg1:Merge(sg2) sg1:Merge(sg3) Duel.ConfirmCards(1-tp,sg1) Duel.ShuffleDeck(tp) Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_ATOHAND) local tg=sg1:Select(1-tp,1,1,nil) local tc=tg:GetFirst() Duel.SendtoHand(tc,nil,REASON_EFFECT) end end