From 2b686c7df298d5383cfbbaab0af49c6cc38b6dc4 Mon Sep 17 00:00:00 2001 From: dscarpac Date: Wed, 14 Feb 2024 12:16:48 -0600 Subject: [PATCH] removed Nkosi --- .../BookofLivingMyths.c5fb1f.json | 8 +- .../NkosiMabati3.6c5628.json | 114 ------------------ .../cards/BookofLivingMyths.ttslua | 50 ++++---- src/playercards/cards/NkosiMabati3.ttslua | 45 ------- xml/playercards/BookofLivingMyths.xml | 61 ++++------ xml/playercards/NkosiMabati3.xml | 46 ------- 6 files changed, 53 insertions(+), 271 deletions(-) delete mode 100644 objects/AllPlayerCards.15bb07/NkosiMabati3.6c5628.json delete mode 100644 src/playercards/cards/NkosiMabati3.ttslua delete mode 100644 xml/playercards/NkosiMabati3.xml diff --git a/objects/AllPlayerCards.15bb07/BookofLivingMyths.c5fb1f.json b/objects/AllPlayerCards.15bb07/BookofLivingMyths.c5fb1f.json index 1b5d9059..6d255d2c 100644 --- a/objects/AllPlayerCards.15bb07/BookofLivingMyths.c5fb1f.json +++ b/objects/AllPlayerCards.15bb07/BookofLivingMyths.c5fb1f.json @@ -67,13 +67,13 @@ }, { "Type": 0, - "Name": "resolve_bless", - "URL": "http://cloud-3.steamusercontent.com/ugc/2324488110706766387/EDC440CC9E6F1EDA73FB3A7B6DD1DE5ABDBD42D8/" + "Name": "bless", + "URL": "http://cloud-3.steamusercontent.com/ugc/2380784374775547028/7855033DE0EB1FDDF706E1303054D35FE0902532/" }, { "Type": 0, - "Name": "resolve_curse", - "URL": "http://cloud-3.steamusercontent.com/ugc/2380783739898089676/02286A78E1F30A6A0E832F32271621ED5A2E987C/" + "Name": "curse", + "URL": "http://cloud-3.steamusercontent.com/ugc/2380784374775547135/2360372CBE9452CB7B4D135BE13BBA6D46B7D427/" } ] diff --git a/objects/AllPlayerCards.15bb07/NkosiMabati3.6c5628.json b/objects/AllPlayerCards.15bb07/NkosiMabati3.6c5628.json deleted file mode 100644 index eae3c4d8..00000000 --- a/objects/AllPlayerCards.15bb07/NkosiMabati3.6c5628.json +++ /dev/null @@ -1,114 +0,0 @@ -{ - "AltLookAngle": { - "x": 0, - "y": 0, - "z": 0 - }, - "Autoraise": true, - "CardID": 378929, - "ColorDiffuse": { - "b": 0.71324, - "g": 0.71324, - "r": 0.71324 - }, - "CustomDeck": { - "3789": { - "BackIsHidden": true, - "BackURL": "http://cloud-3.steamusercontent.com/ugc/2342503777940352139/A2D42E7E5C43D045D72CE5CFC907E4F886C8C690/", - "FaceURL": "http://cloud-3.steamusercontent.com/ugc/1625226898126493809/0EE7F5B9B916B56425CAC1C46F7FCEF9DBF55112/", - "NumHeight": 7, - "NumWidth": 10, - "Type": 0, - "UniqueBack": false - } - }, - "Description": "Enigmatic Warlock", - "DragSelectable": true, - "GMNotes_path": "AllPlayerCards.15bb07/NkosiMabati3.6c5628.gmnotes", - "GUID": "6c5628", - "Grid": true, - "GridProjection": false, - "Hands": true, - "HideWhenFaceDown": true, - "IgnoreFoW": false, - "LayoutGroupSortIndex": 0, - "Locked": false, - "LuaScript": "require(\"playercards/cards/NkosiMabati3\")", - "LuaScriptState": "", - "MeasureMovement": false, - "Name": "Card", - "Nickname": "Nkosi Mabati (3)", - "SidewaysCard": false, - "Snap": true, - "Sticky": true, - "Tags": [ - "Asset", - "PlayerCard" - ], - "Tooltip": true, - "Transform": { - "posX": 9.182, - "posY": 2.801, - "posZ": -16.733, - "rotX": 0, - "rotY": 270, - "rotZ": 0, - "scaleX": 1, - "scaleY": 1, - "scaleZ": 1 - }, - "Value": 0, - "XmlUI": "\u003cInclude src=\"playercards/NkosiMabati3.xml\"/\u003e", - "CustomUIAssets": [ - { - "Type": 1, - "Name": "font_teutonic-arkham", - "URL": "http://cloud-3.steamusercontent.com/ugc/2027213118467703445/89328E273B4C5180BF491516CE998DE3C604E162/" - }, - { - "Type": 0, - "Name": "bless", - "URL": "http://cloud-3.steamusercontent.com/ugc/2380784374775547028/7855033DE0EB1FDDF706E1303054D35FE0902532/" - }, - { - "Type": 0, - "Name": "curse", - "URL": "http://cloud-3.steamusercontent.com/ugc/2380784374775547135/2360372CBE9452CB7B4D135BE13BBA6D46B7D427/" - }, - { - "Type": 0, - "Name": "skull", - "URL": "http://cloud-3.steamusercontent.com/ugc/2380784374775547231/E0FEEF462DE4E7704832CA2415D0D027A6BF5041/" - }, - { - "Type": 0, - "Name": "autofail", - "URL": "http://cloud-3.steamusercontent.com/ugc/2380784374792650351/EA4CE1F7A59E0B4CF5AD29DBCC40C8413DA14ADC/" - }, - { - "Type": 0, - "Name": "unnamed", - "URL": "http://cloud-3.steamusercontent.com/ugc/2380784374792650571/E4C2B2B69282A4EE15FE290FF6B08BEFC8FCA65C/" - }, - { - "Type": 0, - "Name": "elderthing", - "URL": "http://cloud-3.steamusercontent.com/ugc/2380784374792650683/1C046B6335317CA1AEBFC80645EEC18852D83D80/" - }, - { - "Type": 0, - "Name": "cultist", - "URL": "http://cloud-3.steamusercontent.com/ugc/2380784374792650461/10D8037632900AA86045BDD42A564716D5855B1B/" - }, - { - "Type": 0, - "Name": "tablet", - "URL": "http://cloud-3.steamusercontent.com/ugc/2380784374792650857/29DAE514E5C838C24C90ABBFFF92B1359B9A2F76/" - }, - { - "Type": 0, - "Name": "frost", - "URL": "http://cloud-3.steamusercontent.com/ugc/2380784374792650766/73E07A50BE6FD9BED266F3421B472C4BF913DE81/" - } - ] -} diff --git a/src/playercards/cards/BookofLivingMyths.ttslua b/src/playercards/cards/BookofLivingMyths.ttslua index 5c17b883..6400845c 100644 --- a/src/playercards/cards/BookofLivingMyths.ttslua +++ b/src/playercards/cards/BookofLivingMyths.ttslua @@ -16,15 +16,20 @@ function onLoad(savedData) self.addContextMenuItem("Clear Helper", deleteButtons) end else - self.addContextMenuItem("Enable Helper", createButtons) + self.UI.hide("active_bless") + self.UI.hide("inactive_bless") + self.UI.hide("inactive_curse") + self.UI.hide("active_curse") + self.addContextMenuItem("Enable Helper", createButtons) end end function deleteButtons() - self.UI.hide("bless_button") - self.UI.hide("curse_button") - self.UI.hide("both_buttons") + self.UI.hide("active_bless") + self.UI.hide("inactive_bless") + self.UI.hide("inactive_curse") + self.UI.hide("active_curse") self.clearContextMenu() self.addContextMenuItem("Enable Helper", createButtons) Wait.stop(loopId) @@ -37,29 +42,20 @@ function createButtons() self.addContextMenuItem("Clear Helper", deleteButtons) currentState = "Empty" loopId = Wait.time(countBlessCurse, 1, -1) - end function resolveCurse() local closestMatColor = playmatApi.getMatColorByPosition(self.getPosition()) - log(closestMatColor) local mat = guidReferenceApi.getObjectByOwnerAndType(closestMatColor, "Playermat") - log(mat) tokenType = "Curse" - chaosBagApi.drawChaosToken(mat, true , tokenType) - end function resolveBless() local closestMatColor = playmatApi.getMatColorByPosition(self.getPosition()) - --log(closestMatColor) local mat = guidReferenceApi.getObjectByOwnerAndType(closestMatColor, "Playermat") - --log(mat) tokenType = "Bless" - --self.setRotationSmooth({0, 0, 0}) chaosBagApi.drawChaosToken(mat, true , tokenType) - end function countBlessCurse() @@ -77,30 +73,34 @@ function countBlessCurse() if numInBag.Bless > numInBag.Curse then if currentState ~= "More Bless" then - self.UI.show("bless_button") - self.UI.hide("curse_button") - self.UI.hide("both_buttons") + self.UI.show("active_bless") + self.UI.hide("inactive_bless") + self.UI.show("inactive_curse") + self.UI.hide("active_curse") end currentState = "More Bless" elseif numInBag.Curse > numInBag.Bless then if currentState ~= "More Curse" then - self.UI.show("curse_button") - self.UI.hide("bless_button") - self.UI.hide("both_buttons") + self.UI.show("active_curse") + self.UI.hide("inactive_curse") + self.UI.show("inactive_bless") + self.UI.hide("active_bless") end currentState = "More Curse" elseif numInBag.Curse == 0 then if currentState ~= "Empty" then - self.UI.hide("both_buttons") - self.UI.hide("bless_button") - self.UI.hide("curse_button") + self.UI.show("inactive_bless") + self.UI.hide("active_bless") + self.UI.show("inactive_curse") + self.UI.hide("active_curse") end currentState = "Empty" else if currentState ~= "Equal" then - self.UI.show("both_buttons") - self.UI.hide("bless_button") - self.UI.hide("curse_button") + self.UI.show("active_bless") + self.UI.hide("inactive_bless") + self.UI.show("active_curse") + self.UI.hide("inactive_curse") end currentState = "Equal" end diff --git a/src/playercards/cards/NkosiMabati3.ttslua b/src/playercards/cards/NkosiMabati3.ttslua deleted file mode 100644 index e523d8dc..00000000 --- a/src/playercards/cards/NkosiMabati3.ttslua +++ /dev/null @@ -1,45 +0,0 @@ -local playmatApi = require("playermat/PlaymatApi") -local guidReferenceApi = require("core/GUIDReferenceApi") -local chaosBagApi = require("chaosbag/ChaosBagApi") - - -function chooseSigil(_,_,id) - if id == "Bless" then - sigil = "Bless" - self.UI.hide("sigils") - self.UI.hide("choose") - self.UI.show("resolve_bless") - elseif id == "Curse" then - sigil = "Curse" - self.UI.hide("sigils") - self.UI.hide("choose") - self.UI.show("resolve_curse") - else - sigil = "Skull" - self.UI.hide("sigils") - self.UI.hide("choose") - self.UI.show("resolve_skull") - end - log("Sigil is " .. sigil) - -end - -function resolveSigil() - local closestMatColor = playmatApi.getMatColorByPosition(self.getPosition()) - log(closestMatColor) - local mat = guidReferenceApi.getObjectByOwnerAndType(closestMatColor, "Playermat") - log(mat) - tokenType = sigil - log("hello") - log(tokenType) - - local chaosbag = chaosBagApi.findChaosBag() - for i, obj in ipairs(chaosbag.getObjects()) do - if obj.name == tokenType then - chaosBagApi.drawChaosToken(mat, true, tokenType, _) - return - end - end - broadcastToAll(tokenType .. " token not found in chaos bag", "Red") - -end \ No newline at end of file diff --git a/xml/playercards/BookofLivingMyths.xml b/xml/playercards/BookofLivingMyths.xml index 206fe298..1136a9f9 100644 --- a/xml/playercards/BookofLivingMyths.xml +++ b/xml/playercards/BookofLivingMyths.xml @@ -1,40 +1,27 @@ - - - - - - - - - + + + + + + - - - - - - - - - - - - - - - - + + + + + + \ No newline at end of file diff --git a/xml/playercards/NkosiMabati3.xml b/xml/playercards/NkosiMabati3.xml deleted file mode 100644 index 4c05acf4..00000000 --- a/xml/playercards/NkosiMabati3.xml +++ /dev/null @@ -1,46 +0,0 @@ - - Choose sigil: - - - - - - - - - - - - - - - - - - \ No newline at end of file