Skip to content
This repository has been archived by the owner on Oct 19, 2024. It is now read-only.

Commit

Permalink
Merge pull request #149 from Pluviolithic/dev
Browse files Browse the repository at this point in the history
Fix evolver, rename gamepass command, and balance rebirthing
  • Loading branch information
Pluviolithic authored Jan 12, 2024
2 parents fc620b6 + 34b0f04 commit dafb6b3
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 9 deletions.
14 changes: 11 additions & 3 deletions src/client/UI/Inventories/PetInventory.lua
Original file line number Diff line number Diff line change
Expand Up @@ -371,9 +371,13 @@ function PetInventory:_setFocusedDisplay()
self._ui.RightBackground.Evolve.ImageColor3 = evolvedColor
self._ui.RightBackground.Evolve.EvolveText.Text = "Evolved"
else
self._ui.RightBackground.Evolve.EvolveText.Text = "Evolve (" .. details.Quantity .. "/5)"
local amountToEvolve = 5
if selectors.getRebirthUpgradeLevel(store:getState(), player.Name, "Evolver") then
amountToEvolve = 4
end
self._ui.RightBackground.Evolve.EvolveText.Text = `Evolve ({details.Quantity}/{amountToEvolve})`
self._ui.RightBackground.PetName.TextColor3 = unableToEvolveColor
if details.Quantity > 4 then
if details.Quantity >= amountToEvolve then
self._ui.RightBackground.Evolve.ImageColor3 = ableToEvolveColor
else
self._ui.RightBackground.Evolve.ImageColor3 = unableToEvolveColor
Expand Down Expand Up @@ -441,7 +445,11 @@ function PetInventory:_setFocusedDisplay()

self._focusedDestructor:Add(self._ui.RightBackground.Evolve.Activated:Connect(function()
playSoundEffect "UIButton"
if details.Quantity > 4 then
local amountToEvolve = 5
if selectors.getRebirthUpgradeLevel(store:getState(), player.Name, "Evolver") then
amountToEvolve = 4
end
if details.Quantity >= amountToEvolve then
Remotes.Client:Get("EvolvePet"):SendToServer(details.PetName)
self:_clearFocusedDisplay()
self._focusedTemplate = nil
Expand Down
2 changes: 1 addition & 1 deletion src/client/UI/RebirthUI.lua
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ function RebirthUI:Refresh()
self._ui.Background.Passes["2xTokens"].Visible = true
end
self._ui.Background.Tokens.Text = `{formatter.formatNumberWithSuffix(rebirths * tokenMultiplier)} Rebirth Tokens`
self._ui.Background.Strength.Text = `{formatter.formatNumberWithCommas(1 + 0.1 * rebirths)}x Strength`
self._ui.Background.Strength.Text = `{formatter.formatNumberWithCommas(1 + 0.01 * rebirths)}x Strength`
end

task.spawn(RebirthUI._initialize, RebirthUI)
Expand Down
2 changes: 1 addition & 1 deletion src/server/Combat/Perks/Pets.lua
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ local function evolvePet(player, petName)
end
end

store:dispatch(actions.deletePlayerPets(player.Name, { [petName] = 5 }, true))
store:dispatch(actions.deletePlayerPets(player.Name, { [petName] = amountToDeduct }, true))
store:dispatch(actions.givePlayerPets(player.Name, { ["Evolved " .. petName] = 1 }))

if petUtils.getPet(petName):FindFirstChild "PermaLock" then
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
return {
Name = "giveallgamepasses",
Aliases = { "gag" },
Name = "awardallgamepasses",
Aliases = { "aag" },
Description = "Gives a player all the gamepasses.",
Group = "DefaultAdmin",
Args = {
Expand Down
2 changes: 1 addition & 1 deletion src/server/PlayerManager/GlobalLeaderboards.lua
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ local function updateGlobalLeaderboardStores(): ()
globalLeaderboard.SetAsync,
globalLeaderboard,
tostring(player.UserId),
selectors.getStat(store:getState(), player.Name, statName)
math.floor(selectors.getStat(store:getState(), player.Name, statName))
)
if not selectors.isPlayerLoaded(store:getState(), player.Name) then
continue
Expand Down
2 changes: 1 addition & 1 deletion src/server/State/Middleware/ApplyMultipliersMiddleware.lua
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ return function(nextDispatch, store)
end

if action.statName == "Strength" then
action.incrementAmount *= (1 + 0.1 * selectors.getStat(
action.incrementAmount *= (1 + 0.01 * selectors.getStat(
store:getState(),
action.playerName,
"Rebirths"
Expand Down

0 comments on commit dafb6b3

Please sign in to comment.