Skip to content

Commit

Permalink
Fix burn damage
Browse files Browse the repository at this point in the history
Burn damage is reduced to 1/16 of HP from generation 7 onward.
Mentioned in issue jake-white#79

Signed-off-by: ProfessorSidon <[email protected]>
  • Loading branch information
ProfessorSidon committed Dec 18, 2019
1 parent 1b32150 commit 8740345
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions script_res/ko_chance.js
Original file line number Diff line number Diff line change
Expand Up @@ -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') {
Expand Down

0 comments on commit 8740345

Please sign in to comment.