Skip to content

Commit 2ce5953

Browse files
Merge pull request #502 from bobjoe400/pot-of-jokes-fix
Fixed Pot of Jokes internally storing values over it's set limit
2 parents 9991f4f + 99bded1 commit 2ce5953

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

items/misc_joker.lua

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -239,8 +239,15 @@ local potofjokes = {
239239
end,
240240
calculate = function(self, card, context)
241241
if context.end_of_round and not context.individual and not context.repetition and not context.blueprint then
242+
if to_big(card.ability.extra.h_size) + to_big(card.ability.extra.h_mod) >= to_big(1000) then
243+
card.ability.extra.h_size = 1000
244+
card.ability.extra.h_mod = 0
245+
end
246+
242247
G.hand:change_size(math.min(math.max(0, 1000 - card.ability.extra.h_size), card.ability.extra.h_mod))
248+
243249
card.ability.extra.h_size = card.ability.extra.h_size + card.ability.extra.h_mod
250+
244251
return {
245252
message = localize({ type = "variable", key = "a_handsize", vars = { card.ability.extra.h_mod } }),
246253
colour = G.C.FILTER,

0 commit comments

Comments
 (0)