SCED/src/chaosbag/BlessCurseManagerApi.ttslua

25 lines
994 B
Plaintext
Raw Normal View History

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-03-02 18:39:20 -05:00
Wait.time(function() BlessCurseManager.call("removeType", "Bless") end, 0.05)
Wait.time(function() BlessCurseManager.call("removeType", "Curse") end, 0.10)
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-03-02 18:39:20 -05:00
return BlessCurseManagerApi
end