Widget:Megaflare Damage Calculator

<!doctype html> FFBE Megaflare Damage Calculator - exviuswiki.com  function calculate { var damage = document.getElementById('calculator-result'); var enemy_mag = document.getElementsByName('enemy_mag')[0].value; var mag_break = document.getElementsByName('mag_break')[0].value; var unit_spr = document.getElementsByName('unit_spr')[0].value; var mitigation = 1 - (document.getElementsByName('mitigation')[0].value / 100); var modifier = document.getElementsByName('modifier')[0].value; var enemy_level = 99; var guard = (document.getElementById("guard").checked == true ? 0.5 : 1);

var max_damage = Math.floor((Math.pow(enemy_mag * (1 - (mag_break / 100)), 2) / unit_spr) * modifier * (1 + (enemy_level / 100)) * mitigation * guard); var min_damage = Math.floor(max_damage * 0.85);

damage.innerHTML = min_damage + " ~ " + max_damage; }	 Modifier  Enemy MAG  MAG Break  Mitigation  Unit SPR  Guard  Damage Calculate