Syntax for switches in the damage formula

So i want to make a skill that halves the current HP of an enemy.
However this would be extremly overpowerd in a bossfight, so the formula will check if the battle is a bossfight

I've created a switch that is on when the party is facing a boss
But the formula i've come up with doesn't work

$gameSwitches.value(9) ? a.atk * 2 - b.def : b.hp \ 2

When looking in the console it says there is a syntax error
Any ideas what to write instead?
Try
Code:
$gameSwitches.value(9) === true
for your condition instead.
How exactly?^^'
Tried it like this, but that also doesn't work

$gameSwitches.value(9) === true ? a.atk * 2 - b.def : b.hp \ 2
You've used the wrong slash for your division. Should be b.hp / 2
Thanks now it works 🙂
Just verified as well that just $gameSwitches.value(9) is fine, you don't need the === true

Original thread: https://forums.rpgmakerweb.com/threads/syntax-for-switches-in-the-damage-formula.123806/