2023-03-02 18:39:20 -05:00
|
|
|
do
|
|
|
|
local BlessCurseManagerApi = {}
|
2023-03-04 07:54:10 -05:00
|
|
|
local MANAGER_GUID = "5933fb"
|
2023-03-02 18:39:20 -05:00
|
|
|
|
|
|
|
-- removes all taken tokens and resets the counts
|
|
|
|
BlessCurseManagerApi.removeTakenTokensAndReset = function()
|
2023-03-04 07:54:10 -05:00
|
|
|
local BlessCurseManager = getObjectFromGUID(MANAGER_GUID)
|
2023-04-11 16:22:40 -04:00
|
|
|
Wait.time(function() BlessCurseManager.call("removeTakenTokens", "Bless") end, 0.05)
|
|
|
|
Wait.time(function() BlessCurseManager.call("removeTakenTokens", "Curse") end, 0.10)
|
2023-03-02 18:39:20 -05:00
|
|
|
Wait.time(function() BlessCurseManager.call("doReset", "White") end, 0.15)
|
|
|
|
end
|
|
|
|
|
2023-03-04 07:54:10 -05:00
|
|
|
-- updates the internal count (called by cards that seal bless/curse tokens)
|
|
|
|
BlessCurseManagerApi.sealedToken = function(type, guid)
|
|
|
|
getObjectFromGUID(MANAGER_GUID).call("sealedToken", { type = type, guid = guid })
|
|
|
|
end
|
|
|
|
|
|
|
|
-- updates the internal count (called by cards that seal bless/curse tokens)
|
|
|
|
BlessCurseManagerApi.releasedToken = function(type, guid)
|
|
|
|
getObjectFromGUID(MANAGER_GUID).call("releasedToken", { type = type, guid = guid })
|
|
|
|
end
|
|
|
|
|
2023-04-04 06:03:38 -04:00
|
|
|
-- broadcasts the current status for bless/curse tokens
|
|
|
|
---@param playerColor String Color of the player to show the broadcast to
|
|
|
|
BlessCurseManagerApi.broadcastStatus = function(playerColor)
|
|
|
|
getObjectFromGUID(MANAGER_GUID).call("broadcastStatus", playerColor)
|
|
|
|
end
|
|
|
|
|
|
|
|
-- adds Wendy's menu to the hovered card (allows sealing of tokens)
|
|
|
|
---@param color String Color of the player to show the broadcast to
|
|
|
|
BlessCurseManagerApi.addWendysMenu = function(playerColor, hoveredObject)
|
|
|
|
getObjectFromGUID(MANAGER_GUID).call("addMenuOptions", { playerColor = playerColor, hoveredObject = hoveredObject })
|
|
|
|
end
|
|
|
|
|
2023-03-02 18:39:20 -05:00
|
|
|
return BlessCurseManagerApi
|
|
|
|
end
|