From 762756430a6f0fffa7e6890fd2e32e8e11457e10 Mon Sep 17 00:00:00 2001 From: Chr1Z93 Date: Sun, 5 Nov 2023 00:32:19 +0100 Subject: [PATCH] added different color handling --- src/playercards/cards/ScrollofSecrets.ttslua | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/playercards/cards/ScrollofSecrets.ttslua b/src/playercards/cards/ScrollofSecrets.ttslua index c37cc45e..33b78779 100644 --- a/src/playercards/cards/ScrollofSecrets.ttslua +++ b/src/playercards/cards/ScrollofSecrets.ttslua @@ -29,7 +29,9 @@ end function contextFunc(playerColor, amount) local options = Player.getAvailableColors() - table.insert(options, "Encounter") + table.insert(options, "Encounter Deck") + + -- show the target selection dialog Player[playerColor].showOptionsDialog("Select target deck", options, _, function(owner) drawCardsFromBottom(playerColor, owner, amount) @@ -44,10 +46,11 @@ function drawCardsFromBottom(playerColor, owner, amount) local deckAreaObjects = {} -- get the respective deck - if owner == "Encounter" then + if owner == "Encounter Deck" then deck = mythosAreaApi.getEncounterDeck() else - deckAreaObjects = playmatApi.getDeckAreaObjects(owner) + local matColor = playmatApi.getMatColor(owner) + deckAreaObjects = playmatApi.getDeckAreaObjects(matColor) deck = deckAreaObjects.draw end