Fix timezone variant with legendary gacha

pull/16/head
Flashfyre 2024-03-15 19:40:13 -04:00
parent 1bae39d80e
commit eab1ba7ab9
3 changed files with 5 additions and 5 deletions

View File

@ -11,7 +11,7 @@ import { Species } from "./enums/species";
import { tmSpecies } from "./tms"; import { tmSpecies } from "./tms";
import { Type } from "./type"; import { Type } from "./type";
import { initTrainerTypeDialogue } from "./dialogue"; import { initTrainerTypeDialogue } from "./dialogue";
import { PersistentModifier, TerastallizeModifier } from "../modifier/modifier"; import { PersistentModifier } from "../modifier/modifier";
export enum TrainerPoolTier { export enum TrainerPoolTier {
COMMON, COMMON,

View File

@ -359,7 +359,7 @@ export default class BattleInfo extends Phaser.GameObjects.Container {
} }
updateNameText(pokemon: Pokemon): void { updateNameText(pokemon: Pokemon): void {
let displayName = pokemon.name; let displayName = pokemon.name.replace(/[♂♀]/g, '');
let nameTextWidth: number; let nameTextWidth: number;
let nameSizeTest = addTextObject(this.scene, 0, 0, displayName, TextStyle.BATTLE_INFO); let nameSizeTest = addTextObject(this.scene, 0, 0, displayName, TextStyle.BATTLE_INFO);

View File

@ -87,10 +87,10 @@ export function randSeedWeightedItem<T>(items: T[]): T {
} }
export function getSunday(date: Date): Date { export function getSunday(date: Date): Date {
const day = date.getDay(), const day = date.getDay();
diff = date.getDate() - day; const diff = date.getDate() - day;
const newDate = new Date(date.setDate(diff)); const newDate = new Date(date.setDate(diff));
return new Date(newDate.getFullYear(), newDate.getMonth(), newDate.getDate()); return new Date(Date.UTC(newDate.getUTCFullYear(), newDate.getUTCMonth(), newDate.getUTCDate()));
} }
export function getFrameMs(frameCount: integer): integer { export function getFrameMs(frameCount: integer): integer {