Handle review comments

This commit is contained in:
Buhallin 2022-12-13 02:15:16 -08:00
parent db65f3c8e3
commit c8cec71109
No known key found for this signature in database
GPG Key ID: DB3C362823852294
3 changed files with 12 additions and 30 deletions

View File

@ -151,7 +151,7 @@ local function onDeckResult(deck, playerColor, configuration)
maybeAddInvestigatorCards(deck, slots)
maybeAddCustomizeUpgradeSheets(slots, configuration)
maybeAddSummonedServitor(slots)
maybeAddOnTheMend(slots)
maybeAddOnTheMend(slots, playerColor)
extractBondedCards(slots, configuration)
checkTaboos(deck.taboo_id, slots, playerColor, configuration)
@ -257,11 +257,15 @@ end
-- the count based on the investigator count
---@param slots: The slot list for cards in this deck. Table key is the cardId, value is the number
-- of those cards which will be spawned
function maybeAddOnTheMend(slots)
---@param playerColor: Color name of the player this deck is being loaded for. Used for broadcast if an error occurs
function maybeAddOnTheMend(slots, playerColor)
if slots["09006"] ~= nil then
local investigatorCount = playAreaApi.getInvestigatorCount()
if investigatorCount ~= nil then
slots["09006"] = investigatorCount
else
debugPrint("Something went wrong with the load, adding 4 copies of On the Mend", Priority.INFO, playerColor)
slots["09006"] = 4
end
end
end

View File

@ -136,34 +136,23 @@ function onCollisionEnter(collision_info)
end
end
-- Move all contents on the play area (cards, tokens, etc) one row up. Certain fixed objects will
-- be ignored, as will anything the player has tagged with 'displacement_excluded'
-- Move all contents on the play area (cards, tokens, etc) one slot in the given direction. Certain
-- fixed objects will be ignored, as will anything the player has tagged with
-- 'displacement_excluded'
---@param playerColor Color of the player requesting the shift. Used solely to send an error
--- message in the unlikely case that the scripting zone has been deleted
function shiftContentsUp(playerColor)
shiftContents(playerColor, "up")
end
-- Move all contents on the play area (cards, tokens, etc) one row down. Certain fixed objects
-- will be ignored, as will anything the player has tagged with 'displacement_excluded'
---@param playerColor Color of the player requesting the shift. Used solely to send an error
--- message in the unlikely case that the scripting zone has been deleted
function shiftContentsDown(playerColor)
shiftContents(playerColor, "down")
end
-- Move all contents on the play area (cards, tokens, etc) one column left. Certain fixed objects
-- will be ignored, as will anything the player has tagged with 'displacement_excluded'
---@param playerColor Color of the player requesting the shift. Used solely to send an error
--- message in the unlikely case that the scripting zone has been deleted
function shiftContentsLeft(playerColor)
shiftContents(playerColor, "left")
end
-- Move all contents on the play area (cards, tokens, etc) one column right. Certain fixed
-- objects will be ignored, as will anything the player has tagged with 'displacement_excluded'
---@param playerColor Color of the player requesting the shift. Used solely to send an error
--- message in the unlikely case that the scripting zone has been deleted
function shiftContentsRight(playerColor)
shiftContents(playerColor, "right")
end

View File

@ -9,34 +9,23 @@ do
return getObjectFromGUID(PLAY_AREA_GUID).call("getInvestigatorCount")
end
-- Move all contents on the play area (cards, tokens, etc) one row up. Certain fixed objects will
-- be ignored, as will anything the player has tagged with 'displacement_excluded'
-- Move all contents on the play area (cards, tokens, etc) one slot in the given direction. Certain
-- fixed objects will be ignored, as will anything the player has tagged with
-- 'displacement_excluded'
---@param playerColor Color of the player requesting the shift. Used solely to send an error
--- message in the unlikely case that the scripting zone has been deleted
PlayAreaApi.shiftContentsUp = function(playerColor)
return getObjectFromGUID(PLAY_AREA_GUID).call("shiftContentsUp", playerColor)
end
-- Move all contents on the play area (cards, tokens, etc) one row down. Certain fixed objects
-- will be ignored, as will anything the player has tagged with 'displacement_excluded'
---@param playerColor Color of the player requesting the shift. Used solely to send an error
--- message in the unlikely case that the scripting zone has been deleted
PlayAreaApi.shiftContentsDown = function(playerColor)
return getObjectFromGUID(PLAY_AREA_GUID).call("shiftContentsDown", playerColor)
end
-- Move all contents on the play area (cards, tokens, etc) one column left. Certain fixed objects
-- will be ignored, as will anything the player has tagged with 'displacement_excluded'
---@param playerColor Color of the player requesting the shift. Used solely to send an error
--- message in the unlikely case that the scripting zone has been deleted
PlayAreaApi.shiftContentsLeft = function(playerColor)
return getObjectFromGUID(PLAY_AREA_GUID).call("shiftContentsLeft", playerColor)
end
-- Move all contents on the play area (cards, tokens, etc) one column right. Certain fixed
-- objects will be ignored, as will anything the player has tagged with 'displacement_excluded'
---@param playerColor Color of the player requesting the shift. Used solely to send an error
--- message in the unlikely case that the scripting zone has been deleted
PlayAreaApi.shiftContentsRight = function(playerColor)
return getObjectFromGUID(PLAY_AREA_GUID).call("shiftContentsRight", playerColor)
end