--[[ Viravolve Elk Cloner Viravolve Wapiti Clonatore Original Script by: Lyris Rescripted by: XGlitchy30 ]] local s,id=GetID() function s.initial_effect(c) --spsummon local e1=Effect.CreateEffect(c) e1:Desc(0) e1:SetCategory(CATEGORY_SEARCH|CATEGORY_TOHAND) e1:SetType(EFFECT_TYPE_FIELD|EFFECT_TYPE_TRIGGER_O) e1:SetCode(EVENT_DAMAGE) e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP) e1:SetRange(LOCATION_HAND) e1:HOPT() e1:SetCondition(s.condition) e1:SetCost(s.cost) e1:SetTarget(s.target) e1:SetOperation(s.operation) c:RegisterEffect(e1) --damage aux.AddViravolveDamageEffect(c,id) end function s.condition(e,tp,eg,ep,ev,re,r,rp) return ep~=tp end function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return not e:GetHandler():IsPublic() end end function s.filter(c) return c:IsSetCard(ARCHE_VIRAVOLVE) and c:IsAbleToHand() end function s.target(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then local g=Duel.GetMatchingGroup(s.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 s.operation(e,tp,eg,ep,ev,re,r,rp) local g=Duel.GetMatchingGroup(s.filter,tp,LOCATION_DECK,0,nil) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM) local sg1=g:SelectSubGroup(tp,aux.dncheck,false,3,3) if #sg1==3 then Duel.ConfirmCards(1-tp,sg1) Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_ATOHAND) local tg=sg1:Select(1-tp,1,1,nil) if #tg>0 then Duel.SendtoHand(tg,nil,REASON_EFFECT) end Duel.ShuffleDeck(tp) end end