Implemented new feature for releasing sealed tokens and clearing bless/curse
This commit is contained in:
parent
9bdd39a9f1
commit
b6d74ac205
@ -58,6 +58,7 @@ function onLoad(save_state)
|
||||
playAreaAPI = require("core/PlayAreaApi")
|
||||
deckImporterApi = require("arkhamdb/DeckImporterApi")
|
||||
optionPanelApi = require("core/OptionPanelApi")
|
||||
blessCurseApi = require("chaosbag/BlessCurseManagerApi")
|
||||
campaignBoxGUID = ""
|
||||
|
||||
self.createButton({
|
||||
@ -177,7 +178,11 @@ end
|
||||
|
||||
|
||||
-- Creates a campaign token with save data encoded into GM Notes based on the current state of the table
|
||||
function createCampaignToken(_, _, _)
|
||||
function createCampaignToken(_, playerColor, _)
|
||||
-- clean up chaos tokens
|
||||
blessCurseApi.removeAll(playerColor)
|
||||
chaosBagApi.releaseAllSealedTokens(playerColor)
|
||||
|
||||
local campaignBoxGUID = ""
|
||||
-- find active campaign
|
||||
for _, obj in ipairs(getObjectsWithTag("CampaignBox")) do
|
||||
|
@ -7,6 +7,7 @@ local tokenSpawnTrackerApi = require("core/token/TokenSpawnTrackerApi")
|
||||
local soundCubeApi = require("core/SoundCubeApi")
|
||||
local playmatApi = require("playermat/PlaymatApi")
|
||||
local blessCurseManagerApi = require("chaosbag/BlessCurseManagerApi")
|
||||
local chaosBagApi = require("chaosbag/ChaosBagApi")
|
||||
|
||||
-- these objects will be ignored
|
||||
local IGNORE_GUIDS = {
|
||||
@ -173,7 +174,7 @@ function cleanUp(_, color)
|
||||
removeLines()
|
||||
discardHands()
|
||||
tokenSpawnTrackerApi.resetAll()
|
||||
Global.call("releaseAllSealedTokens", color)
|
||||
chaosBagApi.releaseAllSealedTokens(color)
|
||||
|
||||
printToAll("Tidying main play area...", "White")
|
||||
startLuaCoroutine(self, "tidyPlayareaCoroutine")
|
||||
|
@ -23,5 +23,10 @@ do
|
||||
return Global.call("findChaosBag")
|
||||
end
|
||||
|
||||
-- returns all sealed tokens on cards to the chaos bag
|
||||
ChaosBagApi.releaseAllSealedTokens = function(playerColor)
|
||||
return Global.call("releaseAllSealedTokens", playerColor)
|
||||
end
|
||||
|
||||
return ChaosBagApi
|
||||
end
|
Loading…
Reference in New Issue
Block a user