diff --git a/src/util/TokenSpawnTool.ttslua b/src/util/TokenSpawnTool.ttslua index bb4356ec..e140aee2 100644 --- a/src/util/TokenSpawnTool.ttslua +++ b/src/util/TokenSpawnTool.ttslua @@ -66,12 +66,16 @@ function onScriptingButtonDown(index, playerColor) -- check for nearest investigator card and change action token state to its class elseif tokenType == "universalActionAbility" then - local matColor = playermatApi.getMatColorByPosition(position) - local matRotation = playermatApi.returnRotation(matColor) - local class = playermatApi.returnInvestigatorClass(matColor) callback = function(spawned) + local matColor = playermatApi.getMatColorByPosition(position) + local matRotation = playermatApi.returnRotation(matColor) + local activeInvestigatorData = playermatApi.getActiveInvestigatorData(matColor) + spawned.setRotation(matRotation) - spawned.call("updateClassAndSymbol", { class = class, symbol = class }) + spawned.call("updateClassAndSymbol", { + class = activeInvestigatorData.class, + symbol = activeInvestigatorData.class + }) end end