From 977c2c4c050a96f83b822729f0ced5812f5fc017 Mon Sep 17 00:00:00 2001 From: ProfessorSidon Date: Wed, 18 Dec 2019 18:03:44 +0000 Subject: [PATCH] Fix burn damage Burn damage is reduced to 1/16 of HP from generation 7 onward. Mentioned in issue #79 Signed-off-by: ProfessorSidon --- script_res/ko_chance.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/script_res/ko_chance.js b/script_res/ko_chance.js index 3b317ab..0fecc36 100644 --- a/script_res/ko_chance.js +++ b/script_res/ko_chance.js @@ -120,11 +120,12 @@ function getKOChanceText(damage, move, defender, field, isBadDreams) { toxicCounter = defender.toxicCounter; } } else if (defender.status === 'Burned') { + var burnDmgDivider = (gen >= 7) ? 16 : 8; if (defender.ability === 'Heatproof') { - eot -= Math.floor(defender.maxHP / 16); + eot -= Math.floor(defender.maxHP / burnDmgDivider / 2); eotText.push('reduced burn damage'); } else if (defender.ability !== 'Magic Guard') { - eot -= Math.floor(defender.maxHP / 8); + eot -= Math.floor(defender.maxHP / burnDmgDivider); eotText.push('burn damage'); } } else if (defender.status === 'Asleep' && isBadDreams && defender.ability !== 'Magic Guard') {