diff --git a/objects/AllPlayerCards.15bb07.json b/objects/AllPlayerCards.15bb07.json index 170a6a82..f1e4711d 100644 --- a/objects/AllPlayerCards.15bb07.json +++ b/objects/AllPlayerCards.15bb07.json @@ -1134,7 +1134,7 @@ "FatherMateo.eb96e6", "FatherMateoParallel.eb96e7", "FatherMateoParallelBack.eb96e8", - "FatherMateoParalleFront.eb96e9", + "FatherMateoParallelFront.eb96e9", "BobJenkins.419b0c", "WilliamYorick.7e4c56", "CalvinWright.b02a1e", diff --git a/objects/AllPlayerCards.15bb07/FatherMateo.eb96e6.gmnotes b/objects/AllPlayerCards.15bb07/FatherMateo.eb96e6.gmnotes index fb836f73..53dc418b 100644 --- a/objects/AllPlayerCards.15bb07/FatherMateo.eb96e6.gmnotes +++ b/objects/AllPlayerCards.15bb07/FatherMateo.eb96e6.gmnotes @@ -12,7 +12,9 @@ "signatures": [ { "04013": 1, - "04014": 1 + "04014": 1, + "90082": 1, + "90083": 1 } ] } diff --git a/objects/AllPlayerCards.15bb07/FatherMateoParallel.eb96e7.gmnotes b/objects/AllPlayerCards.15bb07/FatherMateoParallel.eb96e7.gmnotes index 93f446ea..d70a031d 100644 --- a/objects/AllPlayerCards.15bb07/FatherMateoParallel.eb96e7.gmnotes +++ b/objects/AllPlayerCards.15bb07/FatherMateoParallel.eb96e7.gmnotes @@ -7,12 +7,14 @@ "intellectIcons": 3, "combatIcons": 2, "agilityIcons": 3, - "cycle": "", - "extraToken": "None", + "cycle": "Aura of Faith", + "extraToken": "FreeTrigger", "signatures": [ { "04013": 1, - "04014": 1 + "04014": 1, + "90082": 1, + "90083": 1 } ] } \ No newline at end of file diff --git a/objects/AllPlayerCards.15bb07/FatherMateoParallel.eb96e7.json b/objects/AllPlayerCards.15bb07/FatherMateoParallel.eb96e7.json index 0b32969c..56366f68 100644 --- a/objects/AllPlayerCards.15bb07/FatherMateoParallel.eb96e7.json +++ b/objects/AllPlayerCards.15bb07/FatherMateoParallel.eb96e7.json @@ -14,8 +14,8 @@ "CustomDeck": { "40042": { "BackIsHidden": true, - "BackURL": "", - "FaceURL": "", + "BackURL": "https://steamusercontent-a.akamaihd.net/ugc/2398822869388381839/BF4CDDC0E9AD9A705D230089E9B47876DAC5202B/", + "FaceURL": "https://steamusercontent-a.akamaihd.net/ugc/2398822869388381873/EDCD13A5D7C229DDCC1B41750238EC8409D9F689/", "NumHeight": 1, "NumWidth": 1, "Type": 0, @@ -33,7 +33,7 @@ "IgnoreFoW": false, "LayoutGroupSortIndex": 0, "Locked": false, - "LuaScript": "", + "LuaScript": "require(\"playercards/cards/FatherMateoParallel\")", "LuaScriptState": "", "MeasureMovement": false, "Name": "CardCustom", diff --git a/objects/AllPlayerCards.15bb07/FatherMateoParallelBack.eb96e8.gmnotes b/objects/AllPlayerCards.15bb07/FatherMateoParallelBack.eb96e8.gmnotes index 12470068..4dc1d04c 100644 --- a/objects/AllPlayerCards.15bb07/FatherMateoParallelBack.eb96e8.gmnotes +++ b/objects/AllPlayerCards.15bb07/FatherMateoParallelBack.eb96e8.gmnotes @@ -7,12 +7,14 @@ "intellectIcons": 3, "combatIcons": 2, "agilityIcons": 3, - "cycle": "", + "cycle": "Aura of Faith", "extraToken": "None", "signatures": [ { "04013": 1, - "04014": 1 + "04014": 1, + "90082": 1, + "90083": 1 } ] } \ No newline at end of file diff --git a/objects/AllPlayerCards.15bb07/FatherMateoParallelBack.eb96e8.json b/objects/AllPlayerCards.15bb07/FatherMateoParallelBack.eb96e8.json index 1132259f..b5e47dbf 100644 --- a/objects/AllPlayerCards.15bb07/FatherMateoParallelBack.eb96e8.json +++ b/objects/AllPlayerCards.15bb07/FatherMateoParallelBack.eb96e8.json @@ -14,7 +14,7 @@ "CustomDeck": { "40043": { "BackIsHidden": true, - "BackURL": "", + "BackURL": "https://steamusercontent-a.akamaihd.net/ugc/2398822869388381839/BF4CDDC0E9AD9A705D230089E9B47876DAC5202B/", "FaceURL": "https://steamusercontent-a.akamaihd.net/ugc/2453991328897621318/D69A572C94A5612D66A3816640B7B6C86A99124A/", "NumHeight": 1, "NumWidth": 1, diff --git a/objects/AllPlayerCards.15bb07/FatherMateoParallelFront.eb96e9.gmnotes b/objects/AllPlayerCards.15bb07/FatherMateoParallelFront.eb96e9.gmnotes index 2d245d50..9e94241b 100644 --- a/objects/AllPlayerCards.15bb07/FatherMateoParallelFront.eb96e9.gmnotes +++ b/objects/AllPlayerCards.15bb07/FatherMateoParallelFront.eb96e9.gmnotes @@ -7,12 +7,14 @@ "intellectIcons": 3, "combatIcons": 2, "agilityIcons": 3, - "cycle": "", - "extraToken": "None", + "cycle": "Aura of Faith", + "extraToken": "FreeTrigger", "signatures": [ { "04013": 1, - "04014": 1 + "04014": 1, + "90082": 1, + "90083": 1 } ] } \ No newline at end of file diff --git a/objects/AllPlayerCards.15bb07/FatherMateoParallelFront.eb96e9.json b/objects/AllPlayerCards.15bb07/FatherMateoParallelFront.eb96e9.json index 257952c8..792699af 100644 --- a/objects/AllPlayerCards.15bb07/FatherMateoParallelFront.eb96e9.json +++ b/objects/AllPlayerCards.15bb07/FatherMateoParallelFront.eb96e9.json @@ -15,7 +15,7 @@ "40044": { "BackIsHidden": true, "BackURL": "https://steamusercontent-a.akamaihd.net/ugc/2453991328897621258/BDB321594063924D7C3E6EDC3BDAE553AB63C3D7/", - "FaceURL": "", + "FaceURL": "https://steamusercontent-a.akamaihd.net/ugc/2398822869388381873/EDCD13A5D7C229DDCC1B41750238EC8409D9F689/", "NumHeight": 1, "NumWidth": 1, "Type": 0, @@ -33,7 +33,7 @@ "IgnoreFoW": false, "LayoutGroupSortIndex": 0, "Locked": false, - "LuaScript": "", + "LuaScript": "require(\"playercards/cards/FatherMateoParallel\")", "LuaScriptState": "", "MeasureMovement": false, "Name": "CardCustom", diff --git a/objects/AllPlayerCards.15bb07/SerpentsofYig.678392.json b/objects/AllPlayerCards.15bb07/SerpentsofYig.678392.json index 9f2b5ddd..f3c011be 100644 --- a/objects/AllPlayerCards.15bb07/SerpentsofYig.678392.json +++ b/objects/AllPlayerCards.15bb07/SerpentsofYig.678392.json @@ -15,7 +15,7 @@ "1713": { "BackIsHidden": true, "BackURL": "https://steamusercontent-a.akamaihd.net/ugc/2342503777940352139/A2D42E7E5C43D045D72CE5CFC907E4F886C8C690/", - "FaceURL": "", + "FaceURL": "https://steamusercontent-a.akamaihd.net/ugc/2398822869388381950/88C8A1CCF5D560702965D1A5E239A8F14A030C7D/", "NumHeight": 1, "NumWidth": 1, "Type": 0, diff --git a/objects/AllPlayerCards.15bb07/TheCodexofAges.df9810.json b/objects/AllPlayerCards.15bb07/TheCodexofAges.df9810.json index dc4f9c9b..20a2d6af 100644 --- a/objects/AllPlayerCards.15bb07/TheCodexofAges.df9810.json +++ b/objects/AllPlayerCards.15bb07/TheCodexofAges.df9810.json @@ -15,7 +15,7 @@ "1712": { "BackIsHidden": true, "BackURL": "https://steamusercontent-a.akamaihd.net/ugc/2342503777940352139/A2D42E7E5C43D045D72CE5CFC907E4F886C8C690/", - "FaceURL": "", + "FaceURL": "https://steamusercontent-a.akamaihd.net/ugc/2398822869388381906/C477360F48FB87A2BB4D451D5DF91FD597937533/", "NumHeight": 1, "NumWidth": 1, "Type": 0, diff --git a/src/chaosbag/BlessCurseManager.ttslua b/src/chaosbag/BlessCurseManager.ttslua index db1d8052..01762257 100644 --- a/src/chaosbag/BlessCurseManager.ttslua +++ b/src/chaosbag/BlessCurseManager.ttslua @@ -387,8 +387,11 @@ end --------------------------------------------------------- function addMenuOptions(parameters) + log(parameters) local playerColor = parameters.playerColor local hoveredObject = parameters.hoveredObject + local noCurse = parameters.noCurse or false + if hoveredObject == nil or hoveredObject.type ~= "Card" then broadcastToColor("Right-click seal options can only be added to cards.", playerColor) return @@ -407,15 +410,17 @@ function addMenuOptions(parameters) tokenArrangerApi.layout() end, true) - hoveredObject.addContextMenuItem("Seal Curse", function(color) - sealToken("Curse", color, hoveredObject) - tokenArrangerApi.layout() - end, true) + if not noCurse then + hoveredObject.addContextMenuItem("Seal Curse", function(color) + sealToken("Curse", color, hoveredObject) + tokenArrangerApi.layout() + end, true) - hoveredObject.addContextMenuItem("Release Curse", function(color) - releaseToken("Curse", color, hoveredObject) - tokenArrangerApi.layout() - end, true) + hoveredObject.addContextMenuItem("Release Curse", function(color) + releaseToken("Curse", color, hoveredObject) + tokenArrangerApi.layout() + end, true) + end broadcastToColor("Right-click seal options added to " .. hoveredObject.getName(), playerColor) hoveredObject.setVar("MENU_ADDED", true) diff --git a/src/chaosbag/BlessCurseManagerApi.ttslua b/src/chaosbag/BlessCurseManagerApi.ttslua index 26bfcb8a..aae9df56 100644 --- a/src/chaosbag/BlessCurseManagerApi.ttslua +++ b/src/chaosbag/BlessCurseManagerApi.ttslua @@ -51,8 +51,9 @@ do -- adds bless / curse sealing to the hovered card ---@param playerColor string Color of the player to show the broadcast to ---@param hoveredObject tts__Object Hovered object - BlessCurseManagerApi.addBlurseSealingMenu = function(playerColor, hoveredObject) - getManager().call("addMenuOptions", { playerColor = playerColor, hoveredObject = hoveredObject }) + ---@param noCurse? boolean True if just Bless sealing should be added (Parallel Mateo) + BlessCurseManagerApi.addBlurseSealingMenu = function(playerColor, hoveredObject, noCurse) + getManager().call("addMenuOptions", { playerColor = playerColor, hoveredObject = hoveredObject, noCurse = noCurse }) end -- adds bless / curse to the chaos bag diff --git a/src/playercards/CardsThatSealTokens.ttslua b/src/playercards/CardsThatSealTokens.ttslua index 3e01d56a..4d94faa0 100644 --- a/src/playercards/CardsThatSealTokens.ttslua +++ b/src/playercards/CardsThatSealTokens.ttslua @@ -134,12 +134,16 @@ function generateContextMenu() end if RESOLVE_TOKEN then - local firstTokenType + local label for tokenType, val in pairs(VALID_TOKENS) do - firstTokenType = tokenType - break + if label and label ~= tokenType then + label = "sealed token" + break + else + label = tokenType + end end - self.addContextMenuItem("Resolve " .. firstTokenType, resolveSealed) + self.addContextMenuItem("Resolve " .. label, resolveSealed) end if SHOW_MULTI_RETURN then @@ -152,7 +156,7 @@ function generateContextMenu() -- main context menu options to seal tokens for _, map in pairs(ID_URL_MAP) do - if (VALID_TOKENS[map.name] ~= nil) or (UPDATE_ON_HOVER and tokensInBag[map.name] and not INVALID_TOKENS[map.name]) then + if (VALID_TOKENS[map.name] ~= nil) or (UPDATE_ON_HOVER and tokensInBag[map.name] and INVALID_TOKENS and not INVALID_TOKENS[map.name]) then if not SHOW_MULTI_SEAL then self.addContextMenuItem("Seal " .. map.name, function(playerColor) sealToken(map.name, playerColor) diff --git a/src/playercards/PlayerCardPanelData.ttslua b/src/playercards/PlayerCardPanelData.ttslua index 315d15f0..3333e594 100644 --- a/src/playercards/PlayerCardPanelData.ttslua +++ b/src/playercards/PlayerCardPanelData.ttslua @@ -345,7 +345,7 @@ INVESTIGATORS["Finn Edwards"] = { INVESTIGATORS["Father Mateo"] = { cards = { "04004", "04004-p", "04004-pf", "04004-pb" }, minicards = { "04004-m" }, - signatures = { "04013", "04014" }, + signatures = { "04013", "04014", "90082", "90083" }, starterDeck = "2625005" } INVESTIGATORS["Calvin Wright"] = { diff --git a/src/playercards/cards/FatherMateoParallel.ttslua b/src/playercards/cards/FatherMateoParallel.ttslua new file mode 100644 index 00000000..a368e2da --- /dev/null +++ b/src/playercards/cards/FatherMateoParallel.ttslua @@ -0,0 +1,13 @@ +local blessCurseManagerApi = require("chaosbag/BlessCurseManagerApi") +local playermatApi = require("playermat/PlayermatApi") + +function onLoad() + self.addContextMenuItem("Enable menus", addSealingMenus) +end + +function addSealingMenus(playerColor) + self.clearContextMenu() + for _, obj in ipairs(playermatApi.getUsedInvestigatorCards()) do + blessCurseManagerApi.addBlurseSealingMenu(playerColor, obj, true) + end +end diff --git a/src/playercards/cards/SerpentsofYigAdvanced.ttslua b/src/playercards/cards/SerpentsofYigAdvanced.ttslua index ff729436..fec2b554 100644 --- a/src/playercards/cards/SerpentsofYigAdvanced.ttslua +++ b/src/playercards/cards/SerpentsofYigAdvanced.ttslua @@ -1,11 +1,10 @@ VALID_TOKENS = { - ["Elder Sign"] = true, - ["Bless"] = true + ["Bless"] = true, + ["Elder Sign"] = true } KEEP_OPEN = true UPDATE_ON_HOVER = true MAX_SEALED = 11 -SHOW_MULTI_RELEASE = 11 require("playercards/CardsThatSealTokens") diff --git a/src/playercards/cards/TheCodexofAgesAdvanced.ttslua b/src/playercards/cards/TheCodexofAgesAdvanced.ttslua index 1946fb3b..8ceea1fd 100644 --- a/src/playercards/cards/TheCodexofAgesAdvanced.ttslua +++ b/src/playercards/cards/TheCodexofAgesAdvanced.ttslua @@ -1,6 +1,6 @@ VALID_TOKENS = { - ["Elder Sign"] = true, - ["Bless"] = true + ["Bless"] = true, + ["Elder Sign"] = true } KEEP_OPEN = true diff --git a/src/playermat/PlayermatApi.ttslua b/src/playermat/PlayermatApi.ttslua index 8233ad02..46930241 100644 --- a/src/playermat/PlayermatApi.ttslua +++ b/src/playermat/PlayermatApi.ttslua @@ -289,6 +289,19 @@ do return usedColors end + -- Returns a list of investigator card objects + PlayermatApi.getUsedInvestigatorCards = function() + local usedCards = {} + for _, mat in pairs(getMatForColor("All")) do + local searchPos = mat.positionToWorld(localInvestigatorPosition) + local searchResult = searchLib.atPosition(searchPos, "isCardOrDeck") + if #searchResult > 0 then + table.insert(usedCards, searchResult[1]) + end + end + return usedCards + end + -- Returns investigator name ---@param matColor string Color of the playmat - White, Orange, Green or Red (does not support "All") PlayermatApi.getInvestigatorName = function(matColor)