You need to add another condition to the bomb planting where it checks the variable. If the variable is < 1 you do not allow them to plant the bomb. You can do this two ways:
1. On your plant the bomb event add a second condition that if variable is equal to 1 (Events only happen if all conditions are met)
2. On your plant the bomb event add a condition that variable is not equal to or greater than 0 (again, if the condition is not met, the event does not fire of it's actions)
You can check the platformer tutorial or the basic tutorial (sorry I forget which one has you add multiple conditions to an event) for an example of adding multiple conditions to an event. I believe it is in the platformer tutorial by Ashley where you set the animation for idle or running based on multiple conditions. Also the part about jumping on the snails also has multiple conditions that need to be met in order to tell if you kill the snail or take damage instead. These should give you a good starting point.
Basically what you need to do as part of the bomb action, is to check to make sure the variable = 1 or is greater then 0. If it fails the check, the condition is not met and the action should not happen.