pokerogue/src/data/variant.ts
Teju Rajbabu c8db3bff4c
[QOL] UI Improvement - Shiny Icon (#2372)
* Test changes to change variant label color based on Tint

* Revert "Test changes to change variant label"

This reverts commit 0ad0f6293050cc5d3552fb996dc68c05f55afc1c.

* minimal recovery changes

* Finalized recovery and implemented ShinyIcon

* add setY in MockSprite

* added back some unintentional removed code

* added shiny_icons

* Initial test for tier change

* implemented Shiny Icon full functionality

* slight setY change for non-Base starters
2024-06-25 13:48:48 -04:00

32 lines
612 B
TypeScript

import { VariantTier } from "#app/enums/variant-tier.js";
export type Variant = 0 | 1 | 2;
export type VariantSet = [Variant, Variant, Variant];
export const variantData: any = {};
export const variantColorCache = {};
export function getVariantTint(variant: Variant): integer {
switch (variant) {
case 0:
return 0xf8c020;
case 1:
return 0x20f8f0;
case 2:
return 0xe81048;
}
}
export function getVariantIcon(variant: Variant): integer {
switch (variant) {
case 0:
return VariantTier.STANDARD;
case 1:
return VariantTier.RARE;
case 2:
return VariantTier.EPIC;
}
}