Merge pull request #664 from dscarpac/discard-pile-tokens
Bugfix: Discard tokens that are on cards that enter discard pile deck
This commit is contained in:
commit
c9b8ae3a51
@ -99,12 +99,13 @@ function onCollisionExit(collisionInfo)
|
||||
end
|
||||
end
|
||||
|
||||
-- Listens for cards entering the encounter deck or encounter discard, and resets the spawn state
|
||||
-- for the cards when they do.
|
||||
-- Listens for cards entering the encounter deck or encounter discard, discards tokens on them,
|
||||
-- and resets the spawn state for the cards when they do.
|
||||
function onObjectEnterContainer(container, object)
|
||||
local localPos = self.positionToLocal(container.getPosition())
|
||||
if inArea(localPos, ENCOUNTER_DECK_AREA) or inArea(localPos, ENCOUNTER_DISCARD_AREA) then
|
||||
tokenSpawnTrackerApi.resetTokensSpawned(object.getGUID())
|
||||
removeTokensFromObject(object)
|
||||
end
|
||||
end
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user