ah_sce_unpacked/unpacked/Custom_Model_Bag Community-Created Player CardsInvestigators ed4ca7/Custom_Model_Bag Artifact Expansion 1.3 2f8332/Custom_Model Artifact Expansion Data Helper 9887f9.ttslua
2021-07-03 14:00:44 -04:00

217 lines
5.0 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"}
}
]]
PLAYER_CARD_DATA_JSON = [[
{
"Tool Belt (0)": {
"tokenType": "resource",
"tokenCount": 2
},
"Tool Belt (3)": {
"tokenType": "resource",
"tokenCount": 3
},
"Gabriel": {
"tokenType": "resource",
"tokenCount": 3
},
"Flux Stabilizer": {
"tokenType": "resource",
"tokenCount": 2
},
"Ancient Crossbow (3):Family Heirloom": {
"tokenType": "resource",
"tokenCount": 1
},
"Dreadful Revelation": {
"tokenType": "resource",
"tokenCount": 1
},
"Enchanting Grace": {
"tokenType": "resource",
"tokenCount": 4
},
"Enchanting Grace (3)": {
"tokenType": "resource",
"tokenCount": 4
},
"Enchanting Grace (5)": {
"tokenType": "resource",
"tokenCount": 4
},
"Plumb the Void": {
"tokenType": "resource",
"tokenCount": 3
},
"Plumb the Void (3):Survivor": {
"tokenType": "resource",
"tokenCount": 3
},
"Plumb the Void (3):Mystic": {
"tokenType": "resource",
"tokenCount": 4
},
"Leather Pouch": {
"tokenType": "resource",
"tokenCount": 2
},
"Tactician (3)": {
"tokenType": "resource",
"tokenCount": 2
},
"Gatling Gun (5)": {
"tokenType": "resource",
"tokenCount": 4
},
"Book of the Believer": {
"tokenType": "resource",
"tokenCount": 3
},
"Cultes des Goules": {
"tokenType": "resource",
"tokenCount": 3
},
"Dragon Idol": {
"tokenType": "resource",
"tokenCount": 2
},
"Elixir of Life": {
"tokenType": "resource",
"tokenCount": 3
},
"Fetch Stick": {
"tokenType": "resource",
"tokenCount": 3
},
"Heart of Winter": {
"tokenType": "resource",
"tokenCount": 3
},
"Key of Tawil At-Umr": {
"tokenType": "resource",
"tokenCount": 3
},
"Mask of Wisdom": {
"tokenType": "resource",
"tokenCount": 3
},
"Massa di Requiem per Shuggay": {
"tokenType": "resource",
"tokenCount": 3
},
"Mi-Go Brain Case": {
"tokenType": "resource",
"tokenCount": 3
},
"Milk of Shub-Niggurath": {
"tokenType": "resource",
"tokenCount": 1
},
"Ruby of R'yleh": {
"tokenType": "resource",
"tokenCount": 3
},
"Sword of Saint Jerome": {
"tokenType": "resource",
"tokenCount": 4
},
"Sword of Y'ha-Talla": {
"tokenType": "resource",
"tokenCount": 3
},
"Vach-Viraj Chant": {
"tokenType": "resource",
"tokenCount": 3
},
"Zanthu Tablets": {
"tokenType": "resource",
"tokenCount": 3
},
"Lamp of Alhazred": {
"tokenType": "resource",
"tokenCount": 3
},
"Soul Gem": {
"tokenType": "resource",
"tokenCount": 3
},
"Warding Statue": {
"tokenType": "resource",
"tokenCount": 4
},
"Yithian Rifle": {
"tokenType": "resource",
"tokenCount": 3
},
"Painkillers (1)": {
"tokenType": "resource",
"tokenCount": 3
},
"Forbidden Knowledge (1)": {
"tokenType": "resource",
"tokenCount": 4
},
"Solatium": {
"tokenType": "resource",
"tokenCount": 2
},
"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