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