pokerogue/src/ui/text.ts

306 lines
10 KiB
TypeScript
Raw Normal View History

Localization: Localized Gacha Machine Names (#2645) * Localization: Localized Gacha Machine Names * Update src/locales/zh_TW/egg.ts Co-authored-by: Yonmaru40 <47717431+40chyan@users.noreply.github.com> * Update src/locales/zh_TW/egg.ts Co-authored-by: Enoch <enoch.jwsong@gmail.com> * Update src/locales/de/egg.ts Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com> * Update src/locales/fr/egg.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> * Update src/locales/ko/egg.ts Co-authored-by: sodam <66295123+sodaMelon@users.noreply.github.com> * Update src/locales/zh_TW/egg.ts Co-authored-by: Yonmaru40 <47717431+40chyan@users.noreply.github.com> * Update src/locales/zh_CN/egg.ts Co-authored-by: Yonmaru40 <47717431+40chyan@users.noreply.github.com> * Update src/locales/es/egg.ts Co-authored-by: InnocentGameDev <asdargmng@gmail.com> * Update Brazilian Portuguese translation for egg.ts * added smaller text size option * update egg.ts translations for German and Brazilian Portuguese * some updates * update egg.ts translations for Spanish and Brazilian Portuguese * Update EggGachaUiHandler to use array.includes for language check * update German translation for legendary egg gatcha * Update src/locales/es/egg.ts Co-authored-by: InnocentGameDev <asdargmng@gmail.com> * update translations for egg.ts in Spanish and Brazilian Portuguese --------- Co-authored-by: Yonmaru40 <47717431+40chyan@users.noreply.github.com> Co-authored-by: Enoch <enoch.jwsong@gmail.com> Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com> Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> Co-authored-by: sodam <66295123+sodaMelon@users.noreply.github.com> Co-authored-by: InnocentGameDev <asdargmng@gmail.com>
2024-07-05 02:26:56 +01:00
import { EggTier } from "#enums/egg-type";
import { UiTheme } from "#enums/ui-theme";
import Phaser from "phaser";
import BBCodeText from "phaser3-rex-plugins/plugins/gameobjects/tagtext/bbcodetext/BBCodeText";
2023-12-30 23:41:25 +00:00
import InputText from "phaser3-rex-plugins/plugins/inputtext";
import BattleScene from "../battle-scene";
import { ModifierTier } from "../modifier/modifier-tier";
2023-03-28 19:54:52 +01:00
export enum TextStyle {
MESSAGE,
WINDOW,
WINDOW_ALT,
2023-04-02 01:06:44 +01:00
BATTLE_INFO,
PARTY,
PARTY_RED,
SUMMARY,
SUMMARY_ALT,
SUMMARY_RED,
2024-01-06 03:24:05 +00:00
SUMMARY_BLUE,
2024-01-05 16:29:34 +00:00
SUMMARY_PINK,
SUMMARY_GOLD,
SUMMARY_GRAY,
SUMMARY_GREEN,
2023-10-26 21:33:59 +01:00
MONEY,
STATS_LABEL,
STATS_VALUE,
2023-10-26 21:33:59 +01:00
SETTINGS_LABEL,
2023-11-02 04:55:20 +00:00
SETTINGS_SELECTED,
SETTINGS_LOCKED,
2023-11-02 04:55:20 +00:00
TOOLTIP_TITLE,
TOOLTIP_CONTENT,
MOVE_INFO_CONTENT,
MOVE_PP_FULL,
MOVE_PP_HALF_FULL,
MOVE_PP_NEAR_EMPTY,
Localization: Localized Gacha Machine Names (#2645) * Localization: Localized Gacha Machine Names * Update src/locales/zh_TW/egg.ts Co-authored-by: Yonmaru40 <47717431+40chyan@users.noreply.github.com> * Update src/locales/zh_TW/egg.ts Co-authored-by: Enoch <enoch.jwsong@gmail.com> * Update src/locales/de/egg.ts Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com> * Update src/locales/fr/egg.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> * Update src/locales/ko/egg.ts Co-authored-by: sodam <66295123+sodaMelon@users.noreply.github.com> * Update src/locales/zh_TW/egg.ts Co-authored-by: Yonmaru40 <47717431+40chyan@users.noreply.github.com> * Update src/locales/zh_CN/egg.ts Co-authored-by: Yonmaru40 <47717431+40chyan@users.noreply.github.com> * Update src/locales/es/egg.ts Co-authored-by: InnocentGameDev <asdargmng@gmail.com> * Update Brazilian Portuguese translation for egg.ts * added smaller text size option * update egg.ts translations for German and Brazilian Portuguese * some updates * update egg.ts translations for Spanish and Brazilian Portuguese * Update EggGachaUiHandler to use array.includes for language check * update German translation for legendary egg gatcha * Update src/locales/es/egg.ts Co-authored-by: InnocentGameDev <asdargmng@gmail.com> * update translations for egg.ts in Spanish and Brazilian Portuguese --------- Co-authored-by: Yonmaru40 <47717431+40chyan@users.noreply.github.com> Co-authored-by: Enoch <enoch.jwsong@gmail.com> Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com> Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> Co-authored-by: sodam <66295123+sodaMelon@users.noreply.github.com> Co-authored-by: InnocentGameDev <asdargmng@gmail.com>
2024-07-05 02:26:56 +01:00
MOVE_PP_EMPTY,
SMALLER_WINDOW_ALT,
BGM_BAR
}
2023-03-28 19:54:52 +01:00
export function addTextObject(scene: Phaser.Scene, x: number, y: number, content: string, style: TextStyle, extraStyleOptions?: Phaser.Types.GameObjects.Text.TextStyle): Phaser.GameObjects.Text {
2024-06-11 02:36:09 +01:00
const [ scale, styleOptions, shadowColor, shadowXpos, shadowYpos ] = getTextStyleOptions(style, (scene as BattleScene).uiTheme, extraStyleOptions);
const ret = scene.add.text(x, y, content, styleOptions);
2024-06-11 02:36:09 +01:00
ret.setScale(scale);
ret.setShadow(shadowXpos, shadowYpos, shadowColor);
if (!(styleOptions as Phaser.Types.GameObjects.Text.TextStyle).lineSpacing) {
ret.setLineSpacing(5);
}
return ret;
}
export function setTextStyle(obj: Phaser.GameObjects.Text, scene: Phaser.Scene, style: TextStyle, extraStyleOptions?: Phaser.Types.GameObjects.Text.TextStyle) {
2024-06-11 02:36:09 +01:00
const [ scale, styleOptions, shadowColor, shadowXpos, shadowYpos ] = getTextStyleOptions(style, (scene as BattleScene).uiTheme, extraStyleOptions);
obj.setScale(scale);
obj.setShadow(shadowXpos, shadowYpos, shadowColor);
if (!(styleOptions as Phaser.Types.GameObjects.Text.TextStyle).lineSpacing) {
obj.setLineSpacing(5);
}
}
export function addBBCodeTextObject(scene: Phaser.Scene, x: number, y: number, content: string, style: TextStyle, extraStyleOptions?: Phaser.Types.GameObjects.Text.TextStyle): BBCodeText {
2024-06-11 02:36:09 +01:00
const [ scale, styleOptions, shadowColor, shadowXpos, shadowYpos ] = getTextStyleOptions(style, (scene as BattleScene).uiTheme, extraStyleOptions);
const ret = new BBCodeText(scene, x, y, content, styleOptions as BBCodeText.TextStyle);
scene.add.existing(ret);
2024-06-11 02:36:09 +01:00
ret.setScale(scale);
ret.setShadow(shadowXpos, shadowYpos, shadowColor);
if (!(styleOptions as BBCodeText.TextStyle).lineSpacing) {
ret.setLineSpacing(10);
}
return ret;
}
2023-12-30 23:41:25 +00:00
export function addTextInputObject(scene: Phaser.Scene, x: number, y: number, width: number, height: number, style: TextStyle, extraStyleOptions?: InputText.IConfig): InputText {
2024-06-11 02:36:09 +01:00
const [ scale, styleOptions ] = getTextStyleOptions(style, (scene as BattleScene).uiTheme, extraStyleOptions);
2023-12-30 23:41:25 +00:00
const ret = new InputText(scene, x, y, width, height, styleOptions as InputText.IConfig);
scene.add.existing(ret);
2024-06-11 02:36:09 +01:00
ret.setScale(scale);
2023-12-30 23:41:25 +00:00
return ret;
}
[Localization] modifier-select-ui-handler Locales (#2527) * Update modifier-select-ui-handler.ts * Update i18next.d.ts * Add files via upload * Add files via upload * Add files via upload * Add files via upload * Add files via upload * Add files via upload * Add files via upload * Add files via upload * Add files via upload * Add files via upload * Update modifier-select-ui-handler.ts * Update modifier-select-ui-handler.ts * Update modifier-select-ui-handler.ts * Update modifier-select-ui-handler.ts * Update modifier-select-ui-handler.ts * Update modifier-select-ui-handler.ts * Update modifier-select-ui-handler.ts * Update modifier-select-ui-handler.ts * Update modifier-select-ui-handler.ts * Update modifier-select-ui-handler.ts * Update src/locales/ko/modifier-select-ui-handler.ts Co-authored-by: yun <97648143+ddullgi@users.noreply.github.com> * Update src/locales/zh_CN/modifier-select-ui-handler.ts Co-authored-by: Yonmaru40 <47717431+40chyan@users.noreply.github.com> * Update src/locales/de/modifier-select-ui-handler.ts Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com> * Update config.ts * Update modifier-select-ui-handler.ts * Update src/locales/pt_BR/modifier-select-ui-handler.ts Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> * Update src/locales/es/modifier-select-ui-handler.ts Co-authored-by: GoldTra <162721984+GoldTra@users.noreply.github.com> * Update modifier-select-ui-handler.ts [Localization(it)] * Update src/locales/es/modifier-select-ui-handler.ts Co-authored-by: InnocentGameDev <asdargmng@gmail.com> * Adaptive buttons and cursors * Update modifier-select-ui-handler.ts * Update modifier-select-ui-handler.ts --------- Co-authored-by: yun <97648143+ddullgi@users.noreply.github.com> Co-authored-by: Yonmaru40 <47717431+40chyan@users.noreply.github.com> Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com> Co-authored-by: José Ricardo Fleury Oliveira <josefleury@discente.ufg.br> Co-authored-by: GoldTra <162721984+GoldTra@users.noreply.github.com> Co-authored-by: Niccolò <123510358+NicusPulcis@users.noreply.github.com> Co-authored-by: InnocentGameDev <asdargmng@gmail.com> Co-authored-by: hjh <j1441257360@163.com>
2024-07-04 21:40:54 +01:00
export function getTextStyleOptions(style: TextStyle, uiTheme: UiTheme, extraStyleOptions?: Phaser.Types.GameObjects.Text.TextStyle): [ number, Phaser.Types.GameObjects.Text.TextStyle | InputText.IConfig, string, number, number ] {
let shadowXpos = 4;
let shadowYpos = 5;
2024-06-11 02:36:09 +01:00
const scale = 0.1666666667;
const defaultFontSize = 96;
2023-03-28 19:54:52 +01:00
let styleOptions: Phaser.Types.GameObjects.Text.TextStyle = {
fontFamily: "emerald",
2024-06-11 02:36:09 +01:00
fontSize: 96,
color: getTextColor(style, false, uiTheme),
padding: {
bottom: 6
}
};
2023-03-28 19:54:52 +01:00
switch (style) {
case TextStyle.SUMMARY:
case TextStyle.SUMMARY_ALT:
case TextStyle.SUMMARY_BLUE:
case TextStyle.SUMMARY_RED:
case TextStyle.SUMMARY_PINK:
case TextStyle.SUMMARY_GOLD:
case TextStyle.SUMMARY_GRAY:
case TextStyle.SUMMARY_GREEN:
case TextStyle.WINDOW:
case TextStyle.WINDOW_ALT:
case TextStyle.STATS_VALUE:
shadowXpos = 3;
shadowYpos = 3;
break;
2024-06-11 02:36:09 +01:00
case TextStyle.STATS_LABEL:
case TextStyle.MESSAGE:
case TextStyle.SETTINGS_LABEL:
case TextStyle.SETTINGS_LOCKED:
case TextStyle.SETTINGS_SELECTED:
break;
case TextStyle.BATTLE_INFO:
case TextStyle.MONEY:
case TextStyle.TOOLTIP_TITLE:
2024-06-11 02:36:09 +01:00
styleOptions.fontSize = defaultFontSize - 24;
shadowXpos = 3.5;
shadowYpos = 3.5;
break;
case TextStyle.PARTY:
case TextStyle.PARTY_RED:
2024-06-11 02:36:09 +01:00
styleOptions.fontSize = defaultFontSize - 30;
styleOptions.fontFamily = "pkmnems";
break;
case TextStyle.TOOLTIP_CONTENT:
2024-06-11 02:36:09 +01:00
styleOptions.fontSize = defaultFontSize - 32;
shadowXpos = 3;
shadowYpos = 3;
break;
case TextStyle.MOVE_INFO_CONTENT:
2024-06-11 02:36:09 +01:00
styleOptions.fontSize = defaultFontSize - 40;
shadowXpos = 3;
shadowYpos = 3;
break;
Localization: Localized Gacha Machine Names (#2645) * Localization: Localized Gacha Machine Names * Update src/locales/zh_TW/egg.ts Co-authored-by: Yonmaru40 <47717431+40chyan@users.noreply.github.com> * Update src/locales/zh_TW/egg.ts Co-authored-by: Enoch <enoch.jwsong@gmail.com> * Update src/locales/de/egg.ts Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com> * Update src/locales/fr/egg.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> * Update src/locales/ko/egg.ts Co-authored-by: sodam <66295123+sodaMelon@users.noreply.github.com> * Update src/locales/zh_TW/egg.ts Co-authored-by: Yonmaru40 <47717431+40chyan@users.noreply.github.com> * Update src/locales/zh_CN/egg.ts Co-authored-by: Yonmaru40 <47717431+40chyan@users.noreply.github.com> * Update src/locales/es/egg.ts Co-authored-by: InnocentGameDev <asdargmng@gmail.com> * Update Brazilian Portuguese translation for egg.ts * added smaller text size option * update egg.ts translations for German and Brazilian Portuguese * some updates * update egg.ts translations for Spanish and Brazilian Portuguese * Update EggGachaUiHandler to use array.includes for language check * update German translation for legendary egg gatcha * Update src/locales/es/egg.ts Co-authored-by: InnocentGameDev <asdargmng@gmail.com> * update translations for egg.ts in Spanish and Brazilian Portuguese --------- Co-authored-by: Yonmaru40 <47717431+40chyan@users.noreply.github.com> Co-authored-by: Enoch <enoch.jwsong@gmail.com> Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com> Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> Co-authored-by: sodam <66295123+sodaMelon@users.noreply.github.com> Co-authored-by: InnocentGameDev <asdargmng@gmail.com>
2024-07-05 02:26:56 +01:00
case TextStyle.SMALLER_WINDOW_ALT:
styleOptions.fontSize = defaultFontSize - 36;
shadowXpos = 3;
shadowYpos = 3;
break;
case TextStyle.BGM_BAR:
styleOptions.fontSize = defaultFontSize - 24;
shadowXpos = 3;
shadowYpos = 3;
break;
2023-03-28 19:54:52 +01:00
}
const shadowColor = getTextColor(style, true, uiTheme);
2023-04-26 17:50:21 +01:00
if (extraStyleOptions) {
if (extraStyleOptions.fontSize) {
2024-02-07 04:11:00 +00:00
const sizeRatio = parseInt(extraStyleOptions.fontSize.toString().slice(0, -2)) / parseInt(styleOptions.fontSize.toString().slice(0, -2));
shadowXpos *= sizeRatio;
2023-04-26 17:50:21 +01:00
}
2023-03-28 19:54:52 +01:00
styleOptions = Object.assign(styleOptions, extraStyleOptions);
2023-04-26 17:50:21 +01:00
}
2023-03-28 19:54:52 +01:00
2024-06-11 02:36:09 +01:00
return [ scale, styleOptions, shadowColor, shadowXpos, shadowYpos ];
}
export function getBBCodeFrag(content: string, textStyle: TextStyle, uiTheme: UiTheme = UiTheme.DEFAULT): string {
return `[color=${getTextColor(textStyle, false, uiTheme)}][shadow=${getTextColor(textStyle, true, uiTheme)}]${content}`;
2024-01-05 16:29:34 +00:00
}
/**
* Should only be used with BBCodeText (see addBBCodeTextObject())
* This does NOT work with UI showText() or showDialogue() methods.
* Method will do pattern match/replace and apply BBCode color/shadow styling to substrings within the content:
* @[<TextStyle>]{<text to color>}
*
* Example: passing a content string of "@[SUMMARY_BLUE]{blue text} primaryStyle text @[SUMMARY_RED]{red text}" will result in:
* - "blue text" with TextStyle.SUMMARY_BLUE applied
* - " primaryStyle text " with primaryStyle TextStyle applied
* - "red text" with TextStyle.SUMMARY_RED applied
* @param content - string with styling that need to be applied for BBCodeTextObject
* @param primaryStyle - primary style is required in order to escape BBCode styling properly.
* @param uiTheme
*/
export function getTextWithColors(content: string, primaryStyle: TextStyle, uiTheme: UiTheme = UiTheme.DEFAULT): string {
// Apply primary styling before anything else
let text = getBBCodeFrag(content, primaryStyle, uiTheme) + "[/color][/shadow]";
const primaryStyleString = [...text.match(new RegExp(/\[color=[^\[]*\]\[shadow=[^\[]*\]/i))][0];
// Set custom colors
text = text.replace(/@\[([^{]*)\]{([^}]*)}/gi, (substring, textStyle: string, textToColor: string) => {
return "[/color][/shadow]" + getBBCodeFrag(textToColor, TextStyle[textStyle], uiTheme) + "[/color][/shadow]" + primaryStyleString;
});
// Remove extra style block at the end
return text.replace(/\[color=[^\[]*\]\[shadow=[^\[]*\]\[\/color\]\[\/shadow\]/gi, "");
}
export function getTextColor(textStyle: TextStyle, shadow?: boolean, uiTheme: UiTheme = UiTheme.DEFAULT): string {
switch (textStyle) {
case TextStyle.MESSAGE:
return !shadow ? "#f8f8f8" : "#6b5a73";
case TextStyle.WINDOW:
case TextStyle.MOVE_INFO_CONTENT:
case TextStyle.MOVE_PP_FULL:
case TextStyle.TOOLTIP_CONTENT:
if (uiTheme) {
return !shadow ? "#484848" : "#d0d0c8";
}
return !shadow ? "#f8f8f8" : "#6b5a73";
case TextStyle.MOVE_PP_HALF_FULL:
if (uiTheme) {
return !shadow ? "#a68e17" : "#ebd773";
}
return !shadow ? "#ccbe00" : "#6e672c";
case TextStyle.MOVE_PP_NEAR_EMPTY:
if (uiTheme) {
return !shadow ? "#d64b00" : "#f7b18b";
}
return !shadow ? "#d64b00" : "#69402a";
case TextStyle.MOVE_PP_EMPTY:
if (uiTheme) {
return !shadow ? "#e13d3d" : "#fca2a2";
}
return !shadow ? "#e13d3d" : "#632929";
case TextStyle.WINDOW_ALT:
return !shadow ? "#484848" : "#d0d0c8";
case TextStyle.BATTLE_INFO:
if (uiTheme) {
return !shadow ? "#404040" : "#ded6b5";
}
return !shadow ? "#f8f8f8" : "#6b5a73";
case TextStyle.PARTY:
return !shadow ? "#f8f8f8" : "#707070";
case TextStyle.PARTY_RED:
return !shadow ? "#f89890" : "#984038";
case TextStyle.SUMMARY:
return !shadow ? "#f8f8f8" : "#636363";
case TextStyle.SUMMARY_ALT:
if (uiTheme) {
return !shadow ? "#f8f8f8" : "#636363";
}
return !shadow ? "#484848" : "#d0d0c8";
case TextStyle.SUMMARY_RED:
case TextStyle.TOOLTIP_TITLE:
return !shadow ? "#e70808" : "#ffbd73";
case TextStyle.SUMMARY_BLUE:
return !shadow ? "#40c8f8" : "#006090";
case TextStyle.SUMMARY_PINK:
return !shadow ? "#f89890" : "#984038";
case TextStyle.SUMMARY_GOLD:
case TextStyle.MONEY:
return !shadow ? "#e8e8a8" : "#a0a060";
case TextStyle.SETTINGS_LOCKED:
case TextStyle.SUMMARY_GRAY:
return !shadow ? "#a0a0a0" : "#636363";
case TextStyle.STATS_LABEL:
return !shadow ? "#f8b050" : "#c07800";
case TextStyle.STATS_VALUE:
return !shadow ? "#f8f8f8" : "#6b5a73";
case TextStyle.SUMMARY_GREEN:
return !shadow ? "#78c850" : "#306850";
case TextStyle.SETTINGS_LABEL:
return !shadow ? "#f8b050" : "#c07800";
case TextStyle.SETTINGS_SELECTED:
return !shadow ? "#f88880" : "#f83018";
Localization: Localized Gacha Machine Names (#2645) * Localization: Localized Gacha Machine Names * Update src/locales/zh_TW/egg.ts Co-authored-by: Yonmaru40 <47717431+40chyan@users.noreply.github.com> * Update src/locales/zh_TW/egg.ts Co-authored-by: Enoch <enoch.jwsong@gmail.com> * Update src/locales/de/egg.ts Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com> * Update src/locales/fr/egg.ts Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> * Update src/locales/ko/egg.ts Co-authored-by: sodam <66295123+sodaMelon@users.noreply.github.com> * Update src/locales/zh_TW/egg.ts Co-authored-by: Yonmaru40 <47717431+40chyan@users.noreply.github.com> * Update src/locales/zh_CN/egg.ts Co-authored-by: Yonmaru40 <47717431+40chyan@users.noreply.github.com> * Update src/locales/es/egg.ts Co-authored-by: InnocentGameDev <asdargmng@gmail.com> * Update Brazilian Portuguese translation for egg.ts * added smaller text size option * update egg.ts translations for German and Brazilian Portuguese * some updates * update egg.ts translations for Spanish and Brazilian Portuguese * Update EggGachaUiHandler to use array.includes for language check * update German translation for legendary egg gatcha * Update src/locales/es/egg.ts Co-authored-by: InnocentGameDev <asdargmng@gmail.com> * update translations for egg.ts in Spanish and Brazilian Portuguese --------- Co-authored-by: Yonmaru40 <47717431+40chyan@users.noreply.github.com> Co-authored-by: Enoch <enoch.jwsong@gmail.com> Co-authored-by: Jannik Tappert <38758606+CodeTappert@users.noreply.github.com> Co-authored-by: Lugiad' <adrien.grivel@hotmail.fr> Co-authored-by: sodam <66295123+sodaMelon@users.noreply.github.com> Co-authored-by: InnocentGameDev <asdargmng@gmail.com>
2024-07-05 02:26:56 +01:00
case TextStyle.SMALLER_WINDOW_ALT:
return !shadow ? "#484848" : "#d0d0c8";
case TextStyle.BGM_BAR:
return !shadow ? "#f8f8f8" : "#6b5a73";
}
2023-11-02 04:55:20 +00:00
}
export function getModifierTierTextTint(tier: ModifierTier): integer {
2023-11-02 04:55:20 +00:00
switch (tier) {
case ModifierTier.COMMON:
return 0xf8f8f8;
case ModifierTier.GREAT:
return 0x4998f8;
case ModifierTier.ULTRA:
return 0xf8d038;
case ModifierTier.ROGUE:
return 0xdb4343;
case ModifierTier.MASTER:
return 0xe331c5;
case ModifierTier.LUXURY:
return 0xe74c18;
2023-11-02 04:55:20 +00:00
}
}
export function getEggTierTextTint(tier: EggTier): integer {
switch (tier) {
case EggTier.COMMON:
return getModifierTierTextTint(ModifierTier.COMMON);
case EggTier.GREAT:
return getModifierTierTextTint(ModifierTier.GREAT);
case EggTier.ULTRA:
return getModifierTierTextTint(ModifierTier.ULTRA);
case EggTier.MASTER:
return getModifierTierTextTint(ModifierTier.MASTER);
}
}