Skip to content

Commit

Permalink
refactor(chess rook): steamodded has built in rounding when displayin…
Browse files Browse the repository at this point in the history
…g now
  • Loading branch information
Aiz0 committed Aug 1, 2024
1 parent 5fb4a5b commit c3b6b6b
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 9 deletions.
3 changes: 1 addition & 2 deletions jokers/chess_rook.lua
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,11 @@ SMODS.Joker({
end
end

local exact_mult = card.ability.extra.base
return card.ability.extra.base
^ (
(stone_tally / #G.playing_cards)
^ card.ability.extra.exponent
)
return Aiz.utils.round_2d(exact_mult)
end
end,

Expand Down
7 changes: 0 additions & 7 deletions utils.lua
Original file line number Diff line number Diff line change
Expand Up @@ -139,13 +139,6 @@ Aiz.utils = {
end
end,

---uses string.format to round to 2 decimal places
---@param exact number
---@return number?
round_2d = function(exact)
return tonumber(string.format("%.2f", exact))
end,

---Flips all jokers
flip_jokers = function()
for _, joker in ipairs(G.jokers.cards) do
Expand Down

0 comments on commit c3b6b6b

Please sign in to comment.