Skip to content

Commit

Permalink
Fix Rivalry boost (#440)
Browse files Browse the repository at this point in the history
* Fix Rivalry boost

https://www.smogon.com/forums/threads/pok%C3%A9mon-showdown-damage-calculator.3593546/page-8#post-8199267
Rivalry and gender is not the same - 0xC00
Rivalry and gender is the same - 0x1400

* Fix Rivalry boost

https://www.smogon.com/bw/articles/bw_complete_damage_formula
  • Loading branch information
Flametix authored Apr 27, 2021
1 parent e06fc9a commit 0cc3c16
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion calc/src/mechanics/gen56.ts
Original file line number Diff line number Diff line change
Expand Up @@ -399,7 +399,7 @@ export function calculateBWXY(
bpMods.push(0x1400);
desc.rivalry = 'buffed';
} else {
bpMods.push(0xccd);
bpMods.push(0xc00);
desc.rivalry = 'nerfed';
}
desc.attackerAbility = attacker.ability;
Expand Down
4 changes: 2 additions & 2 deletions calc/src/mechanics/gen78.ts
Original file line number Diff line number Diff line change
Expand Up @@ -786,10 +786,10 @@ export function calculateBPModsSMSS(

if (attacker.hasAbility('Rivalry') && ![attacker.gender, defender.gender].includes('N')) {
if (attacker.gender === defender.gender) {
bpMods.push(0xC00);
bpMods.push(0x1400);
desc.rivalry = 'buffed';
} else {
bpMods.push(0xCCD);
bpMods.push(0xC00);
desc.rivalry = 'nerfed';
}
desc.attackerAbility = attacker.ability;
Expand Down

0 comments on commit 0cc3c16

Please sign in to comment.