Test changes to change variant label color based on Tint

This commit is contained in:
Teju 2024-06-13 23:12:48 -04:00
parent 5bdc6537e0
commit 0ad0f62930
1 changed files with 10 additions and 0 deletions

View File

@ -1446,6 +1446,16 @@ export default class StarterSelectUiHandler extends MessageUiHandler {
}
} while (newVariant !== props.variant);
this.setSpeciesDetails(this.lastSpecies, undefined, undefined, undefined, newVariant, undefined, undefined);
// Get the luck value
const luck = this.scene.gameData.getDexAttrLuck(this.speciesStarterDexEntry.caughtAttr);
// Get the tint based on the luck value
const tint = getVariantTint(Math.min(luck - 1, 2) as Variant);
// Set the color of variantLabel to the luck tint
this.variantLabel.setTint(tint);
success = true;
}
break;