Compare commits

...

11 Commits

Author SHA1 Message Date
Satanemme
92c4f2d9ab
[Localization] Italian achievements (achv.ts) (#2135)
* loc_it src/locales/it/ability-trigger.ts update windPowerCharged iceFaceAvoidedDamage

* loc_it src/locales/it/achv.ts translated to italian

* fixup wrong voices reverted ability-trigger.ts outside scope

* capitalization
	modified:   src/locales/it/achv.ts
2024-06-12 10:23:48 -04:00
DustinLin
e5d9cfd10f
[Bug] Fixing Baton Pass passing (#2058)
* skip yawn and infatuation for baton pass, and some docs along the way

* update yawn condition readability
2024-06-12 10:19:50 -04:00
ysh4296
c71d794d97
[Bug] remove playing tween with clear in form modal ui (#2122) 2024-06-12 10:03:26 -04:00
prime
0c85823645
[Enhancement] Golden IVs Chart when all IVs are perfect (#2019)
* golden chart for perfect IVs

The IVs chart is now golden in case all IVs are perfect.

A few overrides have also been added to make testing easier:
- the opponents IVs can be overridden
- the color can be modded via the window.perfectIVsChartColor variable.

* added perfectIVsChartColor to window

* added changes as requested

- removed global variable
- removed chart versatility
- changed color
2024-06-12 09:56:23 -04:00
Jannik Tappert
6e52bc7980
[Localization] Ability Bar can now be localized. In a way that pokemonName abilityNa… (#1921)
* Ability Bar can now be localized. In a way that pokemonName abilityName and passive string can be ordered freely

* Update src/locales/ko/fight-ui-handler.ts

Co-authored-by: returntoice <dieandbecome@gmail.com>

* Update src/locales/de/fight-ui-handler.ts

* Update src/locales/de/fight-ui-handler.ts

---------

Co-authored-by: returntoice <dieandbecome@gmail.com>
2024-06-12 09:45:20 -04:00
Bastien
124ef7065f
[Localization][fr] Update battle.ts (#2130)
Add French translation for "regainHealth" and "fainted" that was still in english
2024-06-12 09:28:10 -04:00
José Ricardo Fleury Oliveira
d6a8394503
[Localization] [pt] Updated pt-br achievements (#2129)
* updated pt achievements

* minor fix
2024-06-12 09:25:41 -04:00
GoldTra
965d8d33fb
[Localization][es] Update Spanish fainted localization (#2127) 2024-06-12 09:25:21 -04:00
José Ricardo Fleury Oliveira
e6ce85cd3f
[Localization][pt] fainted translation (#2125) 2024-06-12 09:24:18 -04:00
Seung Ho Jang
0e7498f9ef
[Bug] Fix move 'Hyperspace Fury' to non-contact (#2132) 2024-06-12 09:21:16 -04:00
Ei
b721aeee87
[Enhancement] Minor Search Engine Optimization (#2111)
* Minor Search Engine Optimization

* Added a few more meta tags
2024-06-12 08:42:59 -04:00
23 changed files with 207 additions and 128 deletions

View File

@ -4,12 +4,24 @@
<head> <head>
<meta charset="UTF-8" /> <meta charset="UTF-8" />
<title>PokéRogue</title> <title>PokéRogue</title>
<meta name="title" content="PokéRogue" />
<meta name="description" content="A Pokémon fangame heavily inspired by the roguelite genre. Battle endlessly while gathering stacking items, exploring many different biomes, and reaching Pokémon stats you never thought possible." /> <meta name="description" content="A Pokémon fangame heavily inspired by the roguelite genre. Battle endlessly while gathering stacking items, exploring many different biomes, and reaching Pokémon stats you never thought possible." />
<meta name="theme-color" content="#da3838" /> <meta name="theme-color" content="#da3838" />
<meta name="keywords" content="pokerogue, pokemon, roguelite" />
<meta name="news_keywords" content="pokerogue, pokemon, roguelite" />
<meta name="distribution" content="Global">
<meta http-equiv="audience" content="General">
<meta property="og:title" content="PokéRogue" /> <meta property="og:title" content="PokéRogue" />
<meta property="og:type" content="website" /> <meta property="og:type" content="website" />
<meta property="og:description" content="A Pokémon fangame heavily inspired by the roguelite genre. Battle endlessly while gathering stacking items, exploring many different biomes, and reaching Pokémon stats you never thought possible." /> <meta property="og:description" content="A Pokémon fangame heavily inspired by the roguelite genre. Battle endlessly while gathering stacking items, exploring many different biomes, and reaching Pokémon stats you never thought possible." />
<meta property="og:image" content="https://pokerogue.net/logo512.png" /> <meta property="og:image" content="https://pokerogue.net/logo512.png" />
<meta property="og:url" content="https://pokerogue.net" />
<meta property="og:site_name" content="PokéRogue" />
<meta property="twitter:title" content="PokéRogue" />
<meta property="twitter:description" content="A Pokémon fangame heavily inspired by the roguelite genre. Battle endlessly while gathering stacking items, exploring many different biomes, and reaching Pokémon stats you never thought possible." />
<meta property="twitter:image" content="https://pokerogue.net/logo512.png" />
<meta property="twitter:card" content="summary" />
<meta property="twitter:url" content="https://pokerogue.net" />
<link rel="apple-touch-icon" href="./logo512.png" /> <link rel="apple-touch-icon" href="./logo512.png" />
<link rel="shortcut icon" type="image/png" href="./logo512.png" /> <link rel="shortcut icon" type="image/png" href="./logo512.png" />
<link rel="canonical" href="https://pokerogue.net" /> <link rel="canonical" href="https://pokerogue.net" />

View File

@ -68,6 +68,12 @@ export const bypassLogin = import.meta.env.VITE_BYPASS_LOGIN === "1";
const DEBUG_RNG = false; const DEBUG_RNG = false;
const OPP_IVS_OVERRIDE_VALIDATED : integer[] = (
Array.isArray(Overrides.OPP_IVS_OVERRIDE) ?
Overrides.OPP_IVS_OVERRIDE :
new Array(6).fill(Overrides.OPP_IVS_OVERRIDE)
).map(iv => isNaN(iv) || iv === null || iv > 31 ? -1 : iv);
export const startingWave = Overrides.STARTING_WAVE_OVERRIDE || 1; export const startingWave = Overrides.STARTING_WAVE_OVERRIDE || 1;
const expSpriteKeys: string[] = []; const expSpriteKeys: string[] = [];
@ -689,6 +695,10 @@ export default class BattleScene extends SceneBase {
return this.getPlayerField().find(p => p.isActive()); return this.getPlayerField().find(p => p.isActive());
} }
/**
* Returns an array of PlayerPokemon of length 1 or 2 depending on if double battles or not
* @returns array of {@linkcode PlayerPokemon}
*/
getPlayerField(): PlayerPokemon[] { getPlayerField(): PlayerPokemon[] {
const party = this.getParty(); const party = this.getParty();
return party.slice(0, Math.min(party.length, this.currentBattle?.double ? 2 : 1)); return party.slice(0, Math.min(party.length, this.currentBattle?.double ? 2 : 1));
@ -702,6 +712,10 @@ export default class BattleScene extends SceneBase {
return this.getEnemyField().find(p => p.isActive()); return this.getEnemyField().find(p => p.isActive());
} }
/**
* Returns an array of EnemyPokemon of length 1 or 2 depending on if double battles or not
* @returns array of {@linkcode EnemyPokemon}
*/
getEnemyField(): EnemyPokemon[] { getEnemyField(): EnemyPokemon[] {
const party = this.getEnemyParty(); const party = this.getEnemyParty();
return party.slice(0, Math.min(party.length, this.currentBattle?.double ? 2 : 1)); return party.slice(0, Math.min(party.length, this.currentBattle?.double ? 2 : 1));
@ -766,6 +780,13 @@ export default class BattleScene extends SceneBase {
if (postProcess) { if (postProcess) {
postProcess(pokemon); postProcess(pokemon);
} }
for (let i = 0; i < pokemon.ivs.length; i++) {
if (OPP_IVS_OVERRIDE_VALIDATED[i] > -1) {
pokemon.ivs[i] = OPP_IVS_OVERRIDE_VALIDATED[i];
}
}
pokemon.init(); pokemon.init();
return pokemon; return pokemon;
} }

View File

@ -7141,6 +7141,7 @@ export function initMoves() {
.attr(StatChangeAttr, [ BattleStat.DEF, BattleStat.SPDEF ], -1, true), .attr(StatChangeAttr, [ BattleStat.DEF, BattleStat.SPDEF ], -1, true),
new AttackMove(Moves.HYPERSPACE_FURY, Type.DARK, MoveCategory.PHYSICAL, 100, -1, 5, 100, 0, 6) new AttackMove(Moves.HYPERSPACE_FURY, Type.DARK, MoveCategory.PHYSICAL, 100, -1, 5, 100, 0, 6)
.attr(StatChangeAttr, BattleStat.DEF, -1, true) .attr(StatChangeAttr, BattleStat.DEF, -1, true)
.makesContact(false)
.ignoresProtect(), .ignoresProtect(),
/* Unused */ /* Unused */
new AttackMove(Moves.BREAKNECK_BLITZ__PHYSICAL, Type.NORMAL, MoveCategory.PHYSICAL, -1, -1, 1, -1, 0, 7) new AttackMove(Moves.BREAKNECK_BLITZ__PHYSICAL, Type.NORMAL, MoveCategory.PHYSICAL, -1, -1, 1, -1, 0, 7)

View File

@ -2167,12 +2167,22 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
tags.filter(t => t.sourceId === sourceId).forEach(t => t.sourceId = newSourceId); tags.filter(t => t.sourceId === sourceId).forEach(t => t.sourceId = newSourceId);
} }
/**
* Transferring stat changes and Tags
* @param source {@linkcode Pokemon} the pokemon whose stats/Tags are to be passed on from, ie: the Pokemon using Baton Pass
*/
transferSummon(source: Pokemon): void { transferSummon(source: Pokemon): void {
const battleStats = Utils.getEnumValues(BattleStat); const battleStats = Utils.getEnumValues(BattleStat);
for (const stat of battleStats) { for (const stat of battleStats) {
this.summonData.battleStats[stat] = source.summonData.battleStats[stat]; this.summonData.battleStats[stat] = source.summonData.battleStats[stat];
} }
for (const tag of source.summonData.tags) { for (const tag of source.summonData.tags) {
// bypass yawn, and infatuation as those can not be passed via Baton Pass
if (tag.sourceMove === Moves.YAWN || tag.tagType === BattlerTagType.INFATUATED) {
continue;
}
this.summonData.tags.push(tag); this.summonData.tags.push(tag);
} }
if (this instanceof PlayerPokemon && source.summonData.battleStats.find(bs => bs === 6)) { if (this instanceof PlayerPokemon && source.summonData.battleStats.find(bs => bs === 6)) {

View File

@ -4,4 +4,6 @@ export const fightUiHandler: SimpleTranslationEntries = {
"pp": "AP", "pp": "AP",
"power": "Stärke", "power": "Stärke",
"accuracy": "Genauigkeit", "accuracy": "Genauigkeit",
"abilityFlyInText": "{{passive}}{{abilityName}} von {{pokemonName}} wirkt!",
"passive": "Passive Fähigkeit ", // The space at the end is important
} as const; } as const;

View File

@ -4,4 +4,6 @@ export const fightUiHandler: SimpleTranslationEntries = {
"pp": "PP", "pp": "PP",
"power": "Power", "power": "Power",
"accuracy": "Accuracy", "accuracy": "Accuracy",
"abilityFlyInText": " {{pokemonName}}'s {{passive}}{{abilityName}}",
"passive": "Passive ", // The space at the end is important
} as const; } as const;

View File

@ -61,5 +61,5 @@ export const battle: SimpleTranslationEntries = {
"useMove": "¡{{pokemonNameWithAffix}} usó {{moveName}}!", "useMove": "¡{{pokemonNameWithAffix}} usó {{moveName}}!",
"drainMessage": "¡{{pokemonName}} tuvo su\nenergía absorbida!", "drainMessage": "¡{{pokemonName}} tuvo su\nenergía absorbida!",
"regainHealth": "¡{{pokemonName}} recuperó\nPS!", "regainHealth": "¡{{pokemonName}} recuperó\nPS!",
"fainted": "{{pokemonNameWithAffix}} fainted!" "fainted": "¡El {{pokemonNameWithAffix}} se debilitó!"
} as const; } as const;

View File

@ -4,4 +4,6 @@ export const fightUiHandler: SimpleTranslationEntries = {
"pp": "PP", "pp": "PP",
"power": "Potencia", "power": "Potencia",
"accuracy": "Precisión", "accuracy": "Precisión",
"abilityFlyInText": " {{pokemonName}}'s {{passive}}{{abilityName}}",
"passive": "Passive ", // The space at the end is important
} as const; } as const;

View File

@ -60,6 +60,6 @@ export const battle: SimpleTranslationEntries = {
"foePokemonWithAffix": "{{pokemonName}} ennemi", "foePokemonWithAffix": "{{pokemonName}} ennemi",
"useMove": "{{pokemonNameWithAffix}} utilise\n{{moveName}} !", "useMove": "{{pokemonNameWithAffix}} utilise\n{{moveName}} !",
"drainMessage": "{{pokemonName}} had its\nenergy drained!", "drainMessage": "{{pokemonName}} had its\nenergy drained!",
"regainHealth": "{{pokemonName}} regained\nhealth!", "regainHealth": "{{pokemonName}} a récupéré\ndes PV!",
"fainted": "{{pokemonNameWithAffix}} fainted!" "fainted": "{{pokemonNameWithAffix}} est tombé KO!"
} as const; } as const;

View File

@ -4,4 +4,6 @@ export const fightUiHandler: SimpleTranslationEntries = {
"pp": "PP", "pp": "PP",
"power": "Puissance", "power": "Puissance",
"accuracy": "Précision", "accuracy": "Précision",
"abilityFlyInText": " {{pokemonName}}'s {{passive}}{{abilityName}}",
"passive": "Passive ", // The space at the end is important
} as const; } as const;

View File

@ -3,266 +3,266 @@ import { AchievementTranslationEntries } from "#app/plugins/i18n.js";
// Achievement translations for the when the player character is male // Achievement translations for the when the player character is male
export const PGMachv: AchievementTranslationEntries = { export const PGMachv: AchievementTranslationEntries = {
"Achievements": { "Achievements": {
name: "Achievements", name: "Trofei",
}, },
"Locked": { "Locked": {
name: "Locked", name: "Bloccato",
}, },
"MoneyAchv": { "MoneyAchv": {
description: "Accumulate a total of ₽{{moneyAmount}}", description: "Accumula ₽{{moneyAmount}} PokéDollari",
}, },
"10K_MONEY": { "10K_MONEY": {
name: "Money Haver", name: "Benestante",
}, },
"100K_MONEY": { "100K_MONEY": {
name: "Rich", name: "Ricco",
}, },
"1M_MONEY": { "1M_MONEY": {
name: "Millionaire", name: "Milionario",
}, },
"10M_MONEY": { "10M_MONEY": {
name: "One Percenter", name: "L'Un Percento",
}, },
"DamageAchv": { "DamageAchv": {
description: "Inflict {{damageAmount}} damage in one hit", description: "Infliggi {{damageAmount}} danno in un colpo",
}, },
"250_DMG": { "250_DMG": {
name: "Hard Hitter", name: "Gran Danni!",
}, },
"1000_DMG": { "1000_DMG": {
name: "Harder Hitter", name: "Incredibili Danni",
}, },
"2500_DMG": { "2500_DMG": {
name: "That's a Lotta Damage!", name: "Danni a Palate!",
}, },
"10000_DMG": { "10000_DMG": {
name: "One Punch Man", name: "One Punch Man",
}, },
"HealAchv": { "HealAchv": {
description: "Heal {{healAmount}} {{HP}} at once with a move, ability, or held item", description: "Cura {{healAmount}} {{HP}} tramite mossa, abilità, o oggetto",
}, },
"250_HEAL": { "250_HEAL": {
name: "Novice Healer", name: "Paramedico",
}, },
"1000_HEAL": { "1000_HEAL": {
name: "Big Healer", name: "Dottore",
}, },
"2500_HEAL": { "2500_HEAL": {
name: "Cleric", name: "Chierico",
}, },
"10000_HEAL": { "10000_HEAL": {
name: "Recovery Master", name: "Mastro Curatore",
}, },
"LevelAchv": { "LevelAchv": {
description: "Level up a Pokémon to Lv{{level}}", description: "Porta un pokémon a Lv{{level}}",
}, },
"LV_100": { "LV_100": {
name: "But Wait, There's More!", name: "E Non Finisce Qui!",
}, },
"LV_250": { "LV_250": {
name: "Elite", name: "Elite",
}, },
"LV_1000": { "LV_1000": {
name: "To Go Even Further Beyond", name: "Verso l'Infinito ed Oltre!",
}, },
"RibbonAchv": { "RibbonAchv": {
description: "Accumulate a total of {{ribbonAmount}} Ribbons", description: "Accumula un Totale di {{ribbonAmount}} Nastri",
}, },
"10_RIBBONS": { "10_RIBBONS": {
name: "Pokémon League Champion", name: "Campione Lega Pokémon",
}, },
"25_RIBBONS": { "25_RIBBONS": {
name: "Great League Champion", name: "Campione Lega Estesa",
}, },
"50_RIBBONS": { "50_RIBBONS": {
name: "Ultra League Champion", name: "Campione Lega Ultra",
}, },
"75_RIBBONS": { "75_RIBBONS": {
name: "Rogue League Champion", name: "Campione Lega Rogue",
}, },
"100_RIBBONS": { "100_RIBBONS": {
name: "Master League Champion", name: "Campione Lega Assoluta",
}, },
"TRANSFER_MAX_BATTLE_STAT": { "TRANSFER_MAX_BATTLE_STAT": {
name: "Teamwork", name: "Lavoro di Squadra",
description: "Baton pass to another party member with at least one stat maxed out", description: "Trasferisci almeno sei bonus statistiche tramite staffetta",
}, },
"MAX_FRIENDSHIP": { "MAX_FRIENDSHIP": {
name: "Friendmaxxing", name: "Amiconi",
description: "Reach max friendship on a Pokémon", description: "Raggiungi amicizia massima con un Pokémon",
}, },
"MEGA_EVOLVE": { "MEGA_EVOLVE": {
name: "Megamorph", name: "Megamorfosi",
description: "Mega evolve a Pokémon", description: "Megaevolvi un pokémon",
}, },
"GIGANTAMAX": { "GIGANTAMAX": {
name: "Absolute Unit", name: "Grosso e Cattivo",
description: "Gigantamax a Pokémon", description: "Ottieni una gigamax",
}, },
"TERASTALLIZE": { "TERASTALLIZE": {
name: "STAB Enthusiast", name: "STAB Per Tutti",
description: "Terastallize a Pokémon", description: "Teracristallizza un Pokémon",
}, },
"STELLAR_TERASTALLIZE": { "STELLAR_TERASTALLIZE": {
name: "The Hidden Type", name: "Tipo Segreto",
description: "Stellar Terastallize a Pokémon", description: "Teracristallizza un Pokémon stellare",
}, },
"SPLICE": { "SPLICE": {
name: "Infinite Fusion", name: "Fusione Infinita",
description: "Splice two Pokémon together with DNA Splicers", description: "Fondi due Pokémon insieme tramite cuneo DNA",
}, },
"MINI_BLACK_HOLE": { "MINI_BLACK_HOLE": {
name: "A Hole Lot of Items", name: "Universo di Oggetti",
description: "Acquire a Mini Black Hole", description: "Ottieni un Mini Buco Nero",
}, },
"CATCH_MYTHICAL": { "CATCH_MYTHICAL": {
name: "Mythical", name: "Mitico",
description: "Catch a mythical Pokémon", description: "Cattura un Pokémon mitico",
}, },
"CATCH_SUB_LEGENDARY": { "CATCH_SUB_LEGENDARY": {
name: "(Sub-)Legendary", name: "(Semi)Leggendario",
description: "Catch a sub-legendary Pokémon", description: "Cattura un Pokémon semileggendario",
}, },
"CATCH_LEGENDARY": { "CATCH_LEGENDARY": {
name: "Legendary", name: "Leggendario",
description: "Catch a legendary Pokémon", description: "Cattura un Pokémon leggendario",
}, },
"SEE_SHINY": { "SEE_SHINY": {
name: "Shiny", name: "Cromatico",
description: "Find a shiny Pokémon in the wild", description: "Trova un Pokémon shiny in natura",
}, },
"SHINY_PARTY": { "SHINY_PARTY": {
name: "That's Dedication", name: "Dedizione Totale",
description: "Have a full party of shiny Pokémon", description: "Riempi la squadra di Pokémon shiny",
}, },
"HATCH_MYTHICAL": { "HATCH_MYTHICAL": {
name: "Mythical Egg", name: "Uovo Mitico",
description: "Hatch a mythical Pokémon from an egg", description: "Schiudi l'uovo di un Pokémon mitico",
}, },
"HATCH_SUB_LEGENDARY": { "HATCH_SUB_LEGENDARY": {
name: "Sub-Legendary Egg", name: "Uovo (Semi)Leggendario",
description: "Hatch a sub-legendary Pokémon from an egg", description: "Schiudi l'uovo di un Pokémon semileggendario",
}, },
"HATCH_LEGENDARY": { "HATCH_LEGENDARY": {
name: "Legendary Egg", name: "Uovo Leggendario",
description: "Hatch a legendary Pokémon from an egg", description: "Schiudi l'uovo di un Pokémon leggendario",
}, },
"HATCH_SHINY": { "HATCH_SHINY": {
name: "Shiny Egg", name: "Uovo Cromatico",
description: "Hatch a shiny Pokémon from an egg", description: "Schiudi l'uovo di un Pokémon shiny",
}, },
"HIDDEN_ABILITY": { "HIDDEN_ABILITY": {
name: "Hidden Potential", name: "Potenziale Nascosto",
description: "Catch a Pokémon with a hidden ability", description: "Cattura un Pokémon con abilità nascosta",
}, },
"PERFECT_IVS": { "PERFECT_IVS": {
name: "Certificate of Authenticity", name: "Certificato di Autenticità",
description: "Get perfect IVs on a Pokémon", description: "Ottieni un Pokémon con IV perfetti",
}, },
"CLASSIC_VICTORY": { "CLASSIC_VICTORY": {
name: "Undefeated", name: "Imbattuto",
description: "Beat the game in classic mode", description: "Vinci in modalità classica",
}, },
"MONO_GEN_ONE": { "MONO_GEN_ONE": {
name: "The Original Rival", name: "Rivale Originale",
description: "Complete the generation one only challenge.", description: "Completa la modalità sfida generazione uno.",
}, },
"MONO_GEN_TWO": { "MONO_GEN_TWO": {
name: "Generation 1.5", name: "Generazione 1.5",
description: "Complete the generation two only challenge.", description: "Completa la modalità sfida generazione due.",
}, },
"MONO_GEN_THREE": { "MONO_GEN_THREE": {
name: "Too much water?", name: "Troppa Acqua?",
description: "Complete the generation three only challenge.", description: "Completa la modalità sfida generazione tre.",
}, },
"MONO_GEN_FOUR": { "MONO_GEN_FOUR": {
name: "Is she really the hardest?", name: "È Davvero La Più Forte?",
description: "Complete the generation four only challenge.", description: "Completa la modalità sfida generazione quattro.",
}, },
"MONO_GEN_FIVE": { "MONO_GEN_FIVE": {
name: "All Original", name: "Tutti Originali",
description: "Complete the generation five only challenge.", description: "Completa la modalità sfida generazione cinque.",
}, },
"MONO_GEN_SIX": { "MONO_GEN_SIX": {
name: "Almost Royalty", name: "Quasi Reali",
description: "Complete the generation six only challenge.", description: "Completa la modalità sfida generazione sei.",
}, },
"MONO_GEN_SEVEN": { "MONO_GEN_SEVEN": {
name: "Only Technically", name: "Solo In Teoria",
description: "Complete the generation seven only challenge.", description: "Completa la modalità sfida generazione sette.",
}, },
"MONO_GEN_EIGHT": { "MONO_GEN_EIGHT": {
name: "A Champion Time!", name: "È Champion-time!",
description: "Complete the generation eight only challenge.", description: "Completa la modalità sfida generazione otto.",
}, },
"MONO_GEN_NINE": { "MONO_GEN_NINE": {
name: "She was going easy on you", name: "Non si Stava Impegnando...",
description: "Complete the generation nine only challenge.", description: "Completa la modalità sfida generazione nove.",
}, },
"MonoType": { "MonoType": {
description: "Complete the {{type}} monotype challenge.", description: "Completa la modalità sfida monotipo {{type}}",
}, },
"MONO_NORMAL": { "MONO_NORMAL": {
name: "Mono NORMAL", name: "Mono NORMALE",
}, },
"MONO_FIGHTING": { "MONO_FIGHTING": {
name: "I Know Kung Fu", name: "Conosco il Kung-fu",
}, },
"MONO_FLYING": { "MONO_FLYING": {
name: "Mono FLYING", name: "Mono VOLANTE",
}, },
"MONO_POISON": { "MONO_POISON": {
name: "Kanto's Favourite", name: "I migliori di Kanto",
}, },
"MONO_GROUND": { "MONO_GROUND": {
name: "Mono GROUND", name: "Mono TERRA",
}, },
"MONO_ROCK": { "MONO_ROCK": {
name: "Brock Hard", name: "Brock-o Forte!",
}, },
"MONO_BUG": { "MONO_BUG": {
name: "Sting Like A Beedrill", name: "Pungi Come un Beedrill",
}, },
"MONO_GHOST": { "MONO_GHOST": {
name: "Who you gonna call?", name: "Chi Chiamerai?",
}, },
"MONO_STEEL": { "MONO_STEEL": {
name: "Mono STEEL", name: "Mono ACCIAIO",
}, },
"MONO_FIRE": { "MONO_FIRE": {
name: "Mono FIRE", name: "Mono FUOCO",
}, },
"MONO_WATER": { "MONO_WATER": {
name: "When It Rains, It Pours", name: "Piove Sempre Sul Bagnato",
}, },
"MONO_GRASS": { "MONO_GRASS": {
name: "Mono GRASS", name: "Mono ERBA",
}, },
"MONO_ELECTRIC": { "MONO_ELECTRIC": {
name: "Mono ELECTRIC", name: "Mono ELETTRO",
}, },
"MONO_PSYCHIC": { "MONO_PSYCHIC": {
name: "Mono PSYCHIC", name: "Mono PSICO",
}, },
"MONO_ICE": { "MONO_ICE": {
name: "Mono ICE", name: "Mono GHIACCIO",
}, },
"MONO_DRAGON": { "MONO_DRAGON": {
name: "Mono DRAGON", name: "Mono DRAGO",
}, },
"MONO_DARK": { "MONO_DARK": {
name: "It's just a phase", name: "Solo una fase",
}, },
"MONO_FAIRY": { "MONO_FAIRY": {
name: "Mono FAIRY", name: "Mono FATA",
}, },
} as const; } as const;

View File

@ -4,4 +4,6 @@ export const fightUiHandler: SimpleTranslationEntries = {
"pp": "PP", "pp": "PP",
"power": "Potenza", "power": "Potenza",
"accuracy": "Precisione", "accuracy": "Precisione",
"abilityFlyInText": " {{pokemonName}}'s {{passive}}{{abilityName}}",
"passive": "Passive ", // The space at the end is important
} as const; } as const;

View File

@ -2,7 +2,7 @@ import { SimpleTranslationEntries } from "#app/plugins/i18n";
export const menuUiHandler: SimpleTranslationEntries = { export const menuUiHandler: SimpleTranslationEntries = {
"GAME_SETTINGS": "Impostazioni", "GAME_SETTINGS": "Impostazioni",
"ACHIEVEMENTS": "Risultati", "ACHIEVEMENTS": "Trofei",
"STATS": "Statistiche", "STATS": "Statistiche",
"VOUCHERS": "Biglietti", "VOUCHERS": "Biglietti",
"EGG_LIST": "Lista Uova", "EGG_LIST": "Lista Uova",

View File

@ -4,4 +4,6 @@ export const fightUiHandler: SimpleTranslationEntries = {
"pp": "PP", "pp": "PP",
"power": "위력", "power": "위력",
"accuracy": "명중률", "accuracy": "명중률",
"abilityFlyInText": " {{pokemonName}}의 {{passive}}{{abilityName}}",
"passive": "패시브 ", // The space at the end is important
} as const; } as const;

View File

@ -479,7 +479,7 @@ export const PGFachv: AchievementTranslationEntries = {
description: "Complete o desafio de monotipo {{type}}.", description: "Complete o desafio de monotipo {{type}}.",
}, },
"MONO_NORMAL": { "MONO_NORMAL": {
name: "Tenho medo de fantasma", name: "Extra Ordinário",
}, },
"MONO_FIGHTING": { "MONO_FIGHTING": {
name: "Briga de Rua", name: "Briga de Rua",
@ -491,16 +491,16 @@ export const PGFachv: AchievementTranslationEntries = {
name: "Menina Veneno", name: "Menina Veneno",
}, },
"MONO_GROUND": { "MONO_GROUND": {
name: "Deixou eles comendo poeira!", name: "Comendo Poeira",
}, },
"MONO_ROCK": { "MONO_ROCK": {
name: "Duro como Pedra", name: "Duro Como Pedra",
}, },
"MONO_BUG": { "MONO_BUG": {
name: "Vida de Inseto", name: "Vida de Inseto",
}, },
"MONO_GHOST": { "MONO_GHOST": {
name: "Posso dormir com você hoje, mamãe?", name: "Fantasminha Camarada",
}, },
"MONO_STEEL": { "MONO_STEEL": {
name: "Levantando Ferro", name: "Levantando Ferro",
@ -509,7 +509,7 @@ export const PGFachv: AchievementTranslationEntries = {
name: "Tá Pegando Fogo, Bicho!", name: "Tá Pegando Fogo, Bicho!",
}, },
"MONO_WATER": { "MONO_WATER": {
name: "Água mole em pedra dura...", name: "Água Mole em Pedra Dura...",
}, },
"MONO_GRASS": { "MONO_GRASS": {
name: "Jardim Botânico", name: "Jardim Botânico",
@ -527,9 +527,9 @@ export const PGFachv: AchievementTranslationEntries = {
name: "Caverna do Dragão", name: "Caverna do Dragão",
}, },
"MONO_DARK": { "MONO_DARK": {
name: só uma fase", name: Só Uma Fase",
}, },
"MONO_FAIRY": { "MONO_FAIRY": {
name: "Clube das Winx", name: "O Clube das Winx",
}, },
} as const; } as const;

View File

@ -61,5 +61,5 @@ export const battle: SimpleTranslationEntries = {
"useMove": "{{pokemonNameWithAffix}} usou {{moveName}}!", "useMove": "{{pokemonNameWithAffix}} usou {{moveName}}!",
"drainMessage": "{{pokemonName}} teve sua\nenergia drenada!", "drainMessage": "{{pokemonName}} teve sua\nenergia drenada!",
"regainHealth": "{{pokemonName}} recuperou\npontos de saúde!", "regainHealth": "{{pokemonName}} recuperou\npontos de saúde!",
"fainted": "{{pokemonNameWithAffix}} fainted!" "fainted": "{{pokemonNameWithAffix}} desmaiou!",
} as const; } as const;

View File

@ -4,4 +4,6 @@ export const fightUiHandler: SimpleTranslationEntries = {
"pp": "PP", "pp": "PP",
"power": "Poder", "power": "Poder",
"accuracy": "Precisão", "accuracy": "Precisão",
"abilityFlyInText": " {{pokemonName}}'s {{passive}}{{abilityName}}",
"passive": "Passive ", // The space at the end is important
} as const; } as const;

View File

@ -4,4 +4,6 @@ export const fightUiHandler: SimpleTranslationEntries = {
"pp": "PP", "pp": "PP",
"power": "威力", "power": "威力",
"accuracy": "命中", "accuracy": "命中",
} as const; "abilityFlyInText": " {{pokemonName}}'s {{passive}}{{abilityName}}",
"passive": "Passive ", // The space at the end is important
} as const;

View File

@ -4,4 +4,6 @@ export const fightUiHandler: SimpleTranslationEntries = {
"pp": "PP", "pp": "PP",
"power": "威力", "power": "威力",
"accuracy": "命中率", "accuracy": "命中率",
"abilityFlyInText": " {{pokemonName}}'s {{passive}}{{abilityName}}",
"passive": "Passive ", // The space at the end is important
} as const; } as const;

View File

@ -85,6 +85,7 @@ export const OPP_GENDER_OVERRIDE: Gender = null;
export const OPP_MOVESET_OVERRIDE: Array<Moves> = []; export const OPP_MOVESET_OVERRIDE: Array<Moves> = [];
export const OPP_SHINY_OVERRIDE: boolean = false; export const OPP_SHINY_OVERRIDE: boolean = false;
export const OPP_VARIANT_OVERRIDE: Variant = 0; export const OPP_VARIANT_OVERRIDE: Variant = 0;
export const OPP_IVS_OVERRIDE: integer | integer[] = [];
/** /**
* MODIFIER / ITEM OVERRIDES * MODIFIER / ITEM OVERRIDES

View File

@ -1,6 +1,7 @@
import BattleScene from "../battle-scene"; import BattleScene from "../battle-scene";
import Pokemon from "../field/pokemon"; import Pokemon from "../field/pokemon";
import { TextStyle, addTextObject } from "./text"; import { TextStyle, addTextObject } from "./text";
import i18next from "i18next";
const hiddenX = -118; const hiddenX = -118;
const shownX = 0; const shownX = 0;
@ -8,8 +9,7 @@ const baseY = -116;
export default class AbilityBar extends Phaser.GameObjects.Container { export default class AbilityBar extends Phaser.GameObjects.Container {
private bg: Phaser.GameObjects.Image; private bg: Phaser.GameObjects.Image;
private pokemonNameText: Phaser.GameObjects.Text; private abilityBarText: Phaser.GameObjects.Text;
private abilityNameText: Phaser.GameObjects.Text;
private tween: Phaser.Tweens.Tween; private tween: Phaser.Tweens.Tween;
private autoHideTimer: NodeJS.Timeout; private autoHideTimer: NodeJS.Timeout;
@ -26,21 +26,17 @@ export default class AbilityBar extends Phaser.GameObjects.Container {
this.add(this.bg); this.add(this.bg);
this.pokemonNameText = addTextObject(this.scene, 15, 3, "", TextStyle.MESSAGE, { fontSize: "72px" }); this.abilityBarText = addTextObject(this.scene, 15, 3, "", TextStyle.MESSAGE, { fontSize: "72px" });
this.pokemonNameText.setOrigin(0, 0); this.abilityBarText.setOrigin(0, 0);
this.add(this.pokemonNameText); this.abilityBarText.setWordWrapWidth(600, true);
this.add(this.abilityBarText);
this.abilityNameText = addTextObject(this.scene, 97, 16, "", TextStyle.WINDOW, { fontSize: "72px" });
this.abilityNameText.setOrigin(1, 0);
this.add(this.abilityNameText);
this.setVisible(false); this.setVisible(false);
this.shown = false; this.shown = false;
} }
showAbility(pokemon: Pokemon, passive: boolean = false): void { showAbility(pokemon: Pokemon, passive: boolean = false): void {
this.pokemonNameText.setText(`${pokemon.name}'s${passive ? " Passive" : ""}`); this.abilityBarText.setText(`${i18next.t("fightUiHandler:abilityFlyInText", { pokemonName: pokemon.name, passive: passive ? i18next.t("fightUiHandler:passive") : "", abilityName: !passive ? pokemon.getAbility().name : pokemon.getPassiveAbility().name })}`);
this.abilityNameText.setText((!passive ? pokemon.getAbility() : pokemon.getPassiveAbility()).name);
if (this.shown) { if (this.shown) {
return; return;

View File

@ -18,6 +18,7 @@ export abstract class FormModalUiHandler extends ModalUiHandler {
protected inputs: InputText[]; protected inputs: InputText[];
protected errorMessage: Phaser.GameObjects.Text; protected errorMessage: Phaser.GameObjects.Text;
protected submitAction: Function; protected submitAction: Function;
protected tween: Phaser.Tweens.Tween;
constructor(scene: BattleScene, mode?: Mode) { constructor(scene: BattleScene, mode?: Mode) {
super(scene, mode); super(scene, mode);
@ -99,7 +100,7 @@ export abstract class FormModalUiHandler extends ModalUiHandler {
this.modalContainer.y += 24; this.modalContainer.y += 24;
this.modalContainer.setAlpha(0); this.modalContainer.setAlpha(0);
this.scene.tweens.add({ this.tween = this.scene.tweens.add({
targets: this.modalContainer, targets: this.modalContainer,
duration: Utils.fixedInt(1000), duration: Utils.fixedInt(1000),
ease: "Sine.easeInOut", ease: "Sine.easeInOut",
@ -142,5 +143,9 @@ export abstract class FormModalUiHandler extends ModalUiHandler {
this.inputContainers.map(ic => ic.setVisible(false)); this.inputContainers.map(ic => ic.setVisible(false));
this.submitAction = null; this.submitAction = null;
if (this.tween) {
this.tween.remove();
}
} }
} }

View File

@ -69,6 +69,7 @@ export class StatsContainer extends Phaser.GameObjects.Container {
if (ivs) { if (ivs) {
const ivChartData = new Array(6).fill(null).map((_, i) => [ (ivs[ivChartStatIndexes[i]] / 31) * ivChartSize * ivChartStatCoordMultipliers[ivChartStatIndexes[i]][0], (ivs[ivChartStatIndexes[i]] / 31) * ivChartSize * ivChartStatCoordMultipliers[ivChartStatIndexes[i]][1] ] ).flat(); const ivChartData = new Array(6).fill(null).map((_, i) => [ (ivs[ivChartStatIndexes[i]] / 31) * ivChartSize * ivChartStatCoordMultipliers[ivChartStatIndexes[i]][0], (ivs[ivChartStatIndexes[i]] / 31) * ivChartSize * ivChartStatCoordMultipliers[ivChartStatIndexes[i]][1] ] ).flat();
const lastIvChartData = this.statsIvsCache || defaultIvChartData; const lastIvChartData = this.statsIvsCache || defaultIvChartData;
const perfectIVColor: string = getTextColor(TextStyle.SUMMARY_GOLD, false, (this.scene as BattleScene).uiTheme);
this.statsIvsCache = ivChartData.slice(0); this.statsIvsCache = ivChartData.slice(0);
this.ivStatValueTexts.map((t: BBCodeText, i: integer) => { this.ivStatValueTexts.map((t: BBCodeText, i: integer) => {
@ -76,7 +77,7 @@ export class StatsContainer extends Phaser.GameObjects.Container {
// Check to see if IVs are 31, if so change the text style to gold, otherwise leave them be. // Check to see if IVs are 31, if so change the text style to gold, otherwise leave them be.
if (ivs[i] === 31) { if (ivs[i] === 31) {
label += `[color=${getTextColor(TextStyle.SUMMARY_GOLD, false, (this.scene as BattleScene).uiTheme)}][shadow]${ivs[i].toString()}[/shadow][/color]`; label += `[color=${perfectIVColor}][shadow]${ivs[i].toString()}[/shadow][/color]`;
} else { } else {
label = ivs[i].toString(); label = ivs[i].toString();
} }
@ -90,6 +91,13 @@ export class StatsContainer extends Phaser.GameObjects.Container {
t.setText(`[shadow]${label}[/shadow]`); t.setText(`[shadow]${label}[/shadow]`);
}); });
const newColor = ivs.every(iv => iv === 31) ? parseInt(perfectIVColor.substr(1), 16) : 0x98d8a0;
const oldColor = this.ivChart.fillColor;
const interpolateColor = oldColor !== newColor ? [
Phaser.Display.Color.IntegerToColor(oldColor),
Phaser.Display.Color.IntegerToColor(newColor)
] : null;
this.scene.tweens.addCounter({ this.scene.tweens.addCounter({
from: 0, from: 0,
to: 1, to: 1,
@ -98,6 +106,13 @@ export class StatsContainer extends Phaser.GameObjects.Container {
onUpdate: (tween: Phaser.Tweens.Tween) => { onUpdate: (tween: Phaser.Tweens.Tween) => {
const progress = tween.getValue(); const progress = tween.getValue();
const interpolatedData = ivChartData.map((v: number, i: integer) => v * progress + (lastIvChartData[i] * (1 - progress))); const interpolatedData = ivChartData.map((v: number, i: integer) => v * progress + (lastIvChartData[i] * (1 - progress)));
if (interpolateColor) {
this.ivChart.setFillStyle(
Phaser.Display.Color.ValueToColor(
Phaser.Display.Color.Interpolate.ColorWithColor(interpolateColor[0], interpolateColor[1], 1, progress)
).color,
0.75);
}
this.ivChart.setTo(interpolatedData); this.ivChart.setTo(interpolatedData);
} }
}); });