If you are going for that you should probably add all 3 shields into 1 set of code. Since i'm not really sure how this is going to work but I'm familiar with the encounter each boss has a buff they gain that while it's active you don't want to keep attacking.
1. Impervious Shield
2. Shield of Darkness
3. Sleight of Hand
So what you would be looking for is the code that checks for all three of those buffs and if any are present it stops attacking.