Gladiator Warrior Boolean Logic Macro Help

Ok so I’ll start with my set up, and then get into what I’m trying to do, heads up this isn’t an easy request :slight_smile:

  1. Revenge
  2. Devastate
  3. Shield Charge
  4. Shield Slam
  5. Execute

What I wan’t to set up is a macro to 1,2,4,5 that casts the relevant spell heroic strike but only when I have enough rage to cast Heroic Strike and have enough left over to Shield Charge at all times. Now this is where it gets annoying, I use unyielding strikes so;

“Devastate reduces the Rage cost of Heroic Strike by 5 for 5 sec, stacking up to 6 times. Once this effect reaches 6 applications, its duration will no longer refresh.”

Also Revenge generates 20 Rage, Shield Slam Generates 20 Rage, UNLESS it’s a reset proc from Devastate in which case it produces 25 Rage

So essentially
1 stack, rage cost of Heroic Strike = 25
2 stack, rage cost of Heroic Strike = 20
3 stack, rage cost of Heroic Strike = 15
4 stack, rage cost of Heroic Strike = 10
5 stack, rage cost of Heroic Strike = 5
6 stack, rage cost of Heroic Strike = 0

To avoid the complication of Rage ‘Before vs After’ casting the Non-Heroic-Strike spell I would assume the Boolean check would occur after the cast of either Devastate, Revenge or Shield Slam.

Something that might help:
(first some variables)
U = Number of stacks of Unyielding Strike

/cast Devastate
/castif(
((30-(U*5))≥20) Then //Multiplies the # of stacks by 5 and checks if its above 20
/cast Heroic Strike Else //if it does then casts heroic strike, if not, nothing.
‘do nothing’

If that makes sense at all, I know what I’m asking is a stretch and I’m not sure if this addon can handle this but thought it would be a good place to start, if it can’t handle my request and you know something similar that can let me know!