ah_sce_unpacked/unpacked/Custom_Model_Bag Fan-Made ScenariosCampaignsMiscellany 66e97c/Custom_Model_Bag Fan-Made Campaigns 89c32e/Custom_Model_Bag Alice in Wonderland 39916d/Custom_Model Alice in Wonderland Custom Data Helper f22477.ttslua
2021-04-25 09:57:58 -04:00

154 lines
7.6 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"},
"Arkham Asylum (Arkham in Wonderland)": {"type": "perPlayer", "value": 1, "clueSide": "front"},
"Bank of Arkham (Arkham in Wonderland)": {"type": "perPlayer", "value": 1, "clueSide": "front"},
"Independence Square (Arkham in Wonderland)": {"type": "perPlayer", "value": 1, "clueSide": "front"},
"Newspaper Office (Arkham in Wonderland)": {"type": "perPlayer", "value": 1, "clueSide": "front"},
"Curiositie Shoppe (Arkham in Wonderland)": {"type": "perPlayer", "value": 1, "clueSide": "front"},
"Train Station (Arkham in Wonderland)": {"type": "perPlayer", "value": 1, "clueSide": "front"},
"White Rabbit's House": {"type": "perPlayer", "value": 1, "clueSide": "front"},
"Sandy Strand": {"type": "perPlayer", "value": 1, "clueSide": "front"},
"Tidal Pools": {"type": "perPlayer", "value": 2, "clueSide": "front"},
"Rocky Outcropping": {"type": "perPlayer", "value": 1, "clueSide": "front"},
"Sheltered Shallows": {"type": "perPlayer", "value": 2, "clueSide": "front"},
"Twining Reef": {"type": "perPlayer", "value": 1, "clueSide": "front"},
"Head of the Table": {"type": "perPlayer", "value": 1, "clueSide": "front"},
"Empty Seat_3a6e9c": {"type": "fixed", "value": 2, "clueSide": "front"},
"Empty Seat_088381": {"type": "fixed", "value": 1, "clueSide": "front"},
"Empty Seat_074371": {"type": "fixed", "value": 3, "clueSide": "front"},
"Empty Seat_588c09": {"type": "fixed", "value": 1, "clueSide": "front"},
"Empty Seat_5c65ea": {"type": "fixed", "value": 2, "clueSide": "front"},
"Empty Seat_b931c6": {"type": "fixed", "value": 3, "clueSide": "front"},
"Empty Seat_e7f025": {"type": "fixed", "value": 2, "clueSide": "front"},
"Empty Seat_e757ea": {"type": "fixed", "value": 3, "clueSide": "front"},
"Empty Seat_30cd83": {"type": "fixed", "value": 2, "clueSide": "front"},
"Empty Seat_6a3451": {"type": "fixed", "value": 2, "clueSide": "front"},
"Empty Seat_518810": {"type": "fixed", "value": 3, "clueSide": "front"},
"Empty Seat_bca1f3": {"type": "fixed", "value": 2, "clueSide": "front"},
"Empty Seat_2d8aa6": {"type": "fixed", "value": 2, "clueSide": "front"},
"Croquet Grounds": {"type": "perPlayer", "value": 1, "clueSide": "front"},
"Hedge Maze": {"type": "perPlayer", "value": 1, "clueSide": "front"},
"Throne Room": {"type": "perPlayer", "value": 1, "clueSide": "front"},
"Dungeons": {"type": "perPlayer", "value": 1, "clueSide": "front"},
"Kitchens": {"type": "perPlayer", "value": 2, "clueSide": "front"},
"Tumtum Tree": {"type": "perPlayer", "value": 1, "clueSide": "front"},
"The Wabe": {"type": "perPlayer", "value": 2, "clueSide": "front"},
"Mound of Crags": {"type": "perPlayer", "value": 1, "clueSide": "front"},
"Field of Chasms": {"type": "perPlayer", "value": 1, "clueSide": "front"},
"Narrow Valley": {"type": "perPlayer", "value": 1, "clueSide": "front"},
"The Boots' Trail": {"type": "perPlayer", "value": 1, "clueSide": "back"},
"The Bonnet-Maker's Trail": {"type": "perPlayer", "value": 1, "clueSide": "back"},
"The Billiard-Maker's Trail": {"type": "perPlayer", "value": 1, "clueSide": "back"},
"The Broker's Trail": {"type": "perPlayer", "value": 1, "clueSide": "back"},
"The Barrister's Trail": {"type": "perPlayer", "value": 1, "clueSide": "back"},
"The Banker's Trail": {"type": "perPlayer", "value": 1, "clueSide": "back"},
"The Beaver's Trail": {"type": "perPlayer", "value": 1, "clueSide": "back"},
"The Butcher's Trail": {"type": "perPlayer", "value": 1, "clueSide": "back"},
"Overgrown Dell": {"type": "perPlayer", "value": 1, "clueSide": "front"},
"West Hill": {"type": "perPlayer", "value": 1, "clueSide": "front"},
"East Hill": {"type": "perPlayer", "value": 1, "clueSide": "front"},
"Northwest Slope": {"type": "perPlayer", "value": 1, "clueSide": "front"},
"Northeast Slope": {"type": "perPlayer", "value": 1, "clueSide": "front"},
"Southwest Slope": {"type": "perPlayer", "value": 1, "clueSide": "front"},
"Southeast Slope": {"type": "perPlayer", "value": 1, "clueSide": "front"},
"First Row": {"type": "perPlayer", "value": 1, "clueSide": "front"},
"Second Row": {"type": "perPlayer", "value": 1, "clueSide": "front"},
"Third Row": {"type": "perPlayer", "value": 1, "clueSide": "front"},
"Fourth Row": {"type": "perPlayer", "value": 1, "clueSide": "front"},
"Fifth Row": {"type": "perPlayer", "value": 1, "clueSide": "front"},
"Sixth Row": {"type": "perPlayer", "value": 1, "clueSide": "front"},
"Seventh Row": {"type": "perPlayer", "value": 1, "clueSide": "front"},
"Eighth Row": {"type": "perPlayer", "value": 2, "clueSide": "front"},
"Merchant District (Lucid Nightmare)": {"type": "perPlayer", "value": 2, "clueSide": "front"},
"Rivertown (Lucid Nightmare)": {"type": "perPlayer", "value": 1, "clueSide": "front"},
"Miskatonic University (Lucid Nightmare)": {"type": "perPlayer", "value": 2, "clueSide": "front"},
"French Hill (Lucid Nightmare)": {"type": "perPlayer", "value": 1, "clueSide": "front"},
"Uptown (Lucid Nightmare)": {"type": "perPlayer", "value": 2, "clueSide": "front"},
"Southside (Lucid Nightmare)": {"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
},
"Strange Refreshments": {
"tokenType": "resource",
"tokenCount": 4
},
"Looking-Glass Book": {
"tokenType": "resource",
"tokenCount": 4
},
"Royal Suspicion": {
"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