You are very close with the discount that you are crafting, you just need to specify price rather than total price for the calculation portion. This way it will take the price of the item, and give a discount based on this value. For 50% off you would multiply by .5.
If you had it set this way and had two $10 widgets in the cart and the correct coupon code was entered you would give a discount of $10 * .5 which would be $5, so the total would be $15 after the discount.