Disabling Brigitte's Sheild Bash mid-match

My custom game mode has a feature where heroes have limited uses of their abilities, and when their abilities run out, the ability becomes disabled. However, I can’t seem to disable Sheild Bash once its uses have run out. I’ve tried disallowing the Primary Fire button and disabling her Primary Fire while her shield is up, but that only affects her mace and she can keep shield bashing and stunlocking however much she wants. Any advice would be appreciated.

bad ideas:

  1. disable shield
  2. make her phased out while using shield bash

You have to disable Secondary Fire while her shield is active and then re-enable it once she stops using her shield:

rule("Disable Secondary Fire") {
	event {
		Ongoing - Each Player;
		All;
		Brigitte;
	}
	conditions {
		Is Button Held(Event Player,Secondary Fire) == True;
	}
	actions {
		Set Secondary Fire Enabled(Event Player,False);
	}
}
rule("Enable Secondary Fire") {
	event {
		Ongoing - Each Player;
		All;
		Brigitte;
	}
	conditions {
		Is Button Held(Event Player,Secondary Fire) == False;
	}
	actions {
		Set Secondary Fire Enabled(Event Player,True);
	}
}

Edit:

Seems like if you Primary Fire and then Secondary Fire quick enough - at almost the exact the same time - the game isn't running fast enough to apply your Secondary Fire restriction in time and it will slip through. :/

To somewhat counter this, perhaps you could add some kind of daze effect to punish players who try to get past and exploit it:

rule("Exploit Punishment") {
	event {
		Ongoing - Each Player;
		All;
		All;
	}
	conditions {
		Is Button Held(Event Player,Secondary Fire) == True;
		Is Firing Primary(Event Player) == True;
	}
	actions {
		Set Status(Event Player,Null,Stunned,5);
	}
}

Edit 2:

Also, depending on your ping, you might experience some jerkyness where you launch forward, and then once the client and server catch up with each other, you're reset back to your original position.

We really need a way to disable unique extra abilities and passives. While these workarounds are fine for now, they should only be temporary.

Blizzard have provided a way to disable it - as my method demonstrates - I just think they could have done it differently to stop it conflicting with other aspects of the hero controls/abilities.