Optimised mainDice IF Statement