131 lines
7.3 KiB
Plaintext
131 lines
7.3 KiB
Plaintext
-- set true to enable debug logging
|
|
DEBUG = false
|
|
|
|
function log(message)
|
|
if DEBUG then
|
|
print(message)
|
|
end
|
|
end
|
|
|
|
--[[
|
|
Known locations and clues. We check this to determine if we should
|
|
atttempt to spawn clues, first we look for <LOCATION_NAME>_<GUID> and if
|
|
we find nothing we look for <LOCATION_NAME>
|
|
format is [location_guid -> clueCount]
|
|
]]
|
|
LOCATIONS_DATA_JSON = [[
|
|
{
|
|
"Morgue": {"type": "perPlayer", "value": 2, "clueSide": "front"},
|
|
"Lab Omega": {"type": "perPlayer", "value": 1, "clueSide": "front"},
|
|
"Lab Delta": {"type": "perPlayer", "value": 2, "clueSide": "front"},
|
|
"Lab Alpha_5b9f51": {"type": "perPlayer", "value": 2, "clueSide": "front"},
|
|
"Ripped Hallway": {"type": "perPlayer", "value": 1, "clueSide": "front"},
|
|
"Narrow Stair": {"type": "perPlayer", "value": 3, "clueSide": "front"},
|
|
"Bedroom": {"type": "perPlayer", "value": 2, "clueSide": "front"},
|
|
"Basement": {"type": "perPlayer", "value": 1, "clueSide": "front"},
|
|
"Study": {"type": "perPlayer", "value": 2, "clueSide": "front"},
|
|
"Apothecary Room": {"type": "perPlayer", "value": 1, "clueSide": "front"},
|
|
"Tub Room": {"type": "perPlayer", "value": 1, "clueSide": "front"},
|
|
"Abandoned Room": {"type": "perPlayer", "value": 1, "clueSide": "front"},
|
|
"Grand Hall": {"type": "perPlayer", "value": 2, "clueSide": "front"},
|
|
"Servant's Entry": {"type": "perPlayer", "value": 1, "clueSide": "front"},
|
|
"Arkham Advertiser (Fit to Print)": {"type": "perPlayer", "value": 2, "clueSide": "back"},
|
|
"Bank of Arkham (Bull Market)": {"type": "perPlayer", "value": 2, "clueSide": "back"},
|
|
"General Store (Open for Business)": {"type": "perPlayer", "value": 2, "clueSide": "back"},
|
|
"Hibb's Roadhouse (Bootlegger's Luck)": {"type": "perPlayer", "value": 2, "clueSide": "back"},
|
|
"Ma's Boarding House (Old Friends)": {"type": "perPlayer", "value": 2, "clueSide": "back"},
|
|
"Orne Library (Safe in the Knowledge)": {"type": "perPlayer", "value": 2, "clueSide": "back"},
|
|
"River Docks (Fellowship of Man)": {"type": "perPlayer", "value": 2, "clueSide": "back"},
|
|
"Ye Olde Magick Shoppe (Dangerous Relics)": {"type": "perPlayer", "value": 2, "clueSide": "back"},
|
|
"Lab Alpha (Badly Burned)": {"type": "perPlayer", "value": 1, "clueSide": "front"},
|
|
"Lab Alpha (Terrible Knowledge)": {"type": "perPlayer", "value": 1, "clueSide": "front"},
|
|
"Delta Sub-Lab_102f39": {"type": "perPlayer", "value": 1, "clueSide": "front"},
|
|
"Delta Sub-Lab_3450a6": {"type": "perPlayer", "value": 1, "clueSide": "front"},
|
|
"Delta Sub-Lab_efc384": {"type": "perPlayer", "value": 1, "clueSide": "front"},
|
|
"West's Office": {"type": "perPlayer", "value": 2, "clueSide": "front"},
|
|
"The Left Atrium": {"type": "perPlayer", "value": 1, "clueSide": "front"},
|
|
"The Left Ventricle": {"type": "perPlayer", "value": 1, "clueSide": "front"},
|
|
"The Right Atrium": {"type": "perPlayer", "value": 1, "clueSide": "front"},
|
|
"The Right Ventricle": {"type": "perPlayer", "value": 1, "clueSide": "front"},
|
|
"Alpha Sub-Lab_0d5e19": {"type": "perPlayer", "value": 1, "clueSide": "front"},
|
|
"Alpha Sub-Lab_ca819dfff": {"type": "perPlayer", "value": 1, "clueSide": "front"},
|
|
"Alpha Sub-Lab_fde067": {"type": "perPlayer", "value": 1, "clueSide": "front"},
|
|
"Alpha Sub-Lab_8343cc": {"type": "perPlayer", "value": 1, "clueSide": "front"},
|
|
"Portal of the King": {"type": "fixed", "value": 1, "clueSide": "back"},
|
|
"Portal of the Flame": {"type": "fixed", "value": 1, "clueSide": "back"},
|
|
"Clock Chamber North": {"type": "perPlayer", "value": 3, "clueSide": "front"},
|
|
"Clock Chamber South": {"type": "perPlayer", "value": 1, "clueSide": "front"},
|
|
"Makeshift Lab": {"type": "perPlayer", "value": 1, "clueSide": "front"},
|
|
"Observatory": {"type": "perPlayer", "value": 1, "clueSide": "front"},
|
|
"Organizer's Office": {"type": "perPlayer", "value": 1, "clueSide": "front"},
|
|
"Tinkerer's Workshop": {"type": "perPlayer", "value": 2, "clueSide": "front"},
|
|
"Pickman's Memory": {"type": "perPlayer", "value": 3, "clueSide": "front"},
|
|
"Arkham Advertiser (Final Edition)": {"type": "perPlayer", "value": 2, "clueSide": "front"},
|
|
"Bank of Arkham (Market Close)": {"type": "perPlayer", "value": 2, "clueSide": "front"},
|
|
"General Store (Everything Must Go)": {"type": "perPlayer", "value": 2, "clueSide": "front"},
|
|
"Hibb's Roadhouse (Last Call)": {"type": "perPlayer", "value": 2, "clueSide": "front"},
|
|
"Ma's Boarding House (Friends to the End)": {"type": "perPlayer", "value": 2, "clueSide": "front"},
|
|
"Orne Library (Past Due)": {"type": "perPlayer", "value": 2, "clueSide": "front"},
|
|
"River Docks (Quitting Time)": {"type": "perPlayer", "value": 2, "clueSide": "front"},
|
|
"Ye Olde Magick Shoppe (The End of Days)": {"type": "perPlayer", "value": 2, "clueSide": "front"},
|
|
"Arkham Advertiser (Word of Mouth)": {"type": "perPlayer", "value": 2, "clueSide": "back"},
|
|
"Bank of Arkham (The War Chest)": {"type": "perPlayer", "value": 2, "clueSide": "back"},
|
|
"General Store (Lend a Hand)": {"type": "perPlayer", "value": 1, "clueSide": "back"},
|
|
"Hibb's Roadhouse (Seedy Underbelly)": {"type": "perPlayer", "value": 3, "clueSide": "back"},
|
|
"Ma's Boarding House (Heart of Arkham)": {"type": "perPlayer", "value": 3, "clueSide": "back"},
|
|
"Orne Library (The Brain's Paradise)": {"type": "perPlayer", "value": 2, "clueSide": "back"},
|
|
"River Docks (Take to Arms)": {"type": "perPlayer", "value": 3, "clueSide": "back"},
|
|
"Ye Olde Magick Shoppe (With Eyes Unseen)": {"type": "perPlayer", "value": 2, "clueSide": "back"},
|
|
"Body of Baalshandor": {"type": "perPlayer", "value": 1, "clueSide": "front"},
|
|
"Mind of Baalshandor": {"type": "perPlayer", "value": 1, "clueSide": "front"},
|
|
"Soul of Baalshandor": {"type": "perPlayer", "value": 1, "clueSide": "front"},
|
|
"Crater of Unbinding_6d110b": {"type": "perPlayer", "value": 1, "clueSide": "back"}
|
|
}
|
|
]]
|
|
|
|
|
|
PLAYER_CARD_DATA_JSON = [[
|
|
{
|
|
"Tool Belt (0)": {
|
|
"tokenType": "resource",
|
|
"tokenCount": 2
|
|
},
|
|
"Tool Belt (3)": {
|
|
"tokenType": "resource",
|
|
"tokenCount": 4
|
|
},
|
|
"Yithian Rifle": {
|
|
"tokenType": "resource",
|
|
"tokenCount": 3
|
|
},
|
|
"xxx": {
|
|
"tokenType": "resource",
|
|
"tokenCount": 3
|
|
}
|
|
}
|
|
]]
|
|
|
|
HIDDEN_CARD_DATA = {
|
|
"Unpleasant Card (Doom)",
|
|
"Unpleasant Card (Gloom)",
|
|
"The Case of the Scarlet DOOOOOM!"
|
|
}
|
|
|
|
LOCATIONS_DATA = JSON.decode(LOCATIONS_DATA_JSON)
|
|
PLAYER_CARD_DATA = JSON.decode(PLAYER_CARD_DATA_JSON)
|
|
|
|
function onload(save_state)
|
|
local playArea = getObjectFromGUID('721ba2')
|
|
playArea.call("updateLocations", {self.getGUID()})
|
|
local playerMatWhite = getObjectFromGUID('8b081b')
|
|
playerMatWhite.call("updatePlayerCards", {self.getGUID()})
|
|
local playerMatOrange = getObjectFromGUID('bd0ff4')
|
|
playerMatOrange.call("updatePlayerCards", {self.getGUID()})
|
|
local playerMatGreen = getObjectFromGUID('383d8b')
|
|
playerMatGreen.call("updatePlayerCards", {self.getGUID()})
|
|
local playerMatRed = getObjectFromGUID('0840d5')
|
|
playerMatRed.call("updatePlayerCards", {self.getGUID()})
|
|
local dataHelper = getObjectFromGUID('708279')
|
|
dataHelper.call("updateHiddenCards", {self.getGUID()})
|
|
end
|