one option is to get all within 1, the split that up using the getDistance with NO_GRID flag. This take a little more effort to sort the results into range 0 and range 1. Plus, it would be inaccurate because a cell does not necessarily start at the center of the target.
Is there another way to make getTokenNames give you all tokens inside the same cell housing the target?
example of what i use now:
Code: Select all
[h: condition = '{ "range": {"upto":'+range+', "distancePerCell":1, "metric": "NO_GRID", "token":"' +primaryTarget+ '"}, "unsetStates":["Dead"] }']
[h: tokensInRange = getTokenNames("json", condition)]
I can just base the whole thing off of getDistance calls but i would then have to group them because the damage in each range is divided among the targets in said range.
Any advice would be greatly appreciated.