Id just use a activation checkbox (instead of having it try to check for flanking itself) and then I think xLevel should give you your total number of levels in that class, then just use that to calculate the bonus, store it in abValue, and if enabled add abValue to the attack roll.
|