Merge remote-tracking branch 'upstream/main' into offline_continue

pull/911/head
Nexllon 2024-05-15 18:04:29 -03:00
commit 1d53be9c65
62 changed files with 3933 additions and 3280 deletions

File diff suppressed because it is too large Load Diff

Binary file not shown.

Before

Width:  |  Height:  |  Size: 50 KiB

After

Width:  |  Height:  |  Size: 50 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 217 B

View File

@ -20,6 +20,15 @@ export function updateUserInfo(): Promise<[boolean, integer]> {
lastSessionSlot = slotId;
}
loggedInUser.lastSessionSlot = lastSessionSlot;
// Migrate old data from before the username was appended
[ 'data', 'sessionData', 'sessionData1', 'sessionData2', 'sessionData3', 'sessionData4' ].map(d => {
if (localStorage.hasOwnProperty(d)) {
if (localStorage.hasOwnProperty(`${d}_${loggedInUser.username}`))
localStorage.setItem(`${d}_${loggedInUser.username}_bak`, localStorage.getItem(`${d}_${loggedInUser.username}`));
localStorage.setItem(`${d}_${loggedInUser.username}`, localStorage.getItem(d));
localStorage.removeItem(d);
}
});
return resolve([ true, 200 ]);
}
Utils.apiFetch('account/info', true).then(response => {

View File

@ -1755,7 +1755,7 @@ export class StatusEffectImmunityAbAttr extends PreSetStatusAbAttr {
}
getTriggerMessage(pokemon: Pokemon, abilityName: string, ...args: any[]): string {
return getPokemonMessage(pokemon, `'s ${abilityName}\nprevents ${this.immuneEffects.length ? getStatusEffectDescriptor(this.immuneEffects[0]) : 'status problems'}!`);
return getPokemonMessage(pokemon, `'s ${abilityName}\nprevents ${this.immuneEffects.length ? getStatusEffectDescriptor(args[0] as StatusEffect) : 'status problems'}!`);
}
}
@ -2825,7 +2825,7 @@ export function applyPostStatChangeAbAttrs(attrType: { new(...args: any[]): Post
export function applyPreSetStatusAbAttrs(attrType: { new(...args: any[]): PreSetStatusAbAttr },
pokemon: Pokemon, effect: StatusEffect, cancelled: Utils.BooleanHolder, ...args: any[]): Promise<void> {
const simulated = args.length > 1 && args[1];
return applyAbAttrsInternal<PreSetStatusAbAttr>(attrType, pokemon, (attr, passive) => attr.applyPreSetStatus(pokemon, passive, effect, cancelled, args), args, false, false, simulated);
return applyAbAttrsInternal<PreSetStatusAbAttr>(attrType, pokemon, (attr, passive) => attr.applyPreSetStatus(pokemon, passive, effect, cancelled, args), args, false, false, !simulated);
}
export function applyPreApplyBattlerTagAbAttrs(attrType: { new(...args: any[]): PreApplyBattlerTagAbAttr },
@ -3456,7 +3456,7 @@ export function initAbilities() {
.attr(MovePowerBoostAbAttr, (user, target, move) => user.scene.currentBattle.turnCommands[target.getBattlerIndex()].command === Command.POKEMON, 2),
new Ability(Abilities.WATER_BUBBLE, 7)
.attr(ReceivedTypeDamageMultiplierAbAttr, Type.FIRE, 0.5)
.attr(MoveTypePowerBoostAbAttr, Type.WATER, 1)
.attr(MoveTypePowerBoostAbAttr, Type.WATER, 2)
.attr(StatusEffectImmunityAbAttr, StatusEffect.BURN)
.ignorable(),
new Ability(Abilities.STEELWORKER, 7)

View File

@ -544,6 +544,33 @@ export class AquaRingTag extends BattlerTag {
}
}
/** Tag used to allow moves that interact with {@link Moves.MINIMIZE} to function */
export class MinimizeTag extends BattlerTag {
constructor() {
super(BattlerTagType.MINIMIZED, BattlerTagLapseType.TURN_END, 1, Moves.MINIMIZE, undefined);
}
canAdd(pokemon: Pokemon): boolean {
return !pokemon.isMax();
}
onAdd(pokemon: Pokemon): void {
super.onAdd(pokemon);
}
lapse(pokemon: Pokemon, lapseType: BattlerTagLapseType): boolean {
//If a pokemon dynamaxes they lose minimized status
if(pokemon.isMax()){
return false
}
return lapseType !== BattlerTagLapseType.CUSTOM || super.lapse(pokemon, lapseType);
}
onRemove(pokemon: Pokemon): void {
super.onRemove(pokemon);
}
}
export class DrowsyTag extends BattlerTag {
constructor() {
super(BattlerTagType.DROWSY, BattlerTagLapseType.TURN_END, 2, Moves.YAWN);
@ -1358,6 +1385,8 @@ export function getBattlerTag(tagType: BattlerTagType, turnCount: integer, sourc
return new TypeBoostTag(tagType, sourceMove, Type.ELECTRIC, 2, true);
case BattlerTagType.MAGNET_RISEN:
return new MagnetRisenTag(tagType, sourceMove);
case BattlerTagType.MINIMIZED:
return new MinimizeTag();
case BattlerTagType.NONE:
default:
return new BattlerTag(tagType, BattlerTagLapseType.CUSTOM, turnCount, sourceMove, sourceId);

View File

@ -55,5 +55,6 @@ export enum BattlerTagType {
CURSED = "CURSED",
CHARGED = "CHARGED",
GROUNDED = "GROUNDED",
MAGNET_RISEN = "MAGNET_RISEN"
MAGNET_RISEN = "MAGNET_RISEN",
MINIMIZED = "MINIMIZED"
}

View File

@ -2480,6 +2480,30 @@ export class ThunderAccuracyAttr extends VariableAccuracyAttr {
}
}
/**
* Attribute used for moves which never miss
* against Pokemon with the {@link BattlerTagType.MINIMIZED}
* @see {@link apply}
* @param user N/A
* @param target Target of the move
* @param move N/A
* @param args [0] Accuracy of the move to be modified
* @returns true if the function succeeds
*/
export class MinimizeAccuracyAttr extends VariableAccuracyAttr{
apply(user: Pokemon, target: Pokemon, move: Move, args: any[]): boolean {
if (target.getTag(BattlerTagType.MINIMIZED)){
const accuracy = args[0] as Utils.NumberHolder
accuracy.value = -1;
return true;
}
return false;
}
}
export class ToxicAccuracyAttr extends VariableAccuracyAttr {
apply(user: Pokemon, target: Pokemon, move: Move, args: any[]): boolean {
if (user.isOfType(Type.POISON)) {
@ -3235,8 +3259,11 @@ export class FaintCountdownAttr extends AddBattlerTagAttr {
}
}
/** Attribute used when a move hits a {@link BattlerTagType} for double damage */
export class HitsTagAttr extends MoveAttr {
/** The {@link BattlerTagType} this move hits */
public tagType: BattlerTagType;
/** Should this move deal double damage against {@link HitsTagAttr.tagType}? */
public doubleDamage: boolean;
constructor(tagType: BattlerTagType, doubleDamage?: boolean) {
@ -4403,6 +4430,8 @@ export function initMoves() {
new AttackMove(Moves.SLAM, Type.NORMAL, MoveCategory.PHYSICAL, 80, 75, 20, -1, 0, 1),
new AttackMove(Moves.VINE_WHIP, Type.GRASS, MoveCategory.PHYSICAL, 45, 100, 25, -1, 0, 1),
new AttackMove(Moves.STOMP, Type.NORMAL, MoveCategory.PHYSICAL, 65, 100, 20, 30, 0, 1)
.attr(MinimizeAccuracyAttr)
.attr(HitsTagAttr, BattlerTagType.MINIMIZED, true)
.attr(FlinchAttr),
new AttackMove(Moves.DOUBLE_KICK, Type.FIGHTING, MoveCategory.PHYSICAL, 30, 100, 30, -1, 0, 1)
.attr(MultiHitAttr, MultiHitType._2),
@ -4426,6 +4455,8 @@ export function initMoves() {
.attr(OneHitKOAccuracyAttr),
new AttackMove(Moves.TACKLE, Type.NORMAL, MoveCategory.PHYSICAL, 40, 100, 35, -1, 0, 1),
new AttackMove(Moves.BODY_SLAM, Type.NORMAL, MoveCategory.PHYSICAL, 85, 100, 15, 30, 0, 1)
.attr(MinimizeAccuracyAttr)
.attr(HitsTagAttr, BattlerTagType.MINIMIZED, true)
.attr(StatusEffectAttr, StatusEffect.PARALYSIS),
new AttackMove(Moves.WRAP, Type.NORMAL, MoveCategory.PHYSICAL, 15, 90, 20, 100, 0, 1)
.attr(TrapAttr, BattlerTagType.WRAP),
@ -4623,6 +4654,7 @@ export function initMoves() {
new SelfStatusMove(Moves.HARDEN, Type.NORMAL, -1, 30, -1, 0, 1)
.attr(StatChangeAttr, BattleStat.DEF, 1, true),
new SelfStatusMove(Moves.MINIMIZE, Type.NORMAL, -1, 10, -1, 0, 1)
.attr(AddBattlerTagAttr, BattlerTagType.MINIMIZED, true, false)
.attr(StatChangeAttr, BattleStat.EVA, 2, true),
new StatusMove(Moves.SMOKESCREEN, Type.NORMAL, 100, 20, -1, 0, 1)
.attr(StatChangeAttr, BattleStat.ACC, -1),
@ -5073,7 +5105,7 @@ export function initMoves() {
new AttackMove(Moves.FACADE, Type.NORMAL, MoveCategory.PHYSICAL, 70, 100, 20, -1, 0, 3)
.attr(MovePowerMultiplierAttr, (user, target, move) => user.status
&& (user.status.effect === StatusEffect.BURN || user.status.effect === StatusEffect.POISON || user.status.effect === StatusEffect.TOXIC || user.status.effect === StatusEffect.PARALYSIS) ? 2 : 1)
.attr(BypassBurnDamageReductionAttr),
.attr(BypassBurnDamageReductionAttr),
new AttackMove(Moves.FOCUS_PUNCH, Type.FIGHTING, MoveCategory.PHYSICAL, 150, 100, 20, -1, -3, 3)
.punchingMove()
.ignoresVirtual()
@ -5462,6 +5494,8 @@ export function initMoves() {
new AttackMove(Moves.DRAGON_PULSE, Type.DRAGON, MoveCategory.SPECIAL, 85, 100, 10, -1, 0, 4)
.pulseMove(),
new AttackMove(Moves.DRAGON_RUSH, Type.DRAGON, MoveCategory.PHYSICAL, 100, 75, 10, 20, 0, 4)
.attr(MinimizeAccuracyAttr)
.attr(HitsTagAttr, BattlerTagType.MINIMIZED, true)
.attr(FlinchAttr),
new AttackMove(Moves.POWER_GEM, Type.ROCK, MoveCategory.SPECIAL, 80, 100, 20, -1, 0, 4),
new AttackMove(Moves.DRAIN_PUNCH, Type.FIGHTING, MoveCategory.PHYSICAL, 75, 100, 10, -1, 0, 4)
@ -5671,7 +5705,9 @@ export function initMoves() {
.attr(StatChangeAttr, [ BattleStat.SPATK, BattleStat.SPDEF, BattleStat.SPD ], 1, true)
.danceMove(),
new AttackMove(Moves.HEAVY_SLAM, Type.STEEL, MoveCategory.PHYSICAL, -1, 100, 10, -1, 0, 5)
.attr(MinimizeAccuracyAttr)
.attr(CompareWeightPowerAttr)
.attr(HitsTagAttr, BattlerTagType.MINIMIZED, true)
.condition(failOnMaxCondition),
new AttackMove(Moves.SYNCHRONOISE, Type.PSYCHIC, MoveCategory.SPECIAL, 120, 100, 10, -1, 0, 5)
.target(MoveTarget.ALL_NEAR_OTHERS)
@ -5802,7 +5838,9 @@ export function initMoves() {
.attr(StatChangeAttr, BattleStat.DEF, -1)
.slicingMove(),
new AttackMove(Moves.HEAT_CRASH, Type.FIRE, MoveCategory.PHYSICAL, -1, 100, 10, -1, 0, 5)
.attr(MinimizeAccuracyAttr)
.attr(CompareWeightPowerAttr)
.attr(HitsTagAttr, BattlerTagType.MINIMIZED, true)
.condition(failOnMaxCondition),
new AttackMove(Moves.LEAF_TORNADO, Type.GRASS, MoveCategory.SPECIAL, 65, 90, 10, 50, 0, 5)
.attr(StatChangeAttr, BattleStat.ACC, -1),
@ -5873,7 +5911,9 @@ export function initMoves() {
.makesContact(false)
.partial(),
new AttackMove(Moves.FLYING_PRESS, Type.FIGHTING, MoveCategory.PHYSICAL, 100, 95, 10, -1, 0, 6)
.attr(MinimizeAccuracyAttr)
.attr(FlyingTypeMultiplierAttr)
.attr(HitsTagAttr, BattlerTagType.MINIMIZED, true)
.condition(failOnGravityCondition),
new StatusMove(Moves.MAT_BLOCK, Type.FIGHTING, -1, 10, -1, 0, 6)
.unimplemented(),

View File

@ -855,14 +855,20 @@ export const trainerConfigs: TrainerConfigs = {
}),
[TrainerType.RIVAL_6]: new TrainerConfig(++t).setName('Finn').setHasGenders('Ivy').setHasCharSprite().setTitle('Rival').setBoss().setStaticParty().setMoneyMultiplier(3).setEncounterBgm('final').setBattleBgm('battle_rival_3').setPartyTemplates(trainerPartyTemplates.RIVAL_6)
.setPartyMemberFunc(0, getRandomPartyMemberFunc([ Species.VENUSAUR, Species.CHARIZARD, Species.BLASTOISE, Species.MEGANIUM, Species.TYPHLOSION, Species.FERALIGATR, Species.SCEPTILE, Species.BLAZIKEN, Species.SWAMPERT, Species.TORTERRA, Species.INFERNAPE, Species.EMPOLEON, Species.SERPERIOR, Species.EMBOAR, Species.SAMUROTT, Species.CHESNAUGHT, Species.DELPHOX, Species.GRENINJA, Species.DECIDUEYE, Species.INCINEROAR, Species.PRIMARINA, Species.RILLABOOM, Species.CINDERACE, Species.INTELEON, Species.MEOWSCARADA, Species.SKELEDIRGE, Species.QUAQUAVAL ], TrainerSlot.TRAINER, true,
p => p.setBoss(true, 3))
)
p => {
p.setBoss(true, 3);
p.generateAndPopulateMoveset();
}))
.setPartyMemberFunc(1, getRandomPartyMemberFunc([ Species.PIDGEOT, Species.NOCTOWL, Species.SWELLOW, Species.STARAPTOR, Species.UNFEZANT, Species.TALONFLAME, Species.TOUCANNON, Species.CORVIKNIGHT, Species.KILOWATTREL ], TrainerSlot.TRAINER, true,
p => p.setBoss(true, 2)))
p => {
p.setBoss(true, 2);
p.generateAndPopulateMoveset();
}))
.setPartyMemberFunc(2, getSpeciesFilterRandomPartyMemberFunc((species: PokemonSpecies) => !pokemonEvolutions.hasOwnProperty(species.speciesId) && !pokemonPrevolutions.hasOwnProperty(species.speciesId) && species.baseTotal >= 450))
.setSpeciesFilter(species => species.baseTotal >= 540)
.setPartyMemberFunc(5, getRandomPartyMemberFunc([ Species.RAYQUAZA ], TrainerSlot.TRAINER, true, p => {
p.setBoss();
p.generateAndPopulateMoveset();
p.pokeball = PokeballType.MASTER_BALL;
p.shiny = true;
p.variant = 1;

View File

@ -7,6 +7,7 @@ import * as Utils from "../utils";
import BattleScene from "../battle-scene";
import { SuppressWeatherEffectAbAttr } from "./ability";
import { TerrainType } from "./terrain";
import i18next from "i18next";
export enum WeatherType {
NONE,
@ -121,23 +122,23 @@ export class Weather {
export function getWeatherStartMessage(weatherType: WeatherType): string {
switch (weatherType) {
case WeatherType.SUNNY:
return 'The sunlight got bright!';
return i18next.t('weather:sunnyStartMessage');
case WeatherType.RAIN:
return 'A downpour started!';
return i18next.t('weather:rainStartMessage');
case WeatherType.SANDSTORM:
return 'A sandstorm brewed!';
return i18next.t('weather:sandstormStartMessage');
case WeatherType.HAIL:
return 'It started to hail!';
return i18next.t('weather:hailStartMessage');
case WeatherType.SNOW:
return 'It started to snow!';
return i18next.t('weather:snowStartMessage');
case WeatherType.FOG:
return 'A thick fog emerged!'
return i18next.t('weather:fogStartMessage');
case WeatherType.HEAVY_RAIN:
return 'A heavy downpour started!'
return i18next.t('weather:heavyRainStartMessage');
case WeatherType.HARSH_SUN:
return 'The sunlight got hot!'
return i18next.t('weather:harshSunStartMessage');
case WeatherType.STRONG_WINDS:
return 'A heavy wind began!';
return i18next.t('weather:strongWindsStartMessage');
}
return null;
@ -146,23 +147,23 @@ export function getWeatherStartMessage(weatherType: WeatherType): string {
export function getWeatherLapseMessage(weatherType: WeatherType): string {
switch (weatherType) {
case WeatherType.SUNNY:
return 'The sunlight is strong.';
return i18next.t('weather:sunnyLapseMessage');
case WeatherType.RAIN:
return 'The downpour continues.';
return i18next.t('weather:rainLapseMessage');
case WeatherType.SANDSTORM:
return 'The sandstorm rages.';
return i18next.t('weather:sandstormLapseMessage');
case WeatherType.HAIL:
return 'Hail continues to fall.';
return i18next.t('weather:hailLapseMessage');
case WeatherType.SNOW:
return 'The snow is falling down.';
return i18next.t('weather:snowLapseMessage');
case WeatherType.FOG:
return 'The fog continues.';
return i18next.t('weather:fogLapseMessage');
case WeatherType.HEAVY_RAIN:
return 'The heavy downpour continues.'
return i18next.t('weather:heavyRainLapseMessage');
case WeatherType.HARSH_SUN:
return 'The sun is scorching hot.'
return i18next.t('weather:harshSunLapseMessage');
case WeatherType.STRONG_WINDS:
return 'The wind blows intensely.';
return i18next.t('weather:strongWindsLapseMessage');
}
return null;
@ -182,23 +183,23 @@ export function getWeatherDamageMessage(weatherType: WeatherType, pokemon: Pokem
export function getWeatherClearMessage(weatherType: WeatherType): string {
switch (weatherType) {
case WeatherType.SUNNY:
return 'The sunlight faded.';
return i18next.t('weather:sunnyClearMessage');
case WeatherType.RAIN:
return 'The rain stopped.';
return i18next.t('weather:rainClearMessage');
case WeatherType.SANDSTORM:
return 'The sandstorm subsided.';
return i18next.t('weather:sandstormClearMessage');
case WeatherType.HAIL:
return 'The hail stopped.';
return i18next.t('weather:hailClearMessage');
case WeatherType.SNOW:
return 'The snow stopped.';
return i18next.t('weather:snowClearMessage');
case WeatherType.FOG:
return 'The fog disappeared.'
return i18next.t('weather:fogClearMessage');
case WeatherType.HEAVY_RAIN:
return 'The heavy rain stopped.'
return i18next.t('weather:heavyRainClearMessage');
case WeatherType.HARSH_SUN:
return 'The harsh sunlight faded.'
return i18next.t('weather:harshSunClearMessage');
case WeatherType.STRONG_WINDS:
return 'The heavy wind stopped.';
return i18next.t('weather:strongWindsClearMessage');
}
return null;

View File

@ -9,6 +9,7 @@ import { LearnMovePhase } from "./phases";
import { cos, sin } from "./field/anims";
import { PlayerPokemon } from "./field/pokemon";
import { getTypeRgb } from "./data/type";
import i18next from "i18next";
export class EvolutionPhase extends Phase {
protected pokemon: PlayerPokemon;
@ -115,7 +116,7 @@ export class EvolutionPhase extends Phase {
const evolutionHandler = this.scene.ui.getHandler() as EvolutionSceneHandler;
const preName = this.pokemon.name;
this.scene.ui.showText(`What?\n${preName} is evolving!`, null, () => {
this.scene.ui.showText(i18next.t('menu:evolving', { pokemonName: preName }), null, () => {
this.pokemon.cry();
this.pokemon.getPossibleEvolution(this.evolution).then(evolvedPokemon => {
@ -187,8 +188,8 @@ export class EvolutionPhase extends Phase {
this.scene.unshiftPhase(new EndEvolutionPhase(this.scene));
this.scene.ui.showText(`${preName} stopped evolving.`, null, () => {
this.scene.ui.showText(`Would you like to pause evolutions for ${preName}?\nEvolutions can be re-enabled from the party screen.`, null, () => {
this.scene.ui.showText(i18next.t('menu:stoppedEvolving', { pokemonName: preName }), null, () => {
this.scene.ui.showText(i18next.t('menu:pauseEvolutionsQuestion', { pokemonName: preName }), null, () => {
const end = () => {
this.scene.ui.showText(null, 0);
this.scene.playBgm();
@ -198,7 +199,7 @@ export class EvolutionPhase extends Phase {
this.scene.ui.setOverlayMode(Mode.CONFIRM, () => {
this.scene.ui.revertMode();
this.pokemon.pauseEvolutions = true;
this.scene.ui.showText(`Evolutions have been paused for ${preName}.`, null, end, 3000);
this.scene.ui.showText(i18next.t('menu:evolutionsPaused', { pokemonName: preName }), null, end, 3000);
}, () => {
this.scene.ui.revertMode();
this.scene.time.delayedCall(3000, end);
@ -249,7 +250,7 @@ export class EvolutionPhase extends Phase {
this.scene.playSoundWithoutBgm('evolution_fanfare');
evolvedPokemon.destroy();
this.scene.ui.showText(`Congratulations!\nYour ${preName} evolved into ${this.pokemon.name}!`, null, () => this.end(), null, true, Utils.fixedInt(4000));
this.scene.ui.showText(i18next.t('menu:evolutionDone', { pokemonName: preName, evolvedPokemonName: this.pokemon.name }), null, () => this.end(), null, true, Utils.fixedInt(4000));
this.scene.time.delayedCall(Utils.fixedInt(4250), () => this.scene.playBgm());
});
});

View File

@ -206,6 +206,7 @@ export class Arena {
case Biome.TALL_GRASS:
return Type.GRASS;
case Biome.FOREST:
case Biome.JUNGLE:
return Type.BUG;
case Biome.SLUM:
case Biome.SWAMP:
@ -237,8 +238,10 @@ export class Arena {
case Biome.TEMPLE:
return Type.GHOST;
case Biome.DOJO:
case Biome.CONSTRUCTION_SITE:
return Type.FIGHTING;
case Biome.FACTORY:
case Biome.LABORATORY:
return Type.STEEL;
case Biome.RUINS:
case Biome.SPACE:
@ -248,6 +251,8 @@ export class Arena {
return Type.DRAGON;
case Biome.ABYSS:
return Type.DARK;
default:
return Type.UNKNOWN;
}
}

View File

@ -1229,14 +1229,20 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
for (let i = 0; i < 3; i++) {
const moveId = speciesEggMoves[this.species.getRootSpeciesId()][i];
if (!movePool.some(m => m[0] === moveId) && !allMoves[moveId].name.endsWith(' (N)'))
movePool.push([moveId, Math.min(this.level * 0.5, 40)]);
movePool.push([moveId, 40]);
}
const moveId = speciesEggMoves[this.species.getRootSpeciesId()][3];
if (this.level >= 170 && !movePool.some(m => m[0] === moveId) && !allMoves[moveId].name.endsWith(' (N)') && !this.isBoss()) // No rare egg moves before e4
movePool.push([moveId, 30]);
if (this.fusionSpecies) {
for (let i = 0; i < 3; i++) {
const moveId = speciesEggMoves[this.fusionSpecies.getRootSpeciesId()][i];
if (!movePool.some(m => m[0] === moveId) && !allMoves[moveId].name.endsWith(' (N)'))
movePool.push([moveId, Math.min(this.level * 0.5, 30)]);
movePool.push([moveId, 40]);
}
const moveId = speciesEggMoves[this.fusionSpecies.getRootSpeciesId()][3];
if (this.level >= 170 && !movePool.some(m => m[0] === moveId) && !allMoves[moveId].name.endsWith(' (N)') && !this.isBoss()) // No rare egg moves before e4
movePool.push([moveId, 30]);
}
}
}
@ -1544,6 +1550,12 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
applyPreAttackAbAttrs(DamageBoostAbAttr, source, this, battlerMove, damage);
/**
* For each {@link HitsTagAttr} the move has, doubles the damage of the move if:
* The target has a {@link BattlerTagType} that this move interacts with
* AND
* The move doubles damage when used against that tag
* */
move.getAttrs(HitsTagAttr).map(hta => hta as HitsTagAttr).filter(hta => hta.doubleDamage).forEach(hta => {
if (this.getTag(hta.tagType))
damage.value *= 2;

View File

@ -31,6 +31,8 @@ export const battle: SimpleTranslationEntries = {
"learnMoveNotLearned": "{{pokemonName}} hat\n{{moveName}} nicht erlernt.",
"learnMoveForgetQuestion": "Welche Attacke soll vergessen werden?",
"learnMoveForgetSuccess": "{{pokemonName}} hat\n{{moveName}} vergessen.",
"countdownPoof": "@d{32}Eins, @d{15}zwei @d{15}und@d{15}… @d{15}… @d{15}… @d{15}@s{pb_bounce_1}schwupp!",
"learnMoveAnd": "Und…",
"levelCapUp": "Das Levellimit\nhat sich zu {{levelCap}} erhöht!",
"moveNotImplemented": "{{moveName}} ist noch nicht implementiert und kann nicht ausgewählt werden.",
"moveNoPP": "Es sind keine AP für\ndiese Attacke mehr übrig!",
@ -43,7 +45,7 @@ export const battle: SimpleTranslationEntries = {
"noEscapeTrainer": "Du kannst nicht\naus einem Trainerkampf fliehen!",
"noEscapePokemon": "{{pokemonName}}'s {{moveName}}\nverhindert {{escapeVerb}}!",
"runAwaySuccess": "Du bist entkommen!",
"runAwayCannotEscape": 'Flucht unmöglich!',
"runAwayCannotEscape": 'Flucht gescheitert!',
"escapeVerbSwitch": "auswechseln",
"escapeVerbFlee": "flucht",
"skipItemQuestion": "Bist du sicher, dass du kein Item nehmen willst?",

View File

@ -9,7 +9,7 @@ export const menuUiHandler: SimpleTranslationEntries = {
"EGG_GACHA": "Eier-Gacha",
"MANAGE_DATA": "Daten verwalten",
"COMMUNITY": "Community",
"RETURN_TO_TITLE": "Zurück zum Titelbildschirm",
"SAVE_AND_QUIT": "Save and Quit",
"LOG_OUT": "Ausloggen",
"slot": "Slot {{slotNumber}}",
"importSession": "Sitzung importieren",

View File

@ -35,6 +35,11 @@ export const menu: SimpleTranslationEntries = {
"boyOrGirl": "Bist du ein Junge oder ein Mädchen?",
"boy": "Junge",
"girl": "Mädchen",
"evolving": "What?\n{{pokemonName}} is evolving!",
"stoppedEvolving": "{{pokemonName}} stopped evolving.",
"pauseEvolutionsQuestion": "Would you like to pause evolutions for {{pokemonName}}?\nEvolutions can be re-enabled from the party screen.",
"evolutionsPaused": "Evolutions have been paused for {{pokemonName}}.",
"evolutionDone": "Congratulations!\nYour {{pokemonName}} evolved into {{evolvedPokemonName}}!",
"dailyRankings": "Tägliche Rangliste",
"weeklyRankings": "Wöchentliche Rangliste",
"noRankings": "Keine Rangliste",

View File

@ -7,6 +7,15 @@ import { SimpleTranslationEntries } from "#app/plugins/i18n";
*/
export const starterSelectUiHandler: SimpleTranslationEntries = {
"confirmStartTeam": "Mit diesen Pokémon losziehen?",
"gen1": "I",
"gen2": "II",
"gen3": "III",
"gen4": "IV",
"gen5": "V",
"gen6": "VI",
"gen7": "VII",
"gen8": "VIII",
"gen9": "IX",
"growthRate": "Wachstum:",
"ability": "Fhgkeit:",
"passive": "Passiv:",
@ -32,4 +41,4 @@ export const starterSelectUiHandler: SimpleTranslationEntries = {
"locked": "Gesperrt",
"disabled": "Deaktiviert",
"uncaught": "Uncaught"
}
}

44
src/locales/de/weather.ts Normal file
View File

@ -0,0 +1,44 @@
import { SimpleTranslationEntries } from "#app/plugins/i18n";
/**
* The weather namespace holds text displayed when weather is active during a battle
*/
export const weather: SimpleTranslationEntries = {
"sunnyStartMessage": "The sunlight got bright!",
"sunnyLapseMessage": "The sunlight is strong.",
"sunnyClearMessage": "The sunlight faded.",
"rainStartMessage": "A downpour started!",
"rainLapseMessage": "The downpour continues.",
"rainClearMessage": "The rain stopped.",
"sandstormStartMessage": "A sandstorm brewed!",
"sandstormLapseMessage": "The sandstorm rages.",
"sandstormClearMessage": "The sandstorm subsided.",
"sandstormDamageMessage": "{{pokemonPrefix}}{{pokemonName}} is buffeted\nby the sandstorm!",
"hailStartMessage": "It started to hail!",
"hailLapseMessage": "Hail continues to fall.",
"hailClearMessage": "The hail stopped.",
"hailDamageMessage": "{{pokemonPrefix}}{{pokemonName}} is pelted\nby the hail!",
"snowStartMessage": "It started to snow!",
"snowLapseMessage": "The snow is falling down.",
"snowClearMessage": "The snow stopped.",
"fogStartMessage": "A thick fog emerged!",
"fogLapseMessage": "The fog continues.",
"fogClearMessage": "The fog disappeared.",
"heavyRainStartMessage": "A heavy downpour started!",
"heavyRainLapseMessage": "The heavy downpour continues.",
"heavyRainClearMessage": "The heavy rain stopped.",
"harshSunStartMessage": "The sunlight got hot!",
"harshSunLapseMessage": "The sun is scorching hot.",
"harshSunClearMessage": "The harsh sunlight faded.",
"strongWindsStartMessage": "A heavy wind began!",
"strongWindsLapseMessage": "The wind blows intensely.",
"strongWindsClearMessage": "The heavy wind stopped."
}

View File

@ -31,6 +31,8 @@ export const battle: SimpleTranslationEntries = {
"learnMoveNotLearned": "{{pokemonName}} did not learn the\nmove {{moveName}}.",
"learnMoveForgetQuestion": "Which move should be forgotten?",
"learnMoveForgetSuccess": "{{pokemonName}} forgot how to\nuse {{moveName}}.",
"countdownPoof": "@d{32}1, @d{15}2, and@d{15}… @d{15}… @d{15}… @d{15}@s{pb_bounce_1}Poof!",
"learnMoveAnd": "And…",
"levelCapUp": "The level cap\nhas increased to {{levelCap}}!",
"moveNotImplemented": "{{moveName}} is not yet implemented and cannot be selected.",
"moveNoPP": "There's no PP left for\nthis move!",

View File

@ -13,6 +13,7 @@ import { pokemon } from "./pokemon";
import { pokemonStat } from "./pokemon-stat";
import { starterSelectUiHandler } from "./starter-select-ui-handler";
import { tutorial } from "./tutorial";
import { weather } from "./weather";
export const enConfig = {
@ -30,5 +31,6 @@ export const enConfig = {
starterSelectUiHandler: starterSelectUiHandler,
tutorial: tutorial,
nature: nature,
growth: growth
growth: growth,
weather: weather
}

View File

@ -9,7 +9,7 @@ export const menuUiHandler: SimpleTranslationEntries = {
"EGG_GACHA": "Egg Gacha",
"MANAGE_DATA": "Manage Data",
"COMMUNITY": "Community",
"RETURN_TO_TITLE": "Return To Title",
"SAVE_AND_QUIT": "Save and Quit",
"LOG_OUT": "Log Out",
"slot": "Slot {{slotNumber}}",
"importSession": "Import Session",

View File

@ -35,6 +35,11 @@ export const menu: SimpleTranslationEntries = {
"boyOrGirl": "Are you a boy or a girl?",
"boy": "Boy",
"girl": "Girl",
"evolving": "What?\n{{pokemonName}} is evolving!",
"stoppedEvolving": "{{pokemonName}} stopped evolving.",
"pauseEvolutionsQuestion": "Would you like to pause evolutions for {{pokemonName}}?\nEvolutions can be re-enabled from the party screen.",
"evolutionsPaused": "Evolutions have been paused for {{pokemonName}}.",
"evolutionDone": "Congratulations!\nYour {{pokemonName}} evolved into {{evolvedPokemonName}}!",
"dailyRankings": "Daily Rankings",
"weeklyRankings": "Weekly Rankings",
"noRankings": "No Rankings",

View File

@ -7,6 +7,15 @@ import { SimpleTranslationEntries } from "#app/plugins/i18n";
*/
export const starterSelectUiHandler: SimpleTranslationEntries = {
"confirmStartTeam":'Begin with these Pokémon?',
"gen1": "I",
"gen2": "II",
"gen3": "III",
"gen4": "IV",
"gen5": "V",
"gen6": "VI",
"gen7": "VII",
"gen8": "VIII",
"gen9": "IX",
"growthRate": "Growth Rate:",
"ability": "Ability:",
"passive": "Passive:",
@ -32,4 +41,4 @@ export const starterSelectUiHandler: SimpleTranslationEntries = {
"locked": "Locked",
"disabled": "Disabled",
"uncaught": "Uncaught"
}
}

44
src/locales/en/weather.ts Normal file
View File

@ -0,0 +1,44 @@
import { SimpleTranslationEntries } from "#app/plugins/i18n";
/**
* The weather namespace holds text displayed when weather is active during a battle
*/
export const weather: SimpleTranslationEntries = {
"sunnyStartMessage": "The sunlight got bright!",
"sunnyLapseMessage": "The sunlight is strong.",
"sunnyClearMessage": "The sunlight faded.",
"rainStartMessage": "A downpour started!",
"rainLapseMessage": "The downpour continues.",
"rainClearMessage": "The rain stopped.",
"sandstormStartMessage": "A sandstorm brewed!",
"sandstormLapseMessage": "The sandstorm rages.",
"sandstormClearMessage": "The sandstorm subsided.",
"sandstormDamageMessage": "{{pokemonPrefix}}{{pokemonName}} is buffeted\nby the sandstorm!",
"hailStartMessage": "It started to hail!",
"hailLapseMessage": "Hail continues to fall.",
"hailClearMessage": "The hail stopped.",
"hailDamageMessage": "{{pokemonPrefix}}{{pokemonName}} is pelted\nby the hail!",
"snowStartMessage": "It started to snow!",
"snowLapseMessage": "The snow is falling down.",
"snowClearMessage": "The snow stopped.",
"fogStartMessage": "A thick fog emerged!",
"fogLapseMessage": "The fog continues.",
"fogClearMessage": "The fog disappeared.",
"heavyRainStartMessage": "A heavy downpour started!",
"heavyRainLapseMessage": "The heavy downpour continues.",
"heavyRainClearMessage": "The heavy rain stopped.",
"harshSunStartMessage": "The sunlight got hot!",
"harshSunLapseMessage": "The sun is scorching hot.",
"harshSunClearMessage": "The harsh sunlight faded.",
"strongWindsStartMessage": "A heavy wind began!",
"strongWindsLapseMessage": "The wind blows intensely.",
"strongWindsClearMessage": "The heavy wind stopped."
}

View File

@ -31,6 +31,8 @@ export const battle: SimpleTranslationEntries = {
"learnMoveNotLearned": "{{pokemonName}} no ha aprendido {{moveName}}.",
"learnMoveForgetQuestion": "¿Qué movimiento quieres que olvide?",
"learnMoveForgetSuccess": "{{pokemonName}} ha olvidado cómo utilizar {{moveName}}.",
"countdownPoof": "@d{32}1, @d{15}2, @d{15}y@d{15}… @d{15}… @d{15}… @d{15}@s{pb_bounce_1}¡Puf!",
"learnMoveAnd": "Y…",
"levelCapUp": "¡Se ha incrementado el\nnivel máximo a {{levelCap}}!",
"moveNotImplemented": "{{moveName}} aún no está implementado y no se puede seleccionar.",
"moveNoPP": "There's no PP left for\nthis move!",

View File

@ -13,6 +13,7 @@ import { pokemon } from "./pokemon";
import { pokemonStat } from "./pokemon-stat";
import { starterSelectUiHandler } from "./starter-select-ui-handler";
import { tutorial } from "./tutorial";
import { weather } from "./weather";
export const esConfig = {
@ -30,5 +31,6 @@ export const esConfig = {
starterSelectUiHandler: starterSelectUiHandler,
tutorial: tutorial,
nature: nature,
growth: growth
growth: growth,
weather: weather
}

View File

@ -9,7 +9,7 @@ export const menuUiHandler: SimpleTranslationEntries = {
"EGG_GACHA": "Gacha de Huevos",
"MANAGE_DATA": "Gestionar Datos",
"COMMUNITY": "Comunidad",
"RETURN_TO_TITLE": "Volver al Título",
"SAVE_AND_QUIT": "Save and Quit",
"LOG_OUT": "Cerrar Sesión",
"slot": "Ranura {{slotNumber}}",
"importSession": "Importar Sesión",

View File

@ -35,6 +35,11 @@ export const menu: SimpleTranslationEntries = {
"boyOrGirl": "¿Eres un chico o una chica?",
"boy": "Chico",
"girl": "Chica",
"evolving": "What?\n{{pokemonName}} is evolving!",
"stoppedEvolving": "{{pokemonName}} stopped evolving.",
"pauseEvolutionsQuestion": "Would you like to pause evolutions for {{pokemonName}}?\nEvolutions can be re-enabled from the party screen.",
"evolutionsPaused": "Evolutions have been paused for {{pokemonName}}.",
"evolutionDone": "Congratulations!\nYour {{pokemonName}} evolved into {{evolvedPokemonName}}!",
"dailyRankings": "Rankings Diarios",
"weeklyRankings": "Rankings Semanales",
"noRankings": "Sin Rankings",

View File

@ -7,6 +7,15 @@ import { SimpleTranslationEntries } from "#app/plugins/i18n";
*/
export const starterSelectUiHandler: SimpleTranslationEntries = {
"confirmStartTeam":'¿Comenzar con estos Pokémon?',
"gen1": "I",
"gen2": "II",
"gen3": "III",
"gen4": "IV",
"gen5": "V",
"gen6": "VI",
"gen7": "VII",
"gen8": "VIII",
"gen9": "IX",
"growthRate": "Crecimiento:",
"ability": "Habilid:",
"passive": "Pasiva:",
@ -32,4 +41,4 @@ export const starterSelectUiHandler: SimpleTranslationEntries = {
"locked": "Locked",
"disabled": "Disabled",
"uncaught": "Uncaught"
}
}

44
src/locales/es/weather.ts Normal file
View File

@ -0,0 +1,44 @@
import { SimpleTranslationEntries } from "#app/plugins/i18n";
/**
* The weather namespace holds text displayed when weather is active during a battle
*/
export const weather: SimpleTranslationEntries = {
"sunnyStartMessage": "The sunlight got bright!",
"sunnyLapseMessage": "The sunlight is strong.",
"sunnyClearMessage": "The sunlight faded.",
"rainStartMessage": "A downpour started!",
"rainLapseMessage": "The downpour continues.",
"rainClearMessage": "The rain stopped.",
"sandstormStartMessage": "A sandstorm brewed!",
"sandstormLapseMessage": "The sandstorm rages.",
"sandstormClearMessage": "The sandstorm subsided.",
"sandstormDamageMessage": "{{pokemonPrefix}}{{pokemonName}} is buffeted\nby the sandstorm!",
"hailStartMessage": "It started to hail!",
"hailLapseMessage": "Hail continues to fall.",
"hailClearMessage": "The hail stopped.",
"hailDamageMessage": "{{pokemonPrefix}}{{pokemonName}} is pelted\nby the hail!",
"snowStartMessage": "It started to snow!",
"snowLapseMessage": "The snow is falling down.",
"snowClearMessage": "The snow stopped.",
"fogStartMessage": "A thick fog emerged!",
"fogLapseMessage": "The fog continues.",
"fogClearMessage": "The fog disappeared.",
"heavyRainStartMessage": "A heavy downpour started!",
"heavyRainLapseMessage": "The heavy downpour continues.",
"heavyRainClearMessage": "The heavy rain stopped.",
"harshSunStartMessage": "The sunlight got hot!",
"harshSunLapseMessage": "The sun is scorching hot.",
"harshSunClearMessage": "The harsh sunlight faded.",
"strongWindsStartMessage": "A heavy wind began!",
"strongWindsLapseMessage": "The wind blows intensely.",
"strongWindsClearMessage": "The heavy wind stopped."
}

View File

@ -31,6 +31,8 @@ export const battle: SimpleTranslationEntries = {
"learnMoveNotLearned": "{{pokemonName}} na pas appris\n{{moveName}}.",
"learnMoveForgetQuestion": "Quelle capacité doit être oubliée ?",
"learnMoveForgetSuccess": "{{pokemonName}} oublie comment\nutiliser {{moveName}}.",
"countdownPoof": "@d{32}1, @d{15}2, @d{15}et@d{15}… @d{15}… @d{15}… @d{15}@s{pb_bounce_1}Tadaaa !",
"learnMoveAnd": "Et…",
"levelCapUp": "La limite de niveau\na été augmentée à {{levelCap}} !",
"moveNotImplemented": "{{moveName}} nest pas encore implémenté et ne peut pas être sélectionné.",
"moveNoPP": "Il ny a plus de PP pour\ncette capacité !",

View File

@ -13,6 +13,7 @@ import { pokemon } from "./pokemon";
import { pokemonStat } from "./pokemon-stat";
import { starterSelectUiHandler } from "./starter-select-ui-handler";
import { tutorial } from "./tutorial";
import { weather } from "./weather";
export const frConfig = {
@ -30,5 +31,6 @@ export const frConfig = {
starterSelectUiHandler: starterSelectUiHandler,
tutorial: tutorial,
nature: nature,
growth: growth
growth: growth,
weather: weather
}

View File

@ -9,7 +9,7 @@ export const menuUiHandler: SimpleTranslationEntries = {
"EGG_GACHA": "Gacha-Œufs",
"MANAGE_DATA": "Mes données",
"COMMUNITY": "Communauté",
"RETURN_TO_TITLE": "Écran titre",
"SAVE_AND_QUIT": "Sauver & quitter",
"LOG_OUT": "Déconnexion",
"slot": "Emplacement {{slotNumber}}",
"importSession": "Importer session",

View File

@ -30,6 +30,11 @@ export const menu: SimpleTranslationEntries = {
"boyOrGirl": "Es-tu un garçon ou une fille ?",
"boy": "Garçon",
"girl": "Fille",
"evolving": "Hein ?\n{{pokemonName}} évolue !",
"stoppedEvolving": "{{pokemonName}} a stoppé son évolution.",
"pauseEvolutionsQuestion": "Voulez-vous pauser les évolutions pour {{pokemonName}} ?\nLes évolutions peuvent être réactivées depuis l'écran d'équipe.",
"evolutionsPaused": "Les évolutions ont été mises en pause pour {{pokemonName}}.",
"evolutionDone": "Félicitations !\nVotre {{pokemonName}} a évolué en {{evolvedPokemonName}} !",
"dailyRankings": "Classement du Jour",
"weeklyRankings": "Classement de la Semaine",
"noRankings": "Pas de Classement",

View File

@ -7,6 +7,15 @@ import { SimpleTranslationEntries } from "#app/plugins/i18n";
*/
export const starterSelectUiHandler: SimpleTranslationEntries = {
"confirmStartTeam":'Commencer avec ces Pokémon ?',
"gen1": "1G",
"gen2": "2G",
"gen3": "3G",
"gen4": "4G",
"gen5": "5G",
"gen6": "6G",
"gen7": "7G",
"gen8": "8G",
"gen9": "9G",
"growthRate": "Croissance :",
"ability": "Talent :",
"passive": "Passif :",
@ -31,5 +40,5 @@ export const starterSelectUiHandler: SimpleTranslationEntries = {
"disablePassive": "Désactiver Passif",
"locked": "Verrouillé",
"disabled": "Désactivé",
"uncaught": "Uncaught"
"uncaught": "Non-capturé"
}

44
src/locales/fr/weather.ts Normal file
View File

@ -0,0 +1,44 @@
import { SimpleTranslationEntries } from "#app/plugins/i18n";
/**
* The weather namespace holds text displayed when weather is active during a battle
*/
export const weather: SimpleTranslationEntries = {
"sunnyStartMessage": "Les rayons du soleil brillent !",
"sunnyLapseMessage": "Les rayons du soleil brillent fort !",
"sunnyClearMessage": "Les rayons du soleil saffaiblissent !",
"rainStartMessage": "Il commence à pleuvoir !",
"rainLapseMessage": "La pluie continue de tomber !",
"rainClearMessage": "La pluie sest arrêtée !",
"sandstormStartMessage": "Une tempête de sable se prépare !",
"sandstormLapseMessage": "La tempête de sable fait rage !",
"sandstormClearMessage": "La tempête de sable se calme !",
"sandstormDamageMessage": "La tempête de sable inflige des dégâts\nà {{pokemonPrefix}}{{pokemonName}} !",
"hailStartMessage": "Il commence à grêler !",
"hailLapseMessage": "La grêle continue de tomber !",
"hailClearMessage": "La grêle sest arrêtée !",
"hailDamageMessage": "La grêle inflige des dégâts\nà {{pokemonPrefix}}{{pokemonName}} !",
"snowStartMessage": "Il commence à neiger !",
"snowLapseMessage": "Il y a une tempête de neige !",
"snowClearMessage": "La neige sest arrêtée !",
"fogStartMessage": "Le brouillard devient épais…",
"fogLapseMessage": "Le brouillard continue !",
"fogClearMessage": "Le brouillard sest dissipé !",
"heavyRainStartMessage": "Une pluie battante sabat soudainement !",
"heavyRainLapseMessage": "La pluie battante continue.",
"heavyRainClearMessage": "La pluie battante sest arrêtée…",
"harshSunStartMessage": "Les rayons du soleil sintensifient !",
"harshSunLapseMessage": "Les rayons du soleil sont brulants !",
"harshSunClearMessage": "Les rayons du soleil saffaiblissent !",
"strongWindsStartMessage": "Un vent mystérieux se lève !",
"strongWindsLapseMessage": "Le vent mystérieux violemment !",
"strongWindsClearMessage": "Le vent mystérieux sest dissipé…"
}

View File

@ -31,6 +31,8 @@ export const battle: SimpleTranslationEntries = {
"learnMoveNotLearned": "{{pokemonName}} non ha imparato\n{{moveName}}.",
"learnMoveForgetQuestion": "Quale mossa deve dimenticare?",
"learnMoveForgetSuccess": "{{pokemonName}} ha dimenticato la mossa\n{{moveName}}.",
"countdownPoof": "@d{32}1, @d{15}2, @d{15}e@d{15}… @d{15}… @d{15}… @d{15}@s{pb_bounce_1}Puff!",
"learnMoveAnd": "E…",
"levelCapUp": "Il livello massimo\nè aumentato a {{levelCap}}!",
"moveNotImplemented": "{{moveName}} non è ancora implementata e non può essere selezionata.",
"moveNoPP": "Non ci sono PP rimanenti\nper questa mossa!",

View File

@ -13,6 +13,7 @@ import { pokemon } from "./pokemon";
import { pokemonStat } from "./pokemon-stat";
import { starterSelectUiHandler } from "./starter-select-ui-handler";
import { tutorial } from "./tutorial";
import { weather } from "./weather";
export const itConfig = {
@ -30,5 +31,6 @@ export const itConfig = {
starterSelectUiHandler: starterSelectUiHandler,
tutorial: tutorial,
nature: nature,
growth: growth
growth: growth,
weather: weather
}

View File

@ -9,7 +9,7 @@ export const menuUiHandler: SimpleTranslationEntries = {
"EGG_GACHA": "Gacha Uova",
"MANAGE_DATA": "Gestisci Dati",
"COMMUNITY": "Community",
"RETURN_TO_TITLE": "Ritorna al Titolo",
"SAVE_AND_QUIT": "Save and Quit",
"LOG_OUT": "Disconnettiti",
"slot": "Slot {{slotNumber}}",
"importSession": "Importa Sessione",

View File

@ -40,6 +40,11 @@ export const menu: SimpleTranslationEntries = {
"noRankings": "Nessuna Classifica",
"loading": "Caricamento…",
"playersOnline": "Giocatori Online",
"evolving": "What?\n{{pokemonName}} is evolving!",
"stoppedEvolving": "{{pokemonName}} stopped evolving.",
"pauseEvolutionsQuestion": "Would you like to pause evolutions for {{pokemonName}}?\nEvolutions can be re-enabled from the party screen.",
"evolutionsPaused": "Evolutions have been paused for {{pokemonName}}.",
"evolutionDone": "Congratulations!\nYour {{pokemonName}} evolved into {{evolvedPokemonName}}!",
"empty":"Vuoto",
"yes":"Si",
"no":"No",

View File

@ -7,6 +7,15 @@ import { SimpleTranslationEntries } from "#app/plugins/i18n";
*/
export const starterSelectUiHandler: SimpleTranslationEntries = {
"confirmStartTeam":'Vuoi iniziare con questi Pokémon?',
"gen1": "I",
"gen2": "II",
"gen3": "III",
"gen4": "IV",
"gen5": "V",
"gen6": "VI",
"gen7": "VII",
"gen8": "VIII",
"gen9": "IX",
"growthRate": "Vel. Crescita:",
"ability": "Abilità:",
"passive": "Passiva:",
@ -29,7 +38,7 @@ export const starterSelectUiHandler: SimpleTranslationEntries = {
"cycleVariant": 'V: Alterna Variante',
"enablePassive": "Attiva Passiva",
"disablePassive": "Disattiva Passiva",
"locked": "Locked",
"disabled": "Disabled",
"uncaught": "Uncaught"
"locked": "Bloccato",
"disabled": "Disabilitato",
"uncaught": "Non Catturato"
}

44
src/locales/it/weather.ts Normal file
View File

@ -0,0 +1,44 @@
import { SimpleTranslationEntries } from "#app/plugins/i18n";
/**
* The weather namespace holds text displayed when weather is active during a battle
*/
export const weather: SimpleTranslationEntries = {
"sunnyStartMessage": "The sunlight got bright!",
"sunnyLapseMessage": "The sunlight is strong.",
"sunnyClearMessage": "The sunlight faded.",
"rainStartMessage": "A downpour started!",
"rainLapseMessage": "The downpour continues.",
"rainClearMessage": "The rain stopped.",
"sandstormStartMessage": "A sandstorm brewed!",
"sandstormLapseMessage": "The sandstorm rages.",
"sandstormClearMessage": "The sandstorm subsided.",
"sandstormDamageMessage": "{{pokemonPrefix}}{{pokemonName}} is buffeted\nby the sandstorm!",
"hailStartMessage": "It started to hail!",
"hailLapseMessage": "Hail continues to fall.",
"hailClearMessage": "The hail stopped.",
"hailDamageMessage": "{{pokemonPrefix}}{{pokemonName}} is pelted\nby the hail!",
"snowStartMessage": "It started to snow!",
"snowLapseMessage": "The snow is falling down.",
"snowClearMessage": "The snow stopped.",
"fogStartMessage": "A thick fog emerged!",
"fogLapseMessage": "The fog continues.",
"fogClearMessage": "The fog disappeared.",
"heavyRainStartMessage": "A heavy downpour started!",
"heavyRainLapseMessage": "The heavy downpour continues.",
"heavyRainClearMessage": "The heavy rain stopped.",
"harshSunStartMessage": "The sunlight got hot!",
"harshSunLapseMessage": "The sun is scorching hot.",
"harshSunClearMessage": "The harsh sunlight faded.",
"strongWindsStartMessage": "A heavy wind began!",
"strongWindsLapseMessage": "The wind blows intensely.",
"strongWindsClearMessage": "The heavy wind stopped."
}

View File

@ -31,6 +31,8 @@ export const battle: SimpleTranslationEntries = {
"learnMoveNotLearned": "{{pokemonName}} não aprendeu {{moveName}}.",
"learnMoveForgetQuestion": "Qual movimento quer esquecer?",
"learnMoveForgetSuccess": "{{pokemonName}} esqueceu como usar {{moveName}}.",
"countdownPoof": "@d{32}1, @d{15}2, @d{15}e@d{15}… @d{15}… @d{15}… @d{15}@s{pb_bounce_1}Puf!",
"learnMoveAnd": "E…",
"levelCapUp": "O nível máximo aumentou\npara {{levelCap}}!",
"moveNotImplemented": "{{moveName}} ainda não foi implementado e não pode ser usado.",
"moveNoPP": "Não há mais PP\npara esse movimento!",

View File

@ -12,6 +12,7 @@ import { pokemon } from "./pokemon";
import { pokemonStat } from "./pokemon-stat";
import { starterSelectUiHandler } from "./starter-select-ui-handler";
import { tutorial } from "./tutorial";
import { weather } from "./weather";
export const ptBrConfig = {
@ -28,5 +29,6 @@ export const ptBrConfig = {
starterSelectUiHandler: starterSelectUiHandler,
tutorial: tutorial,
nature: nature,
growth: growth
growth: growth,
weather: weather
}

View File

@ -1,23 +1,23 @@
import { SimpleTranslationEntries } from "#app/plugins/i18n";
export const menuUiHandler: SimpleTranslationEntries = {
"GAME_SETTINGS": 'Configurações',
"GAME_SETTINGS": "Configurações",
"ACHIEVEMENTS": "Conquistas",
"STATS": "Estatísticas",
"VOUCHERS": "Vouchers",
"EGG_LIST": "Incubadora",
"EGG_GACHA": "Gacha de Ovos",
"MANAGE_DATA": "Gerenciar Dados",
"EGG_GACHA": "Gacha de ovos",
"MANAGE_DATA": "Gerenciar dados",
"COMMUNITY": "Comunidade",
"RETURN_TO_TITLE": "Voltar ao Início",
"SAVE_AND_QUIT": "Salvar e sair",
"LOG_OUT": "Logout",
"slot": "Slot {{slotNumber}}",
"importSession": "Importar Sessão",
"importSession": "Importar sessão",
"importSlotSelect": "Selecione um slot para importar.",
"exportSession": "Exportar Sessão",
"exportSession": "Exportar sessão",
"exportSlotSelect": "Selecione um slot para exportar.",
"importData": "Importar Dados",
"exportData": "Exportar Dados",
"importData": "Importar dados",
"exportData": "Exportar dados",
"cancel": "Cancelar",
"losingProgressionWarning": "Você vai perder todo o progresso desde o início da batalha. Confirmar?"
} as const;

View File

@ -8,7 +8,7 @@ import { SimpleTranslationEntries } from "#app/plugins/i18n";
export const menu: SimpleTranslationEntries = {
"cancel": "Cancelar",
"continue": "Continuar",
"dailyRun": "Desafio diário (Beta)",
"dailyRun": "Desafio Diário (Beta)",
"loadGame": "Carregar Jogo",
"newGame": "Novo Jogo",
"selectGameMode": "Escolha um modo de jogo.",
@ -35,6 +35,11 @@ export const menu: SimpleTranslationEntries = {
"boyOrGirl": "Você é um menino ou uma menina?",
"boy": "Menino",
"girl": "Menina",
"evolving": "Que?\n{{pokemonName}} tá evoluindo!",
"stoppedEvolving": "{{pokemonName}} parou de evoluir.",
"pauseEvolutionsQuestion": "Gostaria de pausar evoluções para {{pokemonName}}?\nEvoluções podem ser religadas na tela de equipe.",
"evolutionsPaused": "Evoluções foram paradas para {{pokemonName}}.",
"evolutionDone": "Parabéns!\nSeu {{pokemonName}} evolui para {{evolvedPokemonName}}!",
"dailyRankings": "Classificação Diária",
"weeklyRankings": "Classificação Semanal",
"noRankings": "Sem Classificação",

View File

@ -8,7 +8,7 @@ export const nature: SimpleTranslationEntries = {
"Naughty": "Teimosa",
"Bold": "Corajosa",
"Docile": "Dócil",
"Relaxed": "Descontraída",
"Relaxed": "Relaxada",
"Impish": "Inquieta",
"Lax": "Relaxada",
"Timid": "Tímida",
@ -20,7 +20,7 @@ export const nature: SimpleTranslationEntries = {
"Mild": "Mansa",
"Quiet": "Quieta",
"Bashful": "Atrapalhada",
"Rash": "Imprudente",
"Rash": "Rabugenta",
"Calm": "Calma",
"Gentle": "Gentil",
"Sassy": "Atrevida",

View File

@ -7,10 +7,19 @@ import { SimpleTranslationEntries } from "#app/plugins/i18n";
*/
export const starterSelectUiHandler: SimpleTranslationEntries = {
"confirmStartTeam": 'Começar com esses Pokémon?',
"gen1": "I",
"gen2": "II",
"gen3": "III",
"gen4": "IV",
"gen5": "V",
"gen6": "VI",
"gen7": "VII",
"gen8": "VIII",
"gen9": "IX",
"growthRate": "Crescimento:",
"ability": "Hab.:",
"ability": "Habilidade:",
"passive": "Passiva:",
"nature": "Nature:",
"nature": "Natureza:",
"eggMoves": "Mov. de Ovo",
"start": "Iniciar",
"addToParty": "Adicionar à equipe",
@ -25,11 +34,11 @@ export const starterSelectUiHandler: SimpleTranslationEntries = {
"cycleForm": 'F: Mudar Forma',
"cycleGender": 'G: Mudar Gênero',
"cycleAbility": 'E: Mudar Habilidade',
"cycleNature": 'N: Mudar Nature',
"cycleNature": 'N: Mudar Natureza',
"cycleVariant": 'V: Mudar Variante',
"enablePassive": "Ativar Passiva",
"disablePassive": "Desativar Passiva",
"locked": "Bloqueado",
"disabled": "Desativado",
"locked": "Bloqueada",
"disabled": "Desativada",
"uncaught": "Não capturado"
}
}

View File

@ -0,0 +1,44 @@
import { SimpleTranslationEntries } from "#app/plugins/i18n";
/**
* The weather namespace holds text displayed when weather is active during a battle
*/
export const weather: SimpleTranslationEntries = {
"sunnyStartMessage": "A luz do sol ficou clara!",
"sunnyLapseMessage": "A luz do sol está forte.",
"sunnyClearMessage": "A luz do sol sumiu.",
"rainStartMessage": "Começou a chover!",
"rainLapseMessage": "A chuva continua forte.",
"rainClearMessage": "A chuva parou.",
"sandstormStartMessage": "Uma tempestade de areia se formou!",
"sandstormLapseMessage": "A tempestade de areia é violenta.",
"sandstormClearMessage": "A tempestade de areia diminuiu.",
"sandstormDamageMessage": "{{pokemonPrefix}}{{pokemonName}} é atingido\npela tempestade de areia!",
"hailStartMessage": "Começou a chover granizo!",
"hailLapseMessage": "Granizo cai do céu.",
"hailClearMessage": "O granizo parou.",
"hailDamageMessage": "{{pokemonPrefix}}{{pokemonName}} é atingido\npelo granizo!",
"snowStartMessage": "Começou a nevar!",
"snowLapseMessage": "A neve continua caindo.",
"snowClearMessage": "Parou de nevar.",
"fogStartMessage": "Uma névoa densa se formou!",
"fogLapseMessage": "A névoa continua forte.",
"fogClearMessage": "A névoa sumiu.",
"heavyRainStartMessage": "Um temporal começou!",
"heavyRainLapseMessage": "O temporal continua forte.",
"heavyRainClearMessage": "O temporal parou.",
"harshSunStartMessage": "A luz do sol está escaldante!",
"harshSunLapseMessage": "A luz do sol é intensa.",
"harshSunClearMessage": "A luz do sol enfraqueceu.",
"strongWindsStartMessage": "Ventos fortes apareceram!",
"strongWindsLapseMessage": "Os ventos fortes continuam.",
"strongWindsClearMessage": "Os ventos fortes diminuíram.",
}

View File

@ -31,6 +31,8 @@ export const battle: SimpleTranslationEntries = {
"learnMoveNotLearned": "{{pokemonName}} 没有学会 {{moveName}}。",
"learnMoveForgetQuestion": "要忘记哪个技能?",
"learnMoveForgetSuccess": "{{pokemonName}} 忘记了\n如何使用 {{moveName}}。",
"countdownPoof": "@d{32}1, @d{15}2, @d{15}和@d{15}… @d{15}… @d{15}… @d{15}@s{pb_bounce_1}噗!",
"learnMoveAnd": "和…",
"levelCapUp": "等级上限提升到 {{levelCap}}",
"moveNotImplemented": "{{moveName}} 尚未实装,无法选择。",
"moveNoPP": "这个技能的 PP 用完了",

View File

@ -12,6 +12,7 @@ import { pokemonStat } from "./pokemon-stat";
import { starterSelectUiHandler } from "./starter-select-ui-handler";
import { tutorial } from "./tutorial";
import { nature } from "./nature";
import { weather } from "./weather";
export const zhCnConfig = {
@ -29,5 +30,6 @@ export const zhCnConfig = {
starterSelectUiHandler: starterSelectUiHandler,
tutorial: tutorial,
nature: nature
nature: nature,
weather: weather
}

View File

@ -9,7 +9,7 @@ export const menuUiHandler: SimpleTranslationEntries = {
"EGG_GACHA": "扭蛋机",
"MANAGE_DATA": "管理数据",
"COMMUNITY": "社区",
"RETURN_TO_TITLE": "返回标题画面",
"SAVE_AND_QUIT": "Save and Quit",
"LOG_OUT": "登出",
"slot": "存档位 {{slotNumber}}",
"importSession": "导入存档",

View File

@ -35,6 +35,11 @@ export const menu: SimpleTranslationEntries = {
"boyOrGirl": "你是男孩还是女孩?",
"boy": "男孩",
"girl": "女孩",
"evolving": "What?\n{{pokemonName}} is evolving!",
"stoppedEvolving": "{{pokemonName}} stopped evolving.",
"pauseEvolutionsQuestion": "Would you like to pause evolutions for {{pokemonName}}?\nEvolutions can be re-enabled from the party screen.",
"evolutionsPaused": "Evolutions have been paused for {{pokemonName}}.",
"evolutionDone": "Congratulations!\nYour {{pokemonName}} evolved into {{evolvedPokemonName}}!",
"dailyRankings": "每日排名",
"weeklyRankings": "每周排名",
"noRankings": "无排名",

View File

@ -7,6 +7,15 @@ import { SimpleTranslationEntries } from "#app/plugins/i18n";
*/
export const starterSelectUiHandler: SimpleTranslationEntries = {
"confirmStartTeam":'使用这些宝可梦开始游戏吗?',
"gen1": "I",
"gen2": "II",
"gen3": "III",
"gen4": "IV",
"gen5": "V",
"gen6": "VI",
"gen7": "VII",
"gen8": "VIII",
"gen9": "IX",
"growthRate": "成长速度:",
"ability": "特性:",
"passive": "被动:",
@ -32,4 +41,4 @@ export const starterSelectUiHandler: SimpleTranslationEntries = {
"locked": "Locked",
"disabled": "Disabled",
"uncaught": "Uncaught"
}
}

View File

@ -0,0 +1,44 @@
import { SimpleTranslationEntries } from "#app/plugins/i18n";
/**
* The weather namespace holds text displayed when weather is active during a battle
*/
export const weather: SimpleTranslationEntries = {
"sunnyStartMessage": "The sunlight got bright!",
"sunnyLapseMessage": "The sunlight is strong.",
"sunnyClearMessage": "The sunlight faded.",
"rainStartMessage": "A downpour started!",
"rainLapseMessage": "The downpour continues.",
"rainClearMessage": "The rain stopped.",
"sandstormStartMessage": "A sandstorm brewed!",
"sandstormLapseMessage": "The sandstorm rages.",
"sandstormClearMessage": "The sandstorm subsided.",
"sandstormDamageMessage": "{{pokemonPrefix}}{{pokemonName}} is buffeted\nby the sandstorm!",
"hailStartMessage": "It started to hail!",
"hailLapseMessage": "Hail continues to fall.",
"hailClearMessage": "The hail stopped.",
"hailDamageMessage": "{{pokemonPrefix}}{{pokemonName}} is pelted\nby the hail!",
"snowStartMessage": "It started to snow!",
"snowLapseMessage": "The snow is falling down.",
"snowClearMessage": "The snow stopped.",
"fogStartMessage": "A thick fog emerged!",
"fogLapseMessage": "The fog continues.",
"fogClearMessage": "The fog disappeared.",
"heavyRainStartMessage": "A heavy downpour started!",
"heavyRainLapseMessage": "The heavy downpour continues.",
"heavyRainClearMessage": "The heavy rain stopped.",
"harshSunStartMessage": "The sunlight got hot!",
"harshSunLapseMessage": "The sun is scorching hot.",
"harshSunClearMessage": "The harsh sunlight faded.",
"strongWindsStartMessage": "A heavy wind began!",
"strongWindsLapseMessage": "The wind blows intensely.",
"strongWindsClearMessage": "The heavy wind stopped."
}

View File

@ -925,6 +925,9 @@ export const modifierTypes = {
FOCUS_BAND: () => new PokemonHeldItemModifierType('Focus Band', 'Adds a 10% chance to survive with 1 HP after being damaged enough to faint',
(type, args) => new Modifiers.SurviveDamageModifier(type, (args[0] as Pokemon).id)),
QUICK_CLAW: () => new PokemonHeldItemModifierType('Quick Claw', 'Adds a 10% chance to move first regardless of speed (after priority)',
(type, args) => new Modifiers.BypassSpeedChanceModifier(type, (args[0] as Pokemon).id)),
KINGS_ROCK: () => new PokemonHeldItemModifierType('King\'s Rock', 'Adds a 10% chance an attack move will cause the opponent to flinch',
(type, args) => new Modifiers.FlinchChanceModifier(type, (args[0] as Pokemon).id)),
@ -1087,6 +1090,7 @@ const modifierPool: ModifierPool = {
new WeightedModifierType(modifierTypes.SOOTHE_BELL, 4),
new WeightedModifierType(modifierTypes.ABILITY_CHARM, 6),
new WeightedModifierType(modifierTypes.FOCUS_BAND, 5),
new WeightedModifierType(modifierTypes.QUICK_CLAW, 3),
new WeightedModifierType(modifierTypes.KINGS_ROCK, 3),
new WeightedModifierType(modifierTypes.LOCK_CAPSULE, 3),
new WeightedModifierType(modifierTypes.SUPER_EXP_CHARM, 10),
@ -1138,6 +1142,7 @@ const trainerModifierPool: ModifierPool = {
new WeightedModifierType(modifierTypes.REVIVER_SEED, 2),
new WeightedModifierType(modifierTypes.FOCUS_BAND, 2),
new WeightedModifierType(modifierTypes.LUCKY_EGG, 4),
new WeightedModifierType(modifierTypes.QUICK_CLAW, 1),
new WeightedModifierType(modifierTypes.GRIP_CLAW, 1),
new WeightedModifierType(modifierTypes.WIDE_LENS, 1),
].map(m => { m.setTier(ModifierTier.ROGUE); return m; }),
@ -1198,6 +1203,7 @@ const dailyStarterModifierPool: ModifierPool = {
new WeightedModifierType(modifierTypes.GRIP_CLAW, 5),
new WeightedModifierType(modifierTypes.BATON, 2),
new WeightedModifierType(modifierTypes.FOCUS_BAND, 5),
new WeightedModifierType(modifierTypes.QUICK_CLAW, 3),
new WeightedModifierType(modifierTypes.KINGS_ROCK, 3),
].map(m => { m.setTier(ModifierTier.ROGUE); return m; }),
[ModifierTier.MASTER]: [

View File

@ -731,6 +731,40 @@ export class SurviveDamageModifier extends PokemonHeldItemModifier {
}
}
export class BypassSpeedChanceModifier extends PokemonHeldItemModifier {
constructor(type: ModifierType, pokemonId: integer, stackCount?: integer) {
super(type, pokemonId, stackCount);
}
matchType(modifier: Modifier) {
return modifier instanceof BypassSpeedChanceModifier;
}
clone() {
return new BypassSpeedChanceModifier(this.type, this.pokemonId, this.stackCount);
}
shouldApply(args: any[]): boolean {
return super.shouldApply(args) && args.length === 2 && args[1] instanceof Utils.BooleanHolder;
}
apply(args: any[]): boolean {
const pokemon = args[0] as Pokemon;
const bypassSpeed = args[1] as Utils.BooleanHolder;
if (!bypassSpeed.value && pokemon.randSeedInt(10) < this.getStackCount()) {
bypassSpeed.value = true;
return true;
}
return false;
}
getMaxHeldItemCount(pokemon: Pokemon): integer {
return 3;
}
}
export class FlinchChanceModifier extends PokemonHeldItemModifier {
constructor(type: ModifierType, pokemonId: integer, stackCount?: integer) {
super(type, pokemonId, stackCount);

View File

@ -6,7 +6,7 @@ import { allMoves, applyMoveAttrs, BypassSleepAttr, ChargeAttr, applyFilteredMov
import { Mode } from './ui/ui';
import { Command } from "./ui/command-ui-handler";
import { Stat } from "./data/pokemon-stat";
import { BerryModifier, ContactHeldItemTransferChanceModifier, EnemyAttackStatusEffectChanceModifier, EnemyPersistentModifier, EnemyStatusEffectHealChanceModifier, EnemyTurnHealModifier, ExpBalanceModifier, ExpBoosterModifier, ExpShareModifier, ExtraModifierModifier, FlinchChanceModifier, FusePokemonModifier, HealingBoosterModifier, HitHealModifier, LapsingPersistentModifier, MapModifier, Modifier, MultipleParticipantExpBonusModifier, PersistentModifier, PokemonExpBoosterModifier, PokemonHeldItemModifier, PokemonInstantReviveModifier, SwitchEffectTransferModifier, TempBattleStatBoosterModifier, TurnHealModifier, TurnHeldItemTransferModifier, MoneyMultiplierModifier, MoneyInterestModifier, IvScannerModifier, LapsingPokemonHeldItemModifier, PokemonMultiHitModifier, PokemonMoveAccuracyBoosterModifier, overrideModifiers, overrideHeldItems } from "./modifier/modifier";
import { BerryModifier, ContactHeldItemTransferChanceModifier, EnemyAttackStatusEffectChanceModifier, EnemyPersistentModifier, EnemyStatusEffectHealChanceModifier, EnemyTurnHealModifier, ExpBalanceModifier, ExpBoosterModifier, ExpShareModifier, ExtraModifierModifier, FlinchChanceModifier, FusePokemonModifier, HealingBoosterModifier, HitHealModifier, LapsingPersistentModifier, MapModifier, Modifier, MultipleParticipantExpBonusModifier, PersistentModifier, PokemonExpBoosterModifier, PokemonHeldItemModifier, PokemonInstantReviveModifier, SwitchEffectTransferModifier, TempBattleStatBoosterModifier, TurnHealModifier, TurnHeldItemTransferModifier, MoneyMultiplierModifier, MoneyInterestModifier, IvScannerModifier, LapsingPokemonHeldItemModifier, PokemonMultiHitModifier, PokemonMoveAccuracyBoosterModifier, overrideModifiers, overrideHeldItems, BypassSpeedChanceModifier } from "./modifier/modifier";
import PartyUiHandler, { PartyOption, PartyUiMode } from "./ui/party-ui-handler";
import { doPokeballBounceAnim, getPokeballAtlasKey, getPokeballCatchMultiplier, getPokeballTintColor, PokeballType } from "./data/pokeball";
import { CommonAnim, CommonBattleAnim, MoveAnim, initMoveAnim, loadMoveAnimAssets } from "./data/battle-anims";
@ -1970,6 +1970,14 @@ export class TurnStartPhase extends FieldPhase {
const field = this.scene.getField();
const order = this.getOrder();
const battlerBypassSpeed = {};
this.scene.getField(true).filter(p => p.summonData).map(p => {
const bypassSpeed = new Utils.BooleanHolder(false);
this.scene.applyModifiers(BypassSpeedChanceModifier, p.isPlayer(), p, bypassSpeed);
battlerBypassSpeed[p.getBattlerIndex()] = bypassSpeed;
});
const moveOrder = order.slice(0);
moveOrder.sort((a, b) => {
@ -1994,6 +2002,9 @@ export class TurnStartPhase extends FieldPhase {
if (aPriority.value !== bPriority.value)
return aPriority.value < bPriority.value ? 1 : -1;
}
if (battlerBypassSpeed[a].value !== battlerBypassSpeed[b].value)
return battlerBypassSpeed[a].value ? -1 : 1;
const aIndex = order.indexOf(a);
const bIndex = order.indexOf(b);
@ -3956,9 +3967,9 @@ export class LearnMovePhase extends PlayerPartyMemberPokemonPhase {
return;
}
this.scene.ui.setMode(messageMode).then(() => {
this.scene.ui.showText('@d{32}1, @d{15}2, and@d{15}… @d{15}… @d{15}… @d{15}@s{pb_bounce_1}Poof!', null, () => {
this.scene.ui.showText(i18next.t('battle:countdownPoof'), null, () => {
this.scene.ui.showText(i18next.t('battle:learnMoveForgetSuccess', { pokemonName: pokemon.name, moveName: pokemon.moveset[moveIndex].getName() }), null, () => {
this.scene.ui.showText('And', null, () => {
this.scene.ui.showText(i18next.t('battle:learnMoveAnd'), null, () => {
pokemon.setMove(moveIndex, Moves.NONE);
this.scene.unshiftPhase(new LearnMovePhase(this.scene, this.partyMemberIndex, this.moveId));
this.end();

View File

@ -110,6 +110,7 @@ declare module 'i18next' {
starterSelectUiHandler: SimpleTranslationEntries;
nature: SimpleTranslationEntries;
growth: SimpleTranslationEntries;
weather: SimpleTranslationEntries;
};
}
}

View File

@ -355,16 +355,18 @@ export class GameData {
if (cachedSystemDataStr) {
let cachedSystemData = this.parseSystemData(cachedSystemDataStr);
console.log(cachedSystemData.timestamp, systemData.timestamp)
if (cachedSystemData.timestamp > systemData.timestamp) {
console.debug('Use cached system');
systemData = cachedSystemData;
systemDataStr = cachedSystemDataStr;
} else
this.clearLocalData();
}
console.debug(systemData);
localStorage.setItem(`data_${loggedInUser.username}`, encrypt(systemDataStr, bypassLogin));
/*const versions = [ this.scene.game.config.gameVersion, data.gameVersion || '0.0.0' ];
if (versions[0] !== versions[1]) {
@ -879,7 +881,7 @@ export class GameData {
}) as SessionSaveData;
}
saveAll(scene: BattleScene, skipVerification: boolean = false, sync: boolean = false, useCachedSession: boolean = false): Promise<boolean> {
saveAll(scene: BattleScene, skipVerification: boolean = false, sync: boolean = false, useCachedSession: boolean = false, useCachedSystem: boolean = false): Promise<boolean> {
return new Promise<boolean>(resolve => {
Utils.executeIf(!skipVerification, updateUserInfo).then(success => {
if (success !== null && !success)
@ -889,7 +891,7 @@ export class GameData {
const sessionData = useCachedSession ? this.parseSessionData(decrypt(localStorage.getItem(`sessionData${scene.sessionSlotId ? scene.sessionSlotId : ''}_${loggedInUser.username}`), bypassLogin)) : this.getSessionSaveData(scene);
const maxIntAttrValue = Math.pow(2, 31);
const systemData = this.getSystemSaveData();
const systemData = useCachedSystem ? this.parseSystemData(decrypt(localStorage.getItem(`data_${loggedInUser.username}`), bypassLogin)) : this.getSystemSaveData();
const request = {
system: systemData,

View File

@ -20,7 +20,7 @@ export enum MenuOptions {
EGG_GACHA,
MANAGE_DATA,
COMMUNITY,
RETURN_TO_TITLE,
SAVE_AND_QUIT,
LOG_OUT
}
@ -297,15 +297,18 @@ export default class MenuUiHandler extends MessageUiHandler {
ui.setOverlayMode(Mode.MENU_OPTION_SELECT, this.communityConfig);
success = true;
break;
case MenuOptions.RETURN_TO_TITLE:
case MenuOptions.SAVE_AND_QUIT:
if (this.scene.currentBattle) {
success = true;
ui.showText(i18next.t("menuUiHandler:losingProgressionWarning"), null, () => {
ui.setOverlayMode(Mode.CONFIRM, () => this.scene.reset(true), () => {
ui.revertMode();
ui.showText(null, 0);
}, false, -98);
});
if (this.scene.currentBattle.turn > 1) {
ui.showText(i18next.t("menuUiHandler:losingProgressionWarning"), null, () => {
ui.setOverlayMode(Mode.CONFIRM, () => this.scene.gameData.saveAll(this.scene, true, true, true, true).then(() => this.scene.reset(true)), () => {
ui.revertMode();
ui.showText(null, 0);
}, false, -98);
});
} else
this.scene.gameData.saveAll(this.scene, true, true, true, true).then(() => this.scene.reset(true));
} else
error = true;
break;

View File

@ -86,7 +86,17 @@ function getValueReductionCandyCounts(baseValue: integer): [integer, integer] {
}
}
const gens = [ 'I', 'II', 'III', 'IV', 'V', 'VI', 'VII', 'VIII', 'IX' ];
const gens = [
i18next.t("starterSelectUiHandler:gen1"),
i18next.t("starterSelectUiHandler:gen2"),
i18next.t("starterSelectUiHandler:gen3"),
i18next.t("starterSelectUiHandler:gen4"),
i18next.t("starterSelectUiHandler:gen5"),
i18next.t("starterSelectUiHandler:gen6"),
i18next.t("starterSelectUiHandler:gen7"),
i18next.t("starterSelectUiHandler:gen8"),
i18next.t("starterSelectUiHandler:gen9")
];
export default class StarterSelectUiHandler extends MessageUiHandler {
private starterSelectContainer: Phaser.GameObjects.Container;
@ -245,30 +255,54 @@ export default class StarterSelectUiHandler extends MessageUiHandler {
this.pokemonUncaughtText.setOrigin(0, 0);
this.starterSelectContainer.add(this.pokemonUncaughtText);
this.pokemonAbilityLabelText = addTextObject(this.scene, 6, 127, i18next.t("starterSelectUiHandler:ability"), TextStyle.SUMMARY_ALT, { fontSize: '56px' });
let starterInfoXPosition = 31; // Only text
// The position should be set per language
const currentLanguage = i18next.language;
switch (currentLanguage) {
case 'pt_BR':
starterInfoXPosition = 32;
break;
default:
starterInfoXPosition = 31;
break
}
let starterInfoTextSize = '56px'; // Labels and text
// The font size should be set per language
// currentLanguage is already defined
switch (currentLanguage) {
case 'pt_BR':
starterInfoTextSize = '47px';
break;
default:
starterInfoTextSize = '56px';
break
}
this.pokemonAbilityLabelText = addTextObject(this.scene, 6, 127, i18next.t("starterSelectUiHandler:ability"), TextStyle.SUMMARY_ALT, { fontSize: starterInfoTextSize });
this.pokemonAbilityLabelText.setOrigin(0, 0);
this.pokemonAbilityLabelText.setVisible(false);
this.starterSelectContainer.add(this.pokemonAbilityLabelText);
this.pokemonAbilityText = addTextObject(this.scene, 31, 127, '', TextStyle.SUMMARY_ALT, { fontSize: '56px' });
this.pokemonAbilityText = addTextObject(this.scene, starterInfoXPosition, 127, '', TextStyle.SUMMARY_ALT, { fontSize: starterInfoTextSize });
this.pokemonAbilityText.setOrigin(0, 0);
this.starterSelectContainer.add(this.pokemonAbilityText);
this.pokemonPassiveLabelText = addTextObject(this.scene, 6, 136, i18next.t("starterSelectUiHandler:passive"), TextStyle.SUMMARY_ALT, { fontSize: '56px' });
this.pokemonPassiveLabelText = addTextObject(this.scene, 6, 136, i18next.t("starterSelectUiHandler:passive"), TextStyle.SUMMARY_ALT, { fontSize: starterInfoTextSize });
this.pokemonPassiveLabelText.setOrigin(0, 0);
this.pokemonPassiveLabelText.setVisible(false);
this.starterSelectContainer.add(this.pokemonPassiveLabelText);
this.pokemonPassiveText = addTextObject(this.scene, 31, 136, '', TextStyle.SUMMARY_ALT, { fontSize: '56px' });
this.pokemonPassiveText = addTextObject(this.scene, starterInfoXPosition, 136, '', TextStyle.SUMMARY_ALT, { fontSize: starterInfoTextSize });
this.pokemonPassiveText.setOrigin(0, 0);
this.starterSelectContainer.add(this.pokemonPassiveText);
this.pokemonNatureLabelText = addTextObject(this.scene, 6, 145, i18next.t("starterSelectUiHandler:nature"), TextStyle.SUMMARY_ALT, { fontSize: '56px' });
this.pokemonNatureLabelText = addTextObject(this.scene, 6, 145, i18next.t("starterSelectUiHandler:nature"), TextStyle.SUMMARY_ALT, { fontSize: starterInfoTextSize });
this.pokemonNatureLabelText.setOrigin(0, 0);
this.pokemonNatureLabelText.setVisible(false);
this.starterSelectContainer.add(this.pokemonNatureLabelText);
this.pokemonNatureText = addBBCodeTextObject(this.scene, 31, 145, '', TextStyle.SUMMARY_ALT, { fontSize: '56px' });
this.pokemonNatureText = addBBCodeTextObject(this.scene, starterInfoXPosition, 145, '', TextStyle.SUMMARY_ALT, { fontSize: starterInfoTextSize });
this.pokemonNatureText.setOrigin(0, 0);
this.starterSelectContainer.add(this.pokemonNatureText);
@ -556,8 +590,11 @@ export default class StarterSelectUiHandler extends MessageUiHandler {
let instructionTextSize = '42px';
// The font size should be set per language
const currentLanguage = i18next.language;
// currentLanguage is already defined in the previous code block
switch (currentLanguage) {
case 'de':
instructionTextSize = '35px';
break;
case 'en':
instructionTextSize = '42px';
break;
@ -567,12 +604,12 @@ export default class StarterSelectUiHandler extends MessageUiHandler {
case 'fr':
instructionTextSize = '42px';
break;
case 'de':
instructionTextSize = '35px';
break;
case 'it':
instructionTextSize = '38px';
break;
case 'pt_BR':
instructionTextSize = '38px';
break;
case 'zh_CN':
instructionTextSize = '42px';
break;
@ -1260,15 +1297,17 @@ export default class StarterSelectUiHandler extends MessageUiHandler {
updateGenOptions(): void {
let text = '';
for (let g = this.genScrollCursor; g <= this.genScrollCursor + 2; g++) {
let optionText = gens[g];
if (g === this.genScrollCursor && this.genScrollCursor)
optionText = '↑';
else if (g === this.genScrollCursor + 2 && this.genScrollCursor < gens.length - 3)
optionText = '↓'
text += `${text ? '\n' : ''}${optionText}`;
let optionText = '';
if (g === this.genScrollCursor && this.genScrollCursor)
optionText = '↑';
else if (g === this.genScrollCursor + 2 && this.genScrollCursor < gens.length - 3)
optionText = '↓'
else
optionText = i18next.t(`starterSelectUiHandler:gen${g + 1}`);
text += `${text ? '\n' : ''}${optionText}`;
}
this.genOptionsText.setText(text);
}
}
setGenMode(genMode: boolean): boolean {
this.genCursorObj.setVisible(genMode && !this.startCursorObj.visible);
@ -1833,4 +1872,4 @@ export default class StarterSelectUiHandler extends MessageUiHandler {
icon.setFrame(species.getIconId(female, formIndex, false, variant));
}
}
}
}