A really easy way is to make defense a percentage of damage reduction. ie, 10% and ugradable to 15%, 20% etc etc.
Then you only need to do:
Subtract (Damage * PlayerDefense) from PlayerLife.
PlayerDefense default = 1.0 = no damage reduction. If you want 10%, then just make it 0.9 and the player will take only 90% of the damage.
Otherwise you will have to add a trigger prior to doing that calculation.
ie. If Damage < PlayerDefense = destroy bullet only, no damage calculation.
Else, do the damage - defense calculation and subtract it from life.
Edit: Both works, its what I do for my games. But the first method is better because it has one less event check, so it runs faster on mobiles.