fixed
This commit is contained in:
parent
803d9a9e4e
commit
ecc3735f71
@ -373,8 +373,8 @@ function activeRedrawEffect(params)
|
||||
end
|
||||
|
||||
-- nil handling
|
||||
redrawData.VALID_TOKENS = redrawData.VALID_TOKENS or {}
|
||||
redrawData.INVALID_TOKENS = redrawData.INVALID_TOKENS or {}
|
||||
redrawData.validTokens = redrawData.validTokens or {}
|
||||
redrawData.invalidTokens = redrawData.invalidTokens or {}
|
||||
|
||||
-- determine if only some tokens are able to be returned to the bag
|
||||
local matchingTokensInPlay = {}
|
||||
@ -382,9 +382,9 @@ function activeRedrawEffect(params)
|
||||
local tokenName = getReadableTokenName(token.getName())
|
||||
|
||||
-- allow valid tokens or not invalid tokens, also allow any token if both lists empty
|
||||
if (redrawData.VALID_TOKENS[tokenName] ~= nil and isTableEmpty(redrawData.INVALID_TOKENS)) or
|
||||
(isTableEmpty(redrawData.VALID_TOKENS) and not redrawData.INVALID_TOKENS[tokenName]) or
|
||||
(isTableEmpty(redrawData.VALID_TOKENS) and isTableEmpty(redrawData.INVALID_TOKENS)) then
|
||||
if (redrawData.validTokens[tokenName] ~= nil and isTableEmpty(redrawData.invalidTokens)) or
|
||||
(isTableEmpty(redrawData.validTokens) and not redrawData.invalidTokens[tokenName]) or
|
||||
(isTableEmpty(redrawData.validTokens) and isTableEmpty(redrawData.invalidTokens)) then
|
||||
table.insert(matchingTokensInPlay, token)
|
||||
end
|
||||
end
|
||||
@ -462,12 +462,12 @@ function returnAndRedraw(_, tokenGUID)
|
||||
chaosTokens[indexOfReturnedToken] = drawChaosToken({
|
||||
mat = mat,
|
||||
drawAdditional = true,
|
||||
tokenType = redrawData.DRAW_SPECIFIC_TOKEN, -- currently only used for Nkosi Mabati
|
||||
tokenType = redrawData.drawSpecificToken, -- currently only used for Nkosi Mabati
|
||||
takeParameters = takeParameters
|
||||
})
|
||||
|
||||
-- remove these tokens from the bag
|
||||
if redrawData.RETURN_TO_POOL then
|
||||
if redrawData.returnToPool then
|
||||
-- let the bless/curse manager handle these
|
||||
if tokenName == "Bless" or tokenName == "Curse" then
|
||||
blessCurseManagerApi.removeToken(tokenName)
|
||||
|
Loading…
Reference in New Issue
Block a user