added different color handling
This commit is contained in:
parent
33334b4058
commit
762756430a
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user