Improve probability restoration
Prevents rigged probabilities from leaking into other cards
This commit is contained in:
parent
db5ced1704
commit
609172919b
2 changed files with 4 additions and 4 deletions
|
|
@ -6,7 +6,7 @@
|
|||
"author": [
|
||||
"Emik"
|
||||
],
|
||||
"version": "1.2.8",
|
||||
"version": "1.2.9",
|
||||
"badge_colour": "8BE9FD",
|
||||
"main_file": "src/main.lua",
|
||||
"badge_text_colour": "44475A",
|
||||
|
|
|
|||
|
|
@ -36,15 +36,15 @@ function Game:update(dt)
|
|||
return
|
||||
end
|
||||
|
||||
local normal = orig.normal
|
||||
|
||||
local mt = {
|
||||
orig = orig,
|
||||
__index = function(_, k)
|
||||
return k == "normal" and 0 or orig[k]
|
||||
end,
|
||||
__newindex = function(_, k, v)
|
||||
if k ~= "normal" or v ~= 0 then
|
||||
orig[k] = v
|
||||
end
|
||||
orig[k] = (k == "normal" and v == 0) and normal or v
|
||||
end,
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue