mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-06 16:32:16 +02:00
Migrate TempBattleStat
Usage
This commit is contained in:
parent
c8802a4e3a
commit
34a574e498
@ -35,6 +35,7 @@ export function getBattleStatName(stat: BattleStat) {
|
||||
}
|
||||
}
|
||||
|
||||
// TODO: BattleStat
|
||||
export function getBattleStatLevelChangeDescription(pokemonNameWithAffix: string, stats: string, levels: integer, up: boolean, count: number = 1) {
|
||||
const stringKey = (() => {
|
||||
if (up) {
|
||||
|
@ -1,38 +0,0 @@
|
||||
import { BattleStat, getBattleStatName } from "./battle-stat";
|
||||
import i18next from "i18next";
|
||||
|
||||
export enum TempBattleStat {
|
||||
ATK,
|
||||
DEF,
|
||||
SPATK,
|
||||
SPDEF,
|
||||
SPD,
|
||||
ACC,
|
||||
CRIT
|
||||
}
|
||||
|
||||
export function getTempBattleStatName(tempBattleStat: TempBattleStat) {
|
||||
if (tempBattleStat === TempBattleStat.CRIT) {
|
||||
return i18next.t("modifierType:TempBattleStatBoosterStatName.CRIT");
|
||||
}
|
||||
return getBattleStatName(tempBattleStat as integer as BattleStat);
|
||||
}
|
||||
|
||||
export function getTempBattleStatBoosterItemName(tempBattleStat: TempBattleStat) {
|
||||
switch (tempBattleStat) {
|
||||
case TempBattleStat.ATK:
|
||||
return "X Attack";
|
||||
case TempBattleStat.DEF:
|
||||
return "X Defense";
|
||||
case TempBattleStat.SPATK:
|
||||
return "X Sp. Atk";
|
||||
case TempBattleStat.SPDEF:
|
||||
return "X Sp. Def";
|
||||
case TempBattleStat.SPD:
|
||||
return "X Speed";
|
||||
case TempBattleStat.ACC:
|
||||
return "X Accuracy";
|
||||
case TempBattleStat.CRIT:
|
||||
return "Dire Hit";
|
||||
}
|
||||
}
|
@ -20,7 +20,8 @@ export enum Stat {
|
||||
export const PERMANENT_STATS = [ Stat.HP, Stat.ATK, Stat.DEF, Stat.SPATK, Stat.SPDEF, Stat.SPD ] as const;
|
||||
export type PermanentStat = typeof PERMANENT_STATS[number];
|
||||
|
||||
export const BATTLE_STATS = [ Stat.ATK, Stat.DEF, Stat.SPATK, Stat.SPDEF, Stat.SPD, Stat.ACC, Stat.EVA] as const;
|
||||
export const BATTLE_STATS = [ Stat.ATK, Stat.DEF, Stat.SPATK, Stat.SPDEF, Stat.SPD, Stat.ACC, Stat.EVA ] as const;
|
||||
export type BattleStat = typeof BATTLE_STATS[number];
|
||||
|
||||
export type TempBattleStat = Exclude<BattleStat, Stat.EVA>;
|
||||
export const TEMP_BATTLE_STATS = [ Stat.ATK, Stat.DEF, Stat.SPATK, Stat.SPDEF, Stat.SPD, Stat.ACC ] as const;
|
||||
export type TempBattleStat = typeof TEMP_BATTLE_STATS[number];
|
||||
|
@ -10,7 +10,7 @@ import * as Utils from "../utils";
|
||||
import { Type, TypeDamageMultiplier, getTypeDamageMultiplier, getTypeRgb } from "../data/type";
|
||||
import { getLevelTotalExp } from "../data/exp";
|
||||
import { Stat } from "../data/pokemon-stat";
|
||||
import { DamageMoneyRewardModifier, EnemyDamageBoosterModifier, EnemyDamageReducerModifier, EnemyEndureChanceModifier, EnemyFusionChanceModifier, HiddenAbilityRateBoosterModifier, PokemonBaseStatModifier, PokemonFriendshipBoosterModifier, PokemonHeldItemModifier, PokemonNatureWeightModifier, ShinyRateBoosterModifier, SurviveDamageModifier, TempBattleStatBoosterModifier, StatBoosterModifier, CritBoosterModifier, TerastallizeModifier } from "../modifier/modifier";
|
||||
import { DamageMoneyRewardModifier, EnemyDamageBoosterModifier, EnemyDamageReducerModifier, EnemyEndureChanceModifier, EnemyFusionChanceModifier, HiddenAbilityRateBoosterModifier, PokemonBaseStatModifier, PokemonFriendshipBoosterModifier, PokemonHeldItemModifier, PokemonNatureWeightModifier, ShinyRateBoosterModifier, SurviveDamageModifier, TempStatStageBoosterModifier, TempCritBoosterModifier, StatBoosterModifier, CritBoosterModifier, TerastallizeModifier } from "../modifier/modifier";
|
||||
import { PokeballType } from "../data/pokeball";
|
||||
import { Gender } from "../data/gender";
|
||||
import { initMoveAnim, loadMoveAnimAssets } from "../data/battle-anims";
|
||||
@ -20,7 +20,6 @@ import { reverseCompatibleTms, tmSpecies, tmPoolTiers } from "../data/tms";
|
||||
import { DamagePhase, FaintPhase, LearnMovePhase, MoveEffectPhase, ObtainStatusEffectPhase, StatChangePhase, SwitchSummonPhase, ToggleDoublePositionPhase, MoveEndPhase } from "../phases";
|
||||
import { BattlerTag, BattlerTagLapseType, EncoreTag, GroundedTag, HighestStatBoostTag, TypeImmuneTag, getBattlerTag, SemiInvulnerableTag, TypeBoostTag, ExposedTag } from "../data/battler-tags";
|
||||
import { WeatherType } from "../data/weather";
|
||||
import { TempBattleStat } from "../data/temp-battle-stat";
|
||||
import { ArenaTagSide, NoCritTag, WeakenMoveScreenTag } from "../data/arena-tag";
|
||||
import { Ability, AbAttr, BattleStatMultiplierAbAttr, BlockCritAbAttr, BonusCritAbAttr, BypassBurnDamageReductionAbAttr, FieldPriorityMoveImmunityAbAttr, IgnoreOpponentStatChangesAbAttr, MoveImmunityAbAttr, PreDefendFullHpEndureAbAttr, ReceivedMoveDamageMultiplierAbAttr, ReduceStatusEffectDurationAbAttr, StabBoostAbAttr, StatusEffectImmunityAbAttr, TypeImmunityAbAttr, WeightMultiplierAbAttr, allAbilities, applyAbAttrs, applyBattleStatMultiplierAbAttrs, applyPreApplyBattlerTagAbAttrs, applyPreAttackAbAttrs, applyPreDefendAbAttrs, applyPreSetStatusAbAttrs, UnsuppressableAbilityAbAttr, SuppressFieldAbilitiesAbAttr, NoFusionAbilityAbAttr, MultCritAbAttr, IgnoreTypeImmunityAbAttr, DamageBoostAbAttr, IgnoreTypeStatusEffectImmunityAbAttr, ConditionalCritAbAttr, applyFieldBattleStatMultiplierAbAttrs, FieldMultiplyBattleStatAbAttr, AddSecondStrikeAbAttr, IgnoreOpponentEvasionAbAttr, UserFieldStatusEffectImmunityAbAttr, UserFieldBattlerTagImmunityAbAttr, BattlerTagImmunityAbAttr } from "../data/ability";
|
||||
import PokemonData from "../system/pokemon-data";
|
||||
@ -50,7 +49,7 @@ import { Biome } from "#enums/biome";
|
||||
import { Moves } from "#enums/moves";
|
||||
import { Species } from "#enums/species";
|
||||
import { getPokemonNameWithAffix } from "#app/messages.js";
|
||||
import { PermanentStat, BattleStat, PERMANENT_STATS } from "#app/enums/stat";
|
||||
import { PermanentStat, BattleStat, PERMANENT_STATS } from "#app/enums/stat"; // TODO: Add type
|
||||
|
||||
export enum FieldPosition {
|
||||
CENTER,
|
||||
@ -737,7 +736,6 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
|
||||
}
|
||||
|
||||
getBattleStat(stat: PermanentStat & BattleStat, opponent?: Pokemon, move?: Move, isCritical: boolean = false): integer {
|
||||
const battleStat = (stat - 1) as BattleStat; // TODO: BattleStat
|
||||
const statLevel = new Utils.IntegerHolder(this.getStatStage(stat));
|
||||
if (opponent) {
|
||||
if (isCritical) {
|
||||
@ -758,7 +756,7 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
|
||||
}
|
||||
}
|
||||
if (this.isPlayer()) {
|
||||
this.scene.applyModifiers(TempBattleStatBoosterModifier, this.isPlayer(), battleStat as integer as TempBattleStat, statLevel); // TODO: TempBattleStat
|
||||
this.scene.applyModifiers(TempStatStageBoosterModifier, this.isPlayer(), stat, statLevel);
|
||||
}
|
||||
const statValue = new Utils.NumberHolder(this.getStat(stat, false));
|
||||
this.scene.applyModifiers(StatBoosterModifier, this.isPlayer(), this, stat, statValue);
|
||||
@ -1955,7 +1953,7 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
|
||||
applyAbAttrs(IgnoreOpponentStatChangesAbAttr, this, null, targetEvaStage);
|
||||
applyAbAttrs(IgnoreOpponentEvasionAbAttr, this, null, targetEvaStage);
|
||||
applyMoveAttrs(IgnoreOpponentStatChangesAttr, this, target, sourceMove, targetEvaStage);
|
||||
this.scene.applyModifiers(TempBattleStatBoosterModifier, this.isPlayer(), TempBattleStat.ACC, userAccStage);
|
||||
this.scene.applyModifiers(TempStatStageBoosterModifier, this.isPlayer(), Stat.ACC, userAccStage);
|
||||
|
||||
if (target.findTag(t => t instanceof ExposedTag)) {
|
||||
targetEvaStage.value = Math.min(0, targetEvaStage.value);
|
||||
@ -2062,7 +2060,7 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
|
||||
const critLevel = new Utils.IntegerHolder(0);
|
||||
applyMoveAttrs(HighCritAttr, source, this, move, critLevel);
|
||||
this.scene.applyModifiers(CritBoosterModifier, source.isPlayer(), source, critLevel);
|
||||
this.scene.applyModifiers(TempBattleStatBoosterModifier, source.isPlayer(), TempBattleStat.CRIT, critLevel);
|
||||
this.scene.applyModifiers(TempCritBoosterModifier, source.isPlayer(), critLevel);
|
||||
const bonusCrit = new Utils.BooleanHolder(false);
|
||||
//@ts-ignore
|
||||
if (applyAbAttrs(BonusCritAbAttr, source, null, bonusCrit)) { // TODO: resolve ts-ignore. This is a promise. Checking a promise is bogus.
|
||||
@ -2498,9 +2496,11 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
|
||||
* @param source {@linkcode Pokemon} the pokemon whose stats/Tags are to be passed on from, ie: the Pokemon using Baton Pass
|
||||
*/
|
||||
transferSummon(source: Pokemon): void {
|
||||
/** TODO: BattleStats
|
||||
for (const stat of battleStats) {
|
||||
this.summonData.battleStats[stat] = source.summonData.battleStats[stat];
|
||||
}
|
||||
*/
|
||||
for (const tag of source.summonData.tags) {
|
||||
|
||||
// bypass yawn, and infatuation as those can not be passed via Baton Pass
|
||||
@ -2510,9 +2510,11 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
|
||||
|
||||
this.summonData.tags.push(tag);
|
||||
}
|
||||
/** TODO: BattleStats
|
||||
if (this instanceof PlayerPokemon && source.summonData.battleStats.find(bs => bs === 6)) {
|
||||
this.scene.validateAchv(achvs.TRANSFER_MAX_BATTLE_STAT);
|
||||
}
|
||||
*/
|
||||
this.updateInfo();
|
||||
}
|
||||
|
||||
|
@ -37,8 +37,7 @@ export interface ModifierTypeTranslationEntries {
|
||||
ModifierType: { [key: string]: ModifierTypeTranslationEntry },
|
||||
SpeciesBoosterItem: { [key: string]: ModifierTypeTranslationEntry },
|
||||
AttackTypeBoosterItem: SimpleTranslationEntries,
|
||||
TempBattleStatBoosterItem: SimpleTranslationEntries,
|
||||
TempBattleStatBoosterStatName: SimpleTranslationEntries,
|
||||
TempStatStageBoosterItem: SimpleTranslationEntries,
|
||||
BaseStatBoosterItem: SimpleTranslationEntries,
|
||||
EvolutionItem: SimpleTranslationEntries,
|
||||
FormChangeItem: SimpleTranslationEntries,
|
||||
|
@ -51,8 +51,8 @@ export const modifierType: ModifierTypeTranslationEntries = {
|
||||
"DoubleBattleChanceBoosterModifierType": {
|
||||
description: "Doubles the chance of an encounter being a double battle for {{battleCount}} battles.",
|
||||
},
|
||||
"TempBattleStatBoosterModifierType": {
|
||||
description: "Increases the {{tempBattleStatName}} of all party members by 1 stage for 5 battles.",
|
||||
"TempStatStageBoosterModifierType": {
|
||||
description: "Increases the {{stat}} of all party members by 1 stage for 5 battles.",
|
||||
},
|
||||
"AttackTypeBoosterModifierType": {
|
||||
description: "Increases the power of a Pokémon's {{moveType}}-type moves by 20%.",
|
||||
@ -185,6 +185,7 @@ export const modifierType: ModifierTypeTranslationEntries = {
|
||||
"SOOTHE_BELL": { name: "Soothe Bell" },
|
||||
|
||||
"SCOPE_LENS": { name: "Scope Lens", description: "It's a lens for scoping out weak points. It boosts the holder's critical-hit ratio."},
|
||||
"DIRE_HIT": { name: "Dire Hit", extra: { raises: "Critical Hit Ratio" } },
|
||||
"LEEK": { name: "Leek", description: "This very long and stiff stalk of leek boosts the critical-hit ratio of Farfetch'd's moves."},
|
||||
|
||||
"EVIOLITE": { name: "Eviolite", description: "This mysterious evolutionary lump boosts the Defense and Sp. Def stats when held by a Pokémon that can still evolve." },
|
||||
@ -252,28 +253,14 @@ export const modifierType: ModifierTypeTranslationEntries = {
|
||||
"METAL_POWDER": { name: "Metal Powder", description: "Extremely fine yet hard, this odd powder boosts Ditto's Defense stat." },
|
||||
"QUICK_POWDER": { name: "Quick Powder", description: "Extremely fine yet hard, this odd powder boosts Ditto's Speed stat." }
|
||||
},
|
||||
TempBattleStatBoosterItem: {
|
||||
TempStatStageBoosterItem: {
|
||||
"x_attack": "X Attack",
|
||||
"x_defense": "X Defense",
|
||||
"x_sp_atk": "X Sp. Atk",
|
||||
"x_sp_def": "X Sp. Def",
|
||||
"x_speed": "X Speed",
|
||||
"x_accuracy": "X Accuracy",
|
||||
"dire_hit": "Dire Hit",
|
||||
"x_accuracy": "X Accuracy"
|
||||
},
|
||||
|
||||
TempBattleStatBoosterStatName: {
|
||||
"ATK": "Attack",
|
||||
"DEF": "Defense",
|
||||
"SPATK": "Sp. Atk",
|
||||
"SPDEF": "Sp. Def",
|
||||
"SPD": "Speed",
|
||||
"ACC": "Accuracy",
|
||||
"CRIT": "Critical Hit Ratio",
|
||||
"EVA": "Evasiveness",
|
||||
"DEFAULT": "???",
|
||||
},
|
||||
|
||||
AttackTypeBoosterItem: {
|
||||
"silk_scarf": "Silk Scarf",
|
||||
"black_belt": "Black Belt",
|
||||
|
@ -51,8 +51,8 @@ export const modifierType: ModifierTypeTranslationEntries = {
|
||||
"DoubleBattleChanceBoosterModifierType": {
|
||||
description: "Verdoppelt die Wahrscheinlichkeit, dass die nächsten {{battleCount}} Begegnungen mit wilden Pokémon ein Doppelkampf sind.",
|
||||
},
|
||||
"TempBattleStatBoosterModifierType": {
|
||||
description: "Erhöht die {{tempBattleStatName}} aller Teammitglieder für 5 Kämpfe um eine Stufe.",
|
||||
"TempStatStageBoosterModifierType": {
|
||||
description: "Erhöht die {{stat}} aller Teammitglieder für 5 Kämpfe um eine Stufe.",
|
||||
},
|
||||
"AttackTypeBoosterModifierType": {
|
||||
description: "Erhöht die Stärke aller {{moveType}}-Attacken eines Pokémon um 20%.",
|
||||
@ -185,6 +185,7 @@ export const modifierType: ModifierTypeTranslationEntries = {
|
||||
"SOOTHE_BELL": { name: "Sanftglocke" },
|
||||
|
||||
"SCOPE_LENS": { name: "Scope-Linse", description: "Ein Item zum Tragen. Es erhöht die Volltrefferquote." },
|
||||
"DIRE_HIT": { name: "X-Volltreffer", extra: { raises: "Volltrefferquote" } },
|
||||
"LEEK": { name: "Lauchstange", description: "Ein Item, das von Porenta getragen werden kann. Diese lange Lauchstange erhöht die Volltrefferquote stark." },
|
||||
|
||||
"EVIOLITE": { name: "Evolith", description: "Ein mysteriöser Klumpen, der die Vert. u. Spez.-Vert. von Pokémon erhöht, die sich noch entwickeln können." },
|
||||
@ -253,29 +254,14 @@ export const modifierType: ModifierTypeTranslationEntries = {
|
||||
"METAL_POWDER": { name: "Metallstaub", description: "Ein Item, das von Ditto getragen werden kann. Fein und doch hart, erhöht dieses sonderbare Pulver die Verteidigung." },
|
||||
"QUICK_POWDER": { name: "Flottstaub", description: "Ein Item, das Ditto zum Tragen gegeben werden kann. Fein und doch hart, erhöht dieses sonderbare Pulver die Initiative." }
|
||||
},
|
||||
TempBattleStatBoosterItem: {
|
||||
TempStatStageBoosterItem: {
|
||||
"x_attack": "X-Angriff",
|
||||
"x_defense": "X-Verteidigung",
|
||||
"x_sp_atk": "X-Sp.-Ang.",
|
||||
"x_sp_def": "X-Sp.-Vert.",
|
||||
"x_speed": "X-Tempo",
|
||||
"x_accuracy": "X-Treffer",
|
||||
"dire_hit": "X-Volltreffer",
|
||||
"x_accuracy": "X-Treffer"
|
||||
},
|
||||
|
||||
TempBattleStatBoosterStatName: {
|
||||
"ATK": "Angriff",
|
||||
"DEF": "Verteidigung",
|
||||
"SPATK": "Sp. Ang",
|
||||
"SPDEF": "Sp. Vert",
|
||||
"SPD": "Initiative",
|
||||
"ACC": "Genauigkeit",
|
||||
"CRIT": "Volltrefferquote",
|
||||
"EVA": "Fluchtwert",
|
||||
"DEFAULT": "???",
|
||||
},
|
||||
|
||||
|
||||
AttackTypeBoosterItem: {
|
||||
"silk_scarf": "Seidenschal",
|
||||
"black_belt": "Schwarzgurt",
|
||||
|
@ -51,8 +51,8 @@ export const modifierType: ModifierTypeTranslationEntries = {
|
||||
"DoubleBattleChanceBoosterModifierType": {
|
||||
description: "Doubles the chance of an encounter being a double battle for {{battleCount}} battles.",
|
||||
},
|
||||
"TempBattleStatBoosterModifierType": {
|
||||
description: "Increases the {{tempBattleStatName}} of all party members by 1 stage for 5 battles.",
|
||||
"TempStatStageBoosterModifierType": {
|
||||
description: "Increases the {{stat}} of all party members by 1 stage for 5 battles.",
|
||||
},
|
||||
"AttackTypeBoosterModifierType": {
|
||||
description: "Increases the power of a Pokémon's {{moveType}}-type moves by 20%.",
|
||||
@ -185,6 +185,7 @@ export const modifierType: ModifierTypeTranslationEntries = {
|
||||
"SOOTHE_BELL": { name: "Soothe Bell" },
|
||||
|
||||
"SCOPE_LENS": { name: "Scope Lens", description: "It's a lens for scoping out weak points. It boosts the holder's critical-hit ratio."},
|
||||
"DIRE_HIT": { name: "Dire Hit", extra: { raises: "Critical Hit Ratio" } },
|
||||
"LEEK": { name: "Leek", description: "This very long and stiff stalk of leek boosts the critical-hit ratio of Farfetch'd's moves."},
|
||||
|
||||
"EVIOLITE": { name: "Eviolite", description: "This mysterious evolutionary lump boosts the Defense and Sp. Def stats when held by a Pokémon that can still evolve." },
|
||||
@ -252,28 +253,14 @@ export const modifierType: ModifierTypeTranslationEntries = {
|
||||
"METAL_POWDER": { name: "Metal Powder", description: "Extremely fine yet hard, this odd powder boosts Ditto's Defense stat." },
|
||||
"QUICK_POWDER": { name: "Quick Powder", description: "Extremely fine yet hard, this odd powder boosts Ditto's Speed stat." }
|
||||
},
|
||||
TempBattleStatBoosterItem: {
|
||||
TempStatStageBoosterItem: {
|
||||
"x_attack": "X Attack",
|
||||
"x_defense": "X Defense",
|
||||
"x_sp_atk": "X Sp. Atk",
|
||||
"x_sp_def": "X Sp. Def",
|
||||
"x_speed": "X Speed",
|
||||
"x_accuracy": "X Accuracy",
|
||||
"dire_hit": "Dire Hit",
|
||||
"x_accuracy": "X Accuracy"
|
||||
},
|
||||
|
||||
TempBattleStatBoosterStatName: {
|
||||
"ATK": "Attack",
|
||||
"DEF": "Defense",
|
||||
"SPATK": "Sp. Atk",
|
||||
"SPDEF": "Sp. Def",
|
||||
"SPD": "Speed",
|
||||
"ACC": "Accuracy",
|
||||
"CRIT": "Critical Hit Ratio",
|
||||
"EVA": "Evasiveness",
|
||||
"DEFAULT": "???",
|
||||
},
|
||||
|
||||
AttackTypeBoosterItem: {
|
||||
"silk_scarf": "Silk Scarf",
|
||||
"black_belt": "Black Belt",
|
||||
|
@ -51,8 +51,8 @@ export const modifierType: ModifierTypeTranslationEntries = {
|
||||
"DoubleBattleChanceBoosterModifierType": {
|
||||
description: "Duplica la posibilidad de que un encuentro sea una combate doble durante {{battleCount}} combates.",
|
||||
},
|
||||
"TempBattleStatBoosterModifierType": {
|
||||
description: "Aumenta la est. {{tempBattleStatName}} de todos los miembros del equipo en 1 nivel durante 5 combates.",
|
||||
"TempStatStageBoosterModifierType": {
|
||||
description: "Aumenta la est. {{stat}} de todos los miembros del equipo en 1 nivel durante 5 combates.",
|
||||
},
|
||||
"AttackTypeBoosterModifierType": {
|
||||
description: "Aumenta la potencia de los movimientos de tipo {{moveType}} de un Pokémon en un 20%.",
|
||||
@ -185,6 +185,7 @@ export const modifierType: ModifierTypeTranslationEntries = {
|
||||
"SOOTHE_BELL": { name: "Camp. Alivio" },
|
||||
|
||||
"SCOPE_LENS": { name: "Periscopio", description: "Aumenta la probabilidad de asestar un golpe crítico." },
|
||||
"DIRE_HIT": { name: "Crítico X", extra: { raises: "Critical Hit Ratio" } },
|
||||
"LEEK": { name: "Puerro", description: "Puerro muy largo y duro que aumenta la probabilidad de asestar un golpe crítico. Debe llevarlo Farfetch'd." },
|
||||
|
||||
"EVIOLITE": { name: "Mineral Evolutivo", description: "Roca misteriosa. El Pokémon portador aumentará su Defensa y su Defensa Especial si aún puede evolucionar." },
|
||||
@ -252,26 +253,13 @@ export const modifierType: ModifierTypeTranslationEntries = {
|
||||
"METAL_POWDER": { name: "Polvo Metálico", description: "Polvo muy fino, pero a la vez poderoso, que aumenta la Defensa. Debe llevarlo Ditto." },
|
||||
"QUICK_POWDER": { name: "Polvo Veloz", description: "Polvo muy fino, pero a la vez poderoso, que aumenta la Velocidad. Debe llevarlo Ditto." }
|
||||
},
|
||||
TempBattleStatBoosterItem: {
|
||||
TempStatStageBoosterItem: {
|
||||
"x_attack": "Ataque X",
|
||||
"x_defense": "Defensa X",
|
||||
"x_sp_atk": "Ataq. Esp. X",
|
||||
"x_sp_def": "Def. Esp. X",
|
||||
"x_speed": "Velocidad X",
|
||||
"x_accuracy": "Precisión X",
|
||||
"dire_hit": "Crítico X",
|
||||
},
|
||||
|
||||
TempBattleStatBoosterStatName: {
|
||||
"ATK": "Attack",
|
||||
"DEF": "Defense",
|
||||
"SPATK": "Sp. Atk",
|
||||
"SPDEF": "Sp. Def",
|
||||
"SPD": "Speed",
|
||||
"ACC": "Accuracy",
|
||||
"CRIT": "Critical Hit Ratio",
|
||||
"EVA": "Evasiveness",
|
||||
"DEFAULT": "???",
|
||||
"x_accuracy": "Precisión X"
|
||||
},
|
||||
AttackTypeBoosterItem: {
|
||||
"silk_scarf": "Pañuelo Seda",
|
||||
|
@ -51,8 +51,8 @@ export const modifierType: ModifierTypeTranslationEntries = {
|
||||
"DoubleBattleChanceBoosterModifierType": {
|
||||
description: "Double les chances de tomber sur un combat double pendant {{battleCount}} combats.",
|
||||
},
|
||||
"TempBattleStatBoosterModifierType": {
|
||||
description: "Augmente d’un cran {{tempBattleStatName}} pour toute l’équipe pendant 5 combats.",
|
||||
"TempStatStageBoosterModifierType": {
|
||||
description: "Augmente d’un cran {{stat}} pour toute l’équipe pendant 5 combats.",
|
||||
},
|
||||
"AttackTypeBoosterModifierType": {
|
||||
description: "Augmente de 20% la puissance des capacités de type {{moveType}} d’un Pokémon.",
|
||||
@ -185,6 +185,7 @@ export const modifierType: ModifierTypeTranslationEntries = {
|
||||
"SOOTHE_BELL": { name: "Grelot Zen" },
|
||||
|
||||
"SCOPE_LENS": { name: "Lentilscope", description: "Une lentille qui augmente d’un cran le taux de critiques du porteur." },
|
||||
"DIRE_HIT": { name: "Muscle +", extra: { raises: "Taux de critique" } },
|
||||
"LEEK": { name: "Poireau", description: "À faire tenir à Canarticho ou Palarticho. Un poireau très long et solide qui augmente de 2 crans le taux de critiques." },
|
||||
|
||||
"EVIOLITE": { name: "Évoluroc", description: "Augmente de 50% la Défense et Déf. Spé. si le porteur peut évoluer, 25% aux fusions dont une moitié le peut encore." },
|
||||
@ -252,28 +253,14 @@ export const modifierType: ModifierTypeTranslationEntries = {
|
||||
"METAL_POWDER": { name: "Poudre Métal", description: "À faire tenir à Métamorph. Cette poudre étrange, très fine mais résistante, double sa Défense." },
|
||||
"QUICK_POWDER": { name: "Poudre Vite", description: "À faire tenir à Métamorph. Cette poudre étrange, très fine mais résistante, double sa Vitesse." }
|
||||
},
|
||||
TempBattleStatBoosterItem: {
|
||||
TempStatStageBoosterItem: {
|
||||
"x_attack": "Attaque +",
|
||||
"x_defense": "Défense +",
|
||||
"x_sp_atk": "Atq. Spé. +",
|
||||
"x_sp_def": "Déf. Spé. +",
|
||||
"x_speed": "Vitesse +",
|
||||
"x_accuracy": "Précision +",
|
||||
"dire_hit": "Muscle +",
|
||||
"x_accuracy": "Précision +"
|
||||
},
|
||||
|
||||
TempBattleStatBoosterStatName: {
|
||||
"ATK": "Attaque",
|
||||
"DEF": "Défense",
|
||||
"SPATK": "Atq. Spé.",
|
||||
"SPDEF": "Déf. Spé.",
|
||||
"SPD": "Vitesse",
|
||||
"ACC": "Précision",
|
||||
"CRIT": "Taux de critique",
|
||||
"EVA": "Esquive",
|
||||
"DEFAULT": "???",
|
||||
},
|
||||
|
||||
AttackTypeBoosterItem: {
|
||||
"silk_scarf": "Mouchoir Soie",
|
||||
"black_belt": "Ceinture Noire",
|
||||
|
@ -51,8 +51,8 @@ export const modifierType: ModifierTypeTranslationEntries = {
|
||||
"DoubleBattleChanceBoosterModifierType": {
|
||||
description: "Raddoppia la possibilità di imbattersi in doppie battaglie per {{battleCount}} battaglie.",
|
||||
},
|
||||
"TempBattleStatBoosterModifierType": {
|
||||
description: "Aumenta {{tempBattleStatName}} di un livello a tutti i Pokémon nel gruppo per 5 battaglie.",
|
||||
"TempStatStageBoosterModifierType": {
|
||||
description: "Aumenta {{stat}} di un livello a tutti i Pokémon nel gruppo per 5 battaglie.",
|
||||
},
|
||||
"AttackTypeBoosterModifierType": {
|
||||
description: "Aumenta la potenza delle mosse di tipo {{moveType}} del 20% per un Pokémon.",
|
||||
@ -185,6 +185,7 @@ export const modifierType: ModifierTypeTranslationEntries = {
|
||||
"SOOTHE_BELL": { name: "Calmanella" },
|
||||
|
||||
"SCOPE_LENS": { name: "Mirino", description: "Lente che aumenta la probabilità di sferrare brutti colpi." },
|
||||
"DIRE_HIT": { name: "Supercolpo", extra: { raises: "Tasso di brutti colpi" } },
|
||||
"LEEK": { name: "Porro", description: "Strumento da dare a Farfetch'd. Lungo gambo di porro che aumenta la probabilità di sferrare brutti colpi." },
|
||||
|
||||
"EVIOLITE": { name: "Evolcondensa", description: "Misteriosa materia evolutiva. Aumenta la Difesa e la Difesa Speciale di un Pokémon che può ancora evolversi." },
|
||||
@ -252,28 +253,14 @@ export const modifierType: ModifierTypeTranslationEntries = {
|
||||
"METAL_POWDER": { name: "Metalpolvere", description: "Strumento da dare a Ditto. Strana polvere finissima e al tempo stesso dura che migliora la Difesa." },
|
||||
"QUICK_POWDER": { name: "Velopolvere", description: "Strumento da dare a Ditto. Questa strana polvere, fine e al contempo dura, aumenta la Velocità." }
|
||||
},
|
||||
TempBattleStatBoosterItem: {
|
||||
TempStatStageBoosterItem: {
|
||||
"x_attack": "Attacco X",
|
||||
"x_defense": "Difesa X",
|
||||
"x_sp_atk": "Att. Speciale X",
|
||||
"x_sp_def": "Dif. Speciale X",
|
||||
"x_speed": "Velocità X",
|
||||
"x_accuracy": "Precisione X",
|
||||
"dire_hit": "Supercolpo",
|
||||
},
|
||||
|
||||
TempBattleStatBoosterStatName: {
|
||||
"ATK": "Attacco",
|
||||
"DEF": "Difesa",
|
||||
"SPATK": "Att. Speciale",
|
||||
"SPDEF": "Dif. Speciale",
|
||||
"SPD": "Velocità",
|
||||
"ACC": "Precisione",
|
||||
"CRIT": "Tasso di brutti colpi",
|
||||
"EVA": "Elusione",
|
||||
"DEFAULT": "???",
|
||||
},
|
||||
|
||||
AttackTypeBoosterItem: {
|
||||
"silk_scarf": "Sciarpa seta",
|
||||
"black_belt": "Cinturanera",
|
||||
|
@ -51,8 +51,8 @@ export const modifierType: ModifierTypeTranslationEntries = {
|
||||
"DoubleBattleChanceBoosterModifierType": {
|
||||
description: "バトル{{battleCount}}かいのあいだ ダブルバトルになるかくりつを2ばいにする",
|
||||
},
|
||||
"TempBattleStatBoosterModifierType": {
|
||||
description: "すべてのパーティメンバーの {{tempBattleStatName}}を5かいのバトルのあいだ 1だんかいあげる",
|
||||
"TempStatStageBoosterModifierType": {
|
||||
description: "すべてのパーティメンバーの {{stat}} を5かいのバトルのあいだ 1だんかいあげる",
|
||||
},
|
||||
"AttackTypeBoosterModifierType": {
|
||||
description: "ポケモンの {{moveType}}タイプのわざのいりょくを20パーセントあげる",
|
||||
@ -185,6 +185,7 @@ export const modifierType: ModifierTypeTranslationEntries = {
|
||||
"SOOTHE_BELL": { name: "やすらぎのすず" },
|
||||
|
||||
"SCOPE_LENS": { name: "ピントレンズ", description: "弱点が 見える レンズ。持たせた ポケモンの技が 急所に 当たりやすくなる。"},
|
||||
"DIRE_HIT": { name: "クリティカット", extra: { raises: "きゅうしょりつ" } },
|
||||
"LEEK": { name: "ながねぎ", description: "とても長くて 硬いクキ。カモネギに 持たせると 技が 急所に 当たりやすくなる。"},
|
||||
|
||||
"EVIOLITE": { name: "しんかのきせき", description: "進化の不思議な かたまり。持たせると 進化前ポケモンの 防御と 特防が あがる。" },
|
||||
@ -252,28 +253,14 @@ export const modifierType: ModifierTypeTranslationEntries = {
|
||||
"METAL_POWDER": { name: "メタルパウダー", description: "メタモンに 持たせると 防御が あがる 不思議な粉。とても こまかくて 硬い。" },
|
||||
"QUICK_POWDER": { name: "スピードパウダー", description: "メタモンに 持たせると 素早さが あがる 不思議 粉。とても こまかくて 硬い。" }
|
||||
},
|
||||
TempBattleStatBoosterItem: {
|
||||
TempStatStageBoosterItem: {
|
||||
"x_attack": "プラスパワー",
|
||||
"x_defense": "ディフェンダー",
|
||||
"x_sp_atk": "スペシャルアップ",
|
||||
"x_sp_def": "スペシャルガード",
|
||||
"x_speed": "スピーダー",
|
||||
"x_accuracy": "ヨクアタール",
|
||||
"dire_hit": "クリティカット",
|
||||
"x_accuracy": "ヨクアタール"
|
||||
},
|
||||
|
||||
TempBattleStatBoosterStatName: {
|
||||
"ATK": "こうげき",
|
||||
"DEF": "ぼうぎょ",
|
||||
"SPATK": "とくこう",
|
||||
"SPDEF": "とくぼう",
|
||||
"SPD": "すばやさ",
|
||||
"ACC": "めいちゅう",
|
||||
"CRIT": "きゅうしょりつ",
|
||||
"EVA": "かいひ",
|
||||
"DEFAULT": "???",
|
||||
},
|
||||
|
||||
AttackTypeBoosterItem: {
|
||||
"silk_scarf": "シルクのスカーフ",
|
||||
"black_belt": "くろおび",
|
||||
|
@ -51,8 +51,8 @@ export const modifierType: ModifierTypeTranslationEntries = {
|
||||
"DoubleBattleChanceBoosterModifierType": {
|
||||
description: "{{battleCount}}번의 배틀 동안 더블 배틀이 등장할 확률이 두 배가 된다.",
|
||||
},
|
||||
"TempBattleStatBoosterModifierType": {
|
||||
description: "자신의 모든 포켓몬이 5번의 배틀 동안 {{tempBattleStatName}}[[가]] 한 단계 증가한다."
|
||||
"TempStatStageBoosterModifierType": {
|
||||
description: "자신의 모든 포켓몬이 5번의 배틀 동안 {{stat}}[[가]] 한 단계 증가한다."
|
||||
},
|
||||
"AttackTypeBoosterModifierType": {
|
||||
description: "지니게 하면 {{moveType}}타입 기술의 위력이 20% 상승한다.",
|
||||
@ -185,6 +185,7 @@ export const modifierType: ModifierTypeTranslationEntries = {
|
||||
"SOOTHE_BELL": { name: "평온의방울" },
|
||||
|
||||
"SCOPE_LENS": { name: "초점렌즈", description: "약점이 보이는 렌즈. 지니게 한 포켓몬의 기술이 급소에 맞기 쉬워진다." },
|
||||
"DIRE_HIT": { name: "크리티컬커터", extra: { raises: "급소율" } },
|
||||
"LEEK": { name: "대파", description: "매우 길고 단단한 줄기. 파오리에게 지니게 하면 기술이 급소에 맞기 쉬워진다." },
|
||||
|
||||
"EVIOLITE": { name: "진화의휘석", description: "진화의 이상한 덩어리. 지니게 하면 진화 전 포켓몬의 방어와 특수방어가 올라간다." },
|
||||
@ -252,28 +253,14 @@ export const modifierType: ModifierTypeTranslationEntries = {
|
||||
"METAL_POWDER": { name: "금속파우더", description: "메타몽에게 지니게 하면 방어가 올라가는 이상한 가루. 매우 잘고 단단하다." },
|
||||
"QUICK_POWDER": { name: "스피드파우더", description: "메타몽에게 지니게 하면 스피드가 올라가는 이상한 가루. 매우 잘고 단단하다." }
|
||||
},
|
||||
TempBattleStatBoosterItem: {
|
||||
TempStatStageBoosterItem: {
|
||||
"x_attack": "플러스파워",
|
||||
"x_defense": "디펜드업",
|
||||
"x_sp_atk": "스페셜업",
|
||||
"x_sp_def": "스페셜가드",
|
||||
"x_speed": "스피드업",
|
||||
"x_accuracy": "잘-맞히기",
|
||||
"dire_hit": "크리티컬커터",
|
||||
"x_accuracy": "잘-맞히기"
|
||||
},
|
||||
|
||||
TempBattleStatBoosterStatName: {
|
||||
"ATK": "공격",
|
||||
"DEF": "방어",
|
||||
"SPATK": "특수공격",
|
||||
"SPDEF": "특수방어",
|
||||
"SPD": "스피드",
|
||||
"ACC": "명중률",
|
||||
"CRIT": "급소율",
|
||||
"EVA": "회피율",
|
||||
"DEFAULT": "???",
|
||||
},
|
||||
|
||||
AttackTypeBoosterItem: {
|
||||
"silk_scarf": "실크스카프",
|
||||
"black_belt": "검은띠",
|
||||
|
@ -51,8 +51,8 @@ export const modifierType: ModifierTypeTranslationEntries = {
|
||||
"DoubleBattleChanceBoosterModifierType": {
|
||||
description: "Dobra as chances de encontrar uma batalha em dupla por {{battleCount}} batalhas.",
|
||||
},
|
||||
"TempBattleStatBoosterModifierType": {
|
||||
description: "Aumenta o atributo de {{tempBattleStatName}} para todos os membros da equipe por 5 batalhas.",
|
||||
"TempStatStageBoosterModifierType": {
|
||||
description: "Aumenta o atributo de {{stat}} para todos os membros da equipe por 5 batalhas.",
|
||||
},
|
||||
"AttackTypeBoosterModifierType": {
|
||||
description: "Aumenta o poder dos ataques do tipo {{moveType}} de um Pokémon em 20%.",
|
||||
@ -185,6 +185,7 @@ export const modifierType: ModifierTypeTranslationEntries = {
|
||||
"SOOTHE_BELL": { name: "Guizo" },
|
||||
|
||||
"SCOPE_LENS": { name: "Lentes de Mira", description: "Estas lentes facilitam o foco em pontos fracos. Aumenta a chance de acerto crítico de quem a segurar." },
|
||||
"DIRE_HIT": { name: "Direto", extra: { raises: "Chance de Acerto Crítico" } },
|
||||
"LEEK": { name: "Alho-poró", description: "Esse talo de alho-poró muito longo e rígido aumenta a taxa de acerto crítico dos movimentos do Farfetch'd." },
|
||||
|
||||
"EVIOLITE": { name: "Eviolita", description: "Esse misterioso caroço evolutivo aumenta os atributos de Defesa e Def. Esp. quando segurado por um Pokémon que ainda pode evoluir." },
|
||||
@ -252,28 +253,14 @@ export const modifierType: ModifierTypeTranslationEntries = {
|
||||
"METAL_POWDER": { name: "Pó Metálico", description: "Extremamente fino, porém duro, este pó estranho aumenta o atributo de Defesa de Ditto." },
|
||||
"QUICK_POWDER": { name: "Pó Veloz", description: "Extremamente fino, porém duro, este pó estranho aumenta o atributo de Velocidade de Ditto." }
|
||||
},
|
||||
TempBattleStatBoosterItem: {
|
||||
TempStatStageBoosterItem: {
|
||||
"x_attack": "Ataque X",
|
||||
"x_defense": "Defesa X",
|
||||
"x_sp_atk": "Ataque Esp. X",
|
||||
"x_sp_def": "Defesa Esp. X",
|
||||
"x_speed": "Velocidade X",
|
||||
"x_accuracy": "Precisão X",
|
||||
"dire_hit": "Direto",
|
||||
"x_accuracy": "Precisão X"
|
||||
},
|
||||
|
||||
TempBattleStatBoosterStatName: {
|
||||
"ATK": "Ataque",
|
||||
"DEF": "Defesa",
|
||||
"SPATK": "Ataque Esp.",
|
||||
"SPDEF": "Defesa Esp.",
|
||||
"SPD": "Velocidade",
|
||||
"ACC": "Precisão",
|
||||
"CRIT": "Chance de Acerto Crítico",
|
||||
"EVA": "Evasão",
|
||||
"DEFAULT": "???",
|
||||
},
|
||||
|
||||
AttackTypeBoosterItem: {
|
||||
"silk_scarf": "Lenço de Seda",
|
||||
"black_belt": "Faixa Preta",
|
||||
|
@ -51,8 +51,8 @@ export const modifierType: ModifierTypeTranslationEntries = {
|
||||
"DoubleBattleChanceBoosterModifierType": {
|
||||
description: "接下来的{{battleCount}}场战斗是双打的概率翻倍。",
|
||||
},
|
||||
"TempBattleStatBoosterModifierType": {
|
||||
description: "为所有成员宝可梦提升一级{{tempBattleStatName}},持续5场战斗。",
|
||||
"TempStatStageBoosterModifierType": {
|
||||
description: "为所有成员宝可梦提升一级{{stat}},持续5场战斗。",
|
||||
},
|
||||
"AttackTypeBoosterModifierType": {
|
||||
description: "一只宝可梦的{{moveType}}系招式威力提升20%。",
|
||||
@ -185,6 +185,7 @@ export const modifierType: ModifierTypeTranslationEntries = {
|
||||
"SOOTHE_BELL": { name: "安抚之铃" },
|
||||
|
||||
"SCOPE_LENS": { name: "焦点镜", description: "能看见弱点的镜片。携带它的宝可梦的招式\n会变得容易击中要害。" },
|
||||
"DIRE_HIT": { name: "要害攻击", extra: { raises: "会心" } },
|
||||
"LEEK": { name: "大葱", description: "非常长且坚硬的茎。让大葱鸭携带后,\n招式会变得容易击中要害。" },
|
||||
|
||||
"EVIOLITE": { name: "进化奇石", description: "携带后,还能进化的宝可梦的\n防御和特防就会提高。" },
|
||||
@ -252,28 +253,14 @@ export const modifierType: ModifierTypeTranslationEntries = {
|
||||
"METAL_POWDER": { name: "金属粉", description: "让百变怪携带后,防御就会提高的神奇粉末。\n非常细腻坚硬。" },
|
||||
"QUICK_POWDER": { name: "速度粉", description: "让百变怪携带后,速度就会提高的神奇粉末。\n非常细腻坚硬。" }
|
||||
},
|
||||
TempBattleStatBoosterItem: {
|
||||
TempStatStageBoosterItem: {
|
||||
"x_attack": "力量强化",
|
||||
"x_defense": "防御强化",
|
||||
"x_sp_atk": "特攻强化",
|
||||
"x_sp_def": "特防强化",
|
||||
"x_speed": "速度强化",
|
||||
"x_accuracy": "命中强化",
|
||||
"dire_hit": "要害攻击",
|
||||
"x_accuracy": "命中强化"
|
||||
},
|
||||
|
||||
TempBattleStatBoosterStatName: {
|
||||
"ATK": "攻击",
|
||||
"DEF": "防御",
|
||||
"SPATK": "特攻",
|
||||
"SPDEF": "特防",
|
||||
"SPD": "速度",
|
||||
"ACC": "命中",
|
||||
"CRIT": "会心",
|
||||
"EVA": "闪避",
|
||||
"DEFAULT": "???",
|
||||
},
|
||||
|
||||
AttackTypeBoosterItem: {
|
||||
"silk_scarf": "丝绸围巾",
|
||||
"black_belt": "黑带",
|
||||
|
@ -51,9 +51,8 @@ export const modifierType: ModifierTypeTranslationEntries = {
|
||||
DoubleBattleChanceBoosterModifierType: {
|
||||
description: "接下來的{{battleCount}}場戰鬥是雙打的概率翻倍。",
|
||||
},
|
||||
TempBattleStatBoosterModifierType: {
|
||||
description:
|
||||
"爲所有成員寶可夢提升一級{{tempBattleStatName}},持續5場戰鬥。",
|
||||
TempStatStageBoosterModifierType: {
|
||||
description: "爲所有成員寶可夢提升一級{{stat}},持續5場戰鬥。",
|
||||
},
|
||||
AttackTypeBoosterModifierType: {
|
||||
description: "一隻寶可夢的{{moveType}}系招式威力提升20%。",
|
||||
@ -195,6 +194,12 @@ export const modifierType: ModifierTypeTranslationEntries = {
|
||||
name: "焦點鏡",
|
||||
description: "能看見弱點的鏡片。攜帶它的寶可夢的招式 會變得容易擊中要害。"
|
||||
},
|
||||
DIRE_HIT: {
|
||||
name: "要害攻擊",
|
||||
extra: {
|
||||
raises: "會心"
|
||||
}
|
||||
},
|
||||
LEEK: {
|
||||
name: "大蔥",
|
||||
description: "非常長且堅硬的莖。讓大蔥鴨攜帶後,招式會 變得容易擊中要害。"
|
||||
@ -319,28 +324,14 @@ export const modifierType: ModifierTypeTranslationEntries = {
|
||||
"METAL_POWDER": { name: "金屬粉", description: "讓百變怪攜帶後,防禦就會提高的神奇粉末。非常細緻堅硬。" },
|
||||
"QUICK_POWDER": { name: "速度粉", description: "讓百變怪攜帶後,速度就會提高的神奇粉末。非常細緻堅硬。" }
|
||||
},
|
||||
TempBattleStatBoosterItem: {
|
||||
TempStatStageBoosterItem: {
|
||||
x_attack: "力量強化",
|
||||
x_defense: "防禦強化",
|
||||
x_sp_atk: "特攻強化",
|
||||
x_sp_def: "特防強化",
|
||||
x_speed: "速度強化",
|
||||
x_accuracy: "命中強化",
|
||||
dire_hit: "要害攻擊",
|
||||
x_accuracy: "命中強化"
|
||||
},
|
||||
|
||||
TempBattleStatBoosterStatName: {
|
||||
"ATK": "攻擊",
|
||||
"DEF": "防禦",
|
||||
"SPATK": "特攻",
|
||||
"SPDEF": "特防",
|
||||
"SPD": "速度",
|
||||
"ACC": "命中",
|
||||
"CRIT": "會心",
|
||||
"EVA": "閃避",
|
||||
"DEFAULT": "???",
|
||||
},
|
||||
|
||||
AttackTypeBoosterItem: {
|
||||
silk_scarf: "絲綢圍巾",
|
||||
black_belt: "黑帶",
|
||||
|
@ -8,7 +8,6 @@ import { tmPoolTiers, tmSpecies } from "../data/tms";
|
||||
import { Type } from "../data/type";
|
||||
import PartyUiHandler, { PokemonMoveSelectFilter, PokemonSelectFilter } from "../ui/party-ui-handler";
|
||||
import * as Utils from "../utils";
|
||||
import { TempBattleStat, getTempBattleStatBoosterItemName, getTempBattleStatName } from "../data/temp-battle-stat";
|
||||
import { getBerryEffectDescription, getBerryName } from "../data/berry";
|
||||
import { Unlockables } from "../system/unlockables";
|
||||
import { StatusEffect, getStatusEffectDescriptor } from "../data/status-effect";
|
||||
@ -28,6 +27,7 @@ import { BerryType } from "#enums/berry-type";
|
||||
import { Moves } from "#enums/moves";
|
||||
import { Species } from "#enums/species";
|
||||
import { getPokemonNameWithAffix } from "#app/messages.js";
|
||||
import { TEMP_BATTLE_STATS, TempBattleStat } from "#app/enums/stat";
|
||||
|
||||
const outputModifierData = false;
|
||||
const useMaxWeightForOutput = false;
|
||||
@ -427,26 +427,28 @@ export class DoubleBattleChanceBoosterModifierType extends ModifierType {
|
||||
}
|
||||
}
|
||||
|
||||
export class TempBattleStatBoosterModifierType extends ModifierType implements GeneratedPersistentModifierType {
|
||||
public tempBattleStat: TempBattleStat;
|
||||
export class TempStatStageBoosterModifierType extends ModifierType implements GeneratedPersistentModifierType {
|
||||
private stat: TempBattleStat;
|
||||
private key: string;
|
||||
|
||||
constructor(tempBattleStat: TempBattleStat) {
|
||||
super("", getTempBattleStatBoosterItemName(tempBattleStat).replace(/\./g, "").replace(/[ ]/g, "_").toLowerCase(),
|
||||
(_type, _args) => new Modifiers.TempBattleStatBoosterModifier(this, this.tempBattleStat));
|
||||
constructor(stat: TempBattleStat) {
|
||||
const key = TempStatStageBoosterModifierTypeGenerator.items[stat];
|
||||
super("", key, (_type, _args) => new Modifiers.TempStatStageBoosterModifier(this, this.stat));
|
||||
|
||||
this.tempBattleStat = tempBattleStat;
|
||||
this.stat = stat;
|
||||
this.key = key;
|
||||
}
|
||||
|
||||
get name(): string {
|
||||
return i18next.t(`modifierType:TempBattleStatBoosterItem.${getTempBattleStatBoosterItemName(this.tempBattleStat).replace(/\./g, "").replace(/[ ]/g, "_").toLowerCase()}`);
|
||||
return i18next.t(`modifierType:TempStatStageBoosterItem.${this.key}`);
|
||||
}
|
||||
|
||||
getDescription(scene: BattleScene): string {
|
||||
return i18next.t("modifierType:ModifierType.TempBattleStatBoosterModifierType.description", { tempBattleStatName: getTempBattleStatName(this.tempBattleStat) });
|
||||
getDescription(_scene: BattleScene): string {
|
||||
return i18next.t("modifierType:ModifierType.TempStatStageBoosterModifierType.description", { stat: i18next.t(`pokemonInfo:Stat.${Stat[this.stat]}`) });
|
||||
}
|
||||
|
||||
getPregenArgs(): any[] {
|
||||
return [ this.tempBattleStat ];
|
||||
return [ this.stat ];
|
||||
}
|
||||
}
|
||||
|
||||
@ -902,6 +904,27 @@ class AttackTypeBoosterModifierTypeGenerator extends ModifierTypeGenerator {
|
||||
}
|
||||
}
|
||||
|
||||
class TempStatStageBoosterModifierTypeGenerator extends ModifierTypeGenerator {
|
||||
public static readonly items: Record<TempBattleStat, string> = {
|
||||
[Stat.ATK]: "x_attack",
|
||||
[Stat.DEF]: "x_defense",
|
||||
[Stat.SPATK]: "x_sp_atk",
|
||||
[Stat.SPDEF]: "x_sp_def",
|
||||
[Stat.SPD]: "x_speed",
|
||||
[Stat.ACC]: "x_accuracy"
|
||||
};
|
||||
|
||||
constructor() {
|
||||
super((_party: Pokemon[], pregenArgs?: any[]) => {
|
||||
if (pregenArgs && (pregenArgs.length === 1) && TEMP_BATTLE_STATS.includes(pregenArgs[0])) {
|
||||
return new TempStatStageBoosterModifierType(pregenArgs[0]);
|
||||
}
|
||||
const randStat: TempBattleStat = Utils.randSeedInt(Stat.ACC, Stat.ATK);
|
||||
return new TempStatStageBoosterModifierType(randStat);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Modifier type generator for {@linkcode SpeciesStatBoosterModifierType}, which
|
||||
* encapsulates the logic for weighting the most useful held item from
|
||||
@ -910,7 +933,7 @@ class AttackTypeBoosterModifierTypeGenerator extends ModifierTypeGenerator {
|
||||
*/
|
||||
class SpeciesStatBoosterModifierTypeGenerator extends ModifierTypeGenerator {
|
||||
/** Object comprised of the currently available species-based stat boosting held items */
|
||||
public static items = {
|
||||
public static readonly items = {
|
||||
LIGHT_BALL: { stats: [Stat.ATK, Stat.SPATK], multiplier: 2, species: [Species.PIKACHU] },
|
||||
THICK_CLUB: { stats: [Stat.ATK], multiplier: 2, species: [Species.CUBONE, Species.MAROWAK, Species.ALOLA_MAROWAK] },
|
||||
METAL_POWDER: { stats: [Stat.DEF], multiplier: 2, species: [Species.DITTO] },
|
||||
@ -1273,22 +1296,21 @@ export const modifierTypes = {
|
||||
|
||||
SPECIES_STAT_BOOSTER: () => new SpeciesStatBoosterModifierTypeGenerator(),
|
||||
|
||||
TEMP_STAT_BOOSTER: () => new ModifierTypeGenerator((party: Pokemon[], pregenArgs?: any[]) => {
|
||||
if (pregenArgs) {
|
||||
return new TempBattleStatBoosterModifierType(pregenArgs[0] as TempBattleStat);
|
||||
TEMP_STAT_BOOSTER: () => new TempStatStageBoosterModifierTypeGenerator(),
|
||||
|
||||
DIRE_HIT: () => new class extends ModifierType {
|
||||
getDescription(_scene: BattleScene): string {
|
||||
return i18next.t("modifierType:ModifierType.TempStatStageBoosterModifierType.description", { stat: i18next.t("modifierType:ModifierType.DIRE_HIT.extra.raises") });
|
||||
}
|
||||
const randTempBattleStat = Utils.randSeedInt(6) as TempBattleStat;
|
||||
return new TempBattleStatBoosterModifierType(randTempBattleStat);
|
||||
}),
|
||||
DIRE_HIT: () => new TempBattleStatBoosterModifierType(TempBattleStat.CRIT),
|
||||
}("modifierType:ModifierType.DIRE_HIT", "dire_hit", (type, _args) => new Modifiers.TempCritBoosterModifier(type)),
|
||||
|
||||
BASE_STAT_BOOSTER: () => new ModifierTypeGenerator((party: Pokemon[], pregenArgs?: any[]) => {
|
||||
if (pregenArgs) {
|
||||
const stat = pregenArgs[0] as Stat;
|
||||
return new PokemonBaseStatBoosterModifierType(getBaseStatBoosterItemName(stat), stat);
|
||||
return new PokemonBaseStatBoosterModifierType(getBaseStatBoosterItemName(stat)!, stat); // TODO: Stat
|
||||
}
|
||||
const randStat = Utils.randSeedInt(6) as Stat;
|
||||
return new PokemonBaseStatBoosterModifierType(getBaseStatBoosterItemName(randStat), randStat);
|
||||
return new PokemonBaseStatBoosterModifierType(getBaseStatBoosterItemName(randStat)!, randStat); // TODO: Stat
|
||||
}),
|
||||
|
||||
ATTACK_TYPE_BOOSTER: () => new AttackTypeBoosterModifierTypeGenerator(),
|
||||
|
@ -11,7 +11,6 @@ import { EvolutionPhase } from "../evolution-phase";
|
||||
import { FusionSpeciesFormEvolution, pokemonEvolutions, pokemonPrevolutions } from "../data/pokemon-evolutions";
|
||||
import { getPokemonNameWithAffix } from "../messages";
|
||||
import * as Utils from "../utils";
|
||||
import { TempBattleStat } from "../data/temp-battle-stat";
|
||||
import { getBerryEffectFunc, getBerryPredicate } from "../data/berry";
|
||||
import { BattlerTagType} from "#enums/battler-tag-type";
|
||||
import { BerryType } from "#enums/berry-type";
|
||||
@ -24,7 +23,7 @@ import Overrides from "#app/overrides";
|
||||
import { ModifierType, modifierTypes } from "./modifier-type";
|
||||
import { Command } from "#app/ui/command-ui-handler.js";
|
||||
import { Species } from "#enums/species";
|
||||
import { BATTLE_STATS } from "#app/enums/stat";
|
||||
import { BATTLE_STATS, TEMP_BATTLE_STATS, TempBattleStat } from "#app/enums/stat";
|
||||
import i18next from "i18next";
|
||||
|
||||
import { allMoves } from "#app/data/move.js";
|
||||
@ -361,41 +360,89 @@ export class DoubleBattleChanceBoosterModifier extends LapsingPersistentModifier
|
||||
}
|
||||
}
|
||||
|
||||
export class TempBattleStatBoosterModifier extends LapsingPersistentModifier {
|
||||
private tempBattleStat: TempBattleStat;
|
||||
/**
|
||||
* Modifier used for party-wide items, specifically the X items, that
|
||||
* temporarily increments the stat stage of the corresponding {@linkcode TempBattleStat}.
|
||||
* @extends LapsingPersistentModifier
|
||||
* @see {@linkcode apply}
|
||||
*/
|
||||
export class TempStatStageBoosterModifier extends LapsingPersistentModifier {
|
||||
private stat: TempBattleStat;
|
||||
|
||||
constructor(type: ModifierTypes.TempBattleStatBoosterModifierType, tempBattleStat: TempBattleStat, battlesLeft?: integer, stackCount?: integer) {
|
||||
constructor(type: ModifierType, stat: TempBattleStat, battlesLeft?: integer, stackCount?: number) {
|
||||
super(type, battlesLeft || 5, stackCount);
|
||||
|
||||
this.tempBattleStat = tempBattleStat;
|
||||
this.stat = stat;
|
||||
}
|
||||
|
||||
match(modifier: Modifier): boolean {
|
||||
if (modifier instanceof TempBattleStatBoosterModifier) {
|
||||
return (modifier as TempBattleStatBoosterModifier).tempBattleStat === this.tempBattleStat
|
||||
&& (modifier as TempBattleStatBoosterModifier).battlesLeft === this.battlesLeft;
|
||||
if (modifier instanceof TempStatStageBoosterModifier) {
|
||||
const modifierInstance = modifier as TempStatStageBoosterModifier;
|
||||
return (modifierInstance.stat === this.stat) && (modifierInstance.battlesLeft === this.battlesLeft);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
clone(): TempBattleStatBoosterModifier {
|
||||
return new TempBattleStatBoosterModifier(this.type as ModifierTypes.TempBattleStatBoosterModifierType, this.tempBattleStat, this.battlesLeft, this.stackCount);
|
||||
clone() {
|
||||
return new TempStatStageBoosterModifier(this.type, this.stat, this.battlesLeft, this.stackCount);
|
||||
}
|
||||
|
||||
getArgs(): any[] {
|
||||
return [ this.tempBattleStat, this.battlesLeft ];
|
||||
return [ this.stat, this.battlesLeft ];
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if {@linkcode args} contains the necessary elements and if the
|
||||
* incoming stat is matches {@linkcode stat}.
|
||||
* @param args [0] {@linkcode TempBattleStat} being checked at the time
|
||||
* [1] {@linkcode Utils.IntegerHolder} N/A
|
||||
*/
|
||||
shouldApply(args: any[]): boolean {
|
||||
return args && (args.length === 2) && TEMP_BATTLE_STATS.includes(args[0]) && (args[0] === this.stat) && (args[1] instanceof Utils.IntegerHolder);
|
||||
}
|
||||
|
||||
/**
|
||||
* Increments the incoming stat stage matching {@linkcode stat}.
|
||||
* @param args [0] {@linkcode TempBattleStat} N/A
|
||||
* [1] {@linkcode Utils.IntegerHolder} that holds the resulting value of the stat stage
|
||||
*/
|
||||
apply(args: any[]): boolean {
|
||||
const tempBattleStat = args[0] as TempBattleStat;
|
||||
(args[1] as Utils.IntegerHolder).value++;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
if (tempBattleStat === this.tempBattleStat) {
|
||||
const statLevel = args[1] as Utils.IntegerHolder;
|
||||
statLevel.value = Math.min(statLevel.value + 1, 6);
|
||||
return true;
|
||||
}
|
||||
/**
|
||||
* Modifier used for party-wide items, namely Dire Hit, that
|
||||
* temporarily increments the critical-hit stage
|
||||
* @extends LapsingPersistentModifier
|
||||
* @see {@linkcode apply}
|
||||
*/
|
||||
export class TempCritBoosterModifier extends LapsingPersistentModifier {
|
||||
constructor(type: ModifierType, battlesLeft?: integer, stackCount?: number) {
|
||||
super(type, battlesLeft || 5, stackCount);
|
||||
}
|
||||
|
||||
return false;
|
||||
clone() {
|
||||
return new TempCritBoosterModifier(this.type, this.stackCount);
|
||||
}
|
||||
|
||||
matchType(modifier: Modifier): boolean {
|
||||
return (modifier instanceof TempCritBoosterModifier);
|
||||
}
|
||||
|
||||
shouldApply(args: any[]): boolean {
|
||||
return args && (args.length === 1) && (args[0] instanceof Utils.NumberHolder);
|
||||
}
|
||||
|
||||
/**
|
||||
* Increases the current critical-hit stage value by 1.
|
||||
* @param args [0] {@linkcode Utils.IntegerHolder} that holds the resulting critical-hit level
|
||||
* @returns true if the critical-hit stage boost applies successfully
|
||||
*/
|
||||
apply(args: any[]): boolean {
|
||||
(args[0] as Utils.NumberHolder).value++;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -5,7 +5,7 @@ import { allMoves, applyMoveAttrs, BypassSleepAttr, ChargeAttr, applyFilteredMov
|
||||
import { Mode } from "./ui/ui";
|
||||
import { Command } from "./ui/command-ui-handler";
|
||||
import { Stat } from "./data/pokemon-stat";
|
||||
import { BerryModifier, ContactHeldItemTransferChanceModifier, EnemyAttackStatusEffectChanceModifier, EnemyPersistentModifier, EnemyStatusEffectHealChanceModifier, EnemyTurnHealModifier, ExpBalanceModifier, ExpBoosterModifier, ExpShareModifier, ExtraModifierModifier, FlinchChanceModifier, HealingBoosterModifier, HitHealModifier, LapsingPersistentModifier, MapModifier, Modifier, MultipleParticipantExpBonusModifier, PokemonExpBoosterModifier, PokemonHeldItemModifier, PokemonInstantReviveModifier, SwitchEffectTransferModifier, TurnHealModifier, TurnHeldItemTransferModifier, MoneyMultiplierModifier, MoneyInterestModifier, IvScannerModifier, LapsingPokemonHeldItemModifier, PokemonMultiHitModifier, overrideModifiers, overrideHeldItems, BypassSpeedChanceModifier, TurnStatusEffectModifier, PokemonResetNegativeStatStageModifier } from "./modifier/modifier";
|
||||
import { BerryModifier, ContactHeldItemTransferChanceModifier, EnemyAttackStatusEffectChanceModifier, EnemyPersistentModifier, EnemyStatusEffectHealChanceModifier, EnemyTurnHealModifier, ExpBalanceModifier, ExpBoosterModifier, ExpShareModifier, ExtraModifierModifier, FlinchChanceModifier, HealingBoosterModifier, HitHealModifier, LapsingPersistentModifier, MapModifier, Modifier, MultipleParticipantExpBonusModifier, PokemonExpBoosterModifier, PokemonHeldItemModifier, PokemonInstantReviveModifier, SwitchEffectTransferModifier, TurnHealModifier, TurnHeldItemTransferModifier, MoneyMultiplierModifier, MoneyInterestModifier, IvScannerModifier, LapsingPokemonHeldItemModifier, PokemonMultiHitModifier, overrideModifiers, overrideHeldItems, BypassSpeedChanceModifier, TurnStatusEffectModifier, ResetNegativeStatStageModifier } from "./modifier/modifier";
|
||||
import PartyUiHandler, { PartyOption, PartyUiMode } from "./ui/party-ui-handler";
|
||||
import { doPokeballBounceAnim, getPokeballAtlasKey, getPokeballCatchMultiplier, getPokeballTintColor, PokeballType } from "./data/pokeball";
|
||||
import { CommonAnim, CommonBattleAnim, MoveAnim, initMoveAnim, loadMoveAnimAssets } from "./data/battle-anims";
|
||||
@ -3536,7 +3536,7 @@ export class StatChangePhase extends PokemonPhase {
|
||||
const existingPhase = this.scene.findPhase(p => p instanceof StatChangePhase && p.battlerIndex === this.battlerIndex);
|
||||
if (!(existingPhase instanceof StatChangePhase)) {
|
||||
// Apply White Herb if needed
|
||||
const whiteHerb = this.scene.applyModifier(PokemonResetNegativeStatStageModifier, this.player, pokemon) as PokemonResetNegativeStatStageModifier;
|
||||
const whiteHerb = this.scene.applyModifier(ResetNegativeStatStageModifier, this.player, pokemon) as PokemonResetNegativeStatStageModifier;
|
||||
// If the White Herb was applied, consume it
|
||||
if (whiteHerb) {
|
||||
--whiteHerb.stackCount;
|
||||
|
@ -651,7 +651,7 @@ export default class BattleInfo extends Phaser.GameObjects.Container {
|
||||
}
|
||||
|
||||
const battleStats = pokemon.summonData
|
||||
? pokemon.summonData.battleStats
|
||||
? pokemon.summonData.statStages // TODO: BattleStats
|
||||
: this.battleStatOrder.map(() => 0);
|
||||
const battleStatsStr = battleStats.join("");
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user