ah_sce_unpacked/unpacked/Custom_Model_Bag Fan-Made ScenariosCampaignsMiscellany 66e97c/Custom_Model_Bag Fan-Made Campaigns 89c32e/Custom_Model_Bag Of Sphinx and Sands edb650/Custom_Model Sphinx Clue Spawner 13f2cf.ttslua
2021-09-03 13:52:12 -04:00

123 lines
5.2 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"}
,
"The Modern Gallery": {"type": "perPlayer", "value": 1, "clueSide": "front"},
"Renaissance Gallery": {"type": "perPlayer", "value": 2, "clueSide": "front"},
"Greco Roman Exhibit": {"type": "perPlayer", "value": 3, "clueSide": "front"},
"The Medieval Exhibit": {"type": "perPlayer", "value": 1, "clueSide": "front"},
"The Hieroglyphs": {"type": "perPlayer", "value": 2, "clueSide": "front"},
"The Sarcophagus Room": {"type": "perPlayer", "value": 2, "clueSide": "front"},
"Egyptian Culture Room": {"type": "perPlayer", "value": 2, "clueSide": "front"},
"Egyptian Museum": {"type": "perPlayer", "value": 2, "clueSide": "front"},
"Naguib Cafe": {"type": "perPlayer", "value": 2, "clueSide": "front"},
"Soor el-Azbakeya": {"type": "perPlayer", "value": 3, "clueSide": "front"},
"Qala'at Salah ad-Din": {"type": "perPlayer", "value": 2, "clueSide": "front"},
"El'Arafa 1": {"type": "perPlayer", "value": 1, "clueSide": "front"},
"El'Arafa 2": {"type": "perPlayer", "value": 2, "clueSide": "front"},
"El'Arafa 3": {"type": "perPlayer", "value": 1, "clueSide": "front"},
"El'Arafa 4": {"type": "perPlayer", "value": 2, "clueSide": "front"},
"Al-Azhar Mosque": {"type": "perPlayer", "value": 1, "clueSide": "front"},
"Khan El-Khalili": {"type": "perPlayer", "value": 2, "clueSide": "front"},
"Al-Muizz Street": {"type": "perPlayer", "value": 1, "clueSide": "front"},
"Al-Azhar Park": {"type": "perPlayer", "value": 2, "clueSide": "front"},
"Bottom of the Shaft": {"type": "perPlayer", "value": 2, "clueSide": "front"},
"Tunnel 1": {"type": "perPlayer", "value": 2, "clueSide": "front"},
"Tunnel 2": {"type": "perPlayer", "value": 2, "clueSide": "front"},
"Tunnel 3": {"type": "perPlayer", "value": 2, "clueSide": "front"},
"Fresco Room": {"type": "perPlayer", "value": 2, "clueSide": "front"},
"Black Stairs": {"type": "perPlayer", "value": 2, "clueSide": "front"},
"Bottom of the Stairs": {"type": "perPlayer", "value": 1, "clueSide": "front"},
"Large Hall - 2": {"type": "perPlayer", "value": 1, "clueSide": "front"},
"Large Hall - 1": {"type": "perPlayer", "value": 1, "clueSide": "front"},
"Throne Room": {"type": "perPlayer", "value": 1, "clueSide": "front"},
"Altar Room": {"type": "perPlayer", "value": 1, "clueSide": "front"},
"Spiral Staircase": {"type": "perPlayer", "value": 1, "clueSide": "front"},
"The Altar": {"type": "perPlayer", "value": 1, "clueSide": "front"},
"Sanctuary: Dimmed": {"type": "perPlayer", "value": 1, "clueSide": "front"},
"Sanctuary: Radiant": {"type": "perPlayer", "value": 1, "clueSide": "front"},
"Sanctuary: Mystery": {"type": "perPlayer", "value": 4, "clueSide": "front"},
"Tunnel 1a": {"type": "perPlayer", "value": 2, "clueSide": "front"},
"Tunnel 2a": {"type": "perPlayer", "value": 2, "clueSide": "front"},
"Tunnel 3a": {"type": "perPlayer", "value": 2, "clueSide": "front"},
"The Hieroglyphs - Variant": {"type": "perPlayer", "value": 2, "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
}
}
]]
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