diff --git a/src/client/UI/BillboardShops/EggShop.lua b/src/client/UI/BillboardShops/EggShop.lua index f84c63f..f964921 100644 --- a/src/client/UI/BillboardShops/EggShop.lua +++ b/src/client/UI/BillboardShops/EggShop.lua @@ -519,7 +519,7 @@ CollectionService:GetInstanceAddedSignal("EggShop"):Connect(handleShop) local function updateFoundsDisplay(foundPets): () for petName in foundPets do - if petName:match "Evolved" then + if petName:match "Evolved" or petName:match "Shiny" then continue end diff --git a/src/client/UI/Inventories/PetInventory.lua b/src/client/UI/Inventories/PetInventory.lua index 923578b..a9efe30 100644 --- a/src/client/UI/Inventories/PetInventory.lua +++ b/src/client/UI/Inventories/PetInventory.lua @@ -23,7 +23,8 @@ local rarityTemplates = ReplicatedStorage.RarityTemplates local gamepassIDs = ReplicatedStorage.Config.GamepassData.IDs local globalMaxPetEquipCount = ReplicatedStorage.Config.Pets.GlobalMaxPetEquipCount.Value -local evolvedColor = Color3.fromRGB(255, 255, 0) +local evolvedColor = Color3.fromRGB(70, 255, 57) +local shinyColor = Color3.fromRGB(255, 233, 64) local ableToEvolveColor = Color3.fromRGB(0, 229, 255) local unableToEvolveColor = Color3.fromRGB(255, 255, 255) @@ -63,6 +64,12 @@ function PetInventory:_initialize(): () end end + for _, petFolder in ReplicatedStorage.ShinyPets:GetChildren() do + for _, pet in petFolder:GetChildren() do + table.insert(pets, pet) + end + end + table.sort(pets, multiplierComparator) for index, pet in pets do @@ -233,6 +240,8 @@ function PetInventory:Refresh() if petName:match "Evolved" then petTemplate.PetName.TextColor3 = evolvedColor + elseif petName:match "Shiny" then + petTemplate.PetName.TextColor3 = shinyColor end petTemplate.Parent = self._ui.Background.ScrollingFrame @@ -348,7 +357,7 @@ function PetInventory:_setFocusedDisplay() PetName = self._focusedTemplate.PetName.Text, PetImage = self._focusedTemplate.PetImage.Image, Multiplier = pet.Multiplier.Value, - Evolved = pet.Name:match "Evolved", + Shiny = pet.Name:match "Shiny", Quantity = selectors.getOwnedPets(store:getState(), player.Name)[pet.Name], Equipped = self._focusedTemplate.Equipped.Visible, Locked = self._focusedTemplate.Lock.Visible, @@ -370,17 +379,23 @@ function PetInventory:_setFocusedDisplay() self._ui.RightBackground.Multiplier.Text = "x" .. string.format("%.2f", (if details.Multiplier < 1 then details.Multiplier + 1 else details.Multiplier)) - if details.Evolved then - self._ui.RightBackground.PetName.TextColor3 = evolvedColor - self._ui.RightBackground.Evolve.ImageColor3 = evolvedColor - self._ui.RightBackground.Evolve.EvolveText.Text = "Evolved" + if details.Shiny then + self._ui.RightBackground.PetName.TextColor3 = shinyColor + self._ui.RightBackground.Evolve.ImageColor3 = shinyColor + self._ui.RightBackground.Evolve.EvolveText.Text = "Max Evolved" else local amountToEvolve = 5 if selectors.getRebirthUpgradeLevel(store:getState(), player.Name, "Evolver") > 0 then amountToEvolve = 4 end + if details.PetName:match "Evolved" then + self._ui.RightBackground.PetName.TextColor3 = evolvedColor + self._ui.RightBackground.Evolve.ImageColor3 = evolvedColor + amountToEvolve = 3 + else + self._ui.RightBackground.PetName.TextColor3 = unableToEvolveColor + end self._ui.RightBackground.Evolve.EvolveText.Text = `Evolve ({details.Quantity}/{amountToEvolve})` - self._ui.RightBackground.PetName.TextColor3 = unableToEvolveColor if details.Quantity >= amountToEvolve then self._ui.RightBackground.Evolve.ImageColor3 = ableToEvolveColor else @@ -443,7 +458,7 @@ function PetInventory:_setFocusedDisplay() end end)) - if details.Evolved then + if details.Shiny then return end @@ -453,6 +468,9 @@ function PetInventory:_setFocusedDisplay() if selectors.getRebirthUpgradeLevel(store:getState(), player.Name, "Evolver") > 0 then amountToEvolve = 4 end + if details.PetName:match "Evolved" then + amountToEvolve = 3 + end if details.Quantity >= amountToEvolve then Remotes.Client:Get("EvolvePet"):SendToServer(details.PetName) self:_clearFocusedDisplay() diff --git a/src/server/Combat/Perks/Pets.lua b/src/server/Combat/Perks/Pets.lua index 537bd2c..716f183 100644 --- a/src/server/Combat/Perks/Pets.lua +++ b/src/server/Combat/Perks/Pets.lua @@ -19,7 +19,11 @@ local function evolvePet(player, petName) amountToDeduct = 4 end - if not petOwnedCount or petOwnedCount < amountToDeduct or petName:match "Evolved" then + if petName:match "Evolved" then + amountToDeduct = 3 + end + + if not petOwnedCount or petOwnedCount < amountToDeduct or petName:match "Shiny" then return 1 end @@ -38,10 +42,18 @@ local function evolvePet(player, petName) end store:dispatch(actions.deletePlayerPets(player.Name, { [petName] = amountToDeduct }, true)) - store:dispatch(actions.givePlayerPets(player.Name, { ["Evolved " .. petName] = 1 })) + + local newPetName = petName + if petName:match "Evolved" then + newPetName = petName:gsub("Evolved", "Shiny") + else + newPetName = "Evolved " .. petName + end + + store:dispatch(actions.givePlayerPets(player.Name, { [newPetName] = 1 })) if petUtils.getPet(petName):FindFirstChild "PermaLock" then - store:dispatch(actions.lockPlayerPets(player.Name, { ["Evolved " .. petName] = 1 })) + store:dispatch(actions.lockPlayerPets(player.Name, { [newPetName] = 1 })) end return 0 diff --git a/src/shared/Utils/Player/PetUtils.lua b/src/shared/Utils/Player/PetUtils.lua index c4c2aff..78ee09e 100644 --- a/src/shared/Utils/Player/PetUtils.lua +++ b/src/shared/Utils/Player/PetUtils.lua @@ -33,7 +33,14 @@ end local petUtils petUtils = { getPet = function(petName: string): Instance? - local pets = if petName:match "Evolved" then ReplicatedStorage.EvolvedPets else ReplicatedStorage.Pets + local pets + if petName:match "Evolved" then + pets = ReplicatedStorage.EvolvedPets + elseif petName:match "Shiny" then + pets = ReplicatedStorage.ShinyPets + else + pets = ReplicatedStorage.Pets + end for _, area in pets:GetChildren() do local pet = area:FindFirstChild(petName) if pet then