TheoGeek
December 18th, 2021, 04:06
So I'm thinking about my Improved Critical extension and am trying to possibly streamline some of the code. Currently, to handle dragging damage to a crit immune target correctly, I put a bunch of stuff in the description so that when it is dragged, I can parse the new tags and come up with the proper damage to apply. It works, but I was wondering if there is some built in mechanism I'm missing that I could use instead.
For example, if I rolled an untargeted crit with a greatsword, and used the default settings, the rolled damage (2d6+2d6+5) might be (3+2)+(4+5)+5 = 19, but the actual damage after my extension would be: (6+6) + (4+5) + 5 = 26.
Now, if I drag that "26" to a normal target, I want it to do 26 damage, which it does.
But, if I drag it to a crit immune target, I want it to do 19 damage (which it also does now.)
But to facilitate this, I keep track of everything I need in the sDesc and it works, but it is also displayed in the chat window in a format that I might do differently if I could track the dragged damage another way, like maybe keep track in a stack or something. But I don't know how the dragged item is retrieved.
Any clues?
Thanks!
For example, if I rolled an untargeted crit with a greatsword, and used the default settings, the rolled damage (2d6+2d6+5) might be (3+2)+(4+5)+5 = 19, but the actual damage after my extension would be: (6+6) + (4+5) + 5 = 26.
Now, if I drag that "26" to a normal target, I want it to do 26 damage, which it does.
But, if I drag it to a crit immune target, I want it to do 19 damage (which it also does now.)
But to facilitate this, I keep track of everything I need in the sDesc and it works, but it is also displayed in the chat window in a format that I might do differently if I could track the dragged damage another way, like maybe keep track in a stack or something. But I don't know how the dragged item is retrieved.
Any clues?
Thanks!