Hey guys, just need a little help cleaning my code. It messy, but I don’t know what other way to make it simpler. Any help would be appreciated.
if(eElem == "Neutral") {
_root.playerMinDmg = Math.round((_root.strBonus+_root.playerstr)/1*0.8+_root.wepMinDmg);
_root.playerMaxDmg = Math.round((_root.strBonus+_root.playerstr)/1*1.6+_root.wepMaxDmg);
} else if (pElem == eContrastElem) {
_root.playerMinDmg = Math.round((_root.strBonus+_root.playerstr)/1*0.8+_root.wepMinDmg);
_root.playerMaxDmg = Math.round((_root.strBonus+_root.playerstr)/1*1.6+_root.wepMaxDmg);
playerMinDmg = Math.round(playerMinDmg *= 2);
playerMaxDmg = Math.round(playerMaxDmg *= 2);
} else if (pElem == eAdvElem) {
_root.playerMinDmg = Math.round((_root.strBonus+_root.playerstr)/1*0.8+_root.wepMinDmg);
_root.playerMaxDmg = Math.round((_root.strBonus+_root.playerstr)/1*1.6+_root.wepMaxDmg);
playerMinDmg = Math.round(playerMinDmg /= 2);
playerMaxDmg = Math.round(playerMaxDmg /= 2);
}
Thanks.