1.10.6 to Main
Hotfix 1.10.6 to main
@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "pokemon-rogue-battle",
|
"name": "pokemon-rogue-battle",
|
||||||
"private": true,
|
"private": true,
|
||||||
"version": "1.10.5",
|
"version": "1.10.6",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"start": "vite",
|
"start": "vite",
|
||||||
|
Before Width: | Height: | Size: 197 B After Width: | Height: | Size: 195 B |
Before Width: | Height: | Size: 279 B After Width: | Height: | Size: 276 B |
Before Width: | Height: | Size: 290 B After Width: | Height: | Size: 289 B |
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 218 B After Width: | Height: | Size: 215 B |
Before Width: | Height: | Size: 341 B After Width: | Height: | Size: 283 B |
Before Width: | Height: | Size: 349 B After Width: | Height: | Size: 261 B |
Before Width: | Height: | Size: 336 B After Width: | Height: | Size: 331 B |
Before Width: | Height: | Size: 364 B After Width: | Height: | Size: 289 B |
Before Width: | Height: | Size: 280 B After Width: | Height: | Size: 278 B |
Before Width: | Height: | Size: 206 B After Width: | Height: | Size: 205 B |
Before Width: | Height: | Size: 347 B After Width: | Height: | Size: 283 B |
Before Width: | Height: | Size: 235 B After Width: | Height: | Size: 230 B |
Before Width: | Height: | Size: 645 B After Width: | Height: | Size: 610 B |
Before Width: | Height: | Size: 419 B After Width: | Height: | Size: 417 B |
Before Width: | Height: | Size: 363 B After Width: | Height: | Size: 296 B |
Before Width: | Height: | Size: 208 B After Width: | Height: | Size: 206 B |
Before Width: | Height: | Size: 338 B After Width: | Height: | Size: 335 B |
Before Width: | Height: | Size: 3.7 KiB After Width: | Height: | Size: 3.6 KiB |
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 14 KiB |
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 1.9 KiB |
Before Width: | Height: | Size: 290 B After Width: | Height: | Size: 276 B |
Before Width: | Height: | Size: 58 KiB After Width: | Height: | Size: 53 KiB |
Before Width: | Height: | Size: 471 B After Width: | Height: | Size: 247 B |
Before Width: | Height: | Size: 296 B After Width: | Height: | Size: 295 B |
Before Width: | Height: | Size: 691 B After Width: | Height: | Size: 689 B |
Before Width: | Height: | Size: 2.2 KiB After Width: | Height: | Size: 2.2 KiB |
Before Width: | Height: | Size: 183 B After Width: | Height: | Size: 152 B |
Before Width: | Height: | Size: 201 B After Width: | Height: | Size: 154 B |
Before Width: | Height: | Size: 201 B After Width: | Height: | Size: 162 B |
Before Width: | Height: | Size: 183 B After Width: | Height: | Size: 152 B |
Before Width: | Height: | Size: 201 B After Width: | Height: | Size: 154 B |
Before Width: | Height: | Size: 201 B After Width: | Height: | Size: 162 B |
@ -1 +1 @@
|
|||||||
Subproject commit 102cbdcd924e2a7cdc7eab64d1ce79f6ec7604ff
|
Subproject commit 2686cd3edc0bd2c7a7f12cc54c00c109e51a48d7
|
@ -2318,7 +2318,7 @@ export class BattleScene extends SceneBase {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
playSound(sound: string | AnySound, config?: object): AnySound {
|
playSound(sound: string | AnySound, config?: object): AnySound | null {
|
||||||
const key = typeof sound === "string" ? sound : sound.key;
|
const key = typeof sound === "string" ? sound : sound.key;
|
||||||
config = config ?? {};
|
config = config ?? {};
|
||||||
try {
|
try {
|
||||||
@ -2354,16 +2354,19 @@ export class BattleScene extends SceneBase {
|
|||||||
this.sound.play(key, config);
|
this.sound.play(key, config);
|
||||||
return this.sound.get(key) as AnySound;
|
return this.sound.get(key) as AnySound;
|
||||||
} catch {
|
} catch {
|
||||||
console.log(`${key} not found`);
|
console.warn(`${key} not found`);
|
||||||
return sound as AnySound;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
playSoundWithoutBgm(soundName: string, pauseDuration?: number): AnySound {
|
playSoundWithoutBgm(soundName: string, pauseDuration?: number): AnySound | null {
|
||||||
this.bgmCache.add(soundName);
|
this.bgmCache.add(soundName);
|
||||||
const resumeBgm = this.pauseBgm();
|
const resumeBgm = this.pauseBgm();
|
||||||
this.playSound(soundName);
|
this.playSound(soundName);
|
||||||
const sound = this.sound.get(soundName) as AnySound;
|
const sound = this.sound.get(soundName);
|
||||||
|
if (!sound) {
|
||||||
|
return sound;
|
||||||
|
}
|
||||||
if (this.bgmResumeTimer) {
|
if (this.bgmResumeTimer) {
|
||||||
this.bgmResumeTimer.destroy();
|
this.bgmResumeTimer.destroy();
|
||||||
}
|
}
|
||||||
@ -2373,7 +2376,7 @@ export class BattleScene extends SceneBase {
|
|||||||
this.bgmResumeTimer = null;
|
this.bgmResumeTimer = null;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
return sound;
|
return sound as AnySound;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** The loop point of any given battle, mystery encounter, or title track, read as seconds and milliseconds. */
|
/** The loop point of any given battle, mystery encounter, or title track, read as seconds and milliseconds. */
|
||||||
|
@ -68875,27 +68875,27 @@ interface TmPoolTiers {
|
|||||||
|
|
||||||
export const tmPoolTiers: TmPoolTiers = {
|
export const tmPoolTiers: TmPoolTiers = {
|
||||||
[MoveId.MEGA_PUNCH]: ModifierTier.GREAT,
|
[MoveId.MEGA_PUNCH]: ModifierTier.GREAT,
|
||||||
[MoveId.PAY_DAY]: ModifierTier.ULTRA,
|
[MoveId.PAY_DAY]: ModifierTier.COMMON,
|
||||||
[MoveId.FIRE_PUNCH]: ModifierTier.GREAT,
|
[MoveId.FIRE_PUNCH]: ModifierTier.GREAT,
|
||||||
[MoveId.ICE_PUNCH]: ModifierTier.GREAT,
|
[MoveId.ICE_PUNCH]: ModifierTier.GREAT,
|
||||||
[MoveId.THUNDER_PUNCH]: ModifierTier.GREAT,
|
[MoveId.THUNDER_PUNCH]: ModifierTier.GREAT,
|
||||||
[MoveId.SWORDS_DANCE]: ModifierTier.COMMON,
|
[MoveId.SWORDS_DANCE]: ModifierTier.GREAT,
|
||||||
[MoveId.CUT]: ModifierTier.COMMON,
|
[MoveId.CUT]: ModifierTier.COMMON,
|
||||||
[MoveId.FLY]: ModifierTier.COMMON,
|
[MoveId.FLY]: ModifierTier.GREAT,
|
||||||
[MoveId.MEGA_KICK]: ModifierTier.GREAT,
|
[MoveId.MEGA_KICK]: ModifierTier.GREAT,
|
||||||
[MoveId.BODY_SLAM]: ModifierTier.GREAT,
|
[MoveId.BODY_SLAM]: ModifierTier.GREAT,
|
||||||
[MoveId.TAKE_DOWN]: ModifierTier.GREAT,
|
[MoveId.TAKE_DOWN]: ModifierTier.GREAT,
|
||||||
[MoveId.DOUBLE_EDGE]: ModifierTier.ULTRA,
|
[MoveId.DOUBLE_EDGE]: ModifierTier.ULTRA,
|
||||||
[MoveId.PIN_MISSILE]: ModifierTier.COMMON,
|
[MoveId.PIN_MISSILE]: ModifierTier.GREAT,
|
||||||
[MoveId.ROAR]: ModifierTier.COMMON,
|
[MoveId.ROAR]: ModifierTier.COMMON,
|
||||||
[MoveId.FLAMETHROWER]: ModifierTier.ULTRA,
|
[MoveId.FLAMETHROWER]: ModifierTier.ULTRA,
|
||||||
[MoveId.HYDRO_PUMP]: ModifierTier.ULTRA,
|
[MoveId.HYDRO_PUMP]: ModifierTier.ULTRA,
|
||||||
[MoveId.SURF]: ModifierTier.ULTRA,
|
[MoveId.SURF]: ModifierTier.ULTRA,
|
||||||
[MoveId.ICE_BEAM]: ModifierTier.ULTRA,
|
[MoveId.ICE_BEAM]: ModifierTier.ULTRA,
|
||||||
[MoveId.BLIZZARD]: ModifierTier.ULTRA,
|
[MoveId.BLIZZARD]: ModifierTier.ULTRA,
|
||||||
[MoveId.PSYBEAM]: ModifierTier.GREAT,
|
[MoveId.PSYBEAM]: ModifierTier.COMMON,
|
||||||
[MoveId.HYPER_BEAM]: ModifierTier.ULTRA,
|
[MoveId.HYPER_BEAM]: ModifierTier.ULTRA,
|
||||||
[MoveId.LOW_KICK]: ModifierTier.COMMON,
|
[MoveId.LOW_KICK]: ModifierTier.GREAT,
|
||||||
[MoveId.COUNTER]: ModifierTier.COMMON,
|
[MoveId.COUNTER]: ModifierTier.COMMON,
|
||||||
[MoveId.STRENGTH]: ModifierTier.GREAT,
|
[MoveId.STRENGTH]: ModifierTier.GREAT,
|
||||||
[MoveId.SOLAR_BEAM]: ModifierTier.ULTRA,
|
[MoveId.SOLAR_BEAM]: ModifierTier.ULTRA,
|
||||||
@ -68907,9 +68907,9 @@ export const tmPoolTiers: TmPoolTiers = {
|
|||||||
[MoveId.DIG]: ModifierTier.GREAT,
|
[MoveId.DIG]: ModifierTier.GREAT,
|
||||||
[MoveId.TOXIC]: ModifierTier.GREAT,
|
[MoveId.TOXIC]: ModifierTier.GREAT,
|
||||||
[MoveId.PSYCHIC]: ModifierTier.ULTRA,
|
[MoveId.PSYCHIC]: ModifierTier.ULTRA,
|
||||||
[MoveId.AGILITY]: ModifierTier.COMMON,
|
[MoveId.AGILITY]: ModifierTier.GREAT,
|
||||||
[MoveId.NIGHT_SHADE]: ModifierTier.COMMON,
|
[MoveId.NIGHT_SHADE]: ModifierTier.COMMON,
|
||||||
[MoveId.SCREECH]: ModifierTier.COMMON,
|
[MoveId.SCREECH]: ModifierTier.GREAT,
|
||||||
[MoveId.DOUBLE_TEAM]: ModifierTier.COMMON,
|
[MoveId.DOUBLE_TEAM]: ModifierTier.COMMON,
|
||||||
[MoveId.CONFUSE_RAY]: ModifierTier.COMMON,
|
[MoveId.CONFUSE_RAY]: ModifierTier.COMMON,
|
||||||
[MoveId.LIGHT_SCREEN]: ModifierTier.COMMON,
|
[MoveId.LIGHT_SCREEN]: ModifierTier.COMMON,
|
||||||
@ -68921,7 +68921,7 @@ export const tmPoolTiers: TmPoolTiers = {
|
|||||||
[MoveId.FIRE_BLAST]: ModifierTier.ULTRA,
|
[MoveId.FIRE_BLAST]: ModifierTier.ULTRA,
|
||||||
[MoveId.WATERFALL]: ModifierTier.GREAT,
|
[MoveId.WATERFALL]: ModifierTier.GREAT,
|
||||||
[MoveId.SWIFT]: ModifierTier.COMMON,
|
[MoveId.SWIFT]: ModifierTier.COMMON,
|
||||||
[MoveId.AMNESIA]: ModifierTier.COMMON,
|
[MoveId.AMNESIA]: ModifierTier.GREAT,
|
||||||
[MoveId.DREAM_EATER]: ModifierTier.GREAT,
|
[MoveId.DREAM_EATER]: ModifierTier.GREAT,
|
||||||
[MoveId.LEECH_LIFE]: ModifierTier.ULTRA,
|
[MoveId.LEECH_LIFE]: ModifierTier.ULTRA,
|
||||||
[MoveId.FLASH]: ModifierTier.COMMON,
|
[MoveId.FLASH]: ModifierTier.COMMON,
|
||||||
@ -68933,11 +68933,11 @@ export const tmPoolTiers: TmPoolTiers = {
|
|||||||
[MoveId.SUBSTITUTE]: ModifierTier.COMMON,
|
[MoveId.SUBSTITUTE]: ModifierTier.COMMON,
|
||||||
[MoveId.THIEF]: ModifierTier.GREAT,
|
[MoveId.THIEF]: ModifierTier.GREAT,
|
||||||
[MoveId.SNORE]: ModifierTier.COMMON,
|
[MoveId.SNORE]: ModifierTier.COMMON,
|
||||||
[MoveId.CURSE]: ModifierTier.COMMON,
|
[MoveId.CURSE]: ModifierTier.GREAT,
|
||||||
[MoveId.REVERSAL]: ModifierTier.COMMON,
|
[MoveId.REVERSAL]: ModifierTier.COMMON,
|
||||||
[MoveId.SPITE]: ModifierTier.COMMON,
|
[MoveId.SPITE]: ModifierTier.COMMON,
|
||||||
[MoveId.PROTECT]: ModifierTier.COMMON,
|
[MoveId.PROTECT]: ModifierTier.COMMON,
|
||||||
[MoveId.SCARY_FACE]: ModifierTier.COMMON,
|
[MoveId.SCARY_FACE]: ModifierTier.GREAT,
|
||||||
[MoveId.SLUDGE_BOMB]: ModifierTier.GREAT,
|
[MoveId.SLUDGE_BOMB]: ModifierTier.GREAT,
|
||||||
[MoveId.MUD_SLAP]: ModifierTier.COMMON,
|
[MoveId.MUD_SLAP]: ModifierTier.COMMON,
|
||||||
[MoveId.SPIKES]: ModifierTier.COMMON,
|
[MoveId.SPIKES]: ModifierTier.COMMON,
|
||||||
@ -68979,8 +68979,8 @@ export const tmPoolTiers: TmPoolTiers = {
|
|||||||
[MoveId.TORMENT]: ModifierTier.COMMON,
|
[MoveId.TORMENT]: ModifierTier.COMMON,
|
||||||
[MoveId.WILL_O_WISP]: ModifierTier.COMMON,
|
[MoveId.WILL_O_WISP]: ModifierTier.COMMON,
|
||||||
[MoveId.FACADE]: ModifierTier.GREAT,
|
[MoveId.FACADE]: ModifierTier.GREAT,
|
||||||
[MoveId.FOCUS_PUNCH]: ModifierTier.COMMON,
|
[MoveId.FOCUS_PUNCH]: ModifierTier.GREAT,
|
||||||
[MoveId.NATURE_POWER]: ModifierTier.COMMON,
|
[MoveId.NATURE_POWER]: ModifierTier.GREAT,
|
||||||
[MoveId.CHARGE]: ModifierTier.COMMON,
|
[MoveId.CHARGE]: ModifierTier.COMMON,
|
||||||
[MoveId.TAUNT]: ModifierTier.COMMON,
|
[MoveId.TAUNT]: ModifierTier.COMMON,
|
||||||
[MoveId.HELPING_HAND]: ModifierTier.COMMON,
|
[MoveId.HELPING_HAND]: ModifierTier.COMMON,
|
||||||
@ -68993,7 +68993,7 @@ export const tmPoolTiers: TmPoolTiers = {
|
|||||||
[MoveId.ENDEAVOR]: ModifierTier.COMMON,
|
[MoveId.ENDEAVOR]: ModifierTier.COMMON,
|
||||||
[MoveId.SKILL_SWAP]: ModifierTier.COMMON,
|
[MoveId.SKILL_SWAP]: ModifierTier.COMMON,
|
||||||
[MoveId.IMPRISON]: ModifierTier.COMMON,
|
[MoveId.IMPRISON]: ModifierTier.COMMON,
|
||||||
[MoveId.SECRET_POWER]: ModifierTier.COMMON,
|
[MoveId.SECRET_POWER]: ModifierTier.GREAT,
|
||||||
[MoveId.DIVE]: ModifierTier.GREAT,
|
[MoveId.DIVE]: ModifierTier.GREAT,
|
||||||
[MoveId.FEATHER_DANCE]: ModifierTier.COMMON,
|
[MoveId.FEATHER_DANCE]: ModifierTier.COMMON,
|
||||||
[MoveId.BLAZE_KICK]: ModifierTier.GREAT,
|
[MoveId.BLAZE_KICK]: ModifierTier.GREAT,
|
||||||
@ -69001,12 +69001,12 @@ export const tmPoolTiers: TmPoolTiers = {
|
|||||||
[MoveId.BLAST_BURN]: ModifierTier.ULTRA,
|
[MoveId.BLAST_BURN]: ModifierTier.ULTRA,
|
||||||
[MoveId.HYDRO_CANNON]: ModifierTier.ULTRA,
|
[MoveId.HYDRO_CANNON]: ModifierTier.ULTRA,
|
||||||
[MoveId.WEATHER_BALL]: ModifierTier.COMMON,
|
[MoveId.WEATHER_BALL]: ModifierTier.COMMON,
|
||||||
[MoveId.FAKE_TEARS]: ModifierTier.COMMON,
|
[MoveId.FAKE_TEARS]: ModifierTier.GREAT,
|
||||||
[MoveId.AIR_CUTTER]: ModifierTier.GREAT,
|
[MoveId.AIR_CUTTER]: ModifierTier.GREAT,
|
||||||
[MoveId.OVERHEAT]: ModifierTier.ULTRA,
|
[MoveId.OVERHEAT]: ModifierTier.ULTRA,
|
||||||
[MoveId.ROCK_TOMB]: ModifierTier.GREAT,
|
[MoveId.ROCK_TOMB]: ModifierTier.GREAT,
|
||||||
[MoveId.METAL_SOUND]: ModifierTier.COMMON,
|
[MoveId.METAL_SOUND]: ModifierTier.GREAT,
|
||||||
[MoveId.COSMIC_POWER]: ModifierTier.COMMON,
|
[MoveId.COSMIC_POWER]: ModifierTier.GREAT,
|
||||||
[MoveId.SIGNAL_BEAM]: ModifierTier.GREAT,
|
[MoveId.SIGNAL_BEAM]: ModifierTier.GREAT,
|
||||||
[MoveId.SAND_TOMB]: ModifierTier.COMMON,
|
[MoveId.SAND_TOMB]: ModifierTier.COMMON,
|
||||||
[MoveId.MUDDY_WATER]: ModifierTier.GREAT,
|
[MoveId.MUDDY_WATER]: ModifierTier.GREAT,
|
||||||
@ -69016,10 +69016,10 @@ export const tmPoolTiers: TmPoolTiers = {
|
|||||||
[MoveId.IRON_DEFENSE]: ModifierTier.GREAT,
|
[MoveId.IRON_DEFENSE]: ModifierTier.GREAT,
|
||||||
[MoveId.DRAGON_CLAW]: ModifierTier.ULTRA,
|
[MoveId.DRAGON_CLAW]: ModifierTier.ULTRA,
|
||||||
[MoveId.FRENZY_PLANT]: ModifierTier.ULTRA,
|
[MoveId.FRENZY_PLANT]: ModifierTier.ULTRA,
|
||||||
[MoveId.BULK_UP]: ModifierTier.COMMON,
|
[MoveId.BULK_UP]: ModifierTier.GREAT,
|
||||||
[MoveId.BOUNCE]: ModifierTier.GREAT,
|
[MoveId.BOUNCE]: ModifierTier.GREAT,
|
||||||
[MoveId.MUD_SHOT]: ModifierTier.GREAT,
|
[MoveId.MUD_SHOT]: ModifierTier.GREAT,
|
||||||
[MoveId.POISON_TAIL]: ModifierTier.GREAT,
|
[MoveId.POISON_TAIL]: ModifierTier.COMMON,
|
||||||
[MoveId.COVET]: ModifierTier.GREAT,
|
[MoveId.COVET]: ModifierTier.GREAT,
|
||||||
[MoveId.MAGICAL_LEAF]: ModifierTier.GREAT,
|
[MoveId.MAGICAL_LEAF]: ModifierTier.GREAT,
|
||||||
[MoveId.CALM_MIND]: ModifierTier.GREAT,
|
[MoveId.CALM_MIND]: ModifierTier.GREAT,
|
||||||
@ -69047,7 +69047,7 @@ export const tmPoolTiers: TmPoolTiers = {
|
|||||||
[MoveId.TOXIC_SPIKES]: ModifierTier.GREAT,
|
[MoveId.TOXIC_SPIKES]: ModifierTier.GREAT,
|
||||||
[MoveId.FLARE_BLITZ]: ModifierTier.ULTRA,
|
[MoveId.FLARE_BLITZ]: ModifierTier.ULTRA,
|
||||||
[MoveId.AURA_SPHERE]: ModifierTier.GREAT,
|
[MoveId.AURA_SPHERE]: ModifierTier.GREAT,
|
||||||
[MoveId.ROCK_POLISH]: ModifierTier.COMMON,
|
[MoveId.ROCK_POLISH]: ModifierTier.GREAT,
|
||||||
[MoveId.POISON_JAB]: ModifierTier.GREAT,
|
[MoveId.POISON_JAB]: ModifierTier.GREAT,
|
||||||
[MoveId.DARK_PULSE]: ModifierTier.GREAT,
|
[MoveId.DARK_PULSE]: ModifierTier.GREAT,
|
||||||
[MoveId.AQUA_TAIL]: ModifierTier.GREAT,
|
[MoveId.AQUA_TAIL]: ModifierTier.GREAT,
|
||||||
@ -69063,8 +69063,8 @@ export const tmPoolTiers: TmPoolTiers = {
|
|||||||
[MoveId.ENERGY_BALL]: ModifierTier.GREAT,
|
[MoveId.ENERGY_BALL]: ModifierTier.GREAT,
|
||||||
[MoveId.BRAVE_BIRD]: ModifierTier.ULTRA,
|
[MoveId.BRAVE_BIRD]: ModifierTier.ULTRA,
|
||||||
[MoveId.EARTH_POWER]: ModifierTier.ULTRA,
|
[MoveId.EARTH_POWER]: ModifierTier.ULTRA,
|
||||||
[MoveId.GIGA_IMPACT]: ModifierTier.GREAT,
|
[MoveId.GIGA_IMPACT]: ModifierTier.ULTRA,
|
||||||
[MoveId.NASTY_PLOT]: ModifierTier.COMMON,
|
[MoveId.NASTY_PLOT]: ModifierTier.GREAT,
|
||||||
[MoveId.AVALANCHE]: ModifierTier.GREAT,
|
[MoveId.AVALANCHE]: ModifierTier.GREAT,
|
||||||
[MoveId.SHADOW_CLAW]: ModifierTier.GREAT,
|
[MoveId.SHADOW_CLAW]: ModifierTier.GREAT,
|
||||||
[MoveId.THUNDER_FANG]: ModifierTier.GREAT,
|
[MoveId.THUNDER_FANG]: ModifierTier.GREAT,
|
||||||
@ -69084,7 +69084,7 @@ export const tmPoolTiers: TmPoolTiers = {
|
|||||||
[MoveId.IRON_HEAD]: ModifierTier.GREAT,
|
[MoveId.IRON_HEAD]: ModifierTier.GREAT,
|
||||||
[MoveId.STONE_EDGE]: ModifierTier.ULTRA,
|
[MoveId.STONE_EDGE]: ModifierTier.ULTRA,
|
||||||
[MoveId.STEALTH_ROCK]: ModifierTier.COMMON,
|
[MoveId.STEALTH_ROCK]: ModifierTier.COMMON,
|
||||||
[MoveId.GRASS_KNOT]: ModifierTier.ULTRA,
|
[MoveId.GRASS_KNOT]: ModifierTier.GREAT,
|
||||||
[MoveId.BUG_BITE]: ModifierTier.GREAT,
|
[MoveId.BUG_BITE]: ModifierTier.GREAT,
|
||||||
[MoveId.CHARGE_BEAM]: ModifierTier.GREAT,
|
[MoveId.CHARGE_BEAM]: ModifierTier.GREAT,
|
||||||
[MoveId.HONE_CLAWS]: ModifierTier.COMMON,
|
[MoveId.HONE_CLAWS]: ModifierTier.COMMON,
|
||||||
@ -69102,7 +69102,7 @@ export const tmPoolTiers: TmPoolTiers = {
|
|||||||
[MoveId.FOUL_PLAY]: ModifierTier.ULTRA,
|
[MoveId.FOUL_PLAY]: ModifierTier.ULTRA,
|
||||||
[MoveId.ROUND]: ModifierTier.COMMON,
|
[MoveId.ROUND]: ModifierTier.COMMON,
|
||||||
[MoveId.ECHOED_VOICE]: ModifierTier.COMMON,
|
[MoveId.ECHOED_VOICE]: ModifierTier.COMMON,
|
||||||
[MoveId.STORED_POWER]: ModifierTier.COMMON,
|
[MoveId.STORED_POWER]: ModifierTier.GREAT,
|
||||||
[MoveId.ALLY_SWITCH]: ModifierTier.COMMON,
|
[MoveId.ALLY_SWITCH]: ModifierTier.COMMON,
|
||||||
[MoveId.SCALD]: ModifierTier.GREAT,
|
[MoveId.SCALD]: ModifierTier.GREAT,
|
||||||
[MoveId.HEX]: ModifierTier.GREAT,
|
[MoveId.HEX]: ModifierTier.GREAT,
|
||||||
@ -69130,7 +69130,7 @@ export const tmPoolTiers: TmPoolTiers = {
|
|||||||
[MoveId.SNARL]: ModifierTier.COMMON,
|
[MoveId.SNARL]: ModifierTier.COMMON,
|
||||||
[MoveId.PHANTOM_FORCE]: ModifierTier.ULTRA,
|
[MoveId.PHANTOM_FORCE]: ModifierTier.ULTRA,
|
||||||
[MoveId.PETAL_BLIZZARD]: ModifierTier.GREAT,
|
[MoveId.PETAL_BLIZZARD]: ModifierTier.GREAT,
|
||||||
[MoveId.DISARMING_VOICE]: ModifierTier.GREAT,
|
[MoveId.DISARMING_VOICE]: ModifierTier.COMMON,
|
||||||
[MoveId.DRAINING_KISS]: ModifierTier.GREAT,
|
[MoveId.DRAINING_KISS]: ModifierTier.GREAT,
|
||||||
[MoveId.GRASSY_TERRAIN]: ModifierTier.COMMON,
|
[MoveId.GRASSY_TERRAIN]: ModifierTier.COMMON,
|
||||||
[MoveId.MISTY_TERRAIN]: ModifierTier.COMMON,
|
[MoveId.MISTY_TERRAIN]: ModifierTier.COMMON,
|
||||||
@ -69161,12 +69161,12 @@ export const tmPoolTiers: TmPoolTiers = {
|
|||||||
[MoveId.BREAKING_SWIPE]: ModifierTier.GREAT,
|
[MoveId.BREAKING_SWIPE]: ModifierTier.GREAT,
|
||||||
[MoveId.STEEL_BEAM]: ModifierTier.ULTRA,
|
[MoveId.STEEL_BEAM]: ModifierTier.ULTRA,
|
||||||
[MoveId.EXPANDING_FORCE]: ModifierTier.GREAT,
|
[MoveId.EXPANDING_FORCE]: ModifierTier.GREAT,
|
||||||
[MoveId.STEEL_ROLLER]: ModifierTier.COMMON,
|
[MoveId.STEEL_ROLLER]: ModifierTier.GREAT,
|
||||||
[MoveId.SCALE_SHOT]: ModifierTier.ULTRA,
|
[MoveId.SCALE_SHOT]: ModifierTier.ULTRA,
|
||||||
[MoveId.METEOR_BEAM]: ModifierTier.GREAT,
|
[MoveId.METEOR_BEAM]: ModifierTier.GREAT,
|
||||||
[MoveId.MISTY_EXPLOSION]: ModifierTier.COMMON,
|
[MoveId.MISTY_EXPLOSION]: ModifierTier.GREAT,
|
||||||
[MoveId.GRASSY_GLIDE]: ModifierTier.COMMON,
|
[MoveId.GRASSY_GLIDE]: ModifierTier.COMMON,
|
||||||
[MoveId.RISING_VOLTAGE]: ModifierTier.COMMON,
|
[MoveId.RISING_VOLTAGE]: ModifierTier.GREAT,
|
||||||
[MoveId.TERRAIN_PULSE]: ModifierTier.COMMON,
|
[MoveId.TERRAIN_PULSE]: ModifierTier.COMMON,
|
||||||
[MoveId.SKITTER_SMACK]: ModifierTier.GREAT,
|
[MoveId.SKITTER_SMACK]: ModifierTier.GREAT,
|
||||||
[MoveId.BURNING_JEALOUSY]: ModifierTier.GREAT,
|
[MoveId.BURNING_JEALOUSY]: ModifierTier.GREAT,
|
||||||
@ -69175,20 +69175,20 @@ export const tmPoolTiers: TmPoolTiers = {
|
|||||||
[MoveId.CORROSIVE_GAS]: ModifierTier.COMMON,
|
[MoveId.CORROSIVE_GAS]: ModifierTier.COMMON,
|
||||||
[MoveId.COACHING]: ModifierTier.COMMON,
|
[MoveId.COACHING]: ModifierTier.COMMON,
|
||||||
[MoveId.FLIP_TURN]: ModifierTier.COMMON,
|
[MoveId.FLIP_TURN]: ModifierTier.COMMON,
|
||||||
[MoveId.TRIPLE_AXEL]: ModifierTier.COMMON,
|
[MoveId.TRIPLE_AXEL]: ModifierTier.ULTRA,
|
||||||
[MoveId.DUAL_WINGBEAT]: ModifierTier.COMMON,
|
[MoveId.DUAL_WINGBEAT]: ModifierTier.GREAT,
|
||||||
[MoveId.SCORCHING_SANDS]: ModifierTier.GREAT,
|
[MoveId.SCORCHING_SANDS]: ModifierTier.GREAT,
|
||||||
[MoveId.TERA_BLAST]: ModifierTier.GREAT,
|
[MoveId.TERA_BLAST]: ModifierTier.GREAT,
|
||||||
[MoveId.ICE_SPINNER]: ModifierTier.GREAT,
|
[MoveId.ICE_SPINNER]: ModifierTier.GREAT,
|
||||||
[MoveId.SNOWSCAPE]: ModifierTier.COMMON,
|
[MoveId.SNOWSCAPE]: ModifierTier.COMMON,
|
||||||
[MoveId.POUNCE]: ModifierTier.COMMON,
|
[MoveId.POUNCE]: ModifierTier.COMMON,
|
||||||
[MoveId.TRAILBLAZE]: ModifierTier.COMMON,
|
[MoveId.TRAILBLAZE]: ModifierTier.GREAT,
|
||||||
[MoveId.CHILLING_WATER]: ModifierTier.COMMON,
|
[MoveId.CHILLING_WATER]: ModifierTier.COMMON,
|
||||||
[MoveId.HARD_PRESS]: ModifierTier.GREAT,
|
[MoveId.HARD_PRESS]: ModifierTier.GREAT,
|
||||||
[MoveId.DRAGON_CHEER]: ModifierTier.COMMON,
|
[MoveId.DRAGON_CHEER]: ModifierTier.COMMON,
|
||||||
[MoveId.ALLURING_VOICE]: ModifierTier.GREAT,
|
[MoveId.ALLURING_VOICE]: ModifierTier.GREAT,
|
||||||
[MoveId.TEMPER_FLARE]: ModifierTier.GREAT,
|
[MoveId.TEMPER_FLARE]: ModifierTier.GREAT,
|
||||||
[MoveId.SUPERCELL_SLAM]: ModifierTier.GREAT,
|
[MoveId.SUPERCELL_SLAM]: ModifierTier.ULTRA,
|
||||||
[MoveId.PSYCHIC_NOISE]: ModifierTier.GREAT,
|
[MoveId.PSYCHIC_NOISE]: ModifierTier.GREAT,
|
||||||
[MoveId.UPPER_HAND]: ModifierTier.COMMON,
|
[MoveId.UPPER_HAND]: ModifierTier.COMMON,
|
||||||
};
|
};
|
||||||
|
@ -291,9 +291,17 @@ class AnimTimedSoundEvent extends AnimTimedEvent {
|
|||||||
} catch (err) {
|
} catch (err) {
|
||||||
console.error(err);
|
console.error(err);
|
||||||
}
|
}
|
||||||
return Math.ceil((globalScene.sound.get(`battle_anims/${this.resourceName}`).totalDuration * 1000) / 33.33);
|
const sound = globalScene.sound.get(`battle_anims/${this.resourceName}`);
|
||||||
|
if (!sound) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
return Math.ceil((sound.totalDuration * 1000) / 33.33);
|
||||||
}
|
}
|
||||||
return Math.ceil((battleAnim.user!.cry(soundConfig).totalDuration * 1000) / 33.33); // TODO: is the bang behind user correct?
|
const cry = battleAnim.user!.cry(soundConfig); // TODO: is the bang behind user correct?
|
||||||
|
if (!cry) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
return Math.ceil((cry.totalDuration * 1000) / 33.33);
|
||||||
}
|
}
|
||||||
|
|
||||||
getEventType(): string {
|
getEventType(): string {
|
||||||
|
@ -27,7 +27,7 @@ import type { DexEntry } from "#types/dex-data";
|
|||||||
import { type BooleanHolder, isBetween, type NumberHolder, randSeedItem } from "#utils/common";
|
import { type BooleanHolder, isBetween, type NumberHolder, randSeedItem } from "#utils/common";
|
||||||
import { deepCopy } from "#utils/data";
|
import { deepCopy } from "#utils/data";
|
||||||
import { getPokemonSpecies, getPokemonSpeciesForm } from "#utils/pokemon-utils";
|
import { getPokemonSpecies, getPokemonSpeciesForm } from "#utils/pokemon-utils";
|
||||||
import { toCamelCase, toSnakeCase } from "#utils/strings";
|
import { toCamelCase } from "#utils/strings";
|
||||||
import i18next from "i18next";
|
import i18next from "i18next";
|
||||||
|
|
||||||
/** A constant for the default max cost of the starting party before a run */
|
/** A constant for the default max cost of the starting party before a run */
|
||||||
@ -764,7 +764,7 @@ export class SingleTypeChallenge extends Challenge {
|
|||||||
}
|
}
|
||||||
|
|
||||||
getValue(overrideValue: number = this.value): string {
|
getValue(overrideValue: number = this.value): string {
|
||||||
return toSnakeCase(PokemonType[overrideValue - 1]);
|
return i18next.t(`pokemonInfo:type.${toCamelCase(PokemonType[overrideValue - 1])}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
getDescription(overrideValue: number = this.value): string {
|
getDescription(overrideValue: number = this.value): string {
|
||||||
|
@ -6856,12 +6856,15 @@ export class CopyBiomeTypeAttr extends MoveEffectAttr {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Attribute to override the target's current types to the given type.
|
||||||
|
* Used by {@linkcode MoveId.SOAK} and {@linkcode MoveId.MAGIC_POWDER}.
|
||||||
|
*/
|
||||||
export class ChangeTypeAttr extends MoveEffectAttr {
|
export class ChangeTypeAttr extends MoveEffectAttr {
|
||||||
private type: PokemonType;
|
private type: PokemonType;
|
||||||
|
|
||||||
constructor(type: PokemonType) {
|
constructor(type: PokemonType) {
|
||||||
super(false);
|
super(false);
|
||||||
|
|
||||||
this.type = type;
|
this.type = type;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -6869,7 +6872,7 @@ export class ChangeTypeAttr extends MoveEffectAttr {
|
|||||||
target.summonData.types = [ this.type ];
|
target.summonData.types = [ this.type ];
|
||||||
target.updateInfo();
|
target.updateInfo();
|
||||||
|
|
||||||
globalScene.phaseManager.queueMessage(i18next.t("moveTriggers:transformedIntoType", { pokemonName: getPokemonNameWithAffix(target), typeName: i18next.t(`pokemonInfo:Type.${PokemonType[this.type]}`) }));
|
globalScene.phaseManager.queueMessage(i18next.t("moveTriggers:transformedIntoType", { pokemonName: getPokemonNameWithAffix(target), typeName: i18next.t(`pokemonInfo:type.${toCamelCase(PokemonType[this.type])}`) }));
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -593,14 +593,14 @@ export abstract class PokemonSpeciesForm {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
cry(soundConfig?: Phaser.Types.Sound.SoundConfig, ignorePlay?: boolean): AnySound {
|
cry(soundConfig?: Phaser.Types.Sound.SoundConfig, ignorePlay?: boolean): AnySound | null {
|
||||||
const cryKey = this.getCryKey(this.formIndex);
|
const cryKey = this.getCryKey(this.formIndex);
|
||||||
let cry: AnySound | null = globalScene.sound.get(cryKey) as AnySound;
|
let cry: AnySound | null = globalScene.sound.get(cryKey) as AnySound;
|
||||||
if (cry?.pendingRemove) {
|
if (cry?.pendingRemove) {
|
||||||
cry = null;
|
cry = null;
|
||||||
}
|
}
|
||||||
cry = globalScene.playSound(cry ?? cryKey, soundConfig);
|
cry = globalScene.playSound(cry ?? cryKey, soundConfig);
|
||||||
if (ignorePlay) {
|
if (cry && ignorePlay) {
|
||||||
cry.stop();
|
cry.stop();
|
||||||
}
|
}
|
||||||
return cry;
|
return cry;
|
||||||
|
@ -4547,28 +4547,36 @@ export abstract class Pokemon extends Phaser.GameObjects.Container {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
cry(soundConfig?: Phaser.Types.Sound.SoundConfig, sceneOverride?: BattleScene): AnySound {
|
cry(soundConfig?: Phaser.Types.Sound.SoundConfig, sceneOverride?: BattleScene): AnySound | null {
|
||||||
const scene = sceneOverride ?? globalScene; // TODO: is `sceneOverride` needed?
|
const scene = sceneOverride ?? globalScene; // TODO: is `sceneOverride` needed?
|
||||||
const cry = this.getSpeciesForm(undefined, true).cry(soundConfig);
|
const cry = this.getSpeciesForm(undefined, true).cry(soundConfig);
|
||||||
|
if (!cry) {
|
||||||
|
return cry;
|
||||||
|
}
|
||||||
let duration = cry.totalDuration * 1000;
|
let duration = cry.totalDuration * 1000;
|
||||||
if (this.fusionSpecies && this.getSpeciesForm(undefined, true) !== this.getFusionSpeciesForm(undefined, true)) {
|
if (this.fusionSpecies && this.getSpeciesForm(undefined, true) !== this.getFusionSpeciesForm(undefined, true)) {
|
||||||
let fusionCry = this.getFusionSpeciesForm(undefined, true).cry(soundConfig, true);
|
const fusionCry = this.getFusionSpeciesForm(undefined, true).cry(soundConfig, true);
|
||||||
|
if (!fusionCry) {
|
||||||
|
return cry;
|
||||||
|
}
|
||||||
duration = Math.min(duration, fusionCry.totalDuration * 1000);
|
duration = Math.min(duration, fusionCry.totalDuration * 1000);
|
||||||
fusionCry.destroy();
|
fusionCry.destroy();
|
||||||
scene.time.delayedCall(fixedInt(Math.ceil(duration * 0.4)), () => {
|
scene.time.delayedCall(fixedInt(Math.ceil(duration * 0.4)), () => {
|
||||||
try {
|
try {
|
||||||
SoundFade.fadeOut(scene, cry, fixedInt(Math.ceil(duration * 0.2)));
|
SoundFade.fadeOut(scene, cry, fixedInt(Math.ceil(duration * 0.2)));
|
||||||
fusionCry = this.getFusionSpeciesForm(undefined, true).cry({
|
const fusionCryInner = this.getFusionSpeciesForm(undefined, true).cry({
|
||||||
seek: Math.max(fusionCry.totalDuration * 0.4, 0),
|
seek: Math.max(fusionCry.totalDuration * 0.4, 0),
|
||||||
...soundConfig,
|
...soundConfig,
|
||||||
});
|
});
|
||||||
SoundFade.fadeIn(
|
if (fusionCryInner) {
|
||||||
scene,
|
SoundFade.fadeIn(
|
||||||
fusionCry,
|
scene,
|
||||||
fixedInt(Math.ceil(duration * 0.2)),
|
fusionCryInner,
|
||||||
scene.masterVolume * scene.fieldVolume,
|
fixedInt(Math.ceil(duration * 0.2)),
|
||||||
0,
|
scene.masterVolume * scene.fieldVolume,
|
||||||
);
|
0,
|
||||||
|
);
|
||||||
|
}
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
console.error(err);
|
console.error(err);
|
||||||
}
|
}
|
||||||
@ -4596,14 +4604,14 @@ export abstract class Pokemon extends Phaser.GameObjects.Container {
|
|||||||
crySoundConfig.rate = 0.7;
|
crySoundConfig.rate = 0.7;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
const cry = globalScene.playSound(key, crySoundConfig) as AnySound;
|
const cry = globalScene.playSound(key, crySoundConfig);
|
||||||
if (!cry || globalScene.fieldVolume === 0) {
|
if (!cry || globalScene.fieldVolume === 0) {
|
||||||
callback();
|
callback();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const sprite = this.getSprite();
|
const sprite = this.getSprite();
|
||||||
const tintSprite = this.getTintSprite();
|
const tintSprite = this.getTintSprite();
|
||||||
const delay = Math.max(globalScene.sound.get(key).totalDuration * 50, 25);
|
const delay = Math.max(cry.totalDuration * 50, 25);
|
||||||
|
|
||||||
let frameProgress = 0;
|
let frameProgress = 0;
|
||||||
let frameThreshold: number;
|
let frameThreshold: number;
|
||||||
@ -4656,20 +4664,20 @@ export abstract class Pokemon extends Phaser.GameObjects.Container {
|
|||||||
const key = this.species.getCryKey(this.formIndex);
|
const key = this.species.getCryKey(this.formIndex);
|
||||||
let i = 0;
|
let i = 0;
|
||||||
let rate = 0.85;
|
let rate = 0.85;
|
||||||
const cry = globalScene.playSound(key, { rate: rate }) as AnySound;
|
const cry = globalScene.playSound(key, { rate: rate });
|
||||||
const sprite = this.getSprite();
|
const sprite = this.getSprite();
|
||||||
const tintSprite = this.getTintSprite();
|
const tintSprite = this.getTintSprite();
|
||||||
let duration = cry.totalDuration * 1000;
|
|
||||||
|
|
||||||
const fusionCryKey = this.fusionSpecies!.getCryKey(this.fusionFormIndex);
|
const fusionCryKey = this.fusionSpecies!.getCryKey(this.fusionFormIndex);
|
||||||
let fusionCry = globalScene.playSound(fusionCryKey, {
|
let fusionCry = globalScene.playSound(fusionCryKey, {
|
||||||
rate: rate,
|
rate: rate,
|
||||||
}) as AnySound;
|
});
|
||||||
if (!cry || !fusionCry || globalScene.fieldVolume === 0) {
|
if (!cry || !fusionCry || globalScene.fieldVolume === 0) {
|
||||||
callback();
|
callback();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
fusionCry.stop();
|
fusionCry.stop();
|
||||||
|
let duration = cry.totalDuration * 1000;
|
||||||
duration = Math.min(duration, fusionCry.totalDuration * 1000);
|
duration = Math.min(duration, fusionCry.totalDuration * 1000);
|
||||||
fusionCry.destroy();
|
fusionCry.destroy();
|
||||||
const delay = Math.max(duration * 0.05, 25);
|
const delay = Math.max(duration * 0.05, 25);
|
||||||
@ -4712,16 +4720,20 @@ export abstract class Pokemon extends Phaser.GameObjects.Container {
|
|||||||
if (i === transitionIndex && fusionCryKey) {
|
if (i === transitionIndex && fusionCryKey) {
|
||||||
SoundFade.fadeOut(globalScene, cry, fixedInt(Math.ceil((duration / rate) * 0.2)));
|
SoundFade.fadeOut(globalScene, cry, fixedInt(Math.ceil((duration / rate) * 0.2)));
|
||||||
fusionCry = globalScene.playSound(fusionCryKey, {
|
fusionCry = globalScene.playSound(fusionCryKey, {
|
||||||
seek: Math.max(fusionCry.totalDuration * 0.4, 0),
|
// TODO: This bang is correct as this callback can only be called once, but
|
||||||
|
// this whole block with conditionally reassigning fusionCry needs a second lock.
|
||||||
|
seek: Math.max(fusionCry!.totalDuration * 0.4, 0),
|
||||||
rate: rate,
|
rate: rate,
|
||||||
});
|
});
|
||||||
SoundFade.fadeIn(
|
if (fusionCry) {
|
||||||
globalScene,
|
SoundFade.fadeIn(
|
||||||
fusionCry,
|
globalScene,
|
||||||
fixedInt(Math.ceil((duration / rate) * 0.2)),
|
fusionCry,
|
||||||
globalScene.masterVolume * globalScene.fieldVolume,
|
fixedInt(Math.ceil((duration / rate) * 0.2)),
|
||||||
0,
|
globalScene.masterVolume * globalScene.fieldVolume,
|
||||||
);
|
0,
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
rate *= 0.99;
|
rate *= 0.99;
|
||||||
if (cry && !cry.pendingRemove) {
|
if (cry && !cry.pendingRemove) {
|
||||||
@ -6916,7 +6928,7 @@ export class EnemyPokemon extends Pokemon {
|
|||||||
const leftoverStats = EFFECTIVE_STATS.filter((s: EffectiveStat) => this.getStatStage(s) < 6);
|
const leftoverStats = EFFECTIVE_STATS.filter((s: EffectiveStat) => this.getStatStage(s) < 6);
|
||||||
const statWeights = leftoverStats.map((s: EffectiveStat) => this.getStat(s, false));
|
const statWeights = leftoverStats.map((s: EffectiveStat) => this.getStat(s, false));
|
||||||
|
|
||||||
let boostedStat: EffectiveStat;
|
let boostedStat: EffectiveStat | undefined;
|
||||||
const statThresholds: number[] = [];
|
const statThresholds: number[] = [];
|
||||||
let totalWeight = 0;
|
let totalWeight = 0;
|
||||||
|
|
||||||
@ -6934,6 +6946,11 @@ export class EnemyPokemon extends Pokemon {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (boostedStat === undefined) {
|
||||||
|
this.bossSegmentIndex--;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
let stages = 1;
|
let stages = 1;
|
||||||
|
|
||||||
// increase the boost if the boss has at least 3 segments and we passed last shield
|
// increase the boost if the boss has at least 3 segments and we passed last shield
|
||||||
@ -6949,7 +6966,7 @@ export class EnemyPokemon extends Pokemon {
|
|||||||
"StatStageChangePhase",
|
"StatStageChangePhase",
|
||||||
this.getBattlerIndex(),
|
this.getBattlerIndex(),
|
||||||
true,
|
true,
|
||||||
[boostedStat!],
|
[boostedStat],
|
||||||
stages,
|
stages,
|
||||||
true,
|
true,
|
||||||
true,
|
true,
|
||||||
|
@ -456,7 +456,7 @@ export class CommandPhase extends FieldPhase {
|
|||||||
|
|
||||||
const numBallTypes = 5;
|
const numBallTypes = 5;
|
||||||
if (cursor < numBallTypes) {
|
if (cursor < numBallTypes) {
|
||||||
const targetPokemon = globalScene.getEnemyPokemon();
|
const targetPokemon = globalScene.getEnemyPokemon(false);
|
||||||
if (
|
if (
|
||||||
targetPokemon?.isBoss() &&
|
targetPokemon?.isBoss() &&
|
||||||
targetPokemon?.bossSegmentIndex >= 1 &&
|
targetPokemon?.bossSegmentIndex >= 1 &&
|
||||||
|
@ -64,7 +64,7 @@ export class EggHatchPhase extends Phase {
|
|||||||
private canSkip: boolean;
|
private canSkip: boolean;
|
||||||
private skipped: boolean;
|
private skipped: boolean;
|
||||||
/** The sound effect being played when the egg is hatched */
|
/** The sound effect being played when the egg is hatched */
|
||||||
private evolutionBgm: AnySound;
|
private evolutionBgm: AnySound | null;
|
||||||
private eggLapsePhase: EggLapsePhase;
|
private eggLapsePhase: EggLapsePhase;
|
||||||
|
|
||||||
constructor(hatchScene: EggLapsePhase, egg: Egg, eggsToHatchCount: number) {
|
constructor(hatchScene: EggLapsePhase, egg: Egg, eggsToHatchCount: number) {
|
||||||
|
@ -28,9 +28,10 @@ export class EvolutionPhase extends Phase {
|
|||||||
|
|
||||||
private evolution: SpeciesFormEvolution | null;
|
private evolution: SpeciesFormEvolution | null;
|
||||||
private fusionSpeciesEvolved: boolean; // Whether the evolution is of the fused species
|
private fusionSpeciesEvolved: boolean; // Whether the evolution is of the fused species
|
||||||
private evolutionBgm: AnySound;
|
private evolutionBgm: AnySound | null;
|
||||||
private evolutionHandler: EvolutionSceneHandler;
|
private evolutionHandler: EvolutionSceneHandler;
|
||||||
|
|
||||||
|
/** Container for all assets used by the scene. When the scene is cleared, the children within this are destroyed. */
|
||||||
protected evolutionContainer: Phaser.GameObjects.Container;
|
protected evolutionContainer: Phaser.GameObjects.Container;
|
||||||
protected evolutionBaseBg: Phaser.GameObjects.Image;
|
protected evolutionBaseBg: Phaser.GameObjects.Image;
|
||||||
protected evolutionBg: Phaser.GameObjects.Video;
|
protected evolutionBg: Phaser.GameObjects.Video;
|
||||||
@ -297,7 +298,9 @@ export class EvolutionPhase extends Phase {
|
|||||||
this.evolutionBg.setVisible(false);
|
this.evolutionBg.setVisible(false);
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
SoundFade.fadeOut(globalScene, this.evolutionBgm, 100);
|
if (this.evolutionBgm) {
|
||||||
|
SoundFade.fadeOut(globalScene, this.evolutionBgm, 100);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -377,7 +380,9 @@ export class EvolutionPhase extends Phase {
|
|||||||
* Fadeout evolution music, play the cry, show the evolution completed text, and end the phase
|
* Fadeout evolution music, play the cry, show the evolution completed text, and end the phase
|
||||||
*/
|
*/
|
||||||
private onEvolutionComplete(evolvedPokemon: Pokemon) {
|
private onEvolutionComplete(evolvedPokemon: Pokemon) {
|
||||||
SoundFade.fadeOut(globalScene, this.evolutionBgm, 100);
|
if (this.evolutionBgm) {
|
||||||
|
SoundFade.fadeOut(globalScene, this.evolutionBgm, 100);
|
||||||
|
}
|
||||||
globalScene.time.delayedCall(250, () => {
|
globalScene.time.delayedCall(250, () => {
|
||||||
this.pokemon.cry();
|
this.pokemon.cry();
|
||||||
globalScene.time.delayedCall(1250, () => {
|
globalScene.time.delayedCall(1250, () => {
|
||||||
@ -522,6 +527,7 @@ export class EvolutionPhase extends Phase {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (i === lastCycle) {
|
if (i === lastCycle) {
|
||||||
|
this.pokemonTintSprite.setVisible(false).setActive(false);
|
||||||
this.pokemonEvoTintSprite.setScale(1);
|
this.pokemonEvoTintSprite.setScale(1);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -38,13 +38,15 @@ export class PartyHealPhase extends BattlePhase {
|
|||||||
pokemon.updateInfo(true);
|
pokemon.updateInfo(true);
|
||||||
}
|
}
|
||||||
const healSong = globalScene.playSoundWithoutBgm("heal");
|
const healSong = globalScene.playSoundWithoutBgm("heal");
|
||||||
globalScene.time.delayedCall(fixedInt(healSong.totalDuration * 1000), () => {
|
if (healSong) {
|
||||||
healSong.destroy();
|
globalScene.time.delayedCall(fixedInt(healSong.totalDuration * 1000), () => {
|
||||||
if (this.resumeBgm && bgmPlaying) {
|
healSong.destroy();
|
||||||
globalScene.playBgm();
|
if (this.resumeBgm && bgmPlaying) {
|
||||||
}
|
globalScene.playBgm();
|
||||||
globalScene.ui.fadeIn(500).then(() => this.end());
|
}
|
||||||
});
|
globalScene.ui.fadeIn(500).then(() => this.end());
|
||||||
|
});
|
||||||
|
}
|
||||||
});
|
});
|
||||||
globalScene.arena.playerTerasUsed = 0;
|
globalScene.arena.playerTerasUsed = 0;
|
||||||
}
|
}
|
||||||
|
@ -115,6 +115,9 @@ export class EnemyBattleInfo extends BattleInfo {
|
|||||||
globalScene.gameData.starterData[pokemon.species.getRootSpeciesId()].classicWinCount > 0 &&
|
globalScene.gameData.starterData[pokemon.species.getRootSpeciesId()].classicWinCount > 0 &&
|
||||||
globalScene.gameData.starterData[pokemon.species.getRootSpeciesId(true)].classicWinCount > 0
|
globalScene.gameData.starterData[pokemon.species.getRootSpeciesId(true)].classicWinCount > 0
|
||||||
) {
|
) {
|
||||||
|
// move the ribbon to the left if there is no owned icon
|
||||||
|
const championRibbonX = this.ownedIcon.visible ? 8 : 0;
|
||||||
|
this.championRibbon.setPositionRelative(this.nameText, championRibbonX, 11.75);
|
||||||
this.championRibbon.setVisible(true);
|
this.championRibbon.setVisible(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -180,12 +183,12 @@ export class EnemyBattleInfo extends BattleInfo {
|
|||||||
this.ownedIcon,
|
this.ownedIcon,
|
||||||
this.championRibbon,
|
this.championRibbon,
|
||||||
this.statusIndicator,
|
this.statusIndicator,
|
||||||
this.levelContainer,
|
|
||||||
this.statValuesContainer,
|
this.statValuesContainer,
|
||||||
].map(e => (e.x += 48 * (boss ? -1 : 1)));
|
].map(e => (e.x += 48 * (boss ? -1 : 1)));
|
||||||
this.hpBar.x += 38 * (boss ? -1 : 1);
|
this.hpBar.x += 38 * (boss ? -1 : 1);
|
||||||
this.hpBar.y += 2 * (this.boss ? -1 : 1);
|
this.hpBar.y += 2 * (this.boss ? -1 : 1);
|
||||||
this.hpBar.setTexture(`overlay_hp${boss ? "_boss" : ""}`);
|
this.hpBar.setTexture(`overlay_hp${boss ? "_boss" : ""}`);
|
||||||
|
this.levelContainer.x += 2 * (boss ? -1 : 1);
|
||||||
this.box.setTexture(this.getTextureName());
|
this.box.setTexture(this.getTextureName());
|
||||||
this.statsBox.setTexture(`${this.getTextureName()}_stats`);
|
this.statsBox.setTexture(`${this.getTextureName()}_stats`);
|
||||||
}
|
}
|
||||||
|
@ -613,6 +613,20 @@ export class PartyUiHandler extends MessageUiHandler {
|
|||||||
ui.playSelect();
|
ui.playSelect();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (option === PartyOption.SUMMARY) {
|
||||||
|
return this.processSummaryOption(pokemon);
|
||||||
|
}
|
||||||
|
if (option === PartyOption.POKEDEX) {
|
||||||
|
return this.processPokedexOption(pokemon);
|
||||||
|
}
|
||||||
|
if (option === PartyOption.UNPAUSE_EVOLUTION) {
|
||||||
|
return this.processUnpauseEvolutionOption(pokemon);
|
||||||
|
}
|
||||||
|
if (option === PartyOption.RENAME) {
|
||||||
|
return this.processRenameOption(pokemon);
|
||||||
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -349,6 +349,15 @@ export function getTextStyleOptions(
|
|||||||
styleOptions.fontSize = defaultFontSize - 42;
|
styleOptions.fontSize = defaultFontSize - 42;
|
||||||
styleOptions.padding = { top: 4 };
|
styleOptions.padding = { top: 4 };
|
||||||
break;
|
break;
|
||||||
|
case "ko":
|
||||||
|
styleOptions.fontSize = defaultFontSize - 38;
|
||||||
|
styleOptions.padding = { top: 4, left: 6 };
|
||||||
|
break;
|
||||||
|
case "zh-CN":
|
||||||
|
case "zh-TW":
|
||||||
|
styleOptions.fontSize = defaultFontSize - 42;
|
||||||
|
styleOptions.padding = { top: 5, left: 14 };
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
styleOptions.fontSize = defaultFontSize - 30;
|
styleOptions.fontSize = defaultFontSize - 30;
|
||||||
styleOptions.padding = { left: 12 };
|
styleOptions.padding = { left: 12 };
|
||||||
|
235
test/ui/transfer-item-options.test.ts
Normal file
@ -0,0 +1,235 @@
|
|||||||
|
import { BerryType } from "#enums/berry-type";
|
||||||
|
import { Button } from "#enums/buttons";
|
||||||
|
import { MoveId } from "#enums/move-id";
|
||||||
|
import { SpeciesId } from "#enums/species-id";
|
||||||
|
import { UiMode } from "#enums/ui-mode";
|
||||||
|
import { GameManager } from "#test/test-utils/game-manager";
|
||||||
|
import { type PartyUiHandler, PartyUiMode } from "#ui/party-ui-handler";
|
||||||
|
import type { RenameFormUiHandler } from "#ui/rename-form-ui-handler";
|
||||||
|
import Phaser from "phaser";
|
||||||
|
import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest";
|
||||||
|
|
||||||
|
// todo: Some tests fail when running all tests at once, but pass when running individually. Seams like it's always the 2nd and 4th (non todo) tests that fail.
|
||||||
|
describe("UI - Transfer Item Options", () => {
|
||||||
|
let phaserGame: Phaser.Game;
|
||||||
|
let game: GameManager;
|
||||||
|
|
||||||
|
beforeAll(() => {
|
||||||
|
phaserGame = new Phaser.Game({
|
||||||
|
type: Phaser.HEADLESS,
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
afterEach(() => {
|
||||||
|
game.phaseInterceptor.restoreOg();
|
||||||
|
});
|
||||||
|
|
||||||
|
beforeEach(async () => {
|
||||||
|
game = new GameManager(phaserGame);
|
||||||
|
game.override
|
||||||
|
.battleStyle("single")
|
||||||
|
.startingLevel(100)
|
||||||
|
.startingHeldItems([
|
||||||
|
{ name: "BERRY", count: 1, type: BerryType.SITRUS },
|
||||||
|
{ name: "BERRY", count: 2, type: BerryType.APICOT },
|
||||||
|
{ name: "BERRY", count: 2, type: BerryType.LUM },
|
||||||
|
])
|
||||||
|
.enemySpecies(SpeciesId.MAGIKARP)
|
||||||
|
.enemyMoveset(MoveId.SPLASH);
|
||||||
|
|
||||||
|
await game.classicMode.startBattle([SpeciesId.BULBASAUR, SpeciesId.SQUIRTLE, SpeciesId.CHARMANDER]);
|
||||||
|
|
||||||
|
game.move.use(MoveId.DRAGON_CLAW);
|
||||||
|
|
||||||
|
await game.phaseInterceptor.to("SelectModifierPhase");
|
||||||
|
await game.scene.ui.setModeWithoutClear(UiMode.PARTY, PartyUiMode.MODIFIER_TRANSFER);
|
||||||
|
});
|
||||||
|
|
||||||
|
it.todo("should open the summary screen while transfering an item", async () => {
|
||||||
|
await new Promise<void>(resolve => {
|
||||||
|
game.onNextPrompt("SelectModifierPhase", UiMode.PARTY, async () => {
|
||||||
|
await new Promise(r => setTimeout(r, 100));
|
||||||
|
const handler = game.scene.ui.getHandler() as PartyUiHandler;
|
||||||
|
|
||||||
|
// Select first party member
|
||||||
|
handler.setCursor(0);
|
||||||
|
handler.processInput(Button.ACTION);
|
||||||
|
|
||||||
|
resolve();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
await new Promise<void>(resolve => {
|
||||||
|
game.onNextPrompt("SelectModifierPhase", UiMode.PARTY, async () => {
|
||||||
|
await new Promise(r => setTimeout(r, 100));
|
||||||
|
const handler = game.scene.ui.getHandler() as PartyUiHandler;
|
||||||
|
// select item to transfer
|
||||||
|
handler.processInput(Button.ACTION);
|
||||||
|
resolve();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
await new Promise(r => setTimeout(r, 100));
|
||||||
|
const handler = game.scene.ui.getHandler() as PartyUiHandler;
|
||||||
|
|
||||||
|
// move to second pokemon
|
||||||
|
handler.setCursor(1);
|
||||||
|
handler.processInput(Button.ACTION);
|
||||||
|
|
||||||
|
// select summary
|
||||||
|
handler.processInput(Button.DOWN);
|
||||||
|
handler.processInput(Button.ACTION);
|
||||||
|
|
||||||
|
await new Promise(r => setTimeout(r, 100));
|
||||||
|
expect(game.scene.ui.getMode()).toBe(UiMode.SUMMARY);
|
||||||
|
});
|
||||||
|
|
||||||
|
it.todo("should open the pokèdex screen while transfering an item", async () => {
|
||||||
|
await new Promise<void>(resolve => {
|
||||||
|
game.onNextPrompt("SelectModifierPhase", UiMode.PARTY, async () => {
|
||||||
|
await new Promise(r => setTimeout(r, 100));
|
||||||
|
const handler = game.scene.ui.getHandler() as PartyUiHandler;
|
||||||
|
|
||||||
|
// Select first party member
|
||||||
|
handler.setCursor(0);
|
||||||
|
handler.processInput(Button.ACTION);
|
||||||
|
|
||||||
|
resolve();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
await new Promise<void>(resolve => {
|
||||||
|
game.onNextPrompt("SelectModifierPhase", UiMode.PARTY, async () => {
|
||||||
|
await new Promise(r => setTimeout(r, 100));
|
||||||
|
const handler = game.scene.ui.getHandler() as PartyUiHandler;
|
||||||
|
// select item to transfer
|
||||||
|
handler.processInput(Button.ACTION);
|
||||||
|
resolve();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
await new Promise(r => setTimeout(r, 100));
|
||||||
|
const handler = game.scene.ui.getHandler() as PartyUiHandler;
|
||||||
|
// move to second pokemon
|
||||||
|
handler.setCursor(1);
|
||||||
|
handler.processInput(Button.ACTION);
|
||||||
|
|
||||||
|
// select pokèdex
|
||||||
|
handler.processInput(Button.DOWN);
|
||||||
|
handler.processInput(Button.DOWN);
|
||||||
|
handler.processInput(Button.ACTION);
|
||||||
|
|
||||||
|
await new Promise(r => setTimeout(r, 100));
|
||||||
|
expect(game.scene.ui.getMode()).toBe(UiMode.POKEDEX_PAGE);
|
||||||
|
});
|
||||||
|
|
||||||
|
it.todo("should open the rename screen and rename the pokemon while transfering an item", async () => {
|
||||||
|
await new Promise<void>(resolve => {
|
||||||
|
game.onNextPrompt("SelectModifierPhase", UiMode.PARTY, async () => {
|
||||||
|
await new Promise(r => setTimeout(r, 100));
|
||||||
|
const handler = game.scene.ui.getHandler() as PartyUiHandler;
|
||||||
|
|
||||||
|
// Select first party member
|
||||||
|
handler.setCursor(0);
|
||||||
|
handler.processInput(Button.ACTION);
|
||||||
|
|
||||||
|
resolve();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
await new Promise<void>(resolve => {
|
||||||
|
game.onNextPrompt("SelectModifierPhase", UiMode.PARTY, async () => {
|
||||||
|
await new Promise(r => setTimeout(r, 100));
|
||||||
|
const handler = game.scene.ui.getHandler() as PartyUiHandler;
|
||||||
|
// select item to transfer
|
||||||
|
handler.processInput(Button.ACTION);
|
||||||
|
resolve();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
await new Promise(r => setTimeout(r, 100));
|
||||||
|
let handler: PartyUiHandler | RenameFormUiHandler | undefined;
|
||||||
|
handler = game.scene.ui.getHandler() as PartyUiHandler;
|
||||||
|
|
||||||
|
// move to second pokemon
|
||||||
|
handler.setCursor(1);
|
||||||
|
handler.processInput(Button.ACTION);
|
||||||
|
|
||||||
|
// select rename
|
||||||
|
handler.processInput(Button.DOWN);
|
||||||
|
handler.processInput(Button.DOWN);
|
||||||
|
handler.processInput(Button.DOWN);
|
||||||
|
handler.processInput(Button.ACTION);
|
||||||
|
|
||||||
|
const pokemon = game.scene.getPlayerParty()[1];
|
||||||
|
if (!pokemon) {
|
||||||
|
expect.fail("Pokemon is undefined");
|
||||||
|
}
|
||||||
|
const nickname = pokemon.nickname;
|
||||||
|
|
||||||
|
expect(nickname).toBe(undefined);
|
||||||
|
|
||||||
|
await new Promise(r => setTimeout(r, 100));
|
||||||
|
expect(game.scene.ui.getMode()).toBe(UiMode.RENAME_POKEMON);
|
||||||
|
await new Promise(r => setTimeout(r, 100));
|
||||||
|
handler = game.scene.ui.getHandler() as RenameFormUiHandler;
|
||||||
|
handler["inputs"][0].setText("New nickname");
|
||||||
|
handler.processInput(Button.SUBMIT);
|
||||||
|
await new Promise(r => setTimeout(r, 100));
|
||||||
|
// get the sanitized name
|
||||||
|
const sanitizedName = btoa(unescape(encodeURIComponent("New nickname")));
|
||||||
|
expect(pokemon.nickname).toBe(sanitizedName);
|
||||||
|
});
|
||||||
|
|
||||||
|
it.todo("should pause the evolution while transfering an item", async () => {
|
||||||
|
await new Promise<void>(resolve => {
|
||||||
|
game.onNextPrompt("SelectModifierPhase", UiMode.PARTY, async () => {
|
||||||
|
await new Promise(r => setTimeout(r, 100));
|
||||||
|
const handler = game.scene.ui.getHandler() as PartyUiHandler;
|
||||||
|
|
||||||
|
// Select first party member
|
||||||
|
handler.setCursor(0);
|
||||||
|
handler.processInput(Button.ACTION);
|
||||||
|
|
||||||
|
resolve();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
await new Promise<void>(resolve => {
|
||||||
|
game.onNextPrompt("SelectModifierPhase", UiMode.PARTY, async () => {
|
||||||
|
await new Promise(r => setTimeout(r, 100));
|
||||||
|
const handler = game.scene.ui.getHandler() as PartyUiHandler;
|
||||||
|
// select item to transfer
|
||||||
|
handler.processInput(Button.ACTION);
|
||||||
|
resolve();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
await new Promise(r => setTimeout(r, 100));
|
||||||
|
const handler = game.scene.ui.getHandler() as PartyUiHandler;
|
||||||
|
|
||||||
|
// move to second pokemon
|
||||||
|
handler.setCursor(1);
|
||||||
|
handler.processInput(Button.ACTION);
|
||||||
|
|
||||||
|
const pokemon = game.scene.getPlayerParty()[1];
|
||||||
|
|
||||||
|
if (!pokemon) {
|
||||||
|
expect.fail("Pokemon is undefined");
|
||||||
|
}
|
||||||
|
if (pokemon.pauseEvolutions !== undefined) {
|
||||||
|
expect(pokemon.pauseEvolutions).toBe(false);
|
||||||
|
}
|
||||||
|
|
||||||
|
// select pause evolution
|
||||||
|
handler.processInput(Button.DOWN);
|
||||||
|
handler.processInput(Button.DOWN);
|
||||||
|
handler.processInput(Button.DOWN);
|
||||||
|
handler.processInput(Button.DOWN);
|
||||||
|
handler.processInput(Button.ACTION);
|
||||||
|
|
||||||
|
await new Promise(r => setTimeout(r, 100));
|
||||||
|
expect(game.scene.ui.getMode()).toBe(UiMode.PARTY);
|
||||||
|
expect(pokemon.pauseEvolutions).toBe(true);
|
||||||
|
});
|
||||||
|
});
|