Fix multiplayer-only crash from Amber Acorn being the only joker
This commit is contained in:
parent
0d5acb6cea
commit
0bb46fcb8e
2 changed files with 6 additions and 1 deletions
|
|
@ -3,7 +3,7 @@
|
||||||
"id": "Roland",
|
"id": "Roland",
|
||||||
"name": "Roland",
|
"name": "Roland",
|
||||||
"prefix": "Roland",
|
"prefix": "Roland",
|
||||||
"version": "2.8.9",
|
"version": "2.8.10",
|
||||||
"badge_colour": "8BE9FD",
|
"badge_colour": "8BE9FD",
|
||||||
"display_name": "Roland",
|
"display_name": "Roland",
|
||||||
"main_file": "src/main.lua",
|
"main_file": "src/main.lua",
|
||||||
|
|
|
||||||
|
|
@ -665,6 +665,11 @@ joker {
|
||||||
card.ability.extra.context = context
|
card.ability.extra.context = context
|
||||||
local cards = card.area.cards
|
local cards = card.area.cards
|
||||||
local keys = f(cards):where(f().nq(card)):keys():table()
|
local keys = f(cards):where(f().nq(card)):keys():table()
|
||||||
|
|
||||||
|
if not next(keys) then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
local key = pseudorandom_element(keys, pseudoseed "Roland_amber") or card.rank
|
local key = pseudorandom_element(keys, pseudoseed "Roland_amber") or card.rank
|
||||||
local next = card.rank < key and 1 or -1
|
local next = card.rank < key and 1 or -1
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue