added different color handling
This commit is contained in:
parent
33334b4058
commit
762756430a
@ -29,7 +29,9 @@ end
|
|||||||
|
|
||||||
function contextFunc(playerColor, amount)
|
function contextFunc(playerColor, amount)
|
||||||
local options = Player.getAvailableColors()
|
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, _,
|
Player[playerColor].showOptionsDialog("Select target deck", options, _,
|
||||||
function(owner)
|
function(owner)
|
||||||
drawCardsFromBottom(playerColor, owner, amount)
|
drawCardsFromBottom(playerColor, owner, amount)
|
||||||
@ -44,10 +46,11 @@ function drawCardsFromBottom(playerColor, owner, amount)
|
|||||||
local deckAreaObjects = {}
|
local deckAreaObjects = {}
|
||||||
|
|
||||||
-- get the respective deck
|
-- get the respective deck
|
||||||
if owner == "Encounter" then
|
if owner == "Encounter Deck" then
|
||||||
deck = mythosAreaApi.getEncounterDeck()
|
deck = mythosAreaApi.getEncounterDeck()
|
||||||
else
|
else
|
||||||
deckAreaObjects = playmatApi.getDeckAreaObjects(owner)
|
local matColor = playmatApi.getMatColor(owner)
|
||||||
|
deckAreaObjects = playmatApi.getDeckAreaObjects(matColor)
|
||||||
deck = deckAreaObjects.draw
|
deck = deckAreaObjects.draw
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user