Merge pull request #38 from argonui/fortuneandfolly_fix

adding missing information for FaF
This commit is contained in:
Buhallin 2022-11-15 16:25:54 -08:00 committed by GitHub
commit 990871646e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 111 additions and 110 deletions

View File

@ -21,7 +21,8 @@
"TheBlobthatAteEverything.4dee5a",
"CurseoftheRougarou.db7039",
"GuardiansoftheAbyss.ee987d",
"WaroftheOuterGods.fc7674"
"WaroftheOuterGods.fc7674",
"FortuneandFolly.0dce91"
],
"ContainedObjects_path": "StandaloneScenarios.77a5f9",
"CustomMesh": {

View File

@ -7,14 +7,11 @@ function log(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 = [[
{
--[[ 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.decode(
[[{
"Study": {"type": "perPlayer", "value": 2, "clueSide": "back"},
"Study_670914": {"type": "perPlayer", "value": 1, "clueSide": "back"},
"Attic_377b20": {"type": "perPlayer", "value": 1, "clueSide": "back"},
@ -712,15 +709,28 @@ LOCATIONS_DATA_JSON = [[
"Ye Olde Magick Shoppe": {"type": "perPlayer", "value": 1, "clueSide": "back"},
"Corrigan Industries": {"type": "perPlayer", "value": 1, "clueSide": "back"},
"Counting Room": {"type": "perPlayer", "value": 1, "clueSide": "back"},
"Guard Room": {"type": "perPlayer", "value": 2, "clueSide": "back"},
"Relic Room": {"type": "perPlayer", "value": 1, "clueSide": "back"},
"Security Office_b2d198": {"type": "perPlayer", "value": 2, "clueSide": "back"},
"Owner's Office": {"type": "perPlayer", "value": 3, "clueSide": "back"},
"High Roller's Table_226c6a": {"type": "perPlayer", "value": 2, "clueSide": "back"},
"High Roller's Table_804dbc": {"type": "perPlayer", "value": 2, "clueSide": "front"},
"Casino Lounge_169f16": {"type": "perPlayer", "value": 2, "clueSide": "back"},
"Casino Lounge_4af4eb": {"type": "perPlayer", "value": 2, "clueSide": "front"},
"Roulette Wheel": {"type": "perPlayer", "value": 1, "clueSide": "back"},
"Slot Machines": {"type": "perPlayer", "value": 1, "clueSide": "back"},
"Poker Table": {"type": "perPlayer", "value": 1, "clueSide": "back"},
"Baccarat Table": {"type": "perPlayer", "value": 1, "clueSide": "back"},
"XXXX": {"type": "fixed", "value": 2, "clueSide": "back"},
"xxx": {"type": "perPlayer", "value": 2, "clueSide": "back"}
}
]]
--[[
Player cards with token counts and types
]]
PLAYER_CARD_DATA_JSON = [[
{
}]]
)
-- Player cards with token counts and types
PLAYER_CARD_DATA = JSON.decode(
[[{
"xxx": {
"tokenType": "resource",
"tokenCount": 3
@ -730,8 +740,8 @@ PLAYER_CARD_DATA_JSON = [[
"tokenType": "resource",
"tokenCount": 3
}
}
]]
}]]
)
-- Encounter Cards with Hidden.
HIDDEN_CARD_DATA = {
@ -766,21 +776,18 @@ HIDDEN_CARD_DATA = {
"Whispering Chaos (West)"
}
LOCATIONS_DATA = JSON.decode(LOCATIONS_DATA_JSON)
PLAYER_CARD_DATA = JSON.decode(PLAYER_CARD_DATA_JSON)
PLAYER_CARD_TOKEN_OFFSETS = {
[1] = {
{ 0, 3, -0.2 },
{ 0, 3, -0.2 }
},
[2] = {
{ 0.4, 3, -0.2 },
{ -0.4, 3, -0.2 },
{ -0.4, 3, -0.2 }
},
[3] = {
{ 0, 3, -0.9 },
{ 0.4, 3, -0.2 },
{ -0.4, 3, -0.2 },
{ -0.4, 3, -0.2 }
},
[4] = {
{ 0.4, 3, -0.9 },
@ -801,7 +808,7 @@ PLAYER_CARD_TOKEN_OFFSETS = {
{ -0.7, 3, -0.9 },
{ 0.7, 3, -0.2 },
{ 0, 3, -0.2 },
{ -0.7, 3, -0.2 },
{ -0.7, 3, -0.2 }
},
[7] = {
{ 0.7, 3, -0.9 },
@ -810,7 +817,7 @@ PLAYER_CARD_TOKEN_OFFSETS = {
{ 0.7, 3, -0.2 },
{ 0, 3, -0.2 },
{ -0.7, 3, -0.2 },
{ 0, 3, 0.5 },
{ 0, 3, 0.5 }
},
[8] = {
{ 0.7, 3, -0.9 },
@ -820,7 +827,7 @@ PLAYER_CARD_TOKEN_OFFSETS = {
{ 0, 3, -0.2 },
{ -0.7, 3, -0.2 },
{ -0.35, 3, 0.5 },
{ 0.35, 3, 0.5 },
{ 0.35, 3, 0.5 }
},
[9] = {
{ 0.7, 3, -0.9 },
@ -831,7 +838,7 @@ PLAYER_CARD_TOKEN_OFFSETS = {
{ -0.7, 3, -0.2 },
{ 0.7, 3, 0.5 },
{ 0, 3, 0.5 },
{ -0.7, 3, 0.5 },
{ -0.7, 3, 0.5 }
},
[12] = {
{ 0.7, 3, -0.9 },
@ -845,9 +852,8 @@ PLAYER_CARD_TOKEN_OFFSETS = {
{ -0.7, 3, 0.5 },
{ 0.7, 3, 1.2 },
{ 0, 3, 1.2 },
{ -0.7, 3, 1.2 },
{ -0.7, 3, 1.2 }
}
}
modeData = {
@ -863,8 +869,8 @@ modeData = {
hard = { parent = 'Core Set', append = { 'elder' }, message = 'An additional token for the preparation of this scenario has been added to the bag.' },
expert = { parent = 'Core Set', append = { 'elder' }, message = 'An additional token for the preparation of this scenario has been added to the bag.' }
},
-----------------The Dunwich Legacy
-----------------The Dunwich Legacy
['The Dunwich Legacy'] = {
easy = { token = { 'p1', 'p1', '0', '0', '0', 'm1', 'm1', 'm1', 'm2', 'm2', 'skull', 'skull', 'cultist', 'red', 'blue' } },
normal = { token = { 'p1', '0', '0', 'm1', 'm1', 'm1', 'm2', 'm2', 'm3', 'm4', 'skull', 'skull', 'cultist', 'red', 'blue' } },
@ -889,8 +895,8 @@ modeData = {
['Lost in Time and Space'] = {
standalone = { token = { 'p1', '0', '0', 'm1', 'm1', 'm1', 'm2', 'm2', 'm3', 'm3', 'm4', 'm5', 'skull', 'skull', 'cultist', 'tablet', 'elder', 'red', 'blue' } }
},
-----------------The Path to Carcosa
-----------------The Path to Carcosa
['The Path to Carcosa'] = {
easy = { token = { 'p1', 'p1', '0', '0', '0', 'm1', 'm1', 'm1', 'm2', 'm2', 'skull', 'skull', 'skull', 'red', 'blue' } },
normal = { token = { 'p1', '0', '0', 'm1', 'm1', 'm1', 'm2', 'm2', 'm3', 'm4', 'skull', 'skull', 'skull', 'red', 'blue' } },
@ -918,8 +924,8 @@ modeData = {
['Dim Carcosa'] = {
standalone = { token = { 'p1', '0', '0', 'm1', 'm1', 'm1', 'm2', 'm2', 'm3', 'm3', 'm4', 'm5', 'skull', 'skull', 'skull', 'red', 'blue' } }
},
-----------------The Forgotten Age
-----------------The Forgotten Age
['The Forgotten Age'] = {
easy = { token = { 'p1', 'p1', '0', '0', '0', 'm1', 'm1', 'm2', 'm3', 'skull', 'skull', 'elder', 'red', 'blue' } },
normal = { token = { 'p1', '0', '0', '0', 'm1', 'm2', 'm2', 'm3', 'm5', 'skull', 'skull', 'elder', 'red', 'blue' } },
@ -949,7 +955,6 @@ modeData = {
},
-----------------The Circle Undone
['The Circle Undone'] = {
easy = { token = { 'p1', 'p1', '0', '0', '0', 'm1', 'm1', 'm2', 'm3', 'skull', 'skull', 'red', 'blue' } },
normal = { token = { 'p1', '0', '0', 'm1', 'm1', 'm2', 'm2', 'm3', 'm4', 'skull', 'skull', 'red', 'blue' } },
@ -978,9 +983,7 @@ modeData = {
standalone = { token = { 'p1', '0', '0', 'm1','m1', 'm2', 'm2', 'm3', 'm4', 'skull', 'skull', 'cultist', 'tablet', 'elder', 'red', 'blue' } }
},
-----------------The Dream-Eaters
['TDE_A'] = {
easy = { token = { 'p1', 'p1', '0', '0', '0', 'm1', 'm1', 'm2', 'm2', 'cultist', 'tablet', 'tablet', 'red', 'blue' } },
normal = { token = { 'p1', '0', '0', 'm1', 'm1', 'm2', 'm2', 'm3', 'm4', 'cultist', 'tablet', 'tablet', 'red', 'blue' } },
@ -1012,7 +1015,6 @@ modeData = {
standalone = { token = { 'p1', '0', '0', 'm1', 'm1', 'm1', 'm2', 'm2', 'm3', 'm4', 'skull', 'skull', 'skull', 'cultist', 'elder', 'elder', 'red', 'blue' } }
},
-----------------The Innsmouth Conspiracy
['The Innsmouth Conspiracy'] = {
easy = { token = { 'p1', 'p1', '0', '0', '0', 'm1', 'm1', 'm1', 'm2', 'm2', 'skull', 'skull', 'cultist', 'cultist', 'tablet', 'tablet', 'elder', 'elder', 'red', 'blue' } },
@ -1031,7 +1033,6 @@ modeData = {
hard = { token = { '0', '0', 'm1', 'm1', 'm2', 'm2', 'm3', 'm4', 'm4', 'm5', 'frost', 'frost', 'skull', 'skull', 'cultist', 'tablet', 'red', 'blue' } },
expert = { token = { '0', 'm1', 'm2', 'm2', 'm3', 'm4', 'm4', 'm5', 'm7', 'frost', 'frost', 'frost', 'skull', 'skull', 'cultist', 'tablet', 'red', 'blue' } }
},
['City of the Elder Things'] = {
easy = { token = { 'p1', 'p1', 'p1', '0', '0', 'm1', 'm1', 'm1', 'm2', 'm2', 'skull', 'skull', 'cultist', 'tablet', 'elder', 'red', 'blue' } },
normal = { token = { 'p1', '0', '0', 'm1', 'm1', 'm1', 'm2', 'm2', 'm3', 'm4', 'frost', 'skull', 'skull', 'cultist', 'tablet', 'elder', 'red', 'blue' } },
@ -1073,48 +1074,46 @@ modeData = {
hard = { token = { '0', '0', 'm1', 'm1', 'm2', 'm2', 'm3', 'm4', 'm5', 'm6', 'skull', 'skull', 'cultist', 'tablet', 'elder', 'red', 'blue' } },
expert = { token = { '0', 'm1', 'm2', 'm3', 'm4', 'm5', 'm6', 'm7', 'm8', 'skull', 'skull', 'cultist', 'tablet', 'elder', 'red', 'blue' } }
},
['Meowlathotep'] = {
easy = { token = { 'p1', 'p1', '0', '0', '0', 'm1', 'm1', 'm1', 'm2', 'm2', 'skull', 'skull', 'cultist', 'tablet', 'elder', 'red', 'blue' } },
normal = { token = { 'p1', '0', '0', 'm1', 'm1', 'm1', 'm2', 'm2', 'm3', 'm4', 'skull', 'skull', 'cultist', 'tablet', 'elder', 'red', 'blue' } },
hard = { token = { '0', '0', '0', 'm1', 'm1', 'm2', 'm2', 'm3', 'm3', 'm4', 'm5', 'skull', 'skull', 'cultist', 'tablet', 'elder', 'red', 'blue' } },
expert = { token = { '0', 'm1', 'm1', 'm2', 'm2', 'm3', 'm3', 'm4', 'm4', 'm5', 'm6', 'm8', 'skull', 'skull', 'cultist', 'tablet', 'elder', 'red', 'blue' } }
},
['WotOG'] = {
easy = { token = { 'p1', 'p1', '0', '0', '0', 'm1', 'm1', 'm1', 'm2', 'm2', 'skull', 'skull', 'skull', 'red', 'blue' } },
normal = { token = { 'p1', '0', '0', 'm1', 'm1', 'm1', 'm2', 'm2', 'm3', 'm4', 'skull', 'skull', 'skull', 'red', 'blue' } },
hard = { token = { '0', '0', 'm1', 'm1', 'm2', 'm2', 'm3', 'm4', 'm5', 'm6', 'skull', 'skull', 'skull', 'red', 'blue' } },
expert = { token = { '0', 'm1', 'm2', 'm3', 'm4', 'm5', 'm6', 'm7', 'm8', 'skull', 'skull', 'skull', 'red', 'blue' } }
},
['Bad Blood'] = {
easy = { token = { 'p1', 'p1', '0', '0', '0', 'm1', 'm1', 'm1', 'm2', 'm2', 'skull', 'skull', 'cultist', 'tablet', 'elder', 'red', 'blue' } },
normal = { token = { 'p1', '0', '0', 'm1', 'm1', 'm1', 'm2', 'm2', 'm3', 'm4', 'skull', 'skull', 'cultist', 'tablet', 'elder', 'red', 'blue' } },
hard = { token = { '0', '0', 'm1', 'm1', 'm2', 'm2', 'm3', 'm4', 'm5', 'm6', 'skull', 'skull', 'cultist', 'tablet', 'elder', 'red', 'blue' } },
expert = { token = { '0', 'm1', 'm2', 'm3', 'm4', 'm5', 'm6', 'm7', 'm8', 'skull', 'skull', 'cultist', 'tablet', 'elder', 'red', 'blue' } }
},
['Machinations'] = {
easy = { token = { 'p1', 'p1', 'p1', '0', '0', '0', '0', 'm1', 'm1', 'm1', 'm2', 'm2', 'skull', 'cultist', 'tablet', 'elder', 'red', 'blue' } },
normal = { token = { 'p1', '0', '0', 'm1', 'm1', 'm1', 'm2', 'm2', 'm3', 'm4', 'skull', 'skull', 'cultist', 'tablet', 'elder', 'red', 'blue' } },
hard = { token = { '0', '0', 'm1', 'm1', 'm1', 'm2', 'm3', 'm4', 'm6', 'skull', 'skull', 'cultist', 'tablet', 'elder', 'elder', 'red', 'blue' } },
expert = { token = { '0', 'm1', 'm1', 'm2', 'm3', 'm4', 'm5', 'm6', 'm8', 'skull', 'skull', 'cultist', 'tablet', 'elder', 'elder', 'red', 'blue' } }
},
['Red Tide'] = {
easy = { token = { 'p1', 'p1', '0', '0', '0', 'm1', 'm1', 'm1', 'm2', 'm2', 'skull', 'skull', 'cultist', 'cultist', 'tablet', 'elder', 'red', 'blue' } },
normal = { token = { 'p1', '0', '0', 'm1', 'm1', 'm1', 'm2', 'm2', 'm3', 'm4', 'skull', 'skull', 'cultist', 'cultist', 'tablet', 'elder', 'red', 'blue' } },
hard = { token = { '0', '0', 'm1', 'm1', 'm2', 'm2', 'm3', 'm4', 'm5', 'm6', 'skull', 'skull', 'cultist', 'cultist', 'tablet', 'elder', 'red', 'blue' } },
expert = { token = { '0', 'm1', 'm2', 'm3', 'm4', 'm5', 'm6', 'm7', 'm8', 'skull', 'skull', 'cultist', 'cultist', 'tablet', 'elder', 'red', 'blue' } }
},
['FaF'] = {
normal = { token = { 'p1', '0', '0', 'm1', 'm2', 'm2', 'm3', 'm3', 'm4', 'm5', 'skull', 'skull', 'cultist', 'tablet', 'elder', 'red', 'blue' } },
hard = { token = { '0', '0', 'm1', 'm1', 'm2', 'm2', 'm3', 'm3', 'm6', 'm7', 'skull', 'skull', 'cultist', 'tablet', 'elder', 'red', 'blue' } },
},
--fan-made
['Carnevale of Spiders'] = {
normal = { token = { 'p1', '0', '0', '0', 'm1', 'm1', 'm1', 'm2', 'm3', 'm4', 'm6', 'skull', 'skull', 'skull', 'cultist', 'tablet', 'elder', 'red', 'blue' } },
hard = { token = { 'p1', '0', '0', '0', 'm1', 'm1', 'm3', 'm4', 'm5', 'm6', 'm7', 'skull', 'skull', 'skull', 'cultist', 'tablet', 'elder', 'red', 'blue' } }
},
['The Nephew Calls'] = {
easy = { token = { 'p1', 'p1', '0', '0', '0', 'm1', 'm1', 'm1', 'm2', 'm2', 'skull', 'skull', 'cultist', 'tablet', 'elder', 'red', 'blue' } },
normal = { token = { 'p1', '0', '0', '0', 'm1', 'm1', 'm1', 'm2', 'm2', 'm3', 'm4', 'skull', 'skull', 'cultist', 'tablet', 'elder', 'red', 'blue' } },
@ -1329,17 +1328,16 @@ modeData = {
normal = { token = { 'p1', '0', '0', 'm1', 'm1', 'm1', 'm2', 'm2', 'm3', 'm4', 'skull', 'skull', 'cultist', 'tablet', 'red', 'blue' } },
hard = { token = { '0', '0', '0', 'm1', 'm1', 'm2', 'm2', 'm3', 'm3', 'm4', 'm5', 'skull', 'skull', 'cultist', 'tablet', 'red', 'blue' } },
expert = { token = { '0', 'm1', 'm1', 'm2', 'm2', 'm3', 'm3', 'm4', 'm4', 'm5', 'm6', 'm8', 'skull', 'skull', 'cultist', 'tablet', 'red', 'blue' } }
},
}
}
function onSave()
local globalState = JSON.encode(SPAWNED_PLAYER_CARD_GUIDS)
log('saving global state: ' .. globalState)
self.script_state = globalState
return globalState
end
function onload(save_state)
function onLoad(save_state)
if save_state ~= '' then
log('loading global state: ' .. save_state)
SPAWNED_PLAYER_CARD_GUIDS = JSON.decode(save_state)
@ -1352,9 +1350,10 @@ function getSpawnedPlayerCardGuid(params)
local guid = params[1]
if SPAWNED_PLAYER_CARD_GUIDS == nil then
return nil
end
else
return SPAWNED_PLAYER_CARD_GUIDS[guid]
end
end
function setSpawnedPlayerCardGuid(params)
local guid = params[1]
@ -1362,9 +1361,10 @@ function setSpawnedPlayerCardGuid(params)
if SPAWNED_PLAYER_CARD_GUIDS ~= nil then
SPAWNED_PLAYER_CARD_GUIDS[guid] = value
return true
end
else
return false
end
end
function checkHiddenCard(name)
for _, n in ipairs(HIDDEN_CARD_DATA) do