mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2024-11-27 09:16:03 +00:00
Fix off-by-one error (#3177)
This commit is contained in:
parent
806f0f4e83
commit
4d87254001
@ -854,9 +854,8 @@ export class GameData {
|
|||||||
const sessionData = this.parseSessionData(sessionDataStr);
|
const sessionData = this.parseSessionData(sessionDataStr);
|
||||||
for (let i = 0; i <= 5; i++) {
|
for (let i = 0; i <= 5; i++) {
|
||||||
if (sessionData.party[i]?.abilityIndex === 1) {
|
if (sessionData.party[i]?.abilityIndex === 1) {
|
||||||
if (allSpecies[sessionData.party[i].species].ability1 === allSpecies[sessionData.party[i].species].ability2 &&
|
const speciesToCheck = allSpecies[sessionData.party[i].species - 1];
|
||||||
allSpecies[sessionData.party[i].species].abilityHidden !== Abilities.NONE &&
|
if (speciesToCheck.ability1 === speciesToCheck.ability2 && speciesToCheck.abilityHidden !== Abilities.NONE && speciesToCheck.abilityHidden !== speciesToCheck.ability1) {
|
||||||
allSpecies[sessionData.party[i].species].abilityHidden !== allSpecies[sessionData.party[i].species].ability1) {
|
|
||||||
sessionData.party[i].abilityIndex = 2;
|
sessionData.party[i].abilityIndex = 2;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user