Merge pull request #891 from argonui/investigator-stuff
Investigator Callback: Added 2nd zone for token bags
This commit is contained in:
commit
efb20e476d
@ -1353,10 +1353,6 @@ end
|
||||
function newInvestigatorCallback(newId)
|
||||
updateMessageColor()
|
||||
|
||||
-- get position/rotation for maybe spawned object
|
||||
local pos = zones.getZonePosition(playerColor, "SetAside7")
|
||||
local rot = self.getRotation()
|
||||
|
||||
-- remove existing object that was placed for a specific investigator
|
||||
local obj = guidReferenceApi.getObjectByOwnerAndType(playerColor, "InvestigatorSpecifics")
|
||||
if obj ~= nil then
|
||||
@ -1364,30 +1360,24 @@ function newInvestigatorCallback(newId)
|
||||
guidReferenceApi.editIndex(playerColor, "InvestigatorSpecifics")
|
||||
end
|
||||
|
||||
if newId == "01005-p" or newId == "01005-pf" then
|
||||
-- parallel Wendy Adams
|
||||
if newId == "01005-p" or newId == "01005-pf" then -- parallel Wendy Adams
|
||||
printToColor("Wendy Adams: There's a Game Key to add sealing options to any card:" ..
|
||||
" Top menu bar > Options > Game Keys", messageColor)
|
||||
elseif newId == "06003" then
|
||||
-- Tony Morgan
|
||||
local spawnedObj = spawnObjectData({ data = tokenManagerApi.getDataForInfiniteBag("bounty", pos, rot) })
|
||||
guidReferenceApi.editIndex(playerColor, "InvestigatorSpecifics", spawnedObj.getGUID())
|
||||
printToColor("Tony Morgan: Spawned an infinite bag of bounty tokens near your playermat.", messageColor)
|
||||
elseif newId == "08004" then
|
||||
-- Norman Withers
|
||||
printToColor("At the start of the game flip the top card of your deck manually " ..
|
||||
elseif newId == "06003" then -- Tony Morgan
|
||||
spawnInfiniteTokenBag("bounty")
|
||||
printToColor("Tony Morgan: Spawned bounty tokens near your playermat.", messageColor)
|
||||
elseif newId == "08004" then -- Norman Withers
|
||||
printToColor("Norman Withers: At the start of the game flip the top card of your deck manually " ..
|
||||
"and then the mod should keep it flipped throughout the game.", messageColor)
|
||||
elseif newId == "09015" then
|
||||
-- Darrell Simmons
|
||||
local spawnedObj = spawnObjectData({ data = tokenManagerApi.getDataForInfiniteBag("evidence", pos, rot) })
|
||||
guidReferenceApi.editIndex(playerColor, "InvestigatorSpecifics", spawnedObj.getGUID())
|
||||
printToColor("Darrell Simons: Spawned an infinite bag of evidence tokens near your playermat.", messageColor)
|
||||
elseif newId == "89001" then
|
||||
-- Subject 5U-21
|
||||
elseif newId == "09015" then -- Darrell Simmons
|
||||
spawnInfiniteTokenBag("evidence")
|
||||
printToColor("Darrell Simmons: Spawned evidence tokens near your playermat.", messageColor)
|
||||
elseif newId == "89001" then -- Subject 5U-21
|
||||
local pos = zones.getZonePosition(playerColor, "BelowSetAside")
|
||||
local rot = self.getRotation()
|
||||
local sourceBag = guidReferenceApi.getObjectByOwnerAndType("Mythos", "OptionPanelSource")
|
||||
for _, objData in ipairs(sourceBag.getData().ContainedObjects) do
|
||||
if objData["Nickname"] == "Subject 5U-21 Helper" then
|
||||
objData["Locked"] = true
|
||||
local spawnedObj = spawnObjectData({ data = objData, position = pos, rotation = rot })
|
||||
guidReferenceApi.editIndex(playerColor, "InvestigatorSpecifics", spawnedObj.getGUID())
|
||||
break
|
||||
@ -1398,6 +1388,14 @@ function newInvestigatorCallback(newId)
|
||||
end
|
||||
end
|
||||
|
||||
-- spawns an infinite token bag of the specified type near the set aside area
|
||||
function spawnInfiniteTokenBag(tokenType)
|
||||
local pos = zones.getZonePosition(playerColor, "AboveSetAside")
|
||||
local rot = self.getRotation()
|
||||
local spawnedObj = spawnObjectData({ data = tokenManagerApi.getDataForInfiniteBag(tokenType, pos, rot) })
|
||||
guidReferenceApi.editIndex(playerColor, "InvestigatorSpecifics", spawnedObj.getGUID())
|
||||
end
|
||||
|
||||
-- returns the mini ID for the currently placed investigator
|
||||
function getMiniId(baseId)
|
||||
if #baseId < 16 then
|
||||
|
@ -19,7 +19,8 @@
|
||||
-- SetAside4: Upgrade sheets for customizable cards
|
||||
-- SetAside5: Hunch Deck for Joe Diamond
|
||||
-- SetAside6: currently unused
|
||||
-- SetAside7: Investigator specific object
|
||||
-- AboveSetAside: Investigator specific object
|
||||
-- BelowSetAside: Investigator specific object
|
||||
|
||||
do
|
||||
local playermatApi = require("playermat/PlayermatApi")
|
||||
@ -80,7 +81,8 @@ do
|
||||
zoneData["White"]["SetAside5"] = { 2.78, 0, 0.042 }
|
||||
zoneData["White"]["SetAside6"] = { 2.78, 0, 0.605 }
|
||||
zoneData["White"]["UnderSetAside6"] = { 2.93, 0, 0.805 }
|
||||
zoneData["White"]["SetAside7"] = { 2.85, 0, 1.650 }
|
||||
zoneData["White"]["AboveSetAside"] = { 2.35, 0, -1.069 }
|
||||
zoneData["White"]["BelowSetAside"] = { 2.85, 0, 1.650 }
|
||||
|
||||
zoneData["Orange"] = {}
|
||||
zoneData["Orange"]["Investigator"] = commonZones["Investigator"]
|
||||
@ -113,7 +115,8 @@ do
|
||||
zoneData["Orange"]["SetAside5"] = { -2.78, 0, 0.042 }
|
||||
zoneData["Orange"]["SetAside6"] = { -2.78, 0, 0.605 }
|
||||
zoneData["Orange"]["UnderSetAside6"] = { -2.93, 0, 0.805 }
|
||||
zoneData["Orange"]["SetAside7"] = { -2.85, 0, 1.650 }
|
||||
zoneData["Orange"]["AboveSetAside"] = { -2.35, 0, -1.069 }
|
||||
zoneData["Orange"]["BelowSetAside"] = { -2.85, 0, 1.650 }
|
||||
|
||||
-- Green positions are the same as White and Red the same as Orange
|
||||
zoneData["Red"] = zoneData["Orange"]
|
||||
|
Loading…
x
Reference in New Issue
Block a user