Merge branch 'main' of https://github.com/pagefaultgames/pokerogue
# Conflicts: # src/plugins/i18n.tspull/737/head
|
@ -44,7 +44,8 @@ Check out our [Trello Board](https://trello.com/b/z10B703R/pokerogue-board) to s
|
||||||
- Arata Iiyoshi
|
- Arata Iiyoshi
|
||||||
- Atsuhiro Ishizuna
|
- Atsuhiro Ishizuna
|
||||||
- Pokémon Black/White 2
|
- Pokémon Black/White 2
|
||||||
- Firel (Additional biome themes)
|
- Firel (Custom Metropolis and Laboratory biome music)
|
||||||
|
- Lmz (Custom Jungle biome music)
|
||||||
- edifette (Title screen music)
|
- edifette (Title screen music)
|
||||||
|
|
||||||
### 🎵 Sound Effects
|
### 🎵 Sound Effects
|
||||||
|
|
|
@ -11,6 +11,7 @@
|
||||||
<meta property="og:image" content="https://pokerogue.net/logo512.png" />
|
<meta property="og:image" content="https://pokerogue.net/logo512.png" />
|
||||||
<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" />
|
||||||
<meta charset="UTF-8" />
|
<meta charset="UTF-8" />
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, viewport-fit=cover" />
|
<meta name="viewport" content="width=device-width, initial-scale=1.0, viewport-fit=cover" />
|
||||||
<style type="text/css">
|
<style type="text/css">
|
||||||
|
|
Before Width: | Height: | Size: 4.2 KiB After Width: | Height: | Size: 60 KiB |
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.5 KiB |
After Width: | Height: | Size: 295 B |
After Width: | Height: | Size: 310 B |
After Width: | Height: | Size: 182 B |
After Width: | Height: | Size: 191 B |
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 1.6 KiB |
After Width: | Height: | Size: 295 B |
After Width: | Height: | Size: 310 B |
After Width: | Height: | Size: 182 B |
After Width: | Height: | Size: 191 B |
|
@ -647,6 +647,15 @@ export default class BattleScene extends SceneBase {
|
||||||
|
|
||||||
const icon = this.add.sprite(0, 0, pokemon.getIconAtlasKey(ignoreOverride));
|
const icon = this.add.sprite(0, 0, pokemon.getIconAtlasKey(ignoreOverride));
|
||||||
icon.setFrame(pokemon.getIconId(true));
|
icon.setFrame(pokemon.getIconId(true));
|
||||||
|
// Temporary fix to show pokemon's default icon if variant icon doesn't exist
|
||||||
|
if (icon.frame.name != pokemon.getIconId(true)) {
|
||||||
|
console.log(`${pokemon.name}'s variant icon does not exist. Replacing with default.`)
|
||||||
|
const temp = pokemon.shiny;
|
||||||
|
pokemon.shiny = false;
|
||||||
|
icon.setTexture(pokemon.getIconAtlasKey(ignoreOverride));
|
||||||
|
icon.setFrame(pokemon.getIconId(true));
|
||||||
|
pokemon.shiny = temp;
|
||||||
|
}
|
||||||
icon.setOrigin(0.5, 0);
|
icon.setOrigin(0.5, 0);
|
||||||
|
|
||||||
container.add(icon);
|
container.add(icon);
|
||||||
|
@ -732,6 +741,9 @@ export default class BattleScene extends SceneBase {
|
||||||
|
|
||||||
this.pokeballCounts = Object.fromEntries(Utils.getEnumValues(PokeballType).filter(p => p <= PokeballType.MASTER_BALL).map(t => [ t, 0 ]));
|
this.pokeballCounts = Object.fromEntries(Utils.getEnumValues(PokeballType).filter(p => p <= PokeballType.MASTER_BALL).map(t => [ t, 0 ]));
|
||||||
this.pokeballCounts[PokeballType.POKEBALL] += 5;
|
this.pokeballCounts[PokeballType.POKEBALL] += 5;
|
||||||
|
if (Overrides.POKEBALL_OVERRIDE.active) {
|
||||||
|
this.pokeballCounts = Overrides.POKEBALL_OVERRIDE.pokeballs;
|
||||||
|
}
|
||||||
|
|
||||||
this.modifiers = [];
|
this.modifiers = [];
|
||||||
this.enemyModifiers = [];
|
this.enemyModifiers = [];
|
||||||
|
|
|
@ -3,7 +3,7 @@ import { Type } from "./type";
|
||||||
import * as Utils from "../utils";
|
import * as Utils from "../utils";
|
||||||
import { BattleStat, getBattleStatName } from "./battle-stat";
|
import { BattleStat, getBattleStatName } from "./battle-stat";
|
||||||
import { PokemonHealPhase, ShowAbilityPhase, StatChangePhase } from "../phases";
|
import { PokemonHealPhase, ShowAbilityPhase, StatChangePhase } from "../phases";
|
||||||
import { getPokemonMessage } from "../messages";
|
import { getPokemonMessage, getPokemonPrefix } from "../messages";
|
||||||
import { Weather, WeatherType } from "./weather";
|
import { Weather, WeatherType } from "./weather";
|
||||||
import { BattlerTag } from "./battler-tags";
|
import { BattlerTag } from "./battler-tags";
|
||||||
import { BattlerTagType } from "./enums/battler-tag-type";
|
import { BattlerTagType } from "./enums/battler-tag-type";
|
||||||
|
@ -144,7 +144,7 @@ export class BlockRecoilDamageAttr extends AbAttr {
|
||||||
}
|
}
|
||||||
|
|
||||||
getTriggerMessage(pokemon: Pokemon, abilityName: string, ...args: any[]) {
|
getTriggerMessage(pokemon: Pokemon, abilityName: string, ...args: any[]) {
|
||||||
return getPokemonMessage(pokemon, `'s ${abilityName}\nprotected it from recoil!`);
|
return i18next.t('abilityTriggers:blockRecoilDamage', {pokemonName: `${getPokemonPrefix(pokemon)}${pokemon.name}`, abilityName: abilityName});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -991,6 +991,42 @@ export class MoveTypeChangeAttr extends PreAttackAbAttr {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Class for abilities that boost the damage of moves
|
||||||
|
* For abilities that boost the base power of moves, see VariableMovePowerAbAttr
|
||||||
|
* @param damageMultiplier the amount to multiply the damage by
|
||||||
|
* @param condition the condition for this ability to be applied
|
||||||
|
*/
|
||||||
|
export class DamageBoostAbAttr extends PreAttackAbAttr {
|
||||||
|
private damageMultiplier: number;
|
||||||
|
private condition: PokemonAttackCondition;
|
||||||
|
|
||||||
|
constructor(damageMultiplier: number, condition: PokemonAttackCondition){
|
||||||
|
super(true);
|
||||||
|
this.damageMultiplier = damageMultiplier;
|
||||||
|
this.condition = condition;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @param pokemon the attacker pokemon
|
||||||
|
* @param passive N/A
|
||||||
|
* @param defender the target pokemon
|
||||||
|
* @param move the move used by the attacker pokemon
|
||||||
|
* @param args Utils.NumberHolder as damage
|
||||||
|
* @returns true if the function succeeds
|
||||||
|
*/
|
||||||
|
applyPreAttack(pokemon: Pokemon, passive: boolean, defender: Pokemon, move: PokemonMove, args: any[]): boolean {
|
||||||
|
if (this.condition(pokemon, defender, move.getMove())) {
|
||||||
|
const power = args[0] as Utils.NumberHolder;
|
||||||
|
power.value = Math.floor(power.value * this.damageMultiplier);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
export class MovePowerBoostAbAttr extends VariableMovePowerAbAttr {
|
export class MovePowerBoostAbAttr extends VariableMovePowerAbAttr {
|
||||||
private condition: PokemonAttackCondition;
|
private condition: PokemonAttackCondition;
|
||||||
private powerMultiplier: number;
|
private powerMultiplier: number;
|
||||||
|
@ -1371,6 +1407,23 @@ export class PostSummonMessageAbAttr extends PostSummonAbAttr {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export class PostSummonUnnamedMessageAbAttr extends PostSummonAbAttr {
|
||||||
|
//Attr doesn't force pokemon name on the message
|
||||||
|
private message: string;
|
||||||
|
|
||||||
|
constructor(message: string) {
|
||||||
|
super(true);
|
||||||
|
|
||||||
|
this.message = message;
|
||||||
|
}
|
||||||
|
|
||||||
|
applyPostSummon(pokemon: Pokemon, passive: boolean, args: any[]): boolean {
|
||||||
|
pokemon.scene.queueMessage(this.message);
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
export class PostSummonAddBattlerTagAbAttr extends PostSummonAbAttr {
|
export class PostSummonAddBattlerTagAbAttr extends PostSummonAbAttr {
|
||||||
private tagType: BattlerTagType;
|
private tagType: BattlerTagType;
|
||||||
private turnCount: integer;
|
private turnCount: integer;
|
||||||
|
@ -1448,6 +1501,34 @@ export class PostSummonAllyHealAbAttr extends PostSummonAbAttr {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Resets an ally's temporary stat boots to zero with no regard to
|
||||||
|
* whether this is a positive or negative change
|
||||||
|
* @param pokemon The {@link Pokemon} with this {@link AbAttr}
|
||||||
|
* @param passive N/A
|
||||||
|
* @param args N/A
|
||||||
|
* @returns if the move was successful
|
||||||
|
*/
|
||||||
|
export class PostSummonClearAllyStatsAbAttr extends PostSummonAbAttr {
|
||||||
|
constructor() {
|
||||||
|
super();
|
||||||
|
}
|
||||||
|
|
||||||
|
applyPostSummon(pokemon: Pokemon, passive: boolean, args: any[]): boolean {
|
||||||
|
const target = pokemon.getAlly();
|
||||||
|
if (target?.isActive(true)) {
|
||||||
|
for (let s = 0; s < target.summonData.battleStats.length; s++)
|
||||||
|
target.summonData.battleStats[s] = 0;
|
||||||
|
|
||||||
|
target.scene.queueMessage(getPokemonMessage(target, `'s stat changes\nwere removed!`));
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
export class DownloadAbAttr extends PostSummonAbAttr {
|
export class DownloadAbAttr extends PostSummonAbAttr {
|
||||||
private enemyDef: integer;
|
private enemyDef: integer;
|
||||||
private enemySpDef: integer;
|
private enemySpDef: integer;
|
||||||
|
@ -2347,6 +2428,26 @@ export class PostFaintContactDamageAbAttr extends PostFaintAbAttr {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Attribute used for abilities (Innards Out) that damage the opponent based on how much HP the last attack used to knock out the owner of the ability.
|
||||||
|
*/
|
||||||
|
export class PostFaintHPDamageAbAttr extends PostFaintAbAttr {
|
||||||
|
constructor() {
|
||||||
|
super ();
|
||||||
|
}
|
||||||
|
|
||||||
|
applyPostFaint(pokemon: Pokemon, passive: boolean, attacker: Pokemon, move: PokemonMove, hitResult: HitResult, args: any[]): boolean {
|
||||||
|
const damage = pokemon.turnData.attacksReceived[0].damage;
|
||||||
|
attacker.damageAndUpdate((damage), HitResult.OTHER);
|
||||||
|
attacker.turnData.damageTaken += damage;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
getTriggerMessage(pokemon: Pokemon, abilityName: string, ...args: any[]): string {
|
||||||
|
return getPokemonMessage(pokemon, `'s ${abilityName} hurt\nits attacker!`);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
export class RedirectMoveAbAttr extends AbAttr {
|
export class RedirectMoveAbAttr extends AbAttr {
|
||||||
apply(pokemon: Pokemon, passive: boolean, cancelled: Utils.BooleanHolder, args: any[]): boolean {
|
apply(pokemon: Pokemon, passive: boolean, cancelled: Utils.BooleanHolder, args: any[]): boolean {
|
||||||
if (this.canRedirect(args[0] as Moves)) {
|
if (this.canRedirect(args[0] as Moves)) {
|
||||||
|
@ -2763,7 +2864,7 @@ export const allAbilities = [ new Ability(Abilities.NONE, 3) ];
|
||||||
export function initAbilities() {
|
export function initAbilities() {
|
||||||
allAbilities.push(
|
allAbilities.push(
|
||||||
new Ability(Abilities.STENCH, 3)
|
new Ability(Abilities.STENCH, 3)
|
||||||
.attr(PostAttackApplyBattlerTagAbAttr, false, (user, target, move) => !move.getMove().findAttr(attr => attr instanceof FlinchAttr) ? 10 : 0, BattlerTagType.FLINCHED),
|
.attr(PostAttackApplyBattlerTagAbAttr, false, (user, target, move) => (move.getMove().category !== MoveCategory.STATUS && !move.getMove().findAttr(attr => attr instanceof FlinchAttr)) ? 10 : 0, BattlerTagType.FLINCHED),
|
||||||
new Ability(Abilities.DRIZZLE, 3)
|
new Ability(Abilities.DRIZZLE, 3)
|
||||||
.attr(PostSummonWeatherChangeAbAttr, WeatherType.RAIN)
|
.attr(PostSummonWeatherChangeAbAttr, WeatherType.RAIN)
|
||||||
.attr(PostBiomeChangeWeatherChangeAbAttr, WeatherType.RAIN),
|
.attr(PostBiomeChangeWeatherChangeAbAttr, WeatherType.RAIN),
|
||||||
|
@ -2977,7 +3078,8 @@ export function initAbilities() {
|
||||||
.attr(BlockCritAbAttr)
|
.attr(BlockCritAbAttr)
|
||||||
.ignorable(),
|
.ignorable(),
|
||||||
new Ability(Abilities.AIR_LOCK, 3)
|
new Ability(Abilities.AIR_LOCK, 3)
|
||||||
.attr(SuppressWeatherEffectAbAttr, true),
|
.attr(SuppressWeatherEffectAbAttr, true)
|
||||||
|
.attr(PostSummonUnnamedMessageAbAttr, "The effects of the weather disappeared."),
|
||||||
new Ability(Abilities.TANGLED_FEET, 4)
|
new Ability(Abilities.TANGLED_FEET, 4)
|
||||||
.conditionalAttr(pokemon => !!pokemon.getTag(BattlerTagType.CONFUSED), BattleStatMultiplierAbAttr, BattleStat.EVA, 2)
|
.conditionalAttr(pokemon => !!pokemon.getTag(BattlerTagType.CONFUSED), BattleStatMultiplierAbAttr, BattleStat.EVA, 2)
|
||||||
.ignorable(),
|
.ignorable(),
|
||||||
|
@ -3073,7 +3175,7 @@ export function initAbilities() {
|
||||||
.attr(IgnoreOpponentStatChangesAbAttr)
|
.attr(IgnoreOpponentStatChangesAbAttr)
|
||||||
.ignorable(),
|
.ignorable(),
|
||||||
new Ability(Abilities.TINTED_LENS, 4)
|
new Ability(Abilities.TINTED_LENS, 4)
|
||||||
.attr(MovePowerBoostAbAttr, (user, target, move) => target.getAttackTypeEffectiveness(move.type, user) <= 0.5, 2),
|
.attr(DamageBoostAbAttr, 2, (user, target, move) => target.getAttackTypeEffectiveness(move.type, user) <= 0.5),
|
||||||
new Ability(Abilities.FILTER, 4)
|
new Ability(Abilities.FILTER, 4)
|
||||||
.attr(ReceivedMoveDamageMultiplierAbAttr,(target, user, move) => target.getAttackTypeEffectiveness(move.type, user) >= 2, 0.75)
|
.attr(ReceivedMoveDamageMultiplierAbAttr,(target, user, move) => target.getAttackTypeEffectiveness(move.type, user) >= 2, 0.75)
|
||||||
.ignorable(),
|
.ignorable(),
|
||||||
|
@ -3158,8 +3260,8 @@ export function initAbilities() {
|
||||||
new Ability(Abilities.HARVEST, 5)
|
new Ability(Abilities.HARVEST, 5)
|
||||||
.unimplemented(),
|
.unimplemented(),
|
||||||
new Ability(Abilities.TELEPATHY, 5)
|
new Ability(Abilities.TELEPATHY, 5)
|
||||||
.ignorable()
|
.attr(MoveImmunityAbAttr, (pokemon, attacker, move) => pokemon.getAlly() === attacker && move.getMove() instanceof AttackMove)
|
||||||
.unimplemented(),
|
.ignorable(),
|
||||||
new Ability(Abilities.MOODY, 5)
|
new Ability(Abilities.MOODY, 5)
|
||||||
.attr(MoodyAbAttr),
|
.attr(MoodyAbAttr),
|
||||||
new Ability(Abilities.OVERCOAT, 5)
|
new Ability(Abilities.OVERCOAT, 5)
|
||||||
|
@ -3379,9 +3481,9 @@ export function initAbilities() {
|
||||||
.attr(UnsuppressableAbilityAbAttr)
|
.attr(UnsuppressableAbilityAbAttr)
|
||||||
.attr(NoFusionAbilityAbAttr),
|
.attr(NoFusionAbilityAbAttr),
|
||||||
new Ability(Abilities.POWER_CONSTRUCT, 7) // TODO: 10% Power Construct Zygarde isn't accounted for yet. If changed, update Zygarde's getSpeciesFormIndex entry accordingly
|
new Ability(Abilities.POWER_CONSTRUCT, 7) // TODO: 10% Power Construct Zygarde isn't accounted for yet. If changed, update Zygarde's getSpeciesFormIndex entry accordingly
|
||||||
.attr(PostBattleInitFormChangeAbAttr, p => p.getHpRatio() <= 0.5 ? 4 : 2)
|
.attr(PostBattleInitFormChangeAbAttr, p => p.getHpRatio() <= 0.5 || p.getFormKey() === 'complete' ? 4 : 2)
|
||||||
.attr(PostSummonFormChangeAbAttr, p => p.getHpRatio() <= 0.5 ? 4 : 2)
|
.attr(PostSummonFormChangeAbAttr, p => p.getHpRatio() <= 0.5 || p.getFormKey() === 'complete' ? 4 : 2)
|
||||||
.attr(PostTurnFormChangeAbAttr, p => p.getHpRatio() <= 0.5 ? 4 : 2)
|
.attr(PostTurnFormChangeAbAttr, p => p.getHpRatio() <= 0.5 || p.getFormKey() === 'complete' ? 4 : 2)
|
||||||
.attr(UncopiableAbilityAbAttr)
|
.attr(UncopiableAbilityAbAttr)
|
||||||
.attr(UnswappableAbilityAbAttr)
|
.attr(UnswappableAbilityAbAttr)
|
||||||
.attr(UnsuppressableAbilityAbAttr)
|
.attr(UnsuppressableAbilityAbAttr)
|
||||||
|
@ -3398,7 +3500,8 @@ export function initAbilities() {
|
||||||
.attr(FieldPriorityMoveImmunityAbAttr)
|
.attr(FieldPriorityMoveImmunityAbAttr)
|
||||||
.ignorable(),
|
.ignorable(),
|
||||||
new Ability(Abilities.INNARDS_OUT, 7)
|
new Ability(Abilities.INNARDS_OUT, 7)
|
||||||
.unimplemented(),
|
.attr(PostFaintHPDamageAbAttr)
|
||||||
|
.bypassFaint(),
|
||||||
new Ability(Abilities.DANCER, 7)
|
new Ability(Abilities.DANCER, 7)
|
||||||
.unimplemented(),
|
.unimplemented(),
|
||||||
new Ability(Abilities.BATTERY, 7)
|
new Ability(Abilities.BATTERY, 7)
|
||||||
|
@ -3545,7 +3648,7 @@ export function initAbilities() {
|
||||||
new Ability(Abilities.UNSEEN_FIST, 8)
|
new Ability(Abilities.UNSEEN_FIST, 8)
|
||||||
.unimplemented(),
|
.unimplemented(),
|
||||||
new Ability(Abilities.CURIOUS_MEDICINE, 8)
|
new Ability(Abilities.CURIOUS_MEDICINE, 8)
|
||||||
.unimplemented(),
|
.attr(PostSummonClearAllyStatsAbAttr),
|
||||||
new Ability(Abilities.TRANSISTOR, 8)
|
new Ability(Abilities.TRANSISTOR, 8)
|
||||||
.attr(MoveTypePowerBoostAbAttr, Type.ELECTRIC),
|
.attr(MoveTypePowerBoostAbAttr, Type.ELECTRIC),
|
||||||
new Ability(Abilities.DRAGONS_MAW, 8)
|
new Ability(Abilities.DRAGONS_MAW, 8)
|
||||||
|
|
|
@ -824,7 +824,7 @@ export class HealAttr extends MoveEffectAttr {
|
||||||
|
|
||||||
addHealPhase(target: Pokemon, healRatio: number) {
|
addHealPhase(target: Pokemon, healRatio: number) {
|
||||||
target.scene.unshiftPhase(new PokemonHealPhase(target.scene, target.getBattlerIndex(),
|
target.scene.unshiftPhase(new PokemonHealPhase(target.scene, target.getBattlerIndex(),
|
||||||
Math.max(Math.floor(target.getMaxHp() * healRatio), 1), getPokemonMessage(target, ' regained\nhealth!'), true, !this.showAnim));
|
Math.max(Math.floor(target.getMaxHp() * healRatio), 1), getPokemonMessage(target, ' \nhad its HP restored.'), true, !this.showAnim));
|
||||||
}
|
}
|
||||||
|
|
||||||
getTargetBenefitScore(user: Pokemon, target: Pokemon, move: Move): integer {
|
getTargetBenefitScore(user: Pokemon, target: Pokemon, move: Move): integer {
|
||||||
|
@ -962,6 +962,42 @@ export class SandHealAttr extends WeatherHealAttr {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Heals the target by either {@link normalHealRatio} or {@link boostedHealRatio}
|
||||||
|
* depending on the evaluation of {@link condition}
|
||||||
|
* @see {@link apply}
|
||||||
|
* @param user The Pokemon using this move
|
||||||
|
* @param target The target Pokemon of this move
|
||||||
|
* @param move This move
|
||||||
|
* @param args N/A
|
||||||
|
* @returns if the move was successful
|
||||||
|
*/
|
||||||
|
export class BoostHealAttr extends HealAttr {
|
||||||
|
private normalHealRatio?: number;
|
||||||
|
private boostedHealRatio?: number;
|
||||||
|
private condition?: MoveConditionFunc;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param normalHealRatio Healing received when {@link condition} is false
|
||||||
|
* @param boostedHealRatio Healing received when {@link condition} is true
|
||||||
|
* @param showAnim Should a healing animation be showed?
|
||||||
|
* @param selfTarget Should the move target the user?
|
||||||
|
* @param condition The condition to check against when boosting the healing value
|
||||||
|
*/
|
||||||
|
constructor(normalHealRatio?: number, boostedHealRatio?: number, showAnim?: boolean, selfTarget?: boolean, condition?: MoveConditionFunc) {
|
||||||
|
super(normalHealRatio, showAnim, selfTarget);
|
||||||
|
this.normalHealRatio = normalHealRatio;
|
||||||
|
this.boostedHealRatio = boostedHealRatio;
|
||||||
|
this.condition = condition;
|
||||||
|
}
|
||||||
|
|
||||||
|
apply(user: Pokemon, target: Pokemon, move: Move, args: any[]): boolean {
|
||||||
|
const healRatio = this.condition(user, target, move) ? this.boostedHealRatio : this.normalHealRatio;
|
||||||
|
this.addHealPhase(target, healRatio);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
export class HitHealAttr extends MoveEffectAttr {
|
export class HitHealAttr extends MoveEffectAttr {
|
||||||
private healRatio: number;
|
private healRatio: number;
|
||||||
|
|
||||||
|
@ -1317,6 +1353,25 @@ export class BypassSleepAttr extends MoveAttr {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Attribute used for moves that bypass the burn damage reduction of physical moves, currently only facade
|
||||||
|
* Called during damage calculation
|
||||||
|
* @param user N/A
|
||||||
|
* @param target N/A
|
||||||
|
* @param move Move with this attribute
|
||||||
|
* @param args Utils.BooleanHolder for burnDamageReductionCancelled
|
||||||
|
* @returns true if the function succeeds
|
||||||
|
*/
|
||||||
|
export class BypassBurnDamageReductionAttr extends MoveAttr {
|
||||||
|
|
||||||
|
/** Prevents the move's damage from being reduced by burn */
|
||||||
|
apply(user: Pokemon, target: Pokemon, move: Move, args: any[]): boolean {
|
||||||
|
(args[0] as Utils.BooleanHolder).value = true;
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
export class WeatherChangeAttr extends MoveEffectAttr {
|
export class WeatherChangeAttr extends MoveEffectAttr {
|
||||||
private weatherType: WeatherType;
|
private weatherType: WeatherType;
|
||||||
|
|
||||||
|
@ -4868,7 +4923,8 @@ export function initMoves() {
|
||||||
.attr(StatChangeAttr, [ BattleStat.ATK, BattleStat.SPATK ], -2),
|
.attr(StatChangeAttr, [ BattleStat.ATK, BattleStat.SPATK ], -2),
|
||||||
new AttackMove(Moves.FACADE, Type.NORMAL, MoveCategory.PHYSICAL, 70, 100, 20, -1, 0, 3)
|
new AttackMove(Moves.FACADE, Type.NORMAL, MoveCategory.PHYSICAL, 70, 100, 20, -1, 0, 3)
|
||||||
.attr(MovePowerMultiplierAttr, (user, target, move) => user.status
|
.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),
|
&& (user.status.effect === StatusEffect.BURN || user.status.effect === StatusEffect.POISON || user.status.effect === StatusEffect.TOXIC || user.status.effect === StatusEffect.PARALYSIS) ? 2 : 1)
|
||||||
|
.attr(BypassBurnDamageReductionAttr),
|
||||||
new AttackMove(Moves.FOCUS_PUNCH, Type.FIGHTING, MoveCategory.PHYSICAL, 150, 100, 20, -1, -3, 3)
|
new AttackMove(Moves.FOCUS_PUNCH, Type.FIGHTING, MoveCategory.PHYSICAL, 150, 100, 20, -1, -3, 3)
|
||||||
.punchingMove()
|
.punchingMove()
|
||||||
.ignoresVirtual()
|
.ignoresVirtual()
|
||||||
|
@ -5977,9 +6033,8 @@ export function initMoves() {
|
||||||
.attr(StatChangeAttr, BattleStat.SPD, -1, true)
|
.attr(StatChangeAttr, BattleStat.SPD, -1, true)
|
||||||
.punchingMove(),
|
.punchingMove(),
|
||||||
new StatusMove(Moves.FLORAL_HEALING, Type.FAIRY, -1, 10, -1, 0, 7)
|
new StatusMove(Moves.FLORAL_HEALING, Type.FAIRY, -1, 10, -1, 0, 7)
|
||||||
.attr(HealAttr, 0.5, true, false)
|
.attr(BoostHealAttr, 0.5, 2/3, true, false, (user, target, move) => user.scene.arena.terrain?.terrainType === TerrainType.GRASSY)
|
||||||
.triageMove()
|
.triageMove(),
|
||||||
.partial(),
|
|
||||||
new AttackMove(Moves.HIGH_HORSEPOWER, Type.GROUND, MoveCategory.PHYSICAL, 95, 95, 10, -1, 0, 7),
|
new AttackMove(Moves.HIGH_HORSEPOWER, Type.GROUND, MoveCategory.PHYSICAL, 95, 95, 10, -1, 0, 7),
|
||||||
new StatusMove(Moves.STRENGTH_SAP, Type.GRASS, 100, 10, 100, 0, 7)
|
new StatusMove(Moves.STRENGTH_SAP, Type.GRASS, 100, 10, 100, 0, 7)
|
||||||
.attr(StrengthSapHealAttr)
|
.attr(StrengthSapHealAttr)
|
||||||
|
@ -6166,7 +6221,7 @@ export function initMoves() {
|
||||||
.ignoresVirtual(),
|
.ignoresVirtual(),
|
||||||
/* End Unused */
|
/* End Unused */
|
||||||
new AttackMove(Moves.ZIPPY_ZAP, Type.ELECTRIC, MoveCategory.PHYSICAL, 80, 100, 10, 100, 2, 7)
|
new AttackMove(Moves.ZIPPY_ZAP, Type.ELECTRIC, MoveCategory.PHYSICAL, 80, 100, 10, 100, 2, 7)
|
||||||
.attr(CritOnlyAttr),
|
.attr(StatChangeAttr, BattleStat.EVA, 1, true),
|
||||||
new AttackMove(Moves.SPLISHY_SPLASH, Type.WATER, MoveCategory.SPECIAL, 90, 100, 15, 30, 0, 7)
|
new AttackMove(Moves.SPLISHY_SPLASH, Type.WATER, MoveCategory.SPECIAL, 90, 100, 15, 30, 0, 7)
|
||||||
.attr(StatusEffectAttr, StatusEffect.PARALYSIS)
|
.attr(StatusEffectAttr, StatusEffect.PARALYSIS)
|
||||||
.target(MoveTarget.ALL_NEAR_ENEMIES),
|
.target(MoveTarget.ALL_NEAR_ENEMIES),
|
||||||
|
@ -6191,7 +6246,7 @@ export function initMoves() {
|
||||||
new AttackMove(Moves.FREEZY_FROST, Type.ICE, MoveCategory.SPECIAL, 100, 90, 10, -1, 0, 7)
|
new AttackMove(Moves.FREEZY_FROST, Type.ICE, MoveCategory.SPECIAL, 100, 90, 10, -1, 0, 7)
|
||||||
.attr(ResetStatsAttr),
|
.attr(ResetStatsAttr),
|
||||||
new AttackMove(Moves.SPARKLY_SWIRL, Type.FAIRY, MoveCategory.SPECIAL, 120, 85, 5, -1, 0, 7)
|
new AttackMove(Moves.SPARKLY_SWIRL, Type.FAIRY, MoveCategory.SPECIAL, 120, 85, 5, -1, 0, 7)
|
||||||
.partial(),
|
.attr(PartyStatusCureAttr, null, Abilities.NONE),
|
||||||
new AttackMove(Moves.VEEVEE_VOLLEY, Type.NORMAL, MoveCategory.PHYSICAL, -1, -1, 20, -1, 0, 7)
|
new AttackMove(Moves.VEEVEE_VOLLEY, Type.NORMAL, MoveCategory.PHYSICAL, -1, -1, 20, -1, 0, 7)
|
||||||
.attr(FriendshipPowerAttr),
|
.attr(FriendshipPowerAttr),
|
||||||
new AttackMove(Moves.DOUBLE_IRON_BASH, Type.STEEL, MoveCategory.PHYSICAL, 60, 100, 5, 30, 0, 7)
|
new AttackMove(Moves.DOUBLE_IRON_BASH, Type.STEEL, MoveCategory.PHYSICAL, 60, 100, 5, 30, 0, 7)
|
||||||
|
@ -6786,7 +6841,7 @@ export function initMoves() {
|
||||||
const turnMove = user.getLastXMoves(1);
|
const turnMove = user.getLastXMoves(1);
|
||||||
return !turnMove.length || turnMove[0].move !== move.id || turnMove[0].result !== MoveResult.SUCCESS;
|
return !turnMove.length || turnMove[0].move !== move.id || turnMove[0].result !== MoveResult.SUCCESS;
|
||||||
}), // TODO Add Instruct/Encore interaction
|
}), // TODO Add Instruct/Encore interaction
|
||||||
new AttackMove(Moves.COMEUPPANCE, Type.DARK, MoveCategory.PHYSICAL, 1, 100, 10, -1, 0, 9)
|
new AttackMove(Moves.COMEUPPANCE, Type.DARK, MoveCategory.PHYSICAL, -1, 100, 10, -1, 0, 9)
|
||||||
.attr(CounterDamageAttr, (move: Move) => (move.category === MoveCategory.PHYSICAL || move.category === MoveCategory.SPECIAL), 1.5)
|
.attr(CounterDamageAttr, (move: Move) => (move.category === MoveCategory.PHYSICAL || move.category === MoveCategory.SPECIAL), 1.5)
|
||||||
.target(MoveTarget.ATTACKER),
|
.target(MoveTarget.ATTACKER),
|
||||||
new AttackMove(Moves.AQUA_CUTTER, Type.WATER, MoveCategory.PHYSICAL, 70, 100, 20, -1, 0, 9)
|
new AttackMove(Moves.AQUA_CUTTER, Type.WATER, MoveCategory.PHYSICAL, 70, 100, 20, -1, 0, 9)
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
import { Gender } from "./gender";
|
import { Gender } from "./gender";
|
||||||
import { AttackTypeBoosterModifier, FlinchChanceModifier } from "../modifier/modifier";
|
import { AttackTypeBoosterModifier, FlinchChanceModifier } from "../modifier/modifier";
|
||||||
import { AttackTypeBoosterModifierType } from "../modifier/modifier-type";
|
|
||||||
import { Moves } from "./enums/moves";
|
import { Moves } from "./enums/moves";
|
||||||
import { PokeballType } from "./pokeball";
|
import { PokeballType } from "./pokeball";
|
||||||
import Pokemon from "../field/pokemon";
|
import Pokemon from "../field/pokemon";
|
||||||
|
@ -1386,15 +1385,15 @@ export const pokemonEvolutions: PokemonEvolutions = {
|
||||||
new SpeciesEvolution(Species.HELIOLISK, 1, EvolutionItem.SUN_STONE, null, SpeciesWildEvolutionDelay.LONG)
|
new SpeciesEvolution(Species.HELIOLISK, 1, EvolutionItem.SUN_STONE, null, SpeciesWildEvolutionDelay.LONG)
|
||||||
],
|
],
|
||||||
[Species.CHARJABUG]: [
|
[Species.CHARJABUG]: [
|
||||||
new SpeciesEvolution(Species.VIKAVOLT, 1, EvolutionItem.THUNDER_STONE, null)
|
new SpeciesEvolution(Species.VIKAVOLT, 1, EvolutionItem.THUNDER_STONE, null, SpeciesWildEvolutionDelay.LONG)
|
||||||
],
|
],
|
||||||
[Species.CRABRAWLER]: [
|
[Species.CRABRAWLER]: [
|
||||||
new SpeciesEvolution(Species.CRABOMINABLE, 1, EvolutionItem.ICE_STONE, null)
|
new SpeciesEvolution(Species.CRABOMINABLE, 1, EvolutionItem.ICE_STONE, null, SpeciesWildEvolutionDelay.LONG)
|
||||||
],
|
],
|
||||||
[Species.ROCKRUFF]: [
|
[Species.ROCKRUFF]: [
|
||||||
new SpeciesFormEvolution(Species.LYCANROC, '', 'midday', 25, null, new SpeciesEvolutionCondition(p => p.scene.arena.getTimeOfDay() === TimeOfDay.DAY), null),
|
new SpeciesFormEvolution(Species.LYCANROC, '', 'midday', 25, null, new SpeciesEvolutionCondition(p => (p.scene.arena.getTimeOfDay() === TimeOfDay.DAWN || p.scene.arena.getTimeOfDay() === TimeOfDay.DAY) && (p.formIndex === 0)), null),
|
||||||
new SpeciesFormEvolution(Species.LYCANROC, '', 'dusk', 25, null, new SpeciesEvolutionCondition(p => p.scene.getSpeciesFormIndex(p.species) === 1), null),
|
new SpeciesFormEvolution(Species.LYCANROC, '', 'dusk', 25, null, new SpeciesEvolutionCondition(p => p.formIndex === 1), null),
|
||||||
new SpeciesFormEvolution(Species.LYCANROC, '', 'midnight', 25, null, new SpeciesEvolutionCondition(p => p.scene.arena.getTimeOfDay() === TimeOfDay.NIGHT), null)
|
new SpeciesFormEvolution(Species.LYCANROC, '', 'midnight', 25, null, new SpeciesEvolutionCondition(p => (p.scene.arena.getTimeOfDay() === TimeOfDay.DUSK || p.scene.arena.getTimeOfDay() === TimeOfDay.NIGHT) && (p.formIndex === 0)), null)
|
||||||
],
|
],
|
||||||
[Species.STEENEE]: [
|
[Species.STEENEE]: [
|
||||||
new SpeciesEvolution(Species.TSAREENA, 28, null, new SpeciesEvolutionCondition(p => p.moveset.filter(m => m.moveId === Moves.STOMP).length > 0), SpeciesWildEvolutionDelay.LONG)
|
new SpeciesEvolution(Species.TSAREENA, 28, null, new SpeciesEvolutionCondition(p => p.moveset.filter(m => m.moveId === Moves.STOMP).length > 0), SpeciesWildEvolutionDelay.LONG)
|
||||||
|
|
|
@ -2759,7 +2759,7 @@ export const speciesStarters = {
|
||||||
[Species.GROUDON]: 8,
|
[Species.GROUDON]: 8,
|
||||||
[Species.RAYQUAZA]: 8,
|
[Species.RAYQUAZA]: 8,
|
||||||
[Species.JIRACHI]: 7,
|
[Species.JIRACHI]: 7,
|
||||||
[Species.DEOXYS]: 8,
|
[Species.DEOXYS]: 7,
|
||||||
|
|
||||||
[Species.TURTWIG]: 3,
|
[Species.TURTWIG]: 3,
|
||||||
[Species.CHIMCHAR]: 3,
|
[Species.CHIMCHAR]: 3,
|
||||||
|
@ -2813,7 +2813,7 @@ export const speciesStarters = {
|
||||||
[Species.DARKRAI]: 7,
|
[Species.DARKRAI]: 7,
|
||||||
[Species.SHAYMIN]: 7,
|
[Species.SHAYMIN]: 7,
|
||||||
[Species.ARCEUS]: 9,
|
[Species.ARCEUS]: 9,
|
||||||
[Species.VICTINI]: 8,
|
[Species.VICTINI]: 7,
|
||||||
|
|
||||||
[Species.SNIVY]: 3,
|
[Species.SNIVY]: 3,
|
||||||
[Species.TEPIG]: 3,
|
[Species.TEPIG]: 3,
|
||||||
|
@ -2895,7 +2895,7 @@ export const speciesStarters = {
|
||||||
[Species.KYUREM]: 8,
|
[Species.KYUREM]: 8,
|
||||||
[Species.KELDEO]: 7,
|
[Species.KELDEO]: 7,
|
||||||
[Species.MELOETTA]: 7,
|
[Species.MELOETTA]: 7,
|
||||||
[Species.GENESECT]: 8,
|
[Species.GENESECT]: 7,
|
||||||
|
|
||||||
[Species.CHESPIN]: 3,
|
[Species.CHESPIN]: 3,
|
||||||
[Species.FENNEKIN]: 3,
|
[Species.FENNEKIN]: 3,
|
||||||
|
|
|
@ -617,7 +617,7 @@ export class Arena {
|
||||||
case Biome.CONSTRUCTION_SITE:
|
case Biome.CONSTRUCTION_SITE:
|
||||||
return 1.222;
|
return 1.222;
|
||||||
case Biome.JUNGLE:
|
case Biome.JUNGLE:
|
||||||
return 2.477;
|
return 0.000;
|
||||||
case Biome.FAIRY_CAVE:
|
case Biome.FAIRY_CAVE:
|
||||||
return 4.542;
|
return 4.542;
|
||||||
case Biome.TEMPLE:
|
case Biome.TEMPLE:
|
||||||
|
|
|
@ -13,7 +13,7 @@ export default class DamageNumberHandler {
|
||||||
add(target: Pokemon, amount: integer, result: DamageResult | HitResult.HEAL = HitResult.EFFECTIVE, critical: boolean = false): void {
|
add(target: Pokemon, amount: integer, result: DamageResult | HitResult.HEAL = HitResult.EFFECTIVE, critical: boolean = false): void {
|
||||||
const scene = target.scene;
|
const scene = target.scene;
|
||||||
|
|
||||||
if (!scene.damageNumbersMode)
|
if (!scene?.damageNumbersMode)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
const battlerIndex = target.getBattlerIndex();
|
const battlerIndex = target.getBattlerIndex();
|
||||||
|
|
|
@ -4,7 +4,7 @@ import { Variant, VariantSet, variantColorCache } from '#app/data/variant';
|
||||||
import { variantData } from '#app/data/variant';
|
import { variantData } from '#app/data/variant';
|
||||||
import BattleInfo, { PlayerBattleInfo, EnemyBattleInfo } from '../ui/battle-info';
|
import BattleInfo, { PlayerBattleInfo, EnemyBattleInfo } from '../ui/battle-info';
|
||||||
import { Moves } from "../data/enums/moves";
|
import { Moves } from "../data/enums/moves";
|
||||||
import Move, { HighCritAttr, HitsTagAttr, applyMoveAttrs, FixedDamageAttr, VariableAtkAttr, VariablePowerAttr, allMoves, MoveCategory, TypelessAttr, CritOnlyAttr, getMoveTargets, OneHitKOAttr, MultiHitAttr, StatusMoveTypeImmunityAttr, MoveTarget, VariableDefAttr, AttackMove, ModifiedDamageAttr, VariableMoveTypeMultiplierAttr, IgnoreOpponentStatChangesAttr, SacrificialAttr, VariableMoveTypeAttr, VariableMoveCategoryAttr, CounterDamageAttr, StatChangeAttr, RechargeAttr, ChargeAttr, IgnoreWeatherTypeDebuffAttr } from "../data/move";
|
import Move, { HighCritAttr, HitsTagAttr, applyMoveAttrs, FixedDamageAttr, VariableAtkAttr, VariablePowerAttr, allMoves, MoveCategory, TypelessAttr, CritOnlyAttr, getMoveTargets, OneHitKOAttr, MultiHitAttr, StatusMoveTypeImmunityAttr, MoveTarget, VariableDefAttr, AttackMove, ModifiedDamageAttr, VariableMoveTypeMultiplierAttr, IgnoreOpponentStatChangesAttr, SacrificialAttr, VariableMoveTypeAttr, VariableMoveCategoryAttr, CounterDamageAttr, StatChangeAttr, RechargeAttr, ChargeAttr, IgnoreWeatherTypeDebuffAttr, BypassBurnDamageReductionAttr } from "../data/move";
|
||||||
import { default as PokemonSpecies, PokemonSpeciesForm, SpeciesFormKey, getFusedSpeciesName, getPokemonSpecies, getPokemonSpeciesForm, getStarterValueFriendshipCap, speciesStarters, starterPassiveAbilities } from '../data/pokemon-species';
|
import { default as PokemonSpecies, PokemonSpeciesForm, SpeciesFormKey, getFusedSpeciesName, getPokemonSpecies, getPokemonSpeciesForm, getStarterValueFriendshipCap, speciesStarters, starterPassiveAbilities } from '../data/pokemon-species';
|
||||||
import * as Utils from '../utils';
|
import * as Utils from '../utils';
|
||||||
import { Type, TypeDamageMultiplier, getTypeDamageMultiplier, getTypeRgb } from '../data/type';
|
import { Type, TypeDamageMultiplier, getTypeDamageMultiplier, getTypeRgb } from '../data/type';
|
||||||
|
@ -27,7 +27,7 @@ import { TempBattleStat } from '../data/temp-battle-stat';
|
||||||
import { ArenaTagSide, WeakenMoveScreenTag, WeakenMoveTypeTag } from '../data/arena-tag';
|
import { ArenaTagSide, WeakenMoveScreenTag, WeakenMoveTypeTag } from '../data/arena-tag';
|
||||||
import { ArenaTagType } from "../data/enums/arena-tag-type";
|
import { ArenaTagType } from "../data/enums/arena-tag-type";
|
||||||
import { Biome } from "../data/enums/biome";
|
import { Biome } from "../data/enums/biome";
|
||||||
import { Ability, AbAttr, BattleStatMultiplierAbAttr, BlockCritAbAttr, BonusCritAbAttr, BypassBurnDamageReductionAbAttr, FieldPriorityMoveImmunityAbAttr, FieldVariableMovePowerAbAttr, IgnoreOpponentStatChangesAbAttr, MoveImmunityAbAttr, MoveTypeChangeAttr, NonSuperEffectiveImmunityAbAttr, PreApplyBattlerTagAbAttr, PreDefendFullHpEndureAbAttr, ReceivedMoveDamageMultiplierAbAttr, ReduceStatusEffectDurationAbAttr, StabBoostAbAttr, StatusEffectImmunityAbAttr, TypeImmunityAbAttr, VariableMovePowerAbAttr, VariableMoveTypeAbAttr, WeightMultiplierAbAttr, allAbilities, applyAbAttrs, applyBattleStatMultiplierAbAttrs, applyPostDefendAbAttrs, applyPreApplyBattlerTagAbAttrs, applyPreAttackAbAttrs, applyPreDefendAbAttrs, applyPreSetStatusAbAttrs, UnsuppressableAbilityAbAttr, SuppressFieldAbilitiesAbAttr, NoFusionAbilityAbAttr, MultCritAbAttr, IgnoreTypeImmunityAbAttr } from '../data/ability';
|
import { Ability, AbAttr, BattleStatMultiplierAbAttr, BlockCritAbAttr, BonusCritAbAttr, BypassBurnDamageReductionAbAttr, FieldPriorityMoveImmunityAbAttr, FieldVariableMovePowerAbAttr, IgnoreOpponentStatChangesAbAttr, MoveImmunityAbAttr, MoveTypeChangeAttr, NonSuperEffectiveImmunityAbAttr, PreApplyBattlerTagAbAttr, PreDefendFullHpEndureAbAttr, ReceivedMoveDamageMultiplierAbAttr, ReduceStatusEffectDurationAbAttr, StabBoostAbAttr, StatusEffectImmunityAbAttr, TypeImmunityAbAttr, VariableMovePowerAbAttr, VariableMoveTypeAbAttr, WeightMultiplierAbAttr, allAbilities, applyAbAttrs, applyBattleStatMultiplierAbAttrs, applyPostDefendAbAttrs, applyPreApplyBattlerTagAbAttrs, applyPreAttackAbAttrs, applyPreDefendAbAttrs, applyPreSetStatusAbAttrs, UnsuppressableAbilityAbAttr, SuppressFieldAbilitiesAbAttr, NoFusionAbilityAbAttr, MultCritAbAttr, IgnoreTypeImmunityAbAttr, DamageBoostAbAttr } from '../data/ability';
|
||||||
import { Abilities } from "#app/data/enums/abilities";
|
import { Abilities } from "#app/data/enums/abilities";
|
||||||
import PokemonData from '../system/pokemon-data';
|
import PokemonData from '../system/pokemon-data';
|
||||||
import Battle, { BattlerIndex } from '../battle';
|
import Battle, { BattlerIndex } from '../battle';
|
||||||
|
@ -1096,11 +1096,8 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
|
||||||
|
|
||||||
let shinyThreshold = new Utils.IntegerHolder(32);
|
let shinyThreshold = new Utils.IntegerHolder(32);
|
||||||
if (thresholdOverride === undefined) {
|
if (thresholdOverride === undefined) {
|
||||||
if (!this.hasTrainer()) {
|
if (!this.hasTrainer())
|
||||||
if (new Date() < new Date('2024-05-13'))
|
|
||||||
shinyThreshold.value *= 3;
|
|
||||||
this.scene.applyModifiers(ShinyRateBoosterModifier, true, shinyThreshold);
|
this.scene.applyModifiers(ShinyRateBoosterModifier, true, shinyThreshold);
|
||||||
}
|
|
||||||
} else
|
} else
|
||||||
shinyThreshold.value = thresholdOverride;
|
shinyThreshold.value = thresholdOverride;
|
||||||
|
|
||||||
|
@ -1228,24 +1225,18 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.level >= 25) { // No egg moves below level 25
|
if (this.level >= 60) { // No egg moves below level 60
|
||||||
for (let i = 0; i < 3; i++) {
|
for (let i = 0; i < 3; i++) {
|
||||||
const moveId = speciesEggMoves[this.species.getRootSpeciesId()][i];
|
const moveId = speciesEggMoves[this.species.getRootSpeciesId()][i];
|
||||||
if (!movePool.some(m => m[0] === moveId) && !allMoves[moveId].name.endsWith(' (N)'))
|
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, Math.min(this.level * 0.5, 40)]);
|
||||||
}
|
}
|
||||||
const moveId = speciesEggMoves[this.species.getRootSpeciesId()][3];
|
|
||||||
if (this.level >= 60 && !movePool.some(m => m[0] === moveId) && !allMoves[moveId].name.endsWith(' (N)')) // No rare egg moves before level 60
|
|
||||||
movePool.push([moveId, Math.min(this.level * 0.2, 20)]);
|
|
||||||
if (this.fusionSpecies) {
|
if (this.fusionSpecies) {
|
||||||
for (let i = 0; i < 3; i++) {
|
for (let i = 0; i < 3; i++) {
|
||||||
const moveId = speciesEggMoves[this.fusionSpecies.getRootSpeciesId()][i];
|
const moveId = speciesEggMoves[this.fusionSpecies.getRootSpeciesId()][i];
|
||||||
if (!movePool.some(m => m[0] === moveId) && !allMoves[moveId].name.endsWith(' (N)'))
|
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, Math.min(this.level * 0.5, 30)]);
|
||||||
}
|
}
|
||||||
const moveId = speciesEggMoves[this.fusionSpecies.getRootSpeciesId()][3];
|
|
||||||
if (this.level >= 60 && !movePool.some(m => m[0] === moveId) && !allMoves[moveId].name.endsWith(' (N)')) // No rare egg moves before level 60
|
|
||||||
movePool.push([moveId, Math.min(this.level * 0.2, 20)]);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1543,11 +1534,16 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
|
||||||
if (!isTypeImmune) {
|
if (!isTypeImmune) {
|
||||||
damage.value = Math.ceil(((((2 * source.level / 5 + 2) * power.value * sourceAtk.value / targetDef.value) / 50) + 2) * stabMultiplier.value * typeMultiplier.value * arenaAttackTypeMultiplier.value * screenMultiplier.value * ((this.scene.randBattleSeedInt(15) + 85) / 100) * criticalMultiplier.value);
|
damage.value = Math.ceil(((((2 * source.level / 5 + 2) * power.value * sourceAtk.value / targetDef.value) / 50) + 2) * stabMultiplier.value * typeMultiplier.value * arenaAttackTypeMultiplier.value * screenMultiplier.value * ((this.scene.randBattleSeedInt(15) + 85) / 100) * criticalMultiplier.value);
|
||||||
if (isPhysical && source.status && source.status.effect === StatusEffect.BURN) {
|
if (isPhysical && source.status && source.status.effect === StatusEffect.BURN) {
|
||||||
|
if(!move.getAttrs(BypassBurnDamageReductionAttr).length) {
|
||||||
const burnDamageReductionCancelled = new Utils.BooleanHolder(false);
|
const burnDamageReductionCancelled = new Utils.BooleanHolder(false);
|
||||||
applyAbAttrs(BypassBurnDamageReductionAbAttr, source, burnDamageReductionCancelled);
|
applyAbAttrs(BypassBurnDamageReductionAbAttr, source, burnDamageReductionCancelled);
|
||||||
if (!burnDamageReductionCancelled.value)
|
if (!burnDamageReductionCancelled.value)
|
||||||
damage.value = Math.floor(damage.value / 2);
|
damage.value = Math.floor(damage.value / 2);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
applyPreAttackAbAttrs(DamageBoostAbAttr, source, this, battlerMove, damage);
|
||||||
|
|
||||||
move.getAttrs(HitsTagAttr).map(hta => hta as HitsTagAttr).filter(hta => hta.doubleDamage).forEach(hta => {
|
move.getAttrs(HitsTagAttr).map(hta => hta as HitsTagAttr).filter(hta => hta.doubleDamage).forEach(hta => {
|
||||||
if (this.getTag(hta.tagType))
|
if (this.getTag(hta.tagType))
|
||||||
damage.value *= 2;
|
damage.value *= 2;
|
||||||
|
@ -2492,6 +2488,13 @@ export class PlayerPokemon extends Pokemon {
|
||||||
constructor(scene: BattleScene, species: PokemonSpecies, level: integer, abilityIndex: integer, formIndex: integer, gender: Gender, shiny: boolean, variant: Variant, ivs: integer[], nature: Nature, dataSource: Pokemon | PokemonData) {
|
constructor(scene: BattleScene, species: PokemonSpecies, level: integer, abilityIndex: integer, formIndex: integer, gender: Gender, shiny: boolean, variant: Variant, ivs: integer[], nature: Nature, dataSource: Pokemon | PokemonData) {
|
||||||
super(scene, 106, 148, species, level, abilityIndex, formIndex, gender, shiny, variant, ivs, nature, dataSource);
|
super(scene, 106, 148, species, level, abilityIndex, formIndex, gender, shiny, variant, ivs, nature, dataSource);
|
||||||
|
|
||||||
|
if (Overrides.SHINY_OVERRIDE) {
|
||||||
|
this.shiny = true;
|
||||||
|
this.initShinySparkle();
|
||||||
|
if (Overrides.VARIANT_OVERRIDE)
|
||||||
|
this.variant = Overrides.VARIANT_OVERRIDE;
|
||||||
|
}
|
||||||
|
|
||||||
if (!dataSource)
|
if (!dataSource)
|
||||||
this.generateAndPopulateMoveset();
|
this.generateAndPopulateMoveset();
|
||||||
this.generateCompatibleTms();
|
this.generateCompatibleTms();
|
||||||
|
|
|
@ -100,6 +100,10 @@ export class LoadingScene extends SceneBase {
|
||||||
this.loadImage('summary_bg', 'ui');
|
this.loadImage('summary_bg', 'ui');
|
||||||
this.loadImage('summary_overlay_shiny', 'ui');
|
this.loadImage('summary_overlay_shiny', 'ui');
|
||||||
this.loadImage('summary_profile', 'ui');
|
this.loadImage('summary_profile', 'ui');
|
||||||
|
this.loadImage('summary_profile_prompt_z', 'ui') // The pixel Z button prompt
|
||||||
|
this.loadImage('summary_profile_prompt_a', 'ui'); // The pixel A button prompt
|
||||||
|
this.loadImage('summary_profile_ability', 'ui'); // Pixel text 'ABILITY'
|
||||||
|
this.loadImage('summary_profile_passive', 'ui'); // Pixel text 'PASSIVE'
|
||||||
this.loadImage('summary_status', 'ui');
|
this.loadImage('summary_status', 'ui');
|
||||||
this.loadImage('summary_stats', 'ui');
|
this.loadImage('summary_stats', 'ui');
|
||||||
this.loadImage('summary_stats_overlay_exp', 'ui');
|
this.loadImage('summary_stats_overlay_exp', 'ui');
|
||||||
|
|
|
@ -0,0 +1,5 @@
|
||||||
|
import { SimpleTranslationEntries } from "#app/plugins/i18n";
|
||||||
|
|
||||||
|
export const abilityTriggers: SimpleTranslationEntries = {
|
||||||
|
'blockRecoilDamage' : `{{pokemonName}}'s {{abilityName}}\nprotected it from recoil!`,
|
||||||
|
} as const;
|
|
@ -1,4 +1,5 @@
|
||||||
import { ability } from "./ability";
|
import { ability } from "./ability";
|
||||||
|
import { abilityTriggers } from "./ability-trigger";
|
||||||
import { battle } from "./battle";
|
import { battle } from "./battle";
|
||||||
import { commandUiHandler } from "./command-ui-handler";
|
import { commandUiHandler } from "./command-ui-handler";
|
||||||
import { fightUiHandler } from "./fight-ui-handler";
|
import { fightUiHandler } from "./fight-ui-handler";
|
||||||
|
@ -16,6 +17,7 @@ import { tutorial } from "./tutorial";
|
||||||
|
|
||||||
export const deConfig = {
|
export const deConfig = {
|
||||||
ability: ability,
|
ability: ability,
|
||||||
|
abilityTriggers: abilityTriggers,
|
||||||
battle: battle,
|
battle: battle,
|
||||||
commandUiHandler: commandUiHandler,
|
commandUiHandler: commandUiHandler,
|
||||||
fightUiHandler: fightUiHandler,
|
fightUiHandler: fightUiHandler,
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import { SimpleTranslationEntries } from "#app/plugins/i18n";
|
import { SimpleTranslationEntries } from "#app/plugins/i18n";
|
||||||
|
|
||||||
export const fightUiHandler: SimpleTranslationEntries = {
|
export const fightUiHandler: SimpleTranslationEntries = {
|
||||||
"pp": "PP",
|
"pp": "AP",
|
||||||
"power": "Power",
|
"power": "Stärke",
|
||||||
"accuracy": "Accuracy",
|
"accuracy": "Genauigkeit",
|
||||||
} as const;
|
} as const;
|
|
@ -1,10 +1,10 @@
|
||||||
import { SimpleTranslationEntries } from "#app/plugins/i18n";
|
import { SimpleTranslationEntries } from "#app/plugins/i18n";
|
||||||
|
|
||||||
export const growth: SimpleTranslationEntries = {
|
export const growth: SimpleTranslationEntries = {
|
||||||
"Erratic": "Erratic",
|
"Erratic": "Unregelmäßig",
|
||||||
"Fast": "Fast",
|
"Fast": "Schnell",
|
||||||
"Medium_Fast": "Medium Fast",
|
"Medium_Fast": "Schneller",
|
||||||
"Medium_Slow": "Medium Slow",
|
"Medium_Slow": "Langsamer",
|
||||||
"Slow": "Slow",
|
"Slow": "Langsam",
|
||||||
"Fluctuating": "Fluctuating"
|
"Fluctuating": "Schwankend"
|
||||||
} as const;
|
} as const;
|
|
@ -2915,7 +2915,7 @@ export const move: MoveTranslationEntries = {
|
||||||
},
|
},
|
||||||
"zippyZap": {
|
"zippyZap": {
|
||||||
name: "Britzelturbo",
|
name: "Britzelturbo",
|
||||||
effect: "Ein stürmischer Blitz-Angriff mit hoher Erstschlag- und Volltrefferquote."
|
effect: "The user attacks the target with bursts of electricity at high speed. This move always goes first and raises the user's evasiveness."
|
||||||
},
|
},
|
||||||
"splishySplash": {
|
"splishySplash": {
|
||||||
name: "Plätschersurfer",
|
name: "Plätschersurfer",
|
||||||
|
|
|
@ -28,5 +28,8 @@ export const starterSelectUiHandler: SimpleTranslationEntries = {
|
||||||
"cycleNature": "N: Wesen Ändern",
|
"cycleNature": "N: Wesen Ändern",
|
||||||
"cycleVariant": "V: Seltenheit ändern",
|
"cycleVariant": "V: Seltenheit ändern",
|
||||||
"enablePassive": "Passiv-Skill aktivieren",
|
"enablePassive": "Passiv-Skill aktivieren",
|
||||||
"disablePassive": "Passiv-Skill deaktivieren"
|
"disablePassive": "Passiv-Skill deaktivieren",
|
||||||
|
"locked": "Gesperrt",
|
||||||
|
"disabled": "Deaktiviert",
|
||||||
|
"uncaught": "Uncaught"
|
||||||
}
|
}
|
|
@ -0,0 +1,5 @@
|
||||||
|
import { SimpleTranslationEntries } from "#app/plugins/i18n";
|
||||||
|
|
||||||
|
export const abilityTriggers: SimpleTranslationEntries = {
|
||||||
|
'blockRecoilDamage' : `{{pokemonName}}'s {{abilityName}}\nprotected it from recoil!`,
|
||||||
|
} as const;
|
|
@ -475,7 +475,7 @@ export const ability: AbilityTranslationEntries = {
|
||||||
},
|
},
|
||||||
frisk: {
|
frisk: {
|
||||||
name: "Frisk",
|
name: "Frisk",
|
||||||
description: "When it enters a battle, the Pokémon can check an opposing Pokémon's held item.",
|
description: "When it enters a battle, the Pokémon can check an opposing Pokémon's Ability.",
|
||||||
},
|
},
|
||||||
reckless: {
|
reckless: {
|
||||||
name: "Reckless",
|
name: "Reckless",
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
import { ability } from "./ability";
|
import { ability } from "./ability";
|
||||||
|
import { abilityTriggers } from "./ability-trigger";
|
||||||
import { battle } from "./battle";
|
import { battle } from "./battle";
|
||||||
import { commandUiHandler } from "./command-ui-handler";
|
import { commandUiHandler } from "./command-ui-handler";
|
||||||
import { fightUiHandler } from "./fight-ui-handler";
|
import { fightUiHandler } from "./fight-ui-handler";
|
||||||
|
@ -16,6 +17,7 @@ import { tutorial } from "./tutorial";
|
||||||
|
|
||||||
export const enConfig = {
|
export const enConfig = {
|
||||||
ability: ability,
|
ability: ability,
|
||||||
|
abilityTriggers: abilityTriggers,
|
||||||
battle: battle,
|
battle: battle,
|
||||||
commandUiHandler: commandUiHandler,
|
commandUiHandler: commandUiHandler,
|
||||||
fightUiHandler: fightUiHandler,
|
fightUiHandler: fightUiHandler,
|
||||||
|
|
|
@ -2915,7 +2915,7 @@ export const move: MoveTranslationEntries = {
|
||||||
},
|
},
|
||||||
"zippyZap": {
|
"zippyZap": {
|
||||||
name: "Zippy Zap",
|
name: "Zippy Zap",
|
||||||
effect: "The user attacks the target with bursts of electricity at high speed. This move always goes first and results in a critical hit."
|
effect: "The user attacks the target with bursts of electricity at high speed. This move always goes first and raises the user's evasiveness."
|
||||||
},
|
},
|
||||||
"splishySplash": {
|
"splishySplash": {
|
||||||
name: "Splishy Splash",
|
name: "Splishy Splash",
|
||||||
|
|
|
@ -28,5 +28,8 @@ export const starterSelectUiHandler: SimpleTranslationEntries = {
|
||||||
"cycleNature": 'N: Cycle Nature',
|
"cycleNature": 'N: Cycle Nature',
|
||||||
"cycleVariant": 'V: Cycle Variant',
|
"cycleVariant": 'V: Cycle Variant',
|
||||||
"enablePassive": "Enable Passive",
|
"enablePassive": "Enable Passive",
|
||||||
"disablePassive": "Disable Passive"
|
"disablePassive": "Disable Passive",
|
||||||
|
"locked": "Locked",
|
||||||
|
"disabled": "Disabled",
|
||||||
|
"uncaught": "Uncaught"
|
||||||
}
|
}
|
|
@ -0,0 +1,5 @@
|
||||||
|
import { SimpleTranslationEntries } from "#app/plugins/i18n";
|
||||||
|
|
||||||
|
export const abilityTriggers: SimpleTranslationEntries = {
|
||||||
|
'blockRecoilDamage' : `{{pokemonName}}'s {{abilityName}}\nprotected it from recoil!`,
|
||||||
|
} as const;
|
|
@ -475,7 +475,7 @@ export const ability: AbilityTranslationEntries = {
|
||||||
},
|
},
|
||||||
"frisk": {
|
"frisk": {
|
||||||
name: "Cacheo",
|
name: "Cacheo",
|
||||||
description: "Puede ver el objeto que lleva el rival al entrar en combate."
|
description: "Cuando entra en combate, el Pokémon puede comprobar la habilidad de un Pokémon rival."
|
||||||
},
|
},
|
||||||
"reckless": {
|
"reckless": {
|
||||||
name: "Audaz",
|
name: "Audaz",
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
import { ability } from "./ability";
|
import { ability } from "./ability";
|
||||||
|
import { abilityTriggers } from "./ability-trigger";
|
||||||
import { battle } from "./battle";
|
import { battle } from "./battle";
|
||||||
import { commandUiHandler } from "./command-ui-handler";
|
import { commandUiHandler } from "./command-ui-handler";
|
||||||
import { fightUiHandler } from "./fight-ui-handler";
|
import { fightUiHandler } from "./fight-ui-handler";
|
||||||
|
@ -16,6 +17,7 @@ import { tutorial } from "./tutorial";
|
||||||
|
|
||||||
export const esConfig = {
|
export const esConfig = {
|
||||||
ability: ability,
|
ability: ability,
|
||||||
|
abilityTriggers: abilityTriggers,
|
||||||
battle: battle,
|
battle: battle,
|
||||||
commandUiHandler: commandUiHandler,
|
commandUiHandler: commandUiHandler,
|
||||||
fightUiHandler: fightUiHandler,
|
fightUiHandler: fightUiHandler,
|
||||||
|
|
|
@ -2915,7 +2915,7 @@ export const move: MoveTranslationEntries = {
|
||||||
},
|
},
|
||||||
zippyZap: {
|
zippyZap: {
|
||||||
name: "Pikaturbo",
|
name: "Pikaturbo",
|
||||||
effect: "Ataque eléctrico a la velocidad del rayo. Este movimiento tiene prioridad alta y propina golpes críticos.",
|
effect: "The user attacks the target with bursts of electricity at high speed. This move always goes first and raises the user's evasiveness.",
|
||||||
},
|
},
|
||||||
splishySplash: {
|
splishySplash: {
|
||||||
name: "Salpikasurf",
|
name: "Salpikasurf",
|
||||||
|
|
|
@ -28,5 +28,8 @@ export const starterSelectUiHandler: SimpleTranslationEntries = {
|
||||||
"cycleNature": 'N: Cambiar Naturaleza',
|
"cycleNature": 'N: Cambiar Naturaleza',
|
||||||
"cycleVariant": 'V: Cambiar Variante',
|
"cycleVariant": 'V: Cambiar Variante',
|
||||||
"enablePassive": "Activar Pasiva",
|
"enablePassive": "Activar Pasiva",
|
||||||
"disablePassive": "Desactivar Pasiva"
|
"disablePassive": "Desactivar Pasiva",
|
||||||
|
"locked": "Locked",
|
||||||
|
"disabled": "Disabled",
|
||||||
|
"uncaught": "Uncaught"
|
||||||
}
|
}
|
|
@ -0,0 +1,5 @@
|
||||||
|
import { SimpleTranslationEntries } from "#app/plugins/i18n";
|
||||||
|
|
||||||
|
export const abilityTriggers: SimpleTranslationEntries = {
|
||||||
|
'blockRecoilDamage' : `{{abilityName}}\nde {{pokemonName}} le protège du contrecoup !`,
|
||||||
|
} as const;
|
|
@ -475,7 +475,7 @@ export const ability: AbilityTranslationEntries = {
|
||||||
},
|
},
|
||||||
frisk: {
|
frisk: {
|
||||||
name: "Fouille",
|
name: "Fouille",
|
||||||
description: "Permet de connaitre l’objet tenu par l’adversaire quand le combat commence.",
|
description: "Lorsqu'il entre en combat, le Pokémon peut vérifier la capacité d'un Pokémon adverse.",
|
||||||
},
|
},
|
||||||
reckless: {
|
reckless: {
|
||||||
name: "Téméraire",
|
name: "Téméraire",
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
import { ability } from "./ability";
|
import { ability } from "./ability";
|
||||||
|
import { abilityTriggers } from "./ability-trigger";
|
||||||
import { battle } from "./battle";
|
import { battle } from "./battle";
|
||||||
import { commandUiHandler } from "./command-ui-handler";
|
import { commandUiHandler } from "./command-ui-handler";
|
||||||
import { fightUiHandler } from "./fight-ui-handler";
|
import { fightUiHandler } from "./fight-ui-handler";
|
||||||
|
@ -16,6 +17,7 @@ import { tutorial } from "./tutorial";
|
||||||
|
|
||||||
export const frConfig = {
|
export const frConfig = {
|
||||||
ability: ability,
|
ability: ability,
|
||||||
|
abilityTriggers: abilityTriggers,
|
||||||
battle: battle,
|
battle: battle,
|
||||||
commandUiHandler: commandUiHandler,
|
commandUiHandler: commandUiHandler,
|
||||||
fightUiHandler: fightUiHandler,
|
fightUiHandler: fightUiHandler,
|
||||||
|
|
|
@ -2915,7 +2915,7 @@ export const move: MoveTranslationEntries = {
|
||||||
},
|
},
|
||||||
"zippyZap": {
|
"zippyZap": {
|
||||||
name: "Pika-Sprint",
|
name: "Pika-Sprint",
|
||||||
effect: "Une attaque électrique rapide comme l’éclair qui inflige un coup critique à coup sûr. Frappe en priorité."
|
effect: "Une attaque électrique rapide comme l’éclair qui auguemente l’esquive. Frappe en priorité."
|
||||||
},
|
},
|
||||||
"splishySplash": {
|
"splishySplash": {
|
||||||
name: "Pika-Splash",
|
name: "Pika-Splash",
|
||||||
|
|
|
@ -28,5 +28,8 @@ export const starterSelectUiHandler: SimpleTranslationEntries = {
|
||||||
"cycleNature": "N: » Natures",
|
"cycleNature": "N: » Natures",
|
||||||
"cycleVariant": "V: » Variants",
|
"cycleVariant": "V: » Variants",
|
||||||
"enablePassive": "Activer Passif",
|
"enablePassive": "Activer Passif",
|
||||||
"disablePassive": "Désactiver Passif"
|
"disablePassive": "Désactiver Passif",
|
||||||
|
"locked": "Verrouillé",
|
||||||
|
"disabled": "Désactivé",
|
||||||
|
"uncaught": "Uncaught"
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,5 @@
|
||||||
|
import { SimpleTranslationEntries } from "#app/plugins/i18n";
|
||||||
|
|
||||||
|
export const abilityTriggers: SimpleTranslationEntries = {
|
||||||
|
'blockRecoilDamage' : `{{pokemonName}}'s {{abilityName}}\nprotected it from recoil!`,
|
||||||
|
} as const;
|
|
@ -475,7 +475,7 @@ export const ability: AbilityTranslationEntries = {
|
||||||
},
|
},
|
||||||
frisk: {
|
frisk: {
|
||||||
name: "Indagine",
|
name: "Indagine",
|
||||||
description: "Quando il Pokémon entra in campo, rivela lo strumento del nemico.",
|
description: "Quando entra in battaglia, il Pokémon può controllare il Potere di un Pokémon avversario.",
|
||||||
},
|
},
|
||||||
reckless: {
|
reckless: {
|
||||||
name: "Temerarietà",
|
name: "Temerarietà",
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
import { ability } from "./ability";
|
import { ability } from "./ability";
|
||||||
|
import { abilityTriggers } from "./ability-trigger";
|
||||||
import { battle } from "./battle";
|
import { battle } from "./battle";
|
||||||
import { commandUiHandler } from "./command-ui-handler";
|
import { commandUiHandler } from "./command-ui-handler";
|
||||||
import { fightUiHandler } from "./fight-ui-handler";
|
import { fightUiHandler } from "./fight-ui-handler";
|
||||||
|
@ -16,6 +17,7 @@ import { tutorial } from "./tutorial";
|
||||||
|
|
||||||
export const itConfig = {
|
export const itConfig = {
|
||||||
ability: ability,
|
ability: ability,
|
||||||
|
abilityTriggers: abilityTriggers,
|
||||||
battle: battle,
|
battle: battle,
|
||||||
commandUiHandler: commandUiHandler,
|
commandUiHandler: commandUiHandler,
|
||||||
fightUiHandler: fightUiHandler,
|
fightUiHandler: fightUiHandler,
|
||||||
|
|
|
@ -3,5 +3,5 @@ import { SimpleTranslationEntries } from "#app/plugins/i18n";
|
||||||
export const fightUiHandler: SimpleTranslationEntries = {
|
export const fightUiHandler: SimpleTranslationEntries = {
|
||||||
"pp": "PP",
|
"pp": "PP",
|
||||||
"power": "Potenza",
|
"power": "Potenza",
|
||||||
"accuracy": "Accuracy",
|
"accuracy": "Precisione",
|
||||||
} as const;
|
} as const;
|
|
@ -1,10 +1,10 @@
|
||||||
import { SimpleTranslationEntries } from "#app/plugins/i18n";
|
import { SimpleTranslationEntries } from "#app/plugins/i18n";
|
||||||
|
|
||||||
export const growth: SimpleTranslationEntries = {
|
export const growth: SimpleTranslationEntries = {
|
||||||
"Erratic": "Erratic",
|
"Erratic": "Irregolare",
|
||||||
"Fast": "Fast",
|
"Fast": "Veloce",
|
||||||
"Medium_Fast": "Medium Fast",
|
"Medium_Fast": "Medio-Veloce",
|
||||||
"Medium_Slow": "Medium Slow",
|
"Medium_Slow": "Medio-Lenta",
|
||||||
"Slow": "Slow",
|
"Slow": "Lenta",
|
||||||
"Fluctuating": "Fluctuating"
|
"Fluctuating": "Fluttuante"
|
||||||
} as const;
|
} as const;
|
|
@ -2915,7 +2915,7 @@ export const move: MoveTranslationEntries = {
|
||||||
},
|
},
|
||||||
zippyZap: {
|
zippyZap: {
|
||||||
name: "Sprintaboom",
|
name: "Sprintaboom",
|
||||||
effect: "Un attacco elettrico ad altissima velocità. Questa mossa ha priorità alta e infligge sicuramente un brutto colpo.",
|
effect: "The user attacks the target with bursts of electricity at high speed. This move always goes first and raises the user's evasiveness.",
|
||||||
},
|
},
|
||||||
splishySplash: {
|
splishySplash: {
|
||||||
name: "Surfasplash",
|
name: "Surfasplash",
|
||||||
|
|
|
@ -1,29 +1,29 @@
|
||||||
import { SimpleTranslationEntries } from "#app/plugins/i18n";
|
import { SimpleTranslationEntries } from "#app/plugins/i18n";
|
||||||
|
|
||||||
export const nature: SimpleTranslationEntries = {
|
export const nature: SimpleTranslationEntries = {
|
||||||
"Hardy": "Hardy",
|
"Hardy": "Ardita",
|
||||||
"Lonely": "Lonely",
|
"Lonely": "Schiva",
|
||||||
"Brave": "Brave",
|
"Brave": "Audace",
|
||||||
"Adamant": "Adamant",
|
"Adamant": "Decisa",
|
||||||
"Naughty": "Naughty",
|
"Naughty": "Birbona",
|
||||||
"Bold": "Bold",
|
"Bold": "Sicura",
|
||||||
"Docile": "Docile",
|
"Docile": "Docile",
|
||||||
"Relaxed": "Relaxed",
|
"Relaxed": "Placida",
|
||||||
"Impish": "Impish",
|
"Impish": "Scaltra",
|
||||||
"Lax": "Lax",
|
"Lax": "Fiacca",
|
||||||
"Timid": "Timid",
|
"Timid": "Timida",
|
||||||
"Hasty": "Hasty",
|
"Hasty": "Lesta",
|
||||||
"Serious": "Serious",
|
"Serious": "Seria",
|
||||||
"Jolly": "Jolly",
|
"Jolly": "Allegra",
|
||||||
"Naive": "Naive",
|
"Naive": "Ingenuaa",
|
||||||
"Modest": "Modest",
|
"Modest": "Modesta",
|
||||||
"Mild": "Mild",
|
"Mild": "Mite",
|
||||||
"Quiet": "Quiet",
|
"Quiet": "Quieta",
|
||||||
"Bashful": "Bashful",
|
"Bashful": "Ritrosa",
|
||||||
"Rash": "Rash",
|
"Rash": "Ardente",
|
||||||
"Calm": "Calm",
|
"Calm": "Calma",
|
||||||
"Gentle": "Gentle",
|
"Gentle": "Gentile",
|
||||||
"Sassy": "Sassy",
|
"Sassy": "Vivace",
|
||||||
"Careful": "Careful",
|
"Careful": "Cauta",
|
||||||
"Quirky": "Quirky"
|
"Quirky": "Furba"
|
||||||
} as const;
|
} as const;
|
|
@ -28,5 +28,8 @@ export const starterSelectUiHandler: SimpleTranslationEntries = {
|
||||||
"cycleNature": 'N: Alterna Natura',
|
"cycleNature": 'N: Alterna Natura',
|
||||||
"cycleVariant": 'V: Alterna Variante',
|
"cycleVariant": 'V: Alterna Variante',
|
||||||
"enablePassive": "Attiva Passiva",
|
"enablePassive": "Attiva Passiva",
|
||||||
"disablePassive": "Disattiva Passiva"
|
"disablePassive": "Disattiva Passiva",
|
||||||
|
"locked": "Locked",
|
||||||
|
"disabled": "Disabled",
|
||||||
|
"uncaught": "Uncaught"
|
||||||
}
|
}
|
|
@ -0,0 +1,53 @@
|
||||||
|
import { SimpleTranslationEntries } from "#app/plugins/i18n";
|
||||||
|
|
||||||
|
export const battle: SimpleTranslationEntries = {
|
||||||
|
"bossAppeared": "{{bossName}} apareceu.",
|
||||||
|
"trainerAppeared": "{{trainerName}}\nquer batalhar!",
|
||||||
|
"singleWildAppeared": "Um {{pokemonName}} selvagem apareceu!",
|
||||||
|
"multiWildAppeared": "Um {{pokemonName1}} e um {{pokemonName2}} selvagens\napareceram!",
|
||||||
|
"playerComeBack": "{{pokemonName}}, retorne!",
|
||||||
|
"trainerComeBack": "{{trainerName}} retirou {{pokemonName}} da batalha!",
|
||||||
|
"playerGo": "{{pokemonName}}, eu escolho você!",
|
||||||
|
"trainerGo": "{{trainerName}} enviou {{pokemonName}}!",
|
||||||
|
"switchQuestion": "Quer trocar\nde {{pokemonName}}?",
|
||||||
|
"trainerDefeated": "Você derrotou\n{{trainerName}}!",
|
||||||
|
"pokemonCaught": "{{pokemonName}} foi capturado!",
|
||||||
|
"pokemon": "Pokémon",
|
||||||
|
"sendOutPokemon": "{{pokemonName}}, eu escolho você!!",
|
||||||
|
"hitResultCriticalHit": "Um golpe crítico!",
|
||||||
|
"hitResultSuperEffective": "É supereficaz!",
|
||||||
|
"hitResultNotVeryEffective": "É pouco eficaz...",
|
||||||
|
"hitResultNoEffect": "Isso não afeta {{pokemonName}}!",
|
||||||
|
"hitResultOneHitKO": "Foi um nocaute de um golpe!",
|
||||||
|
"attackFailed": "Mas falhou!",
|
||||||
|
"attackHitsCount": `Acertou {{count}} vezes.`,
|
||||||
|
"expGain": "{{pokemonName}} ganhou\n{{exp}} pontos de experiência.",
|
||||||
|
"levelUp": "{{pokemonName}} subiu para \nNv. {{level}}!",
|
||||||
|
"learnMove": "{{pokemonName}} aprendeu {{moveName}}!",
|
||||||
|
"learnMovePrompt": "{{pokemonName}} quer aprender\n{{moveName}}.",
|
||||||
|
"learnMoveLimitReached": "Porém, {{pokemonName}} já sabe\nquatro movimentos.",
|
||||||
|
"learnMoveReplaceQuestion": "Quer substituir um de seus movimentos por {{moveName}}?",
|
||||||
|
"learnMoveStopTeaching": "Você não quer aprender\n{{moveName}}?",
|
||||||
|
"learnMoveNotLearned": "{{pokemonName}} não aprendeu {{moveName}}.",
|
||||||
|
"learnMoveForgetQuestion": "Qual movimento quer esquecer?",
|
||||||
|
"learnMoveForgetSuccess": "{{pokemonName}} esqueceu como usar {{moveName}}.",
|
||||||
|
"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!",
|
||||||
|
"moveDisabled": "Não se pode usar {{moveName}} porque foi desabilitado!",
|
||||||
|
"noPokeballForce": "Uma força misteriosa\nte impede de usar Poké Bolas.",
|
||||||
|
"noPokeballTrainer": "Não se pode capturar\nPokémon dos outros!",
|
||||||
|
"noPokeballMulti": "Não se pode lançar Poké Bolas\nquando há mais de um Pokémon!",
|
||||||
|
"noPokeballStrong": "Este Pokémon é forte demais para ser capturado!\nÉ preciso enfraquecê-lo primeiro!",
|
||||||
|
"noEscapeForce": "Uma força misteriosa\nte impede de fugir.",
|
||||||
|
"noEscapeTrainer": "Não se pode fugir de\nbatalhas contra treinadores!",
|
||||||
|
"noEscapePokemon": "O movimento {{moveName}} de {{pokemonName}} te impede de fugir!",
|
||||||
|
"runAwaySuccess": "Você fugiu com sucesso",
|
||||||
|
"runAwayCannotEscape": "Você nao conseguiu fugir!",
|
||||||
|
"escapeVerbSwitch": "trocar",
|
||||||
|
"escapeVerbFlee": "fugir",
|
||||||
|
"notDisabled": "O movimento {{moveName}}\nnão está mais desabilitado!",
|
||||||
|
"skipItemQuestion": "Tem certeza de que não quer escolher um item?",
|
||||||
|
"eggHatching": "Opa?",
|
||||||
|
"ivScannerUseQuestion": "Quer usar o Scanner de IVs em {{pokemonName}}?"
|
||||||
|
} as const;
|
|
@ -0,0 +1,9 @@
|
||||||
|
import { SimpleTranslationEntries } from "#app/plugins/i18n";
|
||||||
|
|
||||||
|
export const commandUiHandler: SimpleTranslationEntries = {
|
||||||
|
"fight": "Lutar",
|
||||||
|
"ball": "Bolas",
|
||||||
|
"pokemon": "Pokémon",
|
||||||
|
"run": "Fugir",
|
||||||
|
"actionMessage": "O que {{pokemonName}}\ndeve fazer?",
|
||||||
|
} as const;
|
|
@ -0,0 +1,32 @@
|
||||||
|
import { ability } from "./ability";
|
||||||
|
import { battle } from "./battle";
|
||||||
|
import { commandUiHandler } from "./command-ui-handler";
|
||||||
|
import { fightUiHandler } from "./fight-ui-handler";
|
||||||
|
import { growth } from "./growth";
|
||||||
|
import { menu } from "./menu";
|
||||||
|
import { menuUiHandler } from "./menu-ui-handler";
|
||||||
|
import { move } from "./move";
|
||||||
|
import { nature } from "./nature";
|
||||||
|
import { pokeball } from "./pokeball";
|
||||||
|
import { pokemon } from "./pokemon";
|
||||||
|
import { pokemonStat } from "./pokemon-stat";
|
||||||
|
import { starterSelectUiHandler } from "./starter-select-ui-handler";
|
||||||
|
import { tutorial } from "./tutorial";
|
||||||
|
|
||||||
|
|
||||||
|
export const ptBrConfig = {
|
||||||
|
ability: ability,
|
||||||
|
battle: battle,
|
||||||
|
commandUiHandler: commandUiHandler,
|
||||||
|
fightUiHandler: fightUiHandler,
|
||||||
|
menuUiHandler: menuUiHandler,
|
||||||
|
menu: menu,
|
||||||
|
move: move,
|
||||||
|
pokeball: pokeball,
|
||||||
|
pokemonStat: pokemonStat,
|
||||||
|
pokemon: pokemon,
|
||||||
|
starterSelectUiHandler: starterSelectUiHandler,
|
||||||
|
tutorial: tutorial,
|
||||||
|
nature: nature,
|
||||||
|
growth: growth
|
||||||
|
}
|
|
@ -0,0 +1,7 @@
|
||||||
|
import { SimpleTranslationEntries } from "#app/plugins/i18n";
|
||||||
|
|
||||||
|
export const fightUiHandler: SimpleTranslationEntries = {
|
||||||
|
"pp": "PP",
|
||||||
|
"power": "Poder",
|
||||||
|
"accuracy": "Precisão",
|
||||||
|
} as const;
|
|
@ -0,0 +1,10 @@
|
||||||
|
import { SimpleTranslationEntries } from "#app/plugins/i18n";
|
||||||
|
|
||||||
|
export const growth: SimpleTranslationEntries = {
|
||||||
|
"Erratic": "Instável",
|
||||||
|
"Fast": "Rápido",
|
||||||
|
"Medium_Fast": "Meio Rápido",
|
||||||
|
"Medium_Slow": "Meio Lento",
|
||||||
|
"Slow": "Lento",
|
||||||
|
"Fluctuating": "Flutuante"
|
||||||
|
} as const;
|
|
@ -0,0 +1,23 @@
|
||||||
|
import { SimpleTranslationEntries } from "#app/plugins/i18n";
|
||||||
|
|
||||||
|
export const menuUiHandler: SimpleTranslationEntries = {
|
||||||
|
"GAME_SETTINGS": 'Configurações',
|
||||||
|
"ACHIEVEMENTS": "Conquistas",
|
||||||
|
"STATS": "Estatísticas",
|
||||||
|
"VOUCHERS": "Vouchers",
|
||||||
|
"EGG_LIST": "Incubadora",
|
||||||
|
"EGG_GACHA": "Gacha de Ovos",
|
||||||
|
"MANAGE_DATA": "Gerenciar Dados",
|
||||||
|
"COMMUNITY": "Comunidade",
|
||||||
|
"RETURN_TO_TITLE": "Voltar ao Início",
|
||||||
|
"LOG_OUT": "Logout",
|
||||||
|
"slot": "Slot {{slotNumber}}",
|
||||||
|
"importSession": "Importar Sessão",
|
||||||
|
"importSlotSelect": "Selecione um slot para importar.",
|
||||||
|
"exportSession": "Exportar Sessão",
|
||||||
|
"exportSlotSelect": "Selecione um slot para exportar.",
|
||||||
|
"importData": "Importar Dados",
|
||||||
|
"exportData": "Exportar Dados",
|
||||||
|
"cancel": "Cancelar",
|
||||||
|
"losingProgressionWarning": "Você vai perder todo o progresso desde o início da batalha. Confirmar?"
|
||||||
|
} as const;
|
|
@ -0,0 +1,46 @@
|
||||||
|
import { SimpleTranslationEntries } from "#app/plugins/i18n";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The menu namespace holds most miscellaneous text that isn't directly part of the game's
|
||||||
|
* contents or directly related to Pokemon data. This includes menu navigation, settings,
|
||||||
|
* account interactions, descriptive text, etc.
|
||||||
|
*/
|
||||||
|
export const menu: SimpleTranslationEntries = {
|
||||||
|
"cancel": "Cancelar",
|
||||||
|
"continue": "Continuar",
|
||||||
|
"dailyRun": "Desafio diário (Beta)",
|
||||||
|
"loadGame": "Carregar Jogo",
|
||||||
|
"newGame": "Novo Jogo",
|
||||||
|
"selectGameMode": "Escolha um modo de jogo.",
|
||||||
|
"logInOrCreateAccount": "Inicie uma sessão ou crie uma conta para começar. Não é necessário email!",
|
||||||
|
"username": "Nome de Usuário",
|
||||||
|
"password": "Senha",
|
||||||
|
"login": "Iniciar sessão",
|
||||||
|
"register": "Registrar-se",
|
||||||
|
"emptyUsername": "Nome de usuário vazio",
|
||||||
|
"invalidLoginUsername": "Nome de usuário inválido",
|
||||||
|
"invalidRegisterUsername": "O nome de usuário só pode conter letras, números e sublinhados",
|
||||||
|
"invalidLoginPassword": "Senha inválida",
|
||||||
|
"invalidRegisterPassword": "A senha deve ter pelo menos 6 caracteres",
|
||||||
|
"usernameAlreadyUsed": "Esse nome de usuário já está em uso",
|
||||||
|
"accountNonExistent": "Esse nome de usuário não existe",
|
||||||
|
"unmatchingPassword": "Senha incorreta",
|
||||||
|
"passwordNotMatchingConfirmPassword": "As senhas não coincidem",
|
||||||
|
"confirmPassword": "Confirmar senha",
|
||||||
|
"registrationAgeWarning": "Se registrando, você confirma que tem pelo menos 13 anos de idade.",
|
||||||
|
"backToLogin": "Voltar ao Login",
|
||||||
|
"failedToLoadSaveData": "Não foi possível carregar os dados de salvamento. Por favor, recarregue a página.\nSe a falha persistir, contate o administrador.",
|
||||||
|
"sessionSuccess": "Sessão carregada com sucesso.",
|
||||||
|
"failedToLoadSession": "Não foi possível carregar os dados da sua sessão.\nEles podem estar corrompidos.",
|
||||||
|
"boyOrGirl": "Você é um menino ou uma menina?",
|
||||||
|
"boy": "Menino",
|
||||||
|
"girl": "Menina",
|
||||||
|
"dailyRankings": "Classificação Diária",
|
||||||
|
"weeklyRankings": "Classificação Semanal",
|
||||||
|
"noRankings": "Sem Classificação",
|
||||||
|
"loading": "Carregando…",
|
||||||
|
"playersOnline": "Jogadores Ativos",
|
||||||
|
"empty": "Vazio",
|
||||||
|
"yes": "Sim",
|
||||||
|
"no": "Não",
|
||||||
|
} as const;
|
|
@ -0,0 +1,29 @@
|
||||||
|
import { SimpleTranslationEntries } from "#app/plugins/i18n";
|
||||||
|
|
||||||
|
export const nature: SimpleTranslationEntries = {
|
||||||
|
"Hardy": "Destemida",
|
||||||
|
"Lonely": "Solitária",
|
||||||
|
"Brave": "Valente",
|
||||||
|
"Adamant": "Rígida",
|
||||||
|
"Naughty": "Teimosa",
|
||||||
|
"Bold": "Corajosa",
|
||||||
|
"Docile": "Dócil",
|
||||||
|
"Relaxed": "Descontraída",
|
||||||
|
"Impish": "Inquieta",
|
||||||
|
"Lax": "Relaxada",
|
||||||
|
"Timid": "Tímida",
|
||||||
|
"Hasty": "Apressada",
|
||||||
|
"Serious": "Séria",
|
||||||
|
"Jolly": "Alegre",
|
||||||
|
"Naive": "Ingênua",
|
||||||
|
"Modest": "Modesta",
|
||||||
|
"Mild": "Mansa",
|
||||||
|
"Quiet": "Quieta",
|
||||||
|
"Bashful": "Atrapalhada",
|
||||||
|
"Rash": "Imprudente",
|
||||||
|
"Calm": "Calma",
|
||||||
|
"Gentle": "Gentil",
|
||||||
|
"Sassy": "Atrevida",
|
||||||
|
"Careful": "Cuidadosa",
|
||||||
|
"Quirky": "Peculiar",
|
||||||
|
} as const;
|
|
@ -0,0 +1,10 @@
|
||||||
|
import { SimpleTranslationEntries } from "#app/plugins/i18n";
|
||||||
|
|
||||||
|
export const pokeball: SimpleTranslationEntries = {
|
||||||
|
"pokeBall": "Poké Bola",
|
||||||
|
"greatBall": "Grande Bola",
|
||||||
|
"ultraBall": "Ultra Bola",
|
||||||
|
"rogueBall": "Rogue Bola",
|
||||||
|
"masterBall": "Master Bola",
|
||||||
|
"luxuryBall": "Bola de Luxo",
|
||||||
|
} as const;
|
|
@ -0,0 +1,16 @@
|
||||||
|
import { SimpleTranslationEntries } from "#app/plugins/i18n";
|
||||||
|
|
||||||
|
export const pokemonStat: SimpleTranslationEntries = {
|
||||||
|
"HP": "PS",
|
||||||
|
"HPshortened": "PS",
|
||||||
|
"ATK": "Ataque",
|
||||||
|
"ATKshortened": "Ata",
|
||||||
|
"DEF": "Defesa",
|
||||||
|
"DEFshortened": "Def",
|
||||||
|
"SPATK": "At. Esp.",
|
||||||
|
"SPATKshortened": "AtEsp",
|
||||||
|
"SPDEF": "Def. Esp.",
|
||||||
|
"SPDEFshortened": "DefEsp",
|
||||||
|
"SPD": "Veloc.",
|
||||||
|
"SPDshortened": "Veloc."
|
||||||
|
} as const;
|
|
@ -0,0 +1,35 @@
|
||||||
|
import { SimpleTranslationEntries } from "#app/plugins/i18n";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The menu namespace holds most miscellaneous text that isn't directly part of the game's
|
||||||
|
* contents or directly related to Pokemon data. This includes menu navigation, settings,
|
||||||
|
* account interactions, descriptive text, etc.
|
||||||
|
*/
|
||||||
|
export const starterSelectUiHandler: SimpleTranslationEntries = {
|
||||||
|
"confirmStartTeam": 'Começar com esses Pokémon?',
|
||||||
|
"growthRate": "Crescimento:",
|
||||||
|
"ability": "Hab.:",
|
||||||
|
"passive": "Passiva:",
|
||||||
|
"nature": "Nature:",
|
||||||
|
"eggMoves": "Mov. de Ovo",
|
||||||
|
"start": "Iniciar",
|
||||||
|
"addToParty": "Adicionar à equipe",
|
||||||
|
"toggleIVs": "Mostrar IVs",
|
||||||
|
"manageMoves": "Mudar Movimentos",
|
||||||
|
"useCandies": "Usar Doces",
|
||||||
|
"selectMoveSwapOut": "Escolha um movimento para substituir.",
|
||||||
|
"selectMoveSwapWith": "Escolha o movimento que substituirá",
|
||||||
|
"unlockPassive": "Aprender Passiva",
|
||||||
|
"reduceCost": "Reduzir Custo",
|
||||||
|
"cycleShiny": "R: Mudar Shiny",
|
||||||
|
"cycleForm": 'F: Mudar Forma',
|
||||||
|
"cycleGender": 'G: Mudar Gênero',
|
||||||
|
"cycleAbility": 'E: Mudar Habilidade',
|
||||||
|
"cycleNature": 'N: Mudar Nature',
|
||||||
|
"cycleVariant": 'V: Mudar Variante',
|
||||||
|
"enablePassive": "Ativar Passiva",
|
||||||
|
"disablePassive": "Desativar Passiva",
|
||||||
|
"locked": "Bloqueado",
|
||||||
|
"disabled": "Desativado",
|
||||||
|
"uncaught": "Não capturado"
|
||||||
|
}
|
|
@ -0,0 +1,51 @@
|
||||||
|
import { SimpleTranslationEntries } from "#app/plugins/i18n";
|
||||||
|
|
||||||
|
export const tutorial: SimpleTranslationEntries = {
|
||||||
|
"intro": `Bem-vindo ao PokéRogue! Este é um jogo Pokémon feito por fãs focado em batalhas com elementos roguelite.
|
||||||
|
$Este jogo não é monetizado e não reivindicamos propriedade de Pokémon nem dos ativos protegidos
|
||||||
|
$por direitos autorais usados.
|
||||||
|
$O jogo é um trabalho em andamento, mas é totalmente jogável.
|
||||||
|
$Para relatórios de bugs, use a comunidade no Discord.
|
||||||
|
$Se o jogo estiver rodando lentamente, certifique-se de que a 'Aceleração de hardware' esteja ativada
|
||||||
|
$nas configurações do seu navegador.`,
|
||||||
|
|
||||||
|
"accessMenu": `Para acessar o menu, aperte M ou Esc.
|
||||||
|
$O menu contém configurações e diversas funções.`,
|
||||||
|
|
||||||
|
"menu": `A partir deste menu, você pode acessar as configurações.
|
||||||
|
$Nas configurações, você pode alterar a velocidade do jogo,
|
||||||
|
$o estilo da janela, entre outras opções.
|
||||||
|
$Existem também vários outros recursos disponíveis aqui.
|
||||||
|
$Não deixe de conferir todos eles!`,
|
||||||
|
|
||||||
|
"starterSelect": `Aqui você pode escolher seus iniciais.\nEsses serão os primeiro Pokémon da sua equipe.
|
||||||
|
$Cada inicial tem seu custo. Sua equipe pode ter até 6\nmembros, desde que a soma dos custos não ultrapasse 10.
|
||||||
|
$Você pode escolher o gênero, a habilidade\ne até a forma do seu inicial.
|
||||||
|
$Essas opções dependem das variantes dessa\nespécie que você já capturou ou chocou.
|
||||||
|
$Os IVs de cada inicial são os melhores de todos os Pokémon\ndaquela espécie que você já capturou ou chocou.
|
||||||
|
$Sempre capture vários Pokémon de várias espécies!`,
|
||||||
|
|
||||||
|
"pokerus": `Todo dia, 3 Pokémon iniciais ficam com uma borda roxa.
|
||||||
|
$Caso veja um inicial que você possui com uma dessa, tente\nadicioná-lo a sua equipe. Lembre-se de olhar seu sumário!`,
|
||||||
|
|
||||||
|
"statChange": `As mudanças de atributos se mantém após a batalha desde que o Pokémon não seja trocado.
|
||||||
|
$Seus Pokémon voltam a suas Poké Bolas antes de batalhas contra treinadores e de entrar em um novo bioma.
|
||||||
|
$Para ver as mudanças de atributos dos Pokémon em campo, mantena C ou Shift pressionado durante a batalha.`,
|
||||||
|
|
||||||
|
"selectItem": `Após cada batalha, você pode escolher entre 3 itens aleatórios.
|
||||||
|
$Você pode escolher apenas um deles.
|
||||||
|
$Esses itens variam entre consumíveis, itens de segurar e itens passivos permanentes.
|
||||||
|
$A maioria dos efeitos de itens não consumíveis podem ser acumulados.
|
||||||
|
$Alguns itens só aparecerão se puderem ser usados, como os itens de evolução.
|
||||||
|
$Você também pode transferir itens de segurar entre os Pokémon utilizando a opção "Transfer".
|
||||||
|
$A opção de transferir irá aparecer no canto inferior direito assim que você obter um item de segurar.
|
||||||
|
$Você pode comprar itens consumíveis com dinheiro, e sua variedade aumentará conforme você for mais longe.
|
||||||
|
$Certifique-se de comprá-los antes de escolher seu item aleatório. Ao escolhê-lo, a próxima batalha começará.`,
|
||||||
|
|
||||||
|
"eggGacha": `Aqui você pode trocar seus vouchers\npor ovos de Pokémon.
|
||||||
|
$Ovos ficam mais próximos de chocar após cada batalha.\nOvos mais raros demoram mais para chocar.
|
||||||
|
$Pokémon chocados não serão adicionados a sua equipe,\nmas sim aos seus iniciais.
|
||||||
|
$Pokémon chocados geralmente possuem IVs melhores\nque Pokémon selvagens.
|
||||||
|
$Alguns Pokémon só podem ser obtidos através de seus ovos.
|
||||||
|
$Temos 3 máquinas, cada uma com seu bônus específico,\nentão escolha a que mais lhe convém!`,
|
||||||
|
} as const;
|
|
@ -0,0 +1,5 @@
|
||||||
|
import { SimpleTranslationEntries } from "#app/plugins/i18n";
|
||||||
|
|
||||||
|
export const abilityTriggers: SimpleTranslationEntries = {
|
||||||
|
'blockRecoilDamage' : `{{pokemonName}}'s {{abilityName}}\nprotected it from recoil!`,
|
||||||
|
} as const;
|
|
@ -475,7 +475,7 @@ export const ability: AbilityTranslationEntries = {
|
||||||
},
|
},
|
||||||
frisk: {
|
frisk: {
|
||||||
name: "察觉",
|
name: "察觉",
|
||||||
description: "出场时,可以察觉对手的持\n有物。",
|
description: "进入战斗时,神奇宝贝可以检查对方神奇宝贝的能力。",
|
||||||
},
|
},
|
||||||
reckless: {
|
reckless: {
|
||||||
name: "舍身",
|
name: "舍身",
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
import { ability } from "./ability";
|
import { ability } from "./ability";
|
||||||
|
import { abilityTriggers } from "./ability-trigger";
|
||||||
import { battle } from "./battle";
|
import { battle } from "./battle";
|
||||||
import { commandUiHandler } from "./command-ui-handler";
|
import { commandUiHandler } from "./command-ui-handler";
|
||||||
import { fightUiHandler } from "./fight-ui-handler";
|
import { fightUiHandler } from "./fight-ui-handler";
|
||||||
|
@ -15,6 +16,7 @@ import { nature } from "./nature";
|
||||||
|
|
||||||
export const zhCnConfig = {
|
export const zhCnConfig = {
|
||||||
ability: ability,
|
ability: ability,
|
||||||
|
abilityTriggers: abilityTriggers,
|
||||||
battle: battle,
|
battle: battle,
|
||||||
commandUiHandler: commandUiHandler,
|
commandUiHandler: commandUiHandler,
|
||||||
fightUiHandler: fightUiHandler,
|
fightUiHandler: fightUiHandler,
|
||||||
|
|
|
@ -2915,7 +2915,7 @@ export const move: MoveTranslationEntries = {
|
||||||
},
|
},
|
||||||
"zippyZap": {
|
"zippyZap": {
|
||||||
name: "电电加速",
|
name: "电电加速",
|
||||||
effect: "迅猛无比的电击。必定能够\n先制攻击,击中对方的要害",
|
effect: "The user attacks the target with bursts of electricity at high speed. This move always goes first and raises the user's evasiveness.",
|
||||||
},
|
},
|
||||||
"splishySplash": {
|
"splishySplash": {
|
||||||
name: "滔滔冲浪",
|
name: "滔滔冲浪",
|
||||||
|
|
|
@ -28,5 +28,8 @@ export const starterSelectUiHandler: SimpleTranslationEntries = {
|
||||||
"cycleNature": 'N: 切换性格',
|
"cycleNature": 'N: 切换性格',
|
||||||
"cycleVariant": 'V: 切换变种',
|
"cycleVariant": 'V: 切换变种',
|
||||||
"enablePassive": "启用被动",
|
"enablePassive": "启用被动",
|
||||||
"disablePassive": "禁用被动"
|
"disablePassive": "禁用被动",
|
||||||
|
"locked": "Locked",
|
||||||
|
"disabled": "Disabled",
|
||||||
|
"uncaught": "Uncaught"
|
||||||
}
|
}
|
|
@ -554,10 +554,10 @@ export class EvolutionItemModifierType extends PokemonModifierType implements Ge
|
||||||
super(Utils.toReadableString(EvolutionItem[evolutionItem]), `Causes certain Pokémon to evolve`, (_type, args) => new Modifiers.EvolutionItemModifier(this, (args[0] as PlayerPokemon).id),
|
super(Utils.toReadableString(EvolutionItem[evolutionItem]), `Causes certain Pokémon to evolve`, (_type, args) => new Modifiers.EvolutionItemModifier(this, (args[0] as PlayerPokemon).id),
|
||||||
(pokemon: PlayerPokemon) => {
|
(pokemon: PlayerPokemon) => {
|
||||||
if (pokemonEvolutions.hasOwnProperty(pokemon.species.speciesId) && pokemonEvolutions[pokemon.species.speciesId].filter(e => e.item === this.evolutionItem
|
if (pokemonEvolutions.hasOwnProperty(pokemon.species.speciesId) && pokemonEvolutions[pokemon.species.speciesId].filter(e => e.item === this.evolutionItem
|
||||||
&& (!e.condition || e.condition.predicate(pokemon))).length)
|
&& (!e.condition || e.condition.predicate(pokemon))).length && (pokemon.getFormKey() !== SpeciesFormKey.GIGANTAMAX))
|
||||||
return null;
|
return null;
|
||||||
else if (pokemon.isFusion() && pokemonEvolutions.hasOwnProperty(pokemon.fusionSpecies.speciesId) && pokemonEvolutions[pokemon.fusionSpecies.speciesId].filter(e => e.item === this.evolutionItem
|
else if (pokemon.isFusion() && pokemonEvolutions.hasOwnProperty(pokemon.fusionSpecies.speciesId) && pokemonEvolutions[pokemon.fusionSpecies.speciesId].filter(e => e.item === this.evolutionItem
|
||||||
&& (!e.condition || e.condition.predicate(pokemon))).length)
|
&& (!e.condition || e.condition.predicate(pokemon))).length && (pokemon.getFusionFormKey() !== SpeciesFormKey.GIGANTAMAX))
|
||||||
return null;
|
return null;
|
||||||
|
|
||||||
return PartyUiHandler.NoEffectMessage;
|
return PartyUiHandler.NoEffectMessage;
|
||||||
|
|
|
@ -635,6 +635,9 @@ export class PokemonBaseStatModifier extends PokemonHeldItemModifier {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Applies Specific Type item boosts (e.g., Magnet)
|
||||||
|
*/
|
||||||
export class AttackTypeBoosterModifier extends PokemonHeldItemModifier {
|
export class AttackTypeBoosterModifier extends PokemonHeldItemModifier {
|
||||||
private moveType: Type;
|
private moveType: Type;
|
||||||
private boostMultiplier: number;
|
private boostMultiplier: number;
|
||||||
|
@ -667,8 +670,15 @@ export class AttackTypeBoosterModifier extends PokemonHeldItemModifier {
|
||||||
return super.shouldApply(args) && args.length === 3 && typeof args[1] === 'number' && args[2] instanceof Utils.NumberHolder;
|
return super.shouldApply(args) && args.length === 3 && typeof args[1] === 'number' && args[2] instanceof Utils.NumberHolder;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param {Array<any>} args Array
|
||||||
|
* - Index 0: {Pokemon} Pokemon
|
||||||
|
* - Index 1: {number} Move type
|
||||||
|
* - Index 2: {Utils.NumberHolder} Move power
|
||||||
|
* @returns {boolean} Returns true if boosts have been applied to the move.
|
||||||
|
*/
|
||||||
apply(args: any[]): boolean {
|
apply(args: any[]): boolean {
|
||||||
if (args[1] === this.moveType) {
|
if (args[1] === this.moveType && (args[2] as Utils.NumberHolder).value >= 1) {
|
||||||
(args[2] as Utils.NumberHolder).value = Math.floor((args[2] as Utils.NumberHolder).value * (1 + (this.getStackCount() * this.boostMultiplier)));
|
(args[2] as Utils.NumberHolder).value = Math.floor((args[2] as Utils.NumberHolder).value * (1 + (this.getStackCount() * this.boostMultiplier)));
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,6 +9,8 @@ import { TempBattleStat } from './data/temp-battle-stat';
|
||||||
import { Nature } from './data/nature';
|
import { Nature } from './data/nature';
|
||||||
import { Type } from './data/type';
|
import { Type } from './data/type';
|
||||||
import { Stat } from './data/pokemon-stat';
|
import { Stat } from './data/pokemon-stat';
|
||||||
|
import { PokeballCounts } from './battle-scene';
|
||||||
|
import { PokeballType } from './data/pokeball';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Overrides for testing different in game situations
|
* Overrides for testing different in game situations
|
||||||
|
@ -27,6 +29,16 @@ export const STARTING_WAVE_OVERRIDE: integer = 0;
|
||||||
export const STARTING_BIOME_OVERRIDE: Biome = Biome.TOWN;
|
export const STARTING_BIOME_OVERRIDE: Biome = Biome.TOWN;
|
||||||
// default 1000
|
// default 1000
|
||||||
export const STARTING_MONEY_OVERRIDE: integer = 0;
|
export const STARTING_MONEY_OVERRIDE: integer = 0;
|
||||||
|
export const POKEBALL_OVERRIDE: { active: boolean, pokeballs: PokeballCounts } = {
|
||||||
|
active: false,
|
||||||
|
pokeballs: {
|
||||||
|
[PokeballType.POKEBALL]: 5,
|
||||||
|
[PokeballType.GREAT_BALL]: 0,
|
||||||
|
[PokeballType.ULTRA_BALL]: 0,
|
||||||
|
[PokeballType.ROGUE_BALL]: 0,
|
||||||
|
[PokeballType.MASTER_BALL]: 0,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* PLAYER OVERRIDES
|
* PLAYER OVERRIDES
|
||||||
|
@ -39,6 +51,8 @@ export const STARTING_LEVEL_OVERRIDE: integer = 0;
|
||||||
export const ABILITY_OVERRIDE: Abilities = Abilities.NONE;
|
export const ABILITY_OVERRIDE: Abilities = Abilities.NONE;
|
||||||
export const PASSIVE_ABILITY_OVERRIDE: Abilities = Abilities.NONE;
|
export const PASSIVE_ABILITY_OVERRIDE: Abilities = Abilities.NONE;
|
||||||
export const MOVESET_OVERRIDE: Array<Moves> = [];
|
export const MOVESET_OVERRIDE: Array<Moves> = [];
|
||||||
|
export const SHINY_OVERRIDE: boolean = false;
|
||||||
|
export const VARIANT_OVERRIDE: Variant = 0;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* OPPONENT / ENEMY OVERRIDES
|
* OPPONENT / ENEMY OVERRIDES
|
||||||
|
|
|
@ -775,11 +775,11 @@ export class EncounterPhase extends BattlePhase {
|
||||||
|
|
||||||
this.scene.ui.setMode(Mode.MESSAGE).then(() => {
|
this.scene.ui.setMode(Mode.MESSAGE).then(() => {
|
||||||
if (!this.loaded) {
|
if (!this.loaded) {
|
||||||
this.scene.gameData.saveSystem().then(success => {
|
this.scene.gameData.saveAll(this.scene, true).then(success => {
|
||||||
this.scene.disableMenu = false;
|
this.scene.disableMenu = false;
|
||||||
if (!success)
|
if (!success)
|
||||||
return this.scene.reset(true);
|
return this.scene.reset(true);
|
||||||
this.scene.gameData.saveSession(this.scene, true).then(() => this.doEncounter());
|
this.doEncounter();
|
||||||
});
|
});
|
||||||
} else
|
} else
|
||||||
this.doEncounter();
|
this.doEncounter();
|
||||||
|
|
|
@ -6,6 +6,7 @@ import { enConfig } from '#app/locales/en/config.js';
|
||||||
import { esConfig } from '#app/locales/es/config.js';
|
import { esConfig } from '#app/locales/es/config.js';
|
||||||
import { frConfig } from '#app/locales/fr/config.js';
|
import { frConfig } from '#app/locales/fr/config.js';
|
||||||
import { itConfig } from '#app/locales/it/config.js';
|
import { itConfig } from '#app/locales/it/config.js';
|
||||||
|
import { ptBrConfig } from '#app/locales/pt_BR/config.js';
|
||||||
import { zhCnConfig } from '#app/locales/zh_CN/config.js';
|
import { zhCnConfig } from '#app/locales/zh_CN/config.js';
|
||||||
import { koConfig } from '#app/locales/ko/config.js';
|
import { koConfig } from '#app/locales/ko/config.js';
|
||||||
|
|
||||||
|
@ -60,7 +61,7 @@ export function initI18n(): void {
|
||||||
i18next.use(LanguageDetector).init({
|
i18next.use(LanguageDetector).init({
|
||||||
lng: lang,
|
lng: lang,
|
||||||
fallbackLng: 'en',
|
fallbackLng: 'en',
|
||||||
supportedLngs: ['en', 'es', 'fr', 'it', 'de', 'zh_CN', 'ko'],
|
supportedLngs: ['en', 'es', 'fr', 'it', 'de', 'pt_BR', 'zh_CN', 'ko'],
|
||||||
debug: true,
|
debug: true,
|
||||||
interpolation: {
|
interpolation: {
|
||||||
escapeValue: false,
|
escapeValue: false,
|
||||||
|
@ -81,6 +82,9 @@ export function initI18n(): void {
|
||||||
de: {
|
de: {
|
||||||
...deConfig
|
...deConfig
|
||||||
},
|
},
|
||||||
|
pt_BR: {
|
||||||
|
...ptBrConfig
|
||||||
|
},
|
||||||
zh_CN: {
|
zh_CN: {
|
||||||
...zhCnConfig
|
...zhCnConfig
|
||||||
},
|
},
|
||||||
|
@ -98,7 +102,8 @@ declare module 'i18next' {
|
||||||
menu: SimpleTranslationEntries;
|
menu: SimpleTranslationEntries;
|
||||||
menuUiHandler: SimpleTranslationEntries;
|
menuUiHandler: SimpleTranslationEntries;
|
||||||
move: MoveTranslationEntries;
|
move: MoveTranslationEntries;
|
||||||
battle: SimpleTranslationEntries,
|
battle: SimpleTranslationEntries;
|
||||||
|
abilityTriggers: SimpleTranslationEntries;
|
||||||
ability: AbilityTranslationEntries;
|
ability: AbilityTranslationEntries;
|
||||||
pokeball: SimpleTranslationEntries;
|
pokeball: SimpleTranslationEntries;
|
||||||
pokemon: SimpleTranslationEntries;
|
pokemon: SimpleTranslationEntries;
|
||||||
|
|
|
@ -4,6 +4,7 @@ import { pokemonEvolutions, pokemonPrevolutions } from "../data/pokemon-evolutio
|
||||||
import PokemonSpecies, { allSpecies, getPokemonSpecies, noStarterFormKeys, speciesStarters } from "../data/pokemon-species";
|
import PokemonSpecies, { allSpecies, getPokemonSpecies, noStarterFormKeys, speciesStarters } from "../data/pokemon-species";
|
||||||
import { Species, defaultStarterSpecies } from "../data/enums/species";
|
import { Species, defaultStarterSpecies } from "../data/enums/species";
|
||||||
import * as Utils from "../utils";
|
import * as Utils from "../utils";
|
||||||
|
import * as Overrides from '../overrides';
|
||||||
import PokemonData from "./pokemon-data";
|
import PokemonData from "./pokemon-data";
|
||||||
import PersistentModifierData from "./modifier-data";
|
import PersistentModifierData from "./modifier-data";
|
||||||
import ArenaData from "./arena-data";
|
import ArenaData from "./arena-data";
|
||||||
|
@ -250,10 +251,8 @@ export class GameData {
|
||||||
this.initStarterData();
|
this.initStarterData();
|
||||||
}
|
}
|
||||||
|
|
||||||
public saveSystem(): Promise<boolean> {
|
public getSystemSaveData(): SystemSaveData {
|
||||||
return new Promise<boolean>(resolve => {
|
return {
|
||||||
this.scene.ui.savingIcon.show();
|
|
||||||
const data: SystemSaveData = {
|
|
||||||
trainerId: this.trainerId,
|
trainerId: this.trainerId,
|
||||||
secretId: this.secretId,
|
secretId: this.secretId,
|
||||||
gender: this.gender,
|
gender: this.gender,
|
||||||
|
@ -268,6 +267,12 @@ export class GameData {
|
||||||
gameVersion: this.scene.game.config.gameVersion,
|
gameVersion: this.scene.game.config.gameVersion,
|
||||||
timestamp: new Date().getTime()
|
timestamp: new Date().getTime()
|
||||||
};
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
public saveSystem(): Promise<boolean> {
|
||||||
|
return new Promise<boolean>(resolve => {
|
||||||
|
this.scene.ui.savingIcon.show();
|
||||||
|
const data = this.getSystemSaveData();
|
||||||
|
|
||||||
const maxIntAttrValue = Math.pow(2, 31);
|
const maxIntAttrValue = Math.pow(2, 31);
|
||||||
const systemData = JSON.stringify(data, (k: any, v: any) => typeof v === 'bigint' ? v <= maxIntAttrValue ? Number(v) : v.toString() : v);
|
const systemData = JSON.stringify(data, (k: any, v: any) => typeof v === 'bigint' ? v <= maxIntAttrValue ? Number(v) : v.toString() : v);
|
||||||
|
@ -651,6 +656,9 @@ export class GameData {
|
||||||
Object.keys(scene.pokeballCounts).forEach((key: string) => {
|
Object.keys(scene.pokeballCounts).forEach((key: string) => {
|
||||||
scene.pokeballCounts[key] = sessionData.pokeballCounts[key] || 0;
|
scene.pokeballCounts[key] = sessionData.pokeballCounts[key] || 0;
|
||||||
});
|
});
|
||||||
|
if (Overrides.POKEBALL_OVERRIDE.active) {
|
||||||
|
scene.pokeballCounts = Overrides.POKEBALL_OVERRIDE.pokeballs;
|
||||||
|
}
|
||||||
|
|
||||||
scene.money = sessionData.money || 0;
|
scene.money = sessionData.money || 0;
|
||||||
scene.updateMoneyText();
|
scene.updateMoneyText();
|
||||||
|
@ -817,6 +825,59 @@ export class GameData {
|
||||||
}) as SessionSaveData;
|
}) as SessionSaveData;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
saveAll(scene: BattleScene, skipVerification?: boolean): Promise<boolean> {
|
||||||
|
return new Promise<boolean>(resolve => {
|
||||||
|
Utils.executeIf(!skipVerification, updateUserInfo).then(success => {
|
||||||
|
if (success !== null && !success)
|
||||||
|
return resolve(false);
|
||||||
|
this.scene.ui.savingIcon.show();
|
||||||
|
const data = this.getSystemSaveData();
|
||||||
|
const sessionData = this.getSessionSaveData(scene);
|
||||||
|
|
||||||
|
const maxIntAttrValue = Math.pow(2, 31);
|
||||||
|
const systemData = this.getSystemSaveData();
|
||||||
|
|
||||||
|
const request = {
|
||||||
|
system: systemData,
|
||||||
|
session: sessionData,
|
||||||
|
sessionSlotId: scene.sessionSlotId
|
||||||
|
};
|
||||||
|
|
||||||
|
if (!bypassLogin) {
|
||||||
|
Utils.apiPost('savedata/updateall', JSON.stringify(request, (k: any, v: any) => typeof v === 'bigint' ? v <= maxIntAttrValue ? Number(v) : v.toString() : v), undefined, true)
|
||||||
|
.then(response => response.text())
|
||||||
|
.then(error => {
|
||||||
|
this.scene.ui.savingIcon.hide();
|
||||||
|
if (error) {
|
||||||
|
if (error.startsWith('client version out of date')) {
|
||||||
|
this.scene.clearPhaseQueue();
|
||||||
|
this.scene.unshiftPhase(new OutdatedPhase(this.scene));
|
||||||
|
} else if (error.startsWith('session out of date')) {
|
||||||
|
this.scene.clearPhaseQueue();
|
||||||
|
this.scene.unshiftPhase(new ReloadSessionPhase(this.scene));
|
||||||
|
}
|
||||||
|
console.error(error);
|
||||||
|
return resolve(false);
|
||||||
|
}
|
||||||
|
resolve(true);
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
localStorage.setItem('data_bak', localStorage.getItem('data'));
|
||||||
|
|
||||||
|
localStorage.setItem('data', btoa(JSON.stringify(systemData, (k: any, v: any) => typeof v === 'bigint' ? v <= maxIntAttrValue ? Number(v) : v.toString() : v)));
|
||||||
|
|
||||||
|
localStorage.setItem(`sessionData${scene.sessionSlotId ? scene.sessionSlotId : ''}`, btoa(JSON.stringify(sessionData)));
|
||||||
|
|
||||||
|
console.debug('Session data saved');
|
||||||
|
|
||||||
|
this.scene.ui.savingIcon.hide();
|
||||||
|
|
||||||
|
resolve(true);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
public tryExportData(dataType: GameDataType, slotId: integer = 0): Promise<boolean> {
|
public tryExportData(dataType: GameDataType, slotId: integer = 0): Promise<boolean> {
|
||||||
return new Promise<boolean>(resolve => {
|
return new Promise<boolean>(resolve => {
|
||||||
const dataKey: string = getDataTypeKey(dataType, slotId);
|
const dataKey: string = getDataTypeKey(dataType, slotId);
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
|
import SettingsUiHandler from "#app/ui/settings-ui-handler";
|
||||||
|
import { Mode } from "#app/ui/ui";
|
||||||
import i18next from "i18next";
|
import i18next from "i18next";
|
||||||
import BattleScene from "../battle-scene";
|
import BattleScene from "../battle-scene";
|
||||||
import { hasTouchscreen } from "../touch-controls";
|
import { hasTouchscreen } from "../touch-controls";
|
||||||
import { updateWindowType } from "../ui/ui-theme";
|
import { updateWindowType } from "../ui/ui-theme";
|
||||||
import { PlayerGender } from "./game-data";
|
import { PlayerGender } from "./game-data";
|
||||||
import { Mode } from "#app/ui/ui";
|
|
||||||
import SettingsUiHandler from "#app/ui/settings-ui-handler";
|
|
||||||
|
|
||||||
export enum Setting {
|
export enum Setting {
|
||||||
Game_Speed = "GAME_SPEED",
|
Game_Speed = "GAME_SPEED",
|
||||||
|
@ -40,28 +40,28 @@ export interface SettingDefaults {
|
||||||
}
|
}
|
||||||
|
|
||||||
export const settingOptions: SettingOptions = {
|
export const settingOptions: SettingOptions = {
|
||||||
[Setting.Game_Speed]: [ '1x', '1.25x', '1.5x', '2x', '2.5x', '3x', '4x', '5x' ],
|
[Setting.Game_Speed]: ['1x', '1.25x', '1.5x', '2x', '2.5x', '3x', '4x', '5x'],
|
||||||
[Setting.Master_Volume]: new Array(11).fill(null).map((_, i) => i ? (i * 10).toString() : 'Mute'),
|
[Setting.Master_Volume]: new Array(11).fill(null).map((_, i) => i ? (i * 10).toString() : 'Mute'),
|
||||||
[Setting.BGM_Volume]: new Array(11).fill(null).map((_, i) => i ? (i * 10).toString() : 'Mute'),
|
[Setting.BGM_Volume]: new Array(11).fill(null).map((_, i) => i ? (i * 10).toString() : 'Mute'),
|
||||||
[Setting.SE_Volume]: new Array(11).fill(null).map((_, i) => i ? (i * 10).toString() : 'Mute'),
|
[Setting.SE_Volume]: new Array(11).fill(null).map((_, i) => i ? (i * 10).toString() : 'Mute'),
|
||||||
[Setting.Language]: [ 'English', 'Change' ],
|
[Setting.Language]: ['English', 'Change'],
|
||||||
[Setting.Damage_Numbers]: [ 'Off', 'Simple', 'Fancy' ],
|
[Setting.Damage_Numbers]: ['Off', 'Simple', 'Fancy'],
|
||||||
[Setting.UI_Theme]: [ 'Default', 'Legacy' ],
|
[Setting.UI_Theme]: ['Default', 'Legacy'],
|
||||||
[Setting.Window_Type]: new Array(5).fill(null).map((_, i) => (i + 1).toString()),
|
[Setting.Window_Type]: new Array(5).fill(null).map((_, i) => (i + 1).toString()),
|
||||||
[Setting.Tutorials]: [ 'Off', 'On' ],
|
[Setting.Tutorials]: ['Off', 'On'],
|
||||||
[Setting.Enable_Retries]: [ 'Off', 'On' ],
|
[Setting.Enable_Retries]: ['Off', 'On'],
|
||||||
[Setting.Sprite_Set]: [ 'Consistent', 'Mixed Animated' ],
|
[Setting.Sprite_Set]: ['Consistent', 'Mixed Animated'],
|
||||||
[Setting.Move_Animations]: [ 'Off', 'On' ],
|
[Setting.Move_Animations]: ['Off', 'On'],
|
||||||
[Setting.Show_Stats_on_Level_Up]: [ 'Off', 'On' ],
|
[Setting.Show_Stats_on_Level_Up]: ['Off', 'On'],
|
||||||
[Setting.EXP_Gains_Speed]: [ 'Normal', 'Fast', 'Faster', 'Skip' ],
|
[Setting.EXP_Gains_Speed]: ['Normal', 'Fast', 'Faster', 'Skip'],
|
||||||
[Setting.EXP_Party_Display]: [ 'Normal', 'Level Up Notification', 'Skip' ],
|
[Setting.EXP_Party_Display]: ['Normal', 'Level Up Notification', 'Skip'],
|
||||||
[Setting.HP_Bar_Speed]: [ 'Normal', 'Fast', 'Faster', 'Instant' ],
|
[Setting.HP_Bar_Speed]: ['Normal', 'Fast', 'Faster', 'Instant'],
|
||||||
[Setting.Fusion_Palette_Swaps]: [ 'Off', 'On' ],
|
[Setting.Fusion_Palette_Swaps]: ['Off', 'On'],
|
||||||
[Setting.Player_Gender]: [ 'Boy', 'Girl' ],
|
[Setting.Player_Gender]: ['Boy', 'Girl'],
|
||||||
[Setting.Gamepad_Support]: [ 'Auto', 'Disabled' ],
|
[Setting.Gamepad_Support]: ['Auto', 'Disabled'],
|
||||||
[Setting.Swap_A_and_B]: [ 'Enabled', 'Disabled' ],
|
[Setting.Swap_A_and_B]: ['Enabled', 'Disabled'],
|
||||||
[Setting.Touch_Controls]: [ 'Auto', 'Disabled' ],
|
[Setting.Touch_Controls]: ['Auto', 'Disabled'],
|
||||||
[Setting.Vibration]: [ 'Auto', 'Disabled' ]
|
[Setting.Vibration]: ['Auto', 'Disabled']
|
||||||
};
|
};
|
||||||
|
|
||||||
export const settingDefaults: SettingDefaults = {
|
export const settingDefaults: SettingDefaults = {
|
||||||
|
@ -89,7 +89,7 @@ export const settingDefaults: SettingDefaults = {
|
||||||
[Setting.Vibration]: 0
|
[Setting.Vibration]: 0
|
||||||
};
|
};
|
||||||
|
|
||||||
export const reloadSettings: Setting[] = [ Setting.UI_Theme, Setting.Language, Setting.Sprite_Set ];
|
export const reloadSettings: Setting[] = [Setting.UI_Theme, Setting.Language, Setting.Sprite_Set];
|
||||||
|
|
||||||
export function setSetting(scene: BattleScene, setting: Setting, value: integer): boolean {
|
export function setSetting(scene: BattleScene, setting: Setting, value: integer): boolean {
|
||||||
switch (setting) {
|
switch (setting) {
|
||||||
|
@ -206,6 +206,10 @@ export function setSetting(scene: BattleScene, setting: Setting, value: integer)
|
||||||
label: 'Deutsch',
|
label: 'Deutsch',
|
||||||
handler: () => changeLocaleHandler('de')
|
handler: () => changeLocaleHandler('de')
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
label: 'Português (BR)',
|
||||||
|
handler: () => changeLocaleHandler('pt_BR')
|
||||||
|
},
|
||||||
{
|
{
|
||||||
label: '简体中文',
|
label: '简体中文',
|
||||||
handler: () => changeLocaleHandler('zh_CN')
|
handler: () => changeLocaleHandler('zh_CN')
|
||||||
|
@ -218,7 +222,8 @@ export function setSetting(scene: BattleScene, setting: Setting, value: integer)
|
||||||
label: 'Cancel',
|
label: 'Cancel',
|
||||||
handler: () => cancelHandler()
|
handler: () => cancelHandler()
|
||||||
}
|
}
|
||||||
]
|
],
|
||||||
|
maxOptions: 7
|
||||||
});
|
});
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,34 +1,34 @@
|
||||||
import BattleScene, { starterColors } from "../battle-scene";
|
|
||||||
import PokemonSpecies, { allSpecies, getPokemonSpecies, getPokemonSpeciesForm, speciesStarters, starterPassiveAbilities, getStarterValueFriendshipCap } from "../data/pokemon-species";
|
|
||||||
import { Species } from "../data/enums/species";
|
|
||||||
import { TextStyle, addBBCodeTextObject, addTextObject } from "./text";
|
|
||||||
import { Mode } from "./ui";
|
|
||||||
import MessageUiHandler from "./message-ui-handler";
|
|
||||||
import { Gender, getGenderColor, getGenderSymbol } from "../data/gender";
|
|
||||||
import { allAbilities } from "../data/ability";
|
|
||||||
import { GameModes, gameModes } from "../game-mode";
|
|
||||||
import { GrowthRate, getGrowthRateColor } from "../data/exp";
|
|
||||||
import { AbilityAttr, DexAttr, DexAttrProps, DexEntry, Passive as PassiveAttr, StarterFormMoveData, StarterMoveset } from "../system/game-data";
|
|
||||||
import * as Utils from "../utils";
|
|
||||||
import PokemonIconAnimHandler, { PokemonIconAnimMode } from "./pokemon-icon-anim-handler";
|
|
||||||
import { StatsContainer } from "./stats-container";
|
|
||||||
import { addWindow } from "./ui-theme";
|
|
||||||
import { Nature, getNatureName } from "../data/nature";
|
|
||||||
import BBCodeText from "phaser3-rex-plugins/plugins/bbcodetext";
|
|
||||||
import { pokemonFormChanges } from "../data/pokemon-forms";
|
|
||||||
import { Tutorial, handleTutorial } from "../tutorial";
|
|
||||||
import { LevelMoves, pokemonFormLevelMoves, pokemonSpeciesLevelMoves } from "../data/pokemon-level-moves";
|
|
||||||
import { allMoves } from "../data/move";
|
|
||||||
import { Type } from "../data/type";
|
|
||||||
import { Moves } from "../data/enums/moves";
|
|
||||||
import { speciesEggMoves } from "../data/egg-moves";
|
|
||||||
import { TitlePhase } from "../phases";
|
|
||||||
import { argbFromRgba } from "@material/material-color-utilities";
|
|
||||||
import { OptionSelectItem } from "./abstact-option-select-ui-handler";
|
|
||||||
import { pokemonPrevolutions } from "#app/data/pokemon-evolutions";
|
import { pokemonPrevolutions } from "#app/data/pokemon-evolutions";
|
||||||
import { Variant, getVariantTint } from "#app/data/variant";
|
import { Variant, getVariantTint } from "#app/data/variant";
|
||||||
|
import { argbFromRgba } from "@material/material-color-utilities";
|
||||||
import i18next from "i18next";
|
import i18next from "i18next";
|
||||||
import {Button} from "../enums/buttons";
|
import BBCodeText from "phaser3-rex-plugins/plugins/bbcodetext";
|
||||||
|
import BattleScene, { starterColors } from "../battle-scene";
|
||||||
|
import { allAbilities } from "../data/ability";
|
||||||
|
import { speciesEggMoves } from "../data/egg-moves";
|
||||||
|
import { Moves } from "../data/enums/moves";
|
||||||
|
import { Species } from "../data/enums/species";
|
||||||
|
import { GrowthRate, getGrowthRateColor } from "../data/exp";
|
||||||
|
import { Gender, getGenderColor, getGenderSymbol } from "../data/gender";
|
||||||
|
import { allMoves } from "../data/move";
|
||||||
|
import { Nature, getNatureName } from "../data/nature";
|
||||||
|
import { pokemonFormChanges } from "../data/pokemon-forms";
|
||||||
|
import { LevelMoves, pokemonFormLevelMoves, pokemonSpeciesLevelMoves } from "../data/pokemon-level-moves";
|
||||||
|
import PokemonSpecies, { allSpecies, getPokemonSpecies, getPokemonSpeciesForm, getStarterValueFriendshipCap, speciesStarters, starterPassiveAbilities } from "../data/pokemon-species";
|
||||||
|
import { Type } from "../data/type";
|
||||||
|
import { Button } from "../enums/buttons";
|
||||||
|
import { GameModes, gameModes } from "../game-mode";
|
||||||
|
import { TitlePhase } from "../phases";
|
||||||
|
import { AbilityAttr, DexAttr, DexAttrProps, DexEntry, Passive as PassiveAttr, StarterFormMoveData, StarterMoveset } from "../system/game-data";
|
||||||
|
import { Tutorial, handleTutorial } from "../tutorial";
|
||||||
|
import * as Utils from "../utils";
|
||||||
|
import { OptionSelectItem } from "./abstact-option-select-ui-handler";
|
||||||
|
import MessageUiHandler from "./message-ui-handler";
|
||||||
|
import PokemonIconAnimHandler, { PokemonIconAnimMode } from "./pokemon-icon-anim-handler";
|
||||||
|
import { StatsContainer } from "./stats-container";
|
||||||
|
import { TextStyle, addBBCodeTextObject, addTextObject } from "./text";
|
||||||
|
import { Mode } from "./ui";
|
||||||
|
import { addWindow } from "./ui-theme";
|
||||||
|
|
||||||
export type StarterSelectCallback = (starters: Starter[]) => void;
|
export type StarterSelectCallback = (starters: Starter[]) => void;
|
||||||
|
|
||||||
|
@ -241,7 +241,7 @@ export default class StarterSelectUiHandler extends MessageUiHandler {
|
||||||
this.pokemonGenderText.setOrigin(0, 0);
|
this.pokemonGenderText.setOrigin(0, 0);
|
||||||
this.starterSelectContainer.add(this.pokemonGenderText);
|
this.starterSelectContainer.add(this.pokemonGenderText);
|
||||||
|
|
||||||
this.pokemonUncaughtText = addTextObject(this.scene, 6, 127, 'Uncaught', TextStyle.SUMMARY_ALT, { fontSize: '56px' });
|
this.pokemonUncaughtText = addTextObject(this.scene, 6, 127, i18next.t("starterSelectUiHandler:uncaught"), TextStyle.SUMMARY_ALT, { fontSize: '56px' });
|
||||||
this.pokemonUncaughtText.setOrigin(0, 0);
|
this.pokemonUncaughtText.setOrigin(0, 0);
|
||||||
this.starterSelectContainer.add(this.pokemonUncaughtText);
|
this.starterSelectContainer.add(this.pokemonUncaughtText);
|
||||||
|
|
||||||
|
@ -357,6 +357,7 @@ export default class StarterSelectUiHandler extends MessageUiHandler {
|
||||||
icon.setScale(0.5);
|
icon.setScale(0.5);
|
||||||
icon.setOrigin(0, 0);
|
icon.setOrigin(0, 0);
|
||||||
icon.setFrame(species.getIconId(defaultProps.female, defaultProps.formIndex, defaultProps.shiny, defaultProps.variant));
|
icon.setFrame(species.getIconId(defaultProps.female, defaultProps.formIndex, defaultProps.shiny, defaultProps.variant));
|
||||||
|
this.checkIconId(icon, species, defaultProps.female, defaultProps.formIndex, defaultProps.shiny, defaultProps.variant);
|
||||||
icon.setTint(0);
|
icon.setTint(0);
|
||||||
this.starterSelectGenIconContainers[g].add(icon);
|
this.starterSelectGenIconContainers[g].add(icon);
|
||||||
this.iconAnimHandler.addOrUpdate(icon, PokemonIconAnimMode.NONE);
|
this.iconAnimHandler.addOrUpdate(icon, PokemonIconAnimMode.NONE);
|
||||||
|
@ -551,7 +552,35 @@ export default class StarterSelectUiHandler extends MessageUiHandler {
|
||||||
|
|
||||||
this.starterSelectContainer.add(this.pokemonEggMovesContainer);
|
this.starterSelectContainer.add(this.pokemonEggMovesContainer);
|
||||||
|
|
||||||
this.instructionsText = addTextObject(this.scene, 4, 156, '', TextStyle.PARTY, { fontSize: '42px' });
|
|
||||||
|
|
||||||
|
let instructionTextSize = '42px';
|
||||||
|
// The font size should be set per language
|
||||||
|
const currentLanguage = i18next.language;
|
||||||
|
switch (currentLanguage) {
|
||||||
|
case 'en':
|
||||||
|
instructionTextSize = '42px';
|
||||||
|
break;
|
||||||
|
case 'es':
|
||||||
|
instructionTextSize = '35px';
|
||||||
|
break;
|
||||||
|
case 'fr':
|
||||||
|
instructionTextSize = '42px';
|
||||||
|
break;
|
||||||
|
case 'de':
|
||||||
|
instructionTextSize = '35px';
|
||||||
|
break;
|
||||||
|
case 'it':
|
||||||
|
instructionTextSize = '38px';
|
||||||
|
break;
|
||||||
|
case 'zh_CN':
|
||||||
|
instructionTextSize = '42px';
|
||||||
|
break;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
this.instructionsText = addTextObject(this.scene, 4, 156, '', TextStyle.PARTY, { fontSize: instructionTextSize });
|
||||||
this.starterSelectContainer.add(this.instructionsText);
|
this.starterSelectContainer.add(this.instructionsText);
|
||||||
|
|
||||||
this.starterSelectMessageBoxContainer = this.scene.add.container(0, this.scene.game.canvas.height / 6);
|
this.starterSelectMessageBoxContainer = this.scene.add.container(0, this.scene.game.canvas.height / 6);
|
||||||
|
@ -764,6 +793,7 @@ export default class StarterSelectUiHandler extends MessageUiHandler {
|
||||||
const props = this.scene.gameData.getSpeciesDexAttrProps(species, this.dexAttrCursor);
|
const props = this.scene.gameData.getSpeciesDexAttrProps(species, this.dexAttrCursor);
|
||||||
this.starterIcons[this.starterCursors.length].setTexture(species.getIconAtlasKey(props.formIndex, props.shiny, props.variant));
|
this.starterIcons[this.starterCursors.length].setTexture(species.getIconAtlasKey(props.formIndex, props.shiny, props.variant));
|
||||||
this.starterIcons[this.starterCursors.length].setFrame(species.getIconId(props.female, props.formIndex, props.shiny, props.variant));
|
this.starterIcons[this.starterCursors.length].setFrame(species.getIconId(props.female, props.formIndex, props.shiny, props.variant));
|
||||||
|
this.checkIconId(this.starterIcons[this.starterCursors.length], species, props.female, props.formIndex, props.shiny, props.variant);
|
||||||
this.starterGens.push(this.getGenCursorWithScroll());
|
this.starterGens.push(this.getGenCursorWithScroll());
|
||||||
this.starterCursors.push(this.cursor);
|
this.starterCursors.push(this.cursor);
|
||||||
this.starterAttr.push(this.dexAttrCursor);
|
this.starterAttr.push(this.dexAttrCursor);
|
||||||
|
@ -1137,6 +1167,8 @@ export default class StarterSelectUiHandler extends MessageUiHandler {
|
||||||
cycleInstructionLines[0] += ' | ' + cycleInstructionLines.splice(1, 1);
|
cycleInstructionLines[0] += ' | ' + cycleInstructionLines.splice(1, 1);
|
||||||
if (cycleInstructionLines.length > 2)
|
if (cycleInstructionLines.length > 2)
|
||||||
cycleInstructionLines[1] += ' | ' + cycleInstructionLines.splice(2, 1);
|
cycleInstructionLines[1] += ' | ' + cycleInstructionLines.splice(2, 1);
|
||||||
|
if (cycleInstructionLines.length > 2)
|
||||||
|
cycleInstructionLines[2] += ' | ' + cycleInstructionLines.splice(3, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
for (let cil of cycleInstructionLines)
|
for (let cil of cycleInstructionLines)
|
||||||
|
@ -1276,6 +1308,7 @@ export default class StarterSelectUiHandler extends MessageUiHandler {
|
||||||
const props = this.scene.gameData.getSpeciesDexAttrProps(this.lastSpecies, dexAttr);
|
const props = this.scene.gameData.getSpeciesDexAttrProps(this.lastSpecies, dexAttr);
|
||||||
const lastSpeciesIcon = (this.starterSelectGenIconContainers[this.lastSpecies.generation - 1].getAt(this.genSpecies[this.lastSpecies.generation - 1].indexOf(this.lastSpecies)) as Phaser.GameObjects.Sprite);
|
const lastSpeciesIcon = (this.starterSelectGenIconContainers[this.lastSpecies.generation - 1].getAt(this.genSpecies[this.lastSpecies.generation - 1].indexOf(this.lastSpecies)) as Phaser.GameObjects.Sprite);
|
||||||
lastSpeciesIcon.setTexture(this.lastSpecies.getIconAtlasKey(props.formIndex, props.shiny, props.variant), this.lastSpecies.getIconId(props.female, props.formIndex, props.shiny, props.variant));
|
lastSpeciesIcon.setTexture(this.lastSpecies.getIconAtlasKey(props.formIndex, props.shiny, props.variant), this.lastSpecies.getIconId(props.female, props.formIndex, props.shiny, props.variant));
|
||||||
|
this.checkIconId(lastSpeciesIcon, this.lastSpecies, props.female, props.formIndex, props.shiny, props.variant);
|
||||||
this.iconAnimHandler.addOrUpdate(lastSpeciesIcon, PokemonIconAnimMode.NONE);
|
this.iconAnimHandler.addOrUpdate(lastSpeciesIcon, PokemonIconAnimMode.NONE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1518,7 +1551,7 @@ export default class StarterSelectUiHandler extends MessageUiHandler {
|
||||||
|
|
||||||
(this.starterSelectGenIconContainers[this.getGenCursorWithScroll()].getAt(this.cursor) as Phaser.GameObjects.Sprite)
|
(this.starterSelectGenIconContainers[this.getGenCursorWithScroll()].getAt(this.cursor) as Phaser.GameObjects.Sprite)
|
||||||
.setTexture(species.getIconAtlasKey(formIndex, shiny, variant), species.getIconId(female, formIndex, shiny, variant));
|
.setTexture(species.getIconAtlasKey(formIndex, shiny, variant), species.getIconId(female, formIndex, shiny, variant));
|
||||||
|
this.checkIconId((this.starterSelectGenIconContainers[this.getGenCursorWithScroll()].getAt(this.cursor) as Phaser.GameObjects.Sprite), species, female, formIndex, shiny, variant);
|
||||||
this.canCycleShiny = !!(dexEntry.caughtAttr & DexAttr.NON_SHINY && dexEntry.caughtAttr & DexAttr.SHINY);
|
this.canCycleShiny = !!(dexEntry.caughtAttr & DexAttr.NON_SHINY && dexEntry.caughtAttr & DexAttr.SHINY);
|
||||||
this.canCycleGender = !!(dexEntry.caughtAttr & DexAttr.MALE && dexEntry.caughtAttr & DexAttr.FEMALE);
|
this.canCycleGender = !!(dexEntry.caughtAttr & DexAttr.MALE && dexEntry.caughtAttr & DexAttr.FEMALE);
|
||||||
this.canCycleAbility = [ abilityAttr & AbilityAttr.ABILITY_1, (abilityAttr & AbilityAttr.ABILITY_2) && species.ability2, abilityAttr & AbilityAttr.ABILITY_HIDDEN ].filter(a => a).length > 1;
|
this.canCycleAbility = [ abilityAttr & AbilityAttr.ABILITY_1, (abilityAttr & AbilityAttr.ABILITY_2) && species.ability2, abilityAttr & AbilityAttr.ABILITY_HIDDEN ].filter(a => a).length > 1;
|
||||||
|
@ -1545,7 +1578,7 @@ export default class StarterSelectUiHandler extends MessageUiHandler {
|
||||||
this.pokemonAbilityText.setShadowColor(this.getTextColor(!isHidden ? TextStyle.SUMMARY_ALT : TextStyle.SUMMARY_GOLD, true));
|
this.pokemonAbilityText.setShadowColor(this.getTextColor(!isHidden ? TextStyle.SUMMARY_ALT : TextStyle.SUMMARY_GOLD, true));
|
||||||
|
|
||||||
const passiveAttr = this.scene.gameData.starterData[species.speciesId].passiveAttr;
|
const passiveAttr = this.scene.gameData.starterData[species.speciesId].passiveAttr;
|
||||||
this.pokemonPassiveText.setText(passiveAttr & PassiveAttr.UNLOCKED ? passiveAttr & PassiveAttr.ENABLED ? allAbilities[starterPassiveAbilities[this.lastSpecies.speciesId]].name : 'Disabled' : 'Locked');
|
this.pokemonPassiveText.setText(passiveAttr & PassiveAttr.UNLOCKED ? passiveAttr & PassiveAttr.ENABLED ? allAbilities[starterPassiveAbilities[this.lastSpecies.speciesId]].name : i18next.t("starterSelectUiHandler:disabled") : i18next.t("starterSelectUiHandler:locked"));
|
||||||
this.pokemonPassiveText.setColor(this.getTextColor(passiveAttr === (PassiveAttr.UNLOCKED | PassiveAttr.ENABLED) ? TextStyle.SUMMARY_ALT : TextStyle.SUMMARY_GRAY));
|
this.pokemonPassiveText.setColor(this.getTextColor(passiveAttr === (PassiveAttr.UNLOCKED | PassiveAttr.ENABLED) ? TextStyle.SUMMARY_ALT : TextStyle.SUMMARY_GRAY));
|
||||||
this.pokemonPassiveText.setShadowColor(this.getTextColor(passiveAttr === (PassiveAttr.UNLOCKED | PassiveAttr.ENABLED) ? TextStyle.SUMMARY_ALT : TextStyle.SUMMARY_GRAY, true));
|
this.pokemonPassiveText.setShadowColor(this.getTextColor(passiveAttr === (PassiveAttr.UNLOCKED | PassiveAttr.ENABLED) ? TextStyle.SUMMARY_ALT : TextStyle.SUMMARY_GRAY, true));
|
||||||
|
|
||||||
|
@ -1792,4 +1825,12 @@ export default class StarterSelectUiHandler extends MessageUiHandler {
|
||||||
if (this.statsMode)
|
if (this.statsMode)
|
||||||
this.toggleStatsMode(false);
|
this.toggleStatsMode(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
checkIconId(icon: Phaser.GameObjects.Sprite, species: PokemonSpecies, female, formIndex, shiny, variant) {
|
||||||
|
if (icon.frame.name != species.getIconId(female, formIndex, shiny, variant)) {
|
||||||
|
console.log(`${species.name}'s variant icon does not exist. Replacing with default.`);
|
||||||
|
icon.setTexture(species.getIconAtlasKey(formIndex, false, variant));
|
||||||
|
icon.setFrame(species.getIconId(female, formIndex, false, variant));
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
|
@ -20,6 +20,7 @@ import { loggedInUser } from "../account";
|
||||||
import { PlayerGender } from "../system/game-data";
|
import { PlayerGender } from "../system/game-data";
|
||||||
import { Variant, getVariantTint } from "#app/data/variant";
|
import { Variant, getVariantTint } from "#app/data/variant";
|
||||||
import {Button} from "../enums/buttons";
|
import {Button} from "../enums/buttons";
|
||||||
|
import { Ability } from "../data/ability.js";
|
||||||
|
|
||||||
enum Page {
|
enum Page {
|
||||||
PROFILE,
|
PROFILE,
|
||||||
|
@ -32,6 +33,18 @@ export enum SummaryUiMode {
|
||||||
LEARN_MOVE
|
LEARN_MOVE
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** Holds all objects related to an ability for each iteration */
|
||||||
|
interface abilityContainer {
|
||||||
|
/** An image displaying the summary label */
|
||||||
|
labelImage: Phaser.GameObjects.Image,
|
||||||
|
/** The ability object */
|
||||||
|
ability: Ability,
|
||||||
|
/** The text object displaying the name of the ability */
|
||||||
|
nameText: Phaser.GameObjects.Text,
|
||||||
|
/** The text object displaying the description of the ability */
|
||||||
|
descriptionText: Phaser.GameObjects.Text,
|
||||||
|
}
|
||||||
|
|
||||||
export default class SummaryUiHandler extends UiHandler {
|
export default class SummaryUiHandler extends UiHandler {
|
||||||
private summaryUiMode: SummaryUiMode;
|
private summaryUiMode: SummaryUiMode;
|
||||||
|
|
||||||
|
@ -54,6 +67,12 @@ export default class SummaryUiHandler extends UiHandler {
|
||||||
private championRibbon: Phaser.GameObjects.Image;
|
private championRibbon: Phaser.GameObjects.Image;
|
||||||
private statusContainer: Phaser.GameObjects.Container;
|
private statusContainer: Phaser.GameObjects.Container;
|
||||||
private status: Phaser.GameObjects.Image;
|
private status: Phaser.GameObjects.Image;
|
||||||
|
/** The pixel button prompt indicating a passive is unlocked */
|
||||||
|
private abilityPrompt: Phaser.GameObjects.Image;
|
||||||
|
/** Object holding everything needed to display an ability */
|
||||||
|
private abilityContainer: abilityContainer;
|
||||||
|
/** Object holding everything needed to display a passive */
|
||||||
|
private passiveContainer: abilityContainer;
|
||||||
private summaryPageContainer: Phaser.GameObjects.Container;
|
private summaryPageContainer: Phaser.GameObjects.Container;
|
||||||
private movesContainer: Phaser.GameObjects.Container;
|
private movesContainer: Phaser.GameObjects.Container;
|
||||||
private moveDescriptionText: Phaser.GameObjects.Text;
|
private moveDescriptionText: Phaser.GameObjects.Text;
|
||||||
|
@ -441,6 +460,17 @@ export default class SummaryUiHandler extends UiHandler {
|
||||||
this.showMoveSelect();
|
this.showMoveSelect();
|
||||||
success = true;
|
success = true;
|
||||||
}
|
}
|
||||||
|
// if we're on the PROFILE page and this pokemon has a passive unlocked..
|
||||||
|
else if (this.cursor === Page.PROFILE && this.pokemon.hasPassive()) {
|
||||||
|
// Since abilities are displayed by default, all we need to do is toggle visibility on all elements to show passives
|
||||||
|
this.abilityContainer.nameText.setVisible(!this.abilityContainer.descriptionText.visible);
|
||||||
|
this.abilityContainer.descriptionText.setVisible(!this.abilityContainer.descriptionText.visible);
|
||||||
|
this.abilityContainer.labelImage.setVisible(!this.abilityContainer.labelImage.visible);
|
||||||
|
|
||||||
|
this.passiveContainer.nameText.setVisible(!this.passiveContainer.descriptionText.visible);
|
||||||
|
this.passiveContainer.descriptionText.setVisible(!this.passiveContainer.descriptionText.visible);
|
||||||
|
this.passiveContainer.labelImage.setVisible(!this.passiveContainer.labelImage.visible);
|
||||||
|
}
|
||||||
} else if (button === Button.CANCEL) {
|
} else if (button === Button.CANCEL) {
|
||||||
if (this.summaryUiMode === SummaryUiMode.LEARN_MOVE)
|
if (this.summaryUiMode === SummaryUiMode.LEARN_MOVE)
|
||||||
this.hideMoveSelect();
|
this.hideMoveSelect();
|
||||||
|
@ -686,32 +716,62 @@ export default class SummaryUiHandler extends UiHandler {
|
||||||
profileContainer.add(luckText);
|
profileContainer.add(luckText);
|
||||||
}
|
}
|
||||||
|
|
||||||
const ability = this.pokemon.getAbility(true);
|
this.abilityContainer = {
|
||||||
|
labelImage: this.scene.add.image(0, 0, 'summary_profile_ability'),
|
||||||
|
ability: this.pokemon.getAbility(true),
|
||||||
|
nameText: null,
|
||||||
|
descriptionText: null};
|
||||||
|
|
||||||
const abilityNameText = addTextObject(this.scene, 7, 66, ability.name, TextStyle.SUMMARY_ALT);
|
const allAbilityInfo = [this.abilityContainer]; // Creates an array to iterate through
|
||||||
abilityNameText.setOrigin(0, 1);
|
// Only add to the array and set up displaying a passive if it's unlocked
|
||||||
profileContainer.add(abilityNameText);
|
if (this.pokemon.hasPassive()) {
|
||||||
|
this.passiveContainer = {
|
||||||
|
labelImage: this.scene.add.image(0, 0, 'summary_profile_passive'),
|
||||||
|
ability: this.pokemon.getPassiveAbility(),
|
||||||
|
nameText: null,
|
||||||
|
descriptionText: null};
|
||||||
|
allAbilityInfo.push(this.passiveContainer);
|
||||||
|
|
||||||
const abilityDescriptionText = addTextObject(this.scene, 7, 69, ability.description, TextStyle.WINDOW_ALT, { wordWrap: { width: 1224 } });
|
// Sets up the pixel button prompt image
|
||||||
abilityDescriptionText.setOrigin(0, 0);
|
this.abilityPrompt = this.scene.add.image(0, 0, !this.scene.gamepadSupport ? 'summary_profile_prompt_z' : 'summary_profile_prompt_a');
|
||||||
profileContainer.add(abilityDescriptionText);
|
this.abilityPrompt.setPosition(8, 43);
|
||||||
|
this.abilityPrompt.setVisible(true);
|
||||||
|
this.abilityPrompt.setOrigin(0, 0);
|
||||||
|
profileContainer.add(this.abilityPrompt);
|
||||||
|
}
|
||||||
|
|
||||||
const abilityDescriptionTextMaskRect = this.scene.make.graphics({});
|
allAbilityInfo.forEach(abilityInfo => {
|
||||||
abilityDescriptionTextMaskRect.setScale(6);
|
abilityInfo.labelImage.setPosition(17, 43);
|
||||||
abilityDescriptionTextMaskRect.fillStyle(0xFFFFFF);
|
abilityInfo.labelImage.setVisible(true);
|
||||||
abilityDescriptionTextMaskRect.beginPath();
|
abilityInfo.labelImage.setOrigin(0, 0);
|
||||||
abilityDescriptionTextMaskRect.fillRect(110, 90.5, 206, 31);
|
profileContainer.add(abilityInfo.labelImage);
|
||||||
|
|
||||||
const abilityDescriptionTextMask = abilityDescriptionTextMaskRect.createGeometryMask();
|
abilityInfo.nameText = addTextObject(this.scene, 7, 66, abilityInfo.ability.name, TextStyle.SUMMARY_ALT);
|
||||||
|
abilityInfo.nameText.setOrigin(0, 1);
|
||||||
|
profileContainer.add(abilityInfo.nameText);
|
||||||
|
|
||||||
abilityDescriptionText.setMask(abilityDescriptionTextMask);
|
abilityInfo.descriptionText = addTextObject(this.scene, 7, 69, abilityInfo.ability.description, TextStyle.WINDOW_ALT, { wordWrap: { width: 1224 } });
|
||||||
|
abilityInfo.descriptionText.setOrigin(0, 0);
|
||||||
|
profileContainer.add(abilityInfo.descriptionText);
|
||||||
|
|
||||||
const abilityDescriptionLineCount = Math.floor(abilityDescriptionText.displayHeight / 14.83);
|
// Sets up the mask that hides the description text to give an illusion of scrolling
|
||||||
|
const descriptionTextMaskRect = this.scene.make.graphics({});
|
||||||
|
descriptionTextMaskRect.setScale(6);
|
||||||
|
descriptionTextMaskRect.fillStyle(0xFFFFFF);
|
||||||
|
descriptionTextMaskRect.beginPath();
|
||||||
|
descriptionTextMaskRect.fillRect(110, 90.5, 206, 31);
|
||||||
|
|
||||||
|
const abilityDescriptionTextMask = descriptionTextMaskRect.createGeometryMask();
|
||||||
|
|
||||||
|
abilityInfo.descriptionText.setMask(abilityDescriptionTextMask);
|
||||||
|
|
||||||
|
const abilityDescriptionLineCount = Math.floor(abilityInfo.descriptionText.displayHeight / 14.83);
|
||||||
|
|
||||||
|
// Animates the description text moving upwards
|
||||||
if (abilityDescriptionLineCount > 2) {
|
if (abilityDescriptionLineCount > 2) {
|
||||||
abilityDescriptionText.setY(69);
|
abilityInfo.descriptionText.setY(69);
|
||||||
this.descriptionScrollTween = this.scene.tweens.add({
|
this.descriptionScrollTween = this.scene.tweens.add({
|
||||||
targets: abilityDescriptionText,
|
targets: abilityInfo.descriptionText,
|
||||||
delay: Utils.fixedInt(2000),
|
delay: Utils.fixedInt(2000),
|
||||||
loop: -1,
|
loop: -1,
|
||||||
hold: Utils.fixedInt(2000),
|
hold: Utils.fixedInt(2000),
|
||||||
|
@ -719,6 +779,11 @@ export default class SummaryUiHandler extends UiHandler {
|
||||||
y: `-=${14.83 * (abilityDescriptionLineCount - 2)}`
|
y: `-=${14.83 * (abilityDescriptionLineCount - 2)}`
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
});
|
||||||
|
// Turn off visibility of passive info by default
|
||||||
|
this.passiveContainer?.labelImage.setVisible(false);
|
||||||
|
this.passiveContainer?.nameText.setVisible(false);
|
||||||
|
this.passiveContainer?.descriptionText.setVisible(false);
|
||||||
|
|
||||||
let memoString = `${getBBCodeFrag(Utils.toReadableString(Nature[this.pokemon.getNature()]), TextStyle.SUMMARY_RED)}${getBBCodeFrag(' nature,', TextStyle.WINDOW_ALT)}\n${getBBCodeFrag(`${this.pokemon.metBiome === -1 ? 'apparently ' : ''}met at Lv`, TextStyle.WINDOW_ALT)}${getBBCodeFrag(this.pokemon.metLevel.toString(), TextStyle.SUMMARY_RED)}${getBBCodeFrag(',', TextStyle.WINDOW_ALT)}\n${getBBCodeFrag(getBiomeName(this.pokemon.metBiome), TextStyle.SUMMARY_RED)}${getBBCodeFrag('.', TextStyle.WINDOW_ALT)}`;
|
let memoString = `${getBBCodeFrag(Utils.toReadableString(Nature[this.pokemon.getNature()]), TextStyle.SUMMARY_RED)}${getBBCodeFrag(' nature,', TextStyle.WINDOW_ALT)}\n${getBBCodeFrag(`${this.pokemon.metBiome === -1 ? 'apparently ' : ''}met at Lv`, TextStyle.WINDOW_ALT)}${getBBCodeFrag(this.pokemon.metLevel.toString(), TextStyle.SUMMARY_RED)}${getBBCodeFrag(',', TextStyle.WINDOW_ALT)}\n${getBBCodeFrag(getBiomeName(this.pokemon.metBiome), TextStyle.SUMMARY_RED)}${getBBCodeFrag('.', TextStyle.WINDOW_ALT)}`;
|
||||||
|
|
||||||
|
|
|
@ -117,9 +117,9 @@ export function randSeedEasedWeightedItem<T>(items: T[], easingFunction: string
|
||||||
}
|
}
|
||||||
|
|
||||||
export function getSunday(date: Date): Date {
|
export function getSunday(date: Date): Date {
|
||||||
const day = date.getDay();
|
const day = date.getUTCDay();
|
||||||
const diff = date.getDate() - day;
|
const diff = date.getUTCDate() - day;
|
||||||
const newDate = new Date(date.setDate(diff));
|
const newDate = new Date(date.setUTCDate(diff));
|
||||||
return new Date(Date.UTC(newDate.getUTCFullYear(), newDate.getUTCMonth(), newDate.getUTCDate()));
|
return new Date(Date.UTC(newDate.getUTCFullYear(), newDate.getUTCMonth(), newDate.getUTCDate()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|