diff --git a/unpacked.ttslua b/unpacked.ttslua index 11b05d07d..517c20f60 100644 --- a/unpacked.ttslua +++ b/unpacked.ttslua @@ -350,6 +350,8 @@ function onLoad(savedData) optionPanel = loadedData.optionPanel acknowledgedUpgradeVersions = loadedData.acknowledgedUpgradeVersions updateOptionPanelState() + -- hack to disable on load + playmatApi.clickableClues(false, "All") else print("Saved state could not be found!") end @@ -399,25 +401,20 @@ function tryObjectEnterContainer(container, object) return true end -function drawEncountercard(params) - local position = params[1] - local rotation = params[2] - local alwaysFaceUp = params[3] - local card +function drawEncountercard(color) --[[ Parameter Player color ]] local items = findInRadiusBy(ENCOUNTER_DECK_POS, 4, isCardOrDeck) if #items > 0 then for _, v in ipairs(items) do if v.tag == 'Deck' then - card = v.takeObject({index = 0}) - break + v.deal(1, color) + return end end -- we didn't find the deck so just pull the first thing we did find - if card == nil then card = items[1] end - actualEncounterCardDraw(card, params) + items[1].deal(1, color) else -- nothing here, time to reshuffle - reshuffleEncounterDeck(params) + reshuffleEncounterDeck(color) end end @@ -436,11 +433,11 @@ function actualEncounterCardDraw(card, params) card.setRotationSmooth({0, rotation.y, faceUpRotation}, false, false) end -function reshuffleEncounterDeck(params) +function reshuffleEncounterDeck(color) -- finishes moving the deck back and draws a card local function move(deck) deck.setPositionSmooth({ENCOUNTER_DECK_POS[1], ENCOUNTER_DECK_POS[2] + 2, ENCOUNTER_DECK_POS[3]}, false, true) - actualEncounterCardDraw(deck.takeObject({index=0}), params) + deck.deal(1, color) Wait.time(function() IS_RESHUFFLING = false end, 1) end -- bail out if we're mid reshuffle diff --git a/unpacked.yaml b/unpacked.yaml index 6cc686355..c662434f7 100644 --- a/unpacked.yaml +++ b/unpacked.yaml @@ -569,62 +569,6 @@ SnapPoints: x: -3.85 y: 1.58 z: -10.39 -- Position: - x: -45.3 - y: 1.48 - z: 31.67 -- Position: - x: -45.3 - y: 1.48 - z: 29.73 -- Position: - x: -45.3 - y: 1.48 - z: 27.8 -- Position: - x: -45.3 - y: 1.48 - z: 25.86 -- Position: - x: -45.3 - y: 1.48 - z: 23.93 -- Position: - x: -45.3 - y: 1.48 - z: 21.99 -- Position: - x: -45.3 - y: 1.48 - z: 20.06 -- Position: - x: -45.3 - y: 1.48 - z: -20.62 -- Position: - x: -45.3 - y: 1.48 - z: -22.55 -- Position: - x: -45.3 - y: 1.48 - z: -24.49 -- Position: - x: -45.3 - y: 1.48 - z: -26.43 -- Position: - x: -45.3 - y: 1.48 - z: -28.36 -- Position: - x: -45.3 - y: 1.48 - z: -30.3 -- Position: - x: -45.3 - y: 1.48 - z: -32.23 - Position: x: 65.0 y: 1.48 diff --git a/unpacked/Custom_Tile ArkhamDB Deck Importer a28140.ttslua b/unpacked/Custom_Tile ArkhamDB Deck Importer a28140.ttslua index 5eada9726..12615c83d 100644 --- a/unpacked/Custom_Tile ArkhamDB Deck Importer a28140.ttslua +++ b/unpacked/Custom_Tile ArkhamDB Deck Importer a28140.ttslua @@ -970,6 +970,10 @@ function onLoad(script_state) arkhamDb.initialize() end +function arkhamdb_reinit() + arkhamDb.initialize() +end + function onSave() return JSON.encode(getUiState()) end -- Returns the zone name where the specified card should be placed, based on its metadata. diff --git a/unpacked/Custom_Tile Neutral 012577.yaml b/unpacked/Custom_Tile Neutral 012577.yaml index 92a54f5fb..a0c5824fe 100644 --- a/unpacked/Custom_Tile Neutral 012577.yaml +++ b/unpacked/Custom_Tile Neutral 012577.yaml @@ -2019,12 +2019,12 @@ Tags: - ActionToken Tooltip: true Transform: - posX: -53.2 - posY: 1.57 - posZ: 10.54 + posX: -47.7 + posY: 1.48 + posZ: 9.82 rotX: 0.0 rotY: 270.01 - rotZ: 356.65 + rotZ: 0.0 scaleX: 0.35 scaleY: 1.0 scaleZ: 0.35 diff --git a/unpacked/Custom_Tile Neutral 0329cc.yaml b/unpacked/Custom_Tile Neutral 0329cc.yaml index 07c06d8d1..5c1c1123a 100644 --- a/unpacked/Custom_Tile Neutral 0329cc.yaml +++ b/unpacked/Custom_Tile Neutral 0329cc.yaml @@ -2019,11 +2019,11 @@ Tags: - ActionToken Tooltip: true Transform: - posX: -23.92 - posY: 1.55 - posZ: -24.8 + posX: -19.03 + posY: 1.48 + posZ: -39.97 rotX: 0.0 - rotY: 180.0 + rotY: 270.0 rotZ: 0.0 scaleX: 0.45 scaleY: 1.0 diff --git a/unpacked/Custom_Tile Neutral 04765b.yaml b/unpacked/Custom_Tile Neutral 04765b.yaml index c78f4a557..9be01f8c3 100644 --- a/unpacked/Custom_Tile Neutral 04765b.yaml +++ b/unpacked/Custom_Tile Neutral 04765b.yaml @@ -2019,9 +2019,9 @@ Tags: - ActionToken Tooltip: true Transform: - posX: -53.2 - posY: 1.58 - posZ: 9.67 + posX: -47.7 + posY: 1.48 + posZ: 8.63 rotX: 0.0 rotY: 270.0 rotZ: 0.0 diff --git a/unpacked/Custom_Tile Neutral 183dbe.yaml b/unpacked/Custom_Tile Neutral 183dbe.yaml index fa79e3387..f1cfe0845 100644 --- a/unpacked/Custom_Tile Neutral 183dbe.yaml +++ b/unpacked/Custom_Tile Neutral 183dbe.yaml @@ -2019,11 +2019,11 @@ Tags: - ActionToken Tooltip: true Transform: - posX: -37.94 + posX: -19.33 posY: 1.48 - posZ: 24.8 + posZ: 23.75 rotX: 0.0 - rotY: 0.0 + rotY: 270.0 rotZ: 0.0 scaleX: 0.45 scaleY: 1.0 diff --git a/unpacked/Custom_Tile Neutral 1cb302.yaml b/unpacked/Custom_Tile Neutral 1cb302.yaml index 31f6dab06..b0476524a 100644 --- a/unpacked/Custom_Tile Neutral 1cb302.yaml +++ b/unpacked/Custom_Tile Neutral 1cb302.yaml @@ -2019,11 +2019,11 @@ Tags: - ActionToken Tooltip: true Transform: - posX: -56.49 - posY: 1.55 - posZ: 9.25 + posX: -47.7 + posY: 1.48 + posZ: 6.15 rotX: 0.0 - rotY: 286.58 + rotY: 270.0 rotZ: 0.0 scaleX: 0.45 scaleY: 1.0 diff --git a/unpacked/Custom_Tile Neutral 2691e1.yaml b/unpacked/Custom_Tile Neutral 2691e1.yaml index 60028426a..242817e08 100644 --- a/unpacked/Custom_Tile Neutral 2691e1.yaml +++ b/unpacked/Custom_Tile Neutral 2691e1.yaml @@ -2019,12 +2019,12 @@ Tags: - ActionToken Tooltip: true Transform: - posX: -53.14 - posY: 1.55 - posZ: -24.88 - rotX: 359.27 - rotY: 273.73 - rotZ: 0.05 + posX: -47.7 + posY: 1.48 + posZ: -26.05 + rotX: 0.0 + rotY: 270.0 + rotZ: 0.0 scaleX: 0.45 scaleY: 1.0 scaleZ: 0.45 diff --git a/unpacked/Custom_Tile Neutral 271b17.yaml b/unpacked/Custom_Tile Neutral 271b17.yaml index 4049f928a..5ef490390 100644 --- a/unpacked/Custom_Tile Neutral 271b17.yaml +++ b/unpacked/Custom_Tile Neutral 271b17.yaml @@ -2019,9 +2019,9 @@ Tags: - ActionToken Tooltip: true Transform: - posX: -53.2 - posY: 1.58 - posZ: -22.53 + posX: -47.7 + posY: 1.48 + posZ: -23.57 rotX: 0.0 rotY: 270.0 rotZ: 0.0 diff --git a/unpacked/Custom_Tile Neutral 429bb3.yaml b/unpacked/Custom_Tile Neutral 429bb3.yaml index bfeead66b..7fcb90841 100644 --- a/unpacked/Custom_Tile Neutral 429bb3.yaml +++ b/unpacked/Custom_Tile Neutral 429bb3.yaml @@ -2019,11 +2019,11 @@ Tags: - ActionToken Tooltip: true Transform: - posX: -36.78 + posX: -19.33 posY: 1.48 - posZ: 24.8 + posZ: 25.03 rotX: 0.0 - rotY: 0.0 + rotY: 270.0 rotZ: 0.0 scaleX: 0.45 scaleY: 1.0 diff --git a/unpacked/Custom_Tile Neutral 5825ca.yaml b/unpacked/Custom_Tile Neutral 5825ca.yaml index 4e647f0a0..eff3a709a 100644 --- a/unpacked/Custom_Tile Neutral 5825ca.yaml +++ b/unpacked/Custom_Tile Neutral 5825ca.yaml @@ -2019,11 +2019,11 @@ Tags: - ActionToken Tooltip: true Transform: - posX: -21.61 - posY: 1.55 - posZ: -24.8 + posX: -19.03 + posY: 1.48 + posZ: -42.45 rotX: 0.0 - rotY: 180.0 + rotY: 270.0 rotZ: 0.0 scaleX: 0.45 scaleY: 1.0 diff --git a/unpacked/Custom_Tile Neutral 5bafdf.yaml b/unpacked/Custom_Tile Neutral 5bafdf.yaml index d513c9787..395456de7 100644 --- a/unpacked/Custom_Tile Neutral 5bafdf.yaml +++ b/unpacked/Custom_Tile Neutral 5bafdf.yaml @@ -2019,12 +2019,12 @@ Tags: - ActionToken Tooltip: true Transform: - posX: -53.2 - posY: 1.57 - posZ: -21.64 - rotX: 358.56 - rotY: 270.06 - rotZ: 356.72 + posX: -47.7 + posY: 1.48 + posZ: -22.38 + rotX: 0.0 + rotY: 270.01 + rotZ: 0.0 scaleX: 0.35 scaleY: 1.0 scaleZ: 0.35 diff --git a/unpacked/Custom_Tile Neutral 5bec40.yaml b/unpacked/Custom_Tile Neutral 5bec40.yaml index 945291ce8..4a16ca833 100644 --- a/unpacked/Custom_Tile Neutral 5bec40.yaml +++ b/unpacked/Custom_Tile Neutral 5bec40.yaml @@ -2019,11 +2019,11 @@ Tags: - ActionToken Tooltip: true Transform: - posX: -22.76 - posY: 1.55 - posZ: -24.8 + posX: -19.03 + posY: 1.48 + posZ: -41.25 rotX: 0.0 - rotY: 180.0 + rotY: 270.0 rotZ: 0.0 scaleX: 0.45 scaleY: 1.0 diff --git a/unpacked/Custom_Tile Neutral 748245.yaml b/unpacked/Custom_Tile Neutral 748245.yaml index 48a5cfe30..8ae797e86 100644 --- a/unpacked/Custom_Tile Neutral 748245.yaml +++ b/unpacked/Custom_Tile Neutral 748245.yaml @@ -2019,9 +2019,9 @@ Tags: - ActionToken Tooltip: true Transform: - posX: -53.2 - posY: 1.58 - posZ: -23.69 + posX: -47.7 + posY: 1.48 + posZ: -24.85 rotX: 0.0 rotY: 270.0 rotZ: 0.0 diff --git a/unpacked/Custom_Tile Neutral af1927.yaml b/unpacked/Custom_Tile Neutral af1927.yaml index 94f1220d2..3c8a712f0 100644 --- a/unpacked/Custom_Tile Neutral af1927.yaml +++ b/unpacked/Custom_Tile Neutral af1927.yaml @@ -2019,11 +2019,11 @@ Tags: - ActionToken Tooltip: true Transform: - posX: -24.79 - posY: 1.55 - posZ: -24.8 + posX: -19.03 + posY: 1.48 + posZ: -38.78 rotX: 0.0 - rotY: 180.0 + rotY: 270.01 rotZ: 0.0 scaleX: 0.35 scaleY: 1.0 diff --git a/unpacked/Custom_Tile Neutral b71036.yaml b/unpacked/Custom_Tile Neutral b71036.yaml index 59a8518bf..e9fc2f966 100644 --- a/unpacked/Custom_Tile Neutral b71036.yaml +++ b/unpacked/Custom_Tile Neutral b71036.yaml @@ -2019,9 +2019,9 @@ Tags: - ActionToken Tooltip: true Transform: - posX: -53.2 - posY: 1.58 - posZ: 8.51 + posX: -47.7 + posY: 1.48 + posZ: 7.35 rotX: 0.0 rotY: 270.0 rotZ: 0.0 diff --git a/unpacked/Custom_Tile Neutral b80db6.yaml b/unpacked/Custom_Tile Neutral b80db6.yaml index 5732eca16..634abb369 100644 --- a/unpacked/Custom_Tile Neutral b80db6.yaml +++ b/unpacked/Custom_Tile Neutral b80db6.yaml @@ -2019,11 +2019,11 @@ Tags: - ActionToken Tooltip: true Transform: - posX: -39.09 + posX: -19.33 posY: 1.48 - posZ: 24.8 + posZ: 22.55 rotX: 0.0 - rotY: 0.0 + rotY: 270.0 rotZ: 0.0 scaleX: 0.45 scaleY: 1.0 diff --git a/unpacked/Custom_Tile Neutral bbc5d4.yaml b/unpacked/Custom_Tile Neutral bbc5d4.yaml index 2ddca15e8..63cc0edbf 100644 --- a/unpacked/Custom_Tile Neutral bbc5d4.yaml +++ b/unpacked/Custom_Tile Neutral bbc5d4.yaml @@ -2019,11 +2019,11 @@ Tags: - ActionToken Tooltip: true Transform: - posX: -35.91 + posX: -19.33 posY: 1.48 - posZ: 24.8 + posZ: 26.22 rotX: 0.0 - rotY: 0.0 + rotY: 270.01 rotZ: 0.0 scaleX: 0.35 scaleY: 1.0 diff --git a/unpacked/Custom_Tile Playermat 1 White 8b081b.ttslua b/unpacked/Custom_Tile Playermat 1 White 8b081b.ttslua index 5b3175580..a13fc314d 100644 --- a/unpacked/Custom_Tile Playermat 1 White 8b081b.ttslua +++ b/unpacked/Custom_Tile Playermat 1 White 8b081b.ttslua @@ -881,7 +881,7 @@ function makeDiscardButton(xValue, discardPosition, number) label = "Discard", click_function = handlerName, function_owner = self, - position = position, + position = {position[1], position[2], position[3] + 0.6}, scale = {0.12, 0.12, 0.12}, width = 900, height = 350, @@ -1462,7 +1462,7 @@ function drawChaosTokenButton(_, _, isRightClick) end function drawEncountercard(_, _, isRightClick) - Global.call("drawEncountercard", {self.positionToWorld(DRAWN_ENCOUNTER_CARD_OFFSET), self.getRotation(), isRightClick}) + Global.call("drawEncountercard", PLAYER_COLOR) end function returnGlobalDiscardPosition()