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) maybeAddInvestigatorCards(deck, slots)
maybeAddCustomizeUpgradeSheets(slots, configuration) maybeAddCustomizeUpgradeSheets(slots, configuration)
maybeAddSummonedServitor(slots) maybeAddSummonedServitor(slots)
maybeAddOnTheMend(slots) maybeAddOnTheMend(slots, playerColor)
extractBondedCards(slots, configuration) extractBondedCards(slots, configuration)
checkTaboos(deck.taboo_id, slots, playerColor, configuration) checkTaboos(deck.taboo_id, slots, playerColor, configuration)
@ -257,11 +257,15 @@ end
-- the count based on the investigator count -- 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 ---@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 -- 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 if slots["09006"] ~= nil then
local investigatorCount = playAreaApi.getInvestigatorCount() local investigatorCount = playAreaApi.getInvestigatorCount()
if investigatorCount ~= nil then if investigatorCount ~= nil then
slots["09006"] = investigatorCount 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 end
end end

View File

@ -136,34 +136,23 @@ function onCollisionEnter(collision_info)
end end
end end
-- Move all contents on the play area (cards, tokens, etc) one row up. Certain fixed objects will -- Move all contents on the play area (cards, tokens, etc) one slot in the given direction. Certain
-- be ignored, as will anything the player has tagged with 'displacement_excluded' -- 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 ---@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 --- message in the unlikely case that the scripting zone has been deleted
function shiftContentsUp(playerColor) function shiftContentsUp(playerColor)
shiftContents(playerColor, "up") shiftContents(playerColor, "up")
end 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) function shiftContentsDown(playerColor)
shiftContents(playerColor, "down") shiftContents(playerColor, "down")
end 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) function shiftContentsLeft(playerColor)
shiftContents(playerColor, "left") shiftContents(playerColor, "left")
end 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) function shiftContentsRight(playerColor)
shiftContents(playerColor, "right") shiftContents(playerColor, "right")
end end

View File

@ -9,34 +9,23 @@ do
return getObjectFromGUID(PLAY_AREA_GUID).call("getInvestigatorCount") return getObjectFromGUID(PLAY_AREA_GUID).call("getInvestigatorCount")
end end
-- Move all contents on the play area (cards, tokens, etc) one row up. Certain fixed objects will -- Move all contents on the play area (cards, tokens, etc) one slot in the given direction. Certain
-- be ignored, as will anything the player has tagged with 'displacement_excluded' -- 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 ---@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 --- message in the unlikely case that the scripting zone has been deleted
PlayAreaApi.shiftContentsUp = function(playerColor) PlayAreaApi.shiftContentsUp = function(playerColor)
return getObjectFromGUID(PLAY_AREA_GUID).call("shiftContentsUp", playerColor) return getObjectFromGUID(PLAY_AREA_GUID).call("shiftContentsUp", playerColor)
end 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) PlayAreaApi.shiftContentsDown = function(playerColor)
return getObjectFromGUID(PLAY_AREA_GUID).call("shiftContentsDown", playerColor) return getObjectFromGUID(PLAY_AREA_GUID).call("shiftContentsDown", playerColor)
end 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) PlayAreaApi.shiftContentsLeft = function(playerColor)
return getObjectFromGUID(PLAY_AREA_GUID).call("shiftContentsLeft", playerColor) return getObjectFromGUID(PLAY_AREA_GUID).call("shiftContentsLeft", playerColor)
end 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) PlayAreaApi.shiftContentsRight = function(playerColor)
return getObjectFromGUID(PLAY_AREA_GUID).call("shiftContentsRight", playerColor) return getObjectFromGUID(PLAY_AREA_GUID).call("shiftContentsRight", playerColor)
end end