Add comment, use v === 0 instead of !v

Co-authored-by: Moka <54149968+MokaStitcher@users.noreply.github.com>
This commit is contained in:
NightKev 2024-11-03 06:37:16 -08:00 committed by GitHub
parent 058f2d90ee
commit ed2d64d6be
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 2 deletions

View File

@ -1849,7 +1849,8 @@ export class GameData {
ret |= DexAttr.DEFAULT_VARIANT; ret |= DexAttr.DEFAULT_VARIANT;
} }
} else { } else {
ret |= attr & DexAttr.NON_SHINY || !(attr & DexAttr.SHINY) ? DexAttr.NON_SHINY : DexAttr.SHINY; // Default to non shiny. Fallback to shiny if it's the only thing that's unlocked
ret |= (attr & DexAttr.NON_SHINY || !(attr & DexAttr.SHINY)) ? DexAttr.NON_SHINY : DexAttr.SHINY;
if (attr & DexAttr.DEFAULT_VARIANT) { if (attr & DexAttr.DEFAULT_VARIANT) {
ret |= DexAttr.DEFAULT_VARIANT; ret |= DexAttr.DEFAULT_VARIANT;

View File

@ -1893,7 +1893,7 @@ export default class StarterSelectUiHandler extends MessageUiHandler {
let newVariant = props.variant; let newVariant = props.variant;
do { do {
newVariant = (newVariant + 1) % 3; newVariant = (newVariant + 1) % 3;
if (!newVariant) { if (newVariant === 0) {
if (this.speciesStarterDexEntry!.caughtAttr & DexAttr.DEFAULT_VARIANT) { // TODO: is this bang correct? if (this.speciesStarterDexEntry!.caughtAttr & DexAttr.DEFAULT_VARIANT) { // TODO: is this bang correct?
break; break;
} }