123 lines
4.8 KiB
Plaintext
123 lines
4.8 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 = [[
|
||
|
{
|
||
|
"San Francisco": {"type": "fixed", "value": 1, "clueSide": "back"},
|
||
|
" Arkham": {"type": "perPlayer", "value": 1, "clueSide": "back"},
|
||
|
"Buenos Aires": {"type": "fixed", "value": 2, "clueSide": "back"},
|
||
|
" London": {"type": "perPlayer", "value": 2, "clueSide": "front"},
|
||
|
"Rome": {"type": "perPlayer", "value": 3, "clueSide": "front"},
|
||
|
"Istanbul": {"type": "perPlayer", "value": 4, "clueSide": "front"},
|
||
|
"Tokyo_123abc": {"type": "perPlayer", "value": 0, "clueSide": "back"},
|
||
|
"Tokyo_456efg": {"type": "perPlayer", "value": 4, "clueSide": "back"},
|
||
|
"Tokyo": {"type": "fixed", "value": 2, "clueSide": "back"},
|
||
|
"Shanghai_123": {"type": "fixed", "value": 12, "clueSide": "front"},
|
||
|
"Sydney": {"type": "fixed", "value": 0, "clueSide": "front"},
|
||
|
"Reception": {"type": "perPlayer", "value": 1, "clueSide": "front"},
|
||
|
"Garage": {"type": "perPlayer", "value": 2, "clueSide": "front"},
|
||
|
"Sheriff's Office": {"type": "perPlayer", "value": 2, "clueSide": "front"},
|
||
|
"Officers' Lounge": {"type": "perPlayer", "value": 2, "clueSide": "front"},
|
||
|
"Holding Cells": {"type": "perPlayer", "value": 1, "clueSide": "front"},
|
||
|
"Interview Room": {"type": "perPlayer", "value": 2, "clueSide": "front"},
|
||
|
"Evidence Room": {"type": "perPlayer", "value": 2, "clueSide": "front"},
|
||
|
"Records Room": {"type": "perPlayer", "value": 2, "clueSide": "front"},
|
||
|
"Police Morgue": {"type": "perPlayer", "value": 2, "clueSide": "front"},
|
||
|
"West River Street": {"type": "perPlayer", "value": 1, "clueSide": "front"},
|
||
|
"Central River Street": {"type": "perPlayer", "value": 1, "clueSide": "front"},
|
||
|
"East River Street": {"type": "perPlayer", "value": 1, "clueSide": "front"},
|
||
|
"West Church Street": {"type": "perPlayer", "value": 1, "clueSide": "front"},
|
||
|
"Central Church Street": {"type": "perPlayer", "value": 1, "clueSide": "front"},
|
||
|
"East Church Street": {"type": "perPlayer", "value": 1, "clueSide": "front"},
|
||
|
"Boundary Street": {"type": "perPlayer", "value": 2, "clueSide": "front"},
|
||
|
"West Street": {"type": "perPlayer", "value": 1, "clueSide": "front"},
|
||
|
"Garrison Street": {"type": "perPlayer", "value": 1, "clueSide": "front"},
|
||
|
"Peabody Avenue": {"type": "perPlayer", "value": 2, "clueSide": "front"},
|
||
|
"Dead End Alley": {"type": "perPlayer", "value": 1, "clueSide": "front"},
|
||
|
"Sprawling Caverns": {"type": "perPlayer", "value": 1, "clueSide": "front"},
|
||
|
"Winding Tunnels": {"type": "perPlayer", "value": 1, "clueSide": "front"},
|
||
|
"Dark Recesses": {"type": "perPlayer", "value": 1, "clueSide": "front"},
|
||
|
"Pool of Blood": {"type": "perPlayer", "value": 3, "clueSide": "front"},
|
||
|
"Dusty Attic": {"type": "perPlayer", "value": 2, "clueSide": "front"},
|
||
|
"Armory": {"type": "perPlayer", "value": 2, "clueSide": "front"},
|
||
|
"Lavish Room": {"type": "perPlayer", "value": 2, "clueSide": "front"},
|
||
|
"Reinforced Room": {"type": "perPlayer", "value": 2, "clueSide": "front"},
|
||
|
"Storeroom": {"type": "perPlayer", "value": 2, "clueSide": "front"},
|
||
|
"Door Beyond": {"type": "perPlayer", "value": 1, "clueSide": "front"}
|
||
|
}
|
||
|
]]
|
||
|
|
||
|
|
||
|
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
|
||
|
},
|
||
|
"Command Essence": {
|
||
|
"tokenType": "resource",
|
||
|
"tokenCount": 3
|
||
|
},
|
||
|
"Dimensional Inductor": {
|
||
|
"tokenType": "resource",
|
||
|
"tokenCount": 4
|
||
|
},
|
||
|
"Midas Touch": {
|
||
|
"tokenType": "resource",
|
||
|
"tokenCount": 4
|
||
|
},
|
||
|
"Everything for a Price": {
|
||
|
"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
|