For example, damage is calculated by Attack minus Defense. To do this, I normally use getImpersonated() and getSelected() to switch between tokens with switchToken() and that works. The idea is to find my Attack value by using getImpersonated() and then getting the selected's Defense value by using getSelected() and swapping between the two tokens by using switchToken(). But here's the problem. What if I wanted to come up with an attack that does AOE damage, i.e. harming multiple targets within one turn? If I highlight multiple tokens, it gives an error. Here's an example of what kind of code is being used:
Code: Select all
[h:enemy=getSelected()]
[h:player=getImpersonated()]
[h:switchToken(player)]
[h:attack=Strength]
[h:switchToken(enemy)]
[h:defense=AC]
[h:damage=1d20+attack-defense]