Merge pull request #952 from dscarpac/attachment

Added multihanded support to Attachment Helper
This commit is contained in:
Chr1Z 2024-11-02 01:32:43 +01:00 committed by GitHub
commit 02f8dc26a4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -257,6 +257,14 @@ end
-- handle card drawing via number typing for multihanded gameplay -- handle card drawing via number typing for multihanded gameplay
-- (and additionally allow Norman Withers to draw multiple cards via number) -- (and additionally allow Norman Withers to draw multiple cards via number)
function onObjectNumberTyped(hoveredObject, playerColor, number) function onObjectNumberTyped(hoveredObject, playerColor, number)
-- adds cards to appropriate hand for Attachment Helper
if hoveredObject.getName() == "Attachment Helper" then
local matColor = playermatApi.getMatColorByPosition(hoveredObject.getPosition())
local handColor = playermatApi.getPlayerColor(matColor)
hoveredObject.deal(number, handColor)
return true
end
-- only continue for decks or cards -- only continue for decks or cards
if hoveredObject.type ~= "Deck" and hoveredObject.type ~= "Card" then return end if hoveredObject.type ~= "Deck" and hoveredObject.type ~= "Card" then return end