mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-08-19 05:49:32 +02:00
Compare commits
7 Commits
d14c048a4b
...
7d86449d86
Author | SHA1 | Date | |
---|---|---|---|
|
7d86449d86 | ||
|
0da37a0f0c | ||
|
5a445e3633 | ||
|
c18c2e0dce | ||
|
554b154e8b | ||
|
028bc1ed1a | ||
|
c657e61312 |
@ -1,13 +1,24 @@
|
|||||||
|
import type { Pokemon } from "#field/pokemon";
|
||||||
import type {
|
import type {
|
||||||
AttackMove,
|
AttackMove,
|
||||||
ChargingAttackMove,
|
ChargingAttackMove,
|
||||||
ChargingSelfStatusMove,
|
ChargingSelfStatusMove,
|
||||||
|
Move,
|
||||||
MoveAttr,
|
MoveAttr,
|
||||||
MoveAttrConstructorMap,
|
MoveAttrConstructorMap,
|
||||||
SelfStatusMove,
|
SelfStatusMove,
|
||||||
StatusMove,
|
StatusMove,
|
||||||
} from "#moves/move";
|
} from "#moves/move";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A generic function producing a message during a Move's execution.
|
||||||
|
* @param user - The {@linkcode Pokemon} using the move
|
||||||
|
* @param target - The {@linkcode Pokemon} targeted by the move
|
||||||
|
* @param move - The {@linkcode Move} being used
|
||||||
|
* @returns a string
|
||||||
|
*/
|
||||||
|
export type MoveMessageFunc = (user: Pokemon, target: Pokemon, move: Move) => string;
|
||||||
|
|
||||||
export type MoveAttrFilter = (attr: MoveAttr) => boolean;
|
export type MoveAttrFilter = (attr: MoveAttr) => boolean;
|
||||||
|
|
||||||
export type * from "#moves/move";
|
export type * from "#moves/move";
|
||||||
|
@ -1670,6 +1670,7 @@ export class MoveTypeChangeAbAttr extends PreAttackAbAttr {
|
|||||||
constructor(
|
constructor(
|
||||||
private newType: PokemonType,
|
private newType: PokemonType,
|
||||||
private powerMultiplier: number,
|
private powerMultiplier: number,
|
||||||
|
// TODO: all moves with this attr solely check the move being used...
|
||||||
private condition?: PokemonAttackCondition,
|
private condition?: PokemonAttackCondition,
|
||||||
) {
|
) {
|
||||||
super(false);
|
super(false);
|
||||||
|
@ -86,7 +86,7 @@ import { PokemonHealPhase } from "#phases/pokemon-heal-phase";
|
|||||||
import { SwitchSummonPhase } from "#phases/switch-summon-phase";
|
import { SwitchSummonPhase } from "#phases/switch-summon-phase";
|
||||||
import type { AttackMoveResult } from "#types/attack-move-result";
|
import type { AttackMoveResult } from "#types/attack-move-result";
|
||||||
import type { Localizable } from "#types/locales";
|
import type { Localizable } from "#types/locales";
|
||||||
import type { ChargingMove, MoveAttrMap, MoveAttrString, MoveClassMap, MoveKindString } from "#types/move-types";
|
import type { ChargingMove, MoveAttrMap, MoveAttrString, MoveClassMap, MoveKindString, MoveMessageFunc } from "#types/move-types";
|
||||||
import type { TurnMove } from "#types/turn-move";
|
import type { TurnMove } from "#types/turn-move";
|
||||||
import { BooleanHolder, type Constructor, isNullOrUndefined, NumberHolder, randSeedFloat, randSeedInt, randSeedItem, toDmgValue } from "#utils/common";
|
import { BooleanHolder, type Constructor, isNullOrUndefined, NumberHolder, randSeedFloat, randSeedInt, randSeedItem, toDmgValue } from "#utils/common";
|
||||||
import { getEnumValues } from "#utils/enums";
|
import { getEnumValues } from "#utils/enums";
|
||||||
@ -1357,20 +1357,20 @@ export class MoveHeaderAttr extends MoveAttr {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Header attribute to queue a message at the beginning of a turn.
|
* Header attribute to queue a message at the beginning of a turn.
|
||||||
* @see {@link MoveHeaderAttr}
|
|
||||||
*/
|
*/
|
||||||
export class MessageHeaderAttr extends MoveHeaderAttr {
|
export class MessageHeaderAttr extends MoveHeaderAttr {
|
||||||
private message: string | ((user: Pokemon, move: Move) => string);
|
/** The message to display, or a function producing one. */
|
||||||
|
private message: string | MoveMessageFunc;
|
||||||
|
|
||||||
constructor(message: string | ((user: Pokemon, move: Move) => string)) {
|
constructor(message: string | MoveMessageFunc) {
|
||||||
super();
|
super();
|
||||||
this.message = message;
|
this.message = message;
|
||||||
}
|
}
|
||||||
|
|
||||||
apply(user: Pokemon, target: Pokemon, move: Move, args: any[]): boolean {
|
apply(user: Pokemon, target: Pokemon, move: Move): boolean {
|
||||||
const message = typeof this.message === "string"
|
const message = typeof this.message === "string"
|
||||||
? this.message
|
? this.message
|
||||||
: this.message(user, move);
|
: this.message(user, target, move);
|
||||||
|
|
||||||
if (message) {
|
if (message) {
|
||||||
globalScene.phaseManager.queueMessage(message);
|
globalScene.phaseManager.queueMessage(message);
|
||||||
@ -1418,21 +1418,21 @@ export class BeakBlastHeaderAttr extends AddBattlerTagHeaderAttr {
|
|||||||
*/
|
*/
|
||||||
export class PreMoveMessageAttr extends MoveAttr {
|
export class PreMoveMessageAttr extends MoveAttr {
|
||||||
/** The message to display or a function returning one */
|
/** The message to display or a function returning one */
|
||||||
private message: string | ((user: Pokemon, target: Pokemon, move: Move) => string | undefined);
|
private message: string | MoveMessageFunc;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a new {@linkcode PreMoveMessageAttr} to display a message before move execution.
|
* Create a new {@linkcode PreMoveMessageAttr} to display a message before move execution.
|
||||||
* @param message - The message to display before move use, either as a string or a function producing one.
|
* @param message - The message to display before move use, either` a literal string or a function producing one.
|
||||||
* @remarks
|
* @remarks
|
||||||
* If {@linkcode message} evaluates to an empty string (`''`), no message will be displayed
|
* If {@linkcode message} evaluates to an empty string (`""`), no message will be displayed
|
||||||
* (though the move will still succeed).
|
* (though the move will still succeed).
|
||||||
*/
|
*/
|
||||||
constructor(message: string | ((user: Pokemon, target: Pokemon, move: Move) => string)) {
|
constructor(message: string | MoveMessageFunc) {
|
||||||
super();
|
super();
|
||||||
this.message = message;
|
this.message = message;
|
||||||
}
|
}
|
||||||
|
|
||||||
apply(user: Pokemon, target: Pokemon, move: Move, _args: any[]): boolean {
|
apply(user: Pokemon, target: Pokemon, move: Move): boolean {
|
||||||
const message = typeof this.message === "function"
|
const message = typeof this.message === "function"
|
||||||
? this.message(user, target, move)
|
? this.message(user, target, move)
|
||||||
: this.message;
|
: this.message;
|
||||||
@ -1453,18 +1453,17 @@ export class PreMoveMessageAttr extends MoveAttr {
|
|||||||
* @extends MoveAttr
|
* @extends MoveAttr
|
||||||
*/
|
*/
|
||||||
export class PreUseInterruptAttr extends MoveAttr {
|
export class PreUseInterruptAttr extends MoveAttr {
|
||||||
protected message?: string | ((user: Pokemon, target: Pokemon, move: Move) => string);
|
protected message: string | MoveMessageFunc;
|
||||||
protected overridesFailedMessage: boolean;
|
|
||||||
protected conditionFunc: MoveConditionFunc;
|
protected conditionFunc: MoveConditionFunc;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a new MoveInterruptedMessageAttr.
|
* Create a new MoveInterruptedMessageAttr.
|
||||||
* @param message The message to display when the move is interrupted, or a function that formats the message based on the user, target, and move.
|
* @param message The message to display when the move is interrupted, or a function that formats the message based on the user, target, and move.
|
||||||
*/
|
*/
|
||||||
constructor(message?: string | ((user: Pokemon, target: Pokemon, move: Move) => string), conditionFunc?: MoveConditionFunc) {
|
constructor(message: string | MoveMessageFunc, conditionFunc: MoveConditionFunc) {
|
||||||
super();
|
super();
|
||||||
this.message = message;
|
this.message = message;
|
||||||
this.conditionFunc = conditionFunc ?? (() => true);
|
this.conditionFunc = conditionFunc;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -1485,11 +1484,9 @@ export class PreUseInterruptAttr extends MoveAttr {
|
|||||||
*/
|
*/
|
||||||
override getFailedText(user: Pokemon, target: Pokemon, move: Move): string | undefined {
|
override getFailedText(user: Pokemon, target: Pokemon, move: Move): string | undefined {
|
||||||
if (this.message && this.conditionFunc(user, target, move)) {
|
if (this.message && this.conditionFunc(user, target, move)) {
|
||||||
const message =
|
return typeof this.message === "string"
|
||||||
typeof this.message === "string"
|
? this.message
|
||||||
? (this.message as string)
|
|
||||||
: this.message(user, target, move);
|
: this.message(user, target, move);
|
||||||
return message;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1694,17 +1691,30 @@ export class SurviveDamageAttr extends ModifiedDamageAttr {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export class SplashAttr extends MoveEffectAttr {
|
/**
|
||||||
apply(user: Pokemon, target: Pokemon, move: Move, args: any[]): boolean {
|
* Move attribute to display arbitrary text during a move's execution.
|
||||||
globalScene.phaseManager.queueMessage(i18next.t("moveTriggers:splash"));
|
*/
|
||||||
return true;
|
export class MessageAttr extends MoveEffectAttr {
|
||||||
}
|
/** The message to display, either as a string or a function returning one. */
|
||||||
}
|
private message: string | MoveMessageFunc;
|
||||||
|
|
||||||
export class CelebrateAttr extends MoveEffectAttr {
|
constructor(message: string | MoveMessageFunc, options?: MoveEffectAttrOptions) {
|
||||||
apply(user: Pokemon, target: Pokemon, move: Move, args: any[]): boolean {
|
// TODO: Do we need to respect `selfTarget` if we're just displaying text?
|
||||||
globalScene.phaseManager.queueMessage(i18next.t("moveTriggers:celebrate", { playerName: loggedInUser?.username }));
|
super(false, options)
|
||||||
return true;
|
this.message = message;
|
||||||
|
}
|
||||||
|
|
||||||
|
override apply(user: Pokemon, target: Pokemon, move: Move): boolean {
|
||||||
|
const message = typeof this.message === "function"
|
||||||
|
? this.message(user, target, move)
|
||||||
|
: this.message;
|
||||||
|
|
||||||
|
// TODO: Consider changing if/when MoveAttr `apply` return values become significant
|
||||||
|
if (message) {
|
||||||
|
globalScene.phaseManager.queueMessage(message, 500);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -5931,38 +5941,6 @@ export class ProtectAttr extends AddBattlerTagAttr {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export class IgnoreAccuracyAttr extends AddBattlerTagAttr {
|
|
||||||
constructor() {
|
|
||||||
super(BattlerTagType.IGNORE_ACCURACY, true, false, 2);
|
|
||||||
}
|
|
||||||
|
|
||||||
apply(user: Pokemon, target: Pokemon, move: Move, args: any[]): boolean {
|
|
||||||
if (!super.apply(user, target, move, args)) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
globalScene.phaseManager.queueMessage(i18next.t("moveTriggers:tookAimAtTarget", { pokemonName: getPokemonNameWithAffix(user), targetName: getPokemonNameWithAffix(target) }));
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
export class FaintCountdownAttr extends AddBattlerTagAttr {
|
|
||||||
constructor() {
|
|
||||||
super(BattlerTagType.PERISH_SONG, false, true, 4);
|
|
||||||
}
|
|
||||||
|
|
||||||
apply(user: Pokemon, target: Pokemon, move: Move, args: any[]): boolean {
|
|
||||||
if (!super.apply(user, target, move, args)) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
globalScene.phaseManager.queueMessage(i18next.t("moveTriggers:faintCountdown", { pokemonName: getPokemonNameWithAffix(target), turnCount: this.turnCountMin - 1 }));
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Attribute to remove all Substitutes from the field.
|
* Attribute to remove all Substitutes from the field.
|
||||||
* @extends MoveEffectAttr
|
* @extends MoveEffectAttr
|
||||||
@ -6603,8 +6581,10 @@ export class ChillyReceptionAttr extends ForceSwitchOutAttr {
|
|||||||
return (user, target, move) => globalScene.arena.weather?.weatherType !== WeatherType.SNOW || super.getSwitchOutCondition()(user, target, move);
|
return (user, target, move) => globalScene.arena.weather?.weatherType !== WeatherType.SNOW || super.getSwitchOutCondition()(user, target, move);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export class RemoveTypeAttr extends MoveEffectAttr {
|
export class RemoveTypeAttr extends MoveEffectAttr {
|
||||||
|
|
||||||
|
// TODO: Remove the message callback
|
||||||
private removedType: PokemonType;
|
private removedType: PokemonType;
|
||||||
private messageCallback: ((user: Pokemon) => void) | undefined;
|
private messageCallback: ((user: Pokemon) => void) | undefined;
|
||||||
|
|
||||||
@ -8299,8 +8279,6 @@ const MoveAttrs = Object.freeze({
|
|||||||
RandomLevelDamageAttr,
|
RandomLevelDamageAttr,
|
||||||
ModifiedDamageAttr,
|
ModifiedDamageAttr,
|
||||||
SurviveDamageAttr,
|
SurviveDamageAttr,
|
||||||
SplashAttr,
|
|
||||||
CelebrateAttr,
|
|
||||||
RecoilAttr,
|
RecoilAttr,
|
||||||
SacrificialAttr,
|
SacrificialAttr,
|
||||||
SacrificialAttrOnHit,
|
SacrificialAttrOnHit,
|
||||||
@ -8443,8 +8421,7 @@ const MoveAttrs = Object.freeze({
|
|||||||
RechargeAttr,
|
RechargeAttr,
|
||||||
TrapAttr,
|
TrapAttr,
|
||||||
ProtectAttr,
|
ProtectAttr,
|
||||||
IgnoreAccuracyAttr,
|
MessageAttr,
|
||||||
FaintCountdownAttr,
|
|
||||||
RemoveAllSubstitutesAttr,
|
RemoveAllSubstitutesAttr,
|
||||||
HitsTagAttr,
|
HitsTagAttr,
|
||||||
HitsTagForDoubleDamageAttr,
|
HitsTagForDoubleDamageAttr,
|
||||||
@ -8938,7 +8915,7 @@ export function initMoves() {
|
|||||||
new AttackMove(MoveId.PSYWAVE, PokemonType.PSYCHIC, MoveCategory.SPECIAL, -1, 100, 15, -1, 0, 1)
|
new AttackMove(MoveId.PSYWAVE, PokemonType.PSYCHIC, MoveCategory.SPECIAL, -1, 100, 15, -1, 0, 1)
|
||||||
.attr(RandomLevelDamageAttr),
|
.attr(RandomLevelDamageAttr),
|
||||||
new SelfStatusMove(MoveId.SPLASH, PokemonType.NORMAL, -1, 40, -1, 0, 1)
|
new SelfStatusMove(MoveId.SPLASH, PokemonType.NORMAL, -1, 40, -1, 0, 1)
|
||||||
.attr(SplashAttr)
|
.attr(MessageAttr, i18next.t("moveTriggers:splash"))
|
||||||
.condition(failOnGravityCondition),
|
.condition(failOnGravityCondition),
|
||||||
new SelfStatusMove(MoveId.ACID_ARMOR, PokemonType.POISON, -1, 20, -1, 0, 1)
|
new SelfStatusMove(MoveId.ACID_ARMOR, PokemonType.POISON, -1, 20, -1, 0, 1)
|
||||||
.attr(StatStageChangeAttr, [ Stat.DEF ], 2, true),
|
.attr(StatStageChangeAttr, [ Stat.DEF ], 2, true),
|
||||||
@ -9000,7 +8977,10 @@ export function initMoves() {
|
|||||||
.attr(AddBattlerTagAttr, BattlerTagType.TRAPPED, false, true, 1)
|
.attr(AddBattlerTagAttr, BattlerTagType.TRAPPED, false, true, 1)
|
||||||
.reflectable(),
|
.reflectable(),
|
||||||
new StatusMove(MoveId.MIND_READER, PokemonType.NORMAL, -1, 5, -1, 0, 2)
|
new StatusMove(MoveId.MIND_READER, PokemonType.NORMAL, -1, 5, -1, 0, 2)
|
||||||
.attr(IgnoreAccuracyAttr),
|
.attr(AddBattlerTagAttr, BattlerTagType.IGNORE_ACCURACY, true, false, 2)
|
||||||
|
.attr(MessageAttr, (user, target) =>
|
||||||
|
i18next.t("moveTriggers:tookAimAtTarget", { pokemonName: getPokemonNameWithAffix(user), targetName: getPokemonNameWithAffix(target) })
|
||||||
|
),
|
||||||
new StatusMove(MoveId.NIGHTMARE, PokemonType.GHOST, 100, 15, -1, 0, 2)
|
new StatusMove(MoveId.NIGHTMARE, PokemonType.GHOST, 100, 15, -1, 0, 2)
|
||||||
.attr(AddBattlerTagAttr, BattlerTagType.NIGHTMARE)
|
.attr(AddBattlerTagAttr, BattlerTagType.NIGHTMARE)
|
||||||
.condition(targetSleptOrComatoseCondition),
|
.condition(targetSleptOrComatoseCondition),
|
||||||
@ -9088,7 +9068,9 @@ export function initMoves() {
|
|||||||
return lastTurnMove.length === 0 || lastTurnMove[0].move !== move.id || lastTurnMove[0].result !== MoveResult.SUCCESS;
|
return lastTurnMove.length === 0 || lastTurnMove[0].move !== move.id || lastTurnMove[0].result !== MoveResult.SUCCESS;
|
||||||
}),
|
}),
|
||||||
new StatusMove(MoveId.PERISH_SONG, PokemonType.NORMAL, -1, 5, -1, 0, 2)
|
new StatusMove(MoveId.PERISH_SONG, PokemonType.NORMAL, -1, 5, -1, 0, 2)
|
||||||
.attr(FaintCountdownAttr)
|
.attr(AddBattlerTagAttr, BattlerTagType.PERISH_SONG, false, true, 4)
|
||||||
|
.attr(MessageAttr, (_user, target) =>
|
||||||
|
i18next.t("moveTriggers:faintCountdown", { pokemonName: getPokemonNameWithAffix(target), turnCount: 3 }))
|
||||||
.ignoresProtect()
|
.ignoresProtect()
|
||||||
.soundBased()
|
.soundBased()
|
||||||
.condition(failOnBossCondition)
|
.condition(failOnBossCondition)
|
||||||
@ -9104,7 +9086,10 @@ export function initMoves() {
|
|||||||
.attr(MultiHitAttr)
|
.attr(MultiHitAttr)
|
||||||
.makesContact(false),
|
.makesContact(false),
|
||||||
new StatusMove(MoveId.LOCK_ON, PokemonType.NORMAL, -1, 5, -1, 0, 2)
|
new StatusMove(MoveId.LOCK_ON, PokemonType.NORMAL, -1, 5, -1, 0, 2)
|
||||||
.attr(IgnoreAccuracyAttr),
|
.attr(AddBattlerTagAttr, BattlerTagType.IGNORE_ACCURACY, true, false, 2)
|
||||||
|
.attr(MessageAttr, (user, target) =>
|
||||||
|
i18next.t("moveTriggers:tookAimAtTarget", { pokemonName: getPokemonNameWithAffix(user), targetName: getPokemonNameWithAffix(target) })
|
||||||
|
),
|
||||||
new AttackMove(MoveId.OUTRAGE, PokemonType.DRAGON, MoveCategory.PHYSICAL, 120, 100, 10, -1, 0, 2)
|
new AttackMove(MoveId.OUTRAGE, PokemonType.DRAGON, MoveCategory.PHYSICAL, 120, 100, 10, -1, 0, 2)
|
||||||
.attr(FrenzyAttr)
|
.attr(FrenzyAttr)
|
||||||
.attr(MissEffectAttr, frenzyMissFunc)
|
.attr(MissEffectAttr, frenzyMissFunc)
|
||||||
@ -9331,8 +9316,8 @@ export function initMoves() {
|
|||||||
&& (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),
|
.attr(BypassBurnDamageReductionAttr),
|
||||||
new AttackMove(MoveId.FOCUS_PUNCH, PokemonType.FIGHTING, MoveCategory.PHYSICAL, 150, 100, 20, -1, -3, 3)
|
new AttackMove(MoveId.FOCUS_PUNCH, PokemonType.FIGHTING, MoveCategory.PHYSICAL, 150, 100, 20, -1, -3, 3)
|
||||||
.attr(MessageHeaderAttr, (user, move) => i18next.t("moveTriggers:isTighteningFocus", { pokemonName: getPokemonNameWithAffix(user) }))
|
.attr(MessageHeaderAttr, (user) => i18next.t("moveTriggers:isTighteningFocus", { pokemonName: getPokemonNameWithAffix(user) }))
|
||||||
.attr(PreUseInterruptAttr, (user, target, move) => i18next.t("moveTriggers:lostFocus", { pokemonName: getPokemonNameWithAffix(user) }), user => !!user.turnData.attacksReceived.find(r => r.damage))
|
.attr(PreUseInterruptAttr, (user) => i18next.t("moveTriggers:lostFocus", { pokemonName: getPokemonNameWithAffix(user) }), user => user.turnData.attacksReceived.some(r => r.damage > 0))
|
||||||
.punchingMove(),
|
.punchingMove(),
|
||||||
new AttackMove(MoveId.SMELLING_SALTS, PokemonType.NORMAL, MoveCategory.PHYSICAL, 70, 100, 10, -1, 0, 3)
|
new AttackMove(MoveId.SMELLING_SALTS, PokemonType.NORMAL, MoveCategory.PHYSICAL, 70, 100, 10, -1, 0, 3)
|
||||||
.attr(MovePowerMultiplierAttr, (user, target, move) => target.status?.effect === StatusEffect.PARALYSIS ? 2 : 1)
|
.attr(MovePowerMultiplierAttr, (user, target, move) => target.status?.effect === StatusEffect.PARALYSIS ? 2 : 1)
|
||||||
@ -10433,7 +10418,8 @@ export function initMoves() {
|
|||||||
new AttackMove(MoveId.DAZZLING_GLEAM, PokemonType.FAIRY, MoveCategory.SPECIAL, 80, 100, 10, -1, 0, 6)
|
new AttackMove(MoveId.DAZZLING_GLEAM, PokemonType.FAIRY, MoveCategory.SPECIAL, 80, 100, 10, -1, 0, 6)
|
||||||
.target(MoveTarget.ALL_NEAR_ENEMIES),
|
.target(MoveTarget.ALL_NEAR_ENEMIES),
|
||||||
new SelfStatusMove(MoveId.CELEBRATE, PokemonType.NORMAL, -1, 40, -1, 0, 6)
|
new SelfStatusMove(MoveId.CELEBRATE, PokemonType.NORMAL, -1, 40, -1, 0, 6)
|
||||||
.attr(CelebrateAttr),
|
// NB: This needs a lambda function as the user will not be logged in by the time the moves are initialized
|
||||||
|
.attr(MessageAttr, () => i18next.t("moveTriggers:celebrate", { playerName: loggedInUser?.username })),
|
||||||
new StatusMove(MoveId.HOLD_HANDS, PokemonType.NORMAL, -1, 40, -1, 0, 6)
|
new StatusMove(MoveId.HOLD_HANDS, PokemonType.NORMAL, -1, 40, -1, 0, 6)
|
||||||
.ignoresSubstitute()
|
.ignoresSubstitute()
|
||||||
.target(MoveTarget.NEAR_ALLY),
|
.target(MoveTarget.NEAR_ALLY),
|
||||||
@ -10608,7 +10594,12 @@ export function initMoves() {
|
|||||||
.attr(StatStageChangeAttr, [ Stat.SPD ], -1)
|
.attr(StatStageChangeAttr, [ Stat.SPD ], -1)
|
||||||
.reflectable(),
|
.reflectable(),
|
||||||
new SelfStatusMove(MoveId.LASER_FOCUS, PokemonType.NORMAL, -1, 30, -1, 0, 7)
|
new SelfStatusMove(MoveId.LASER_FOCUS, PokemonType.NORMAL, -1, 30, -1, 0, 7)
|
||||||
.attr(AddBattlerTagAttr, BattlerTagType.ALWAYS_CRIT, true, false),
|
.attr(AddBattlerTagAttr, BattlerTagType.ALWAYS_CRIT, true, false)
|
||||||
|
.attr(MessageAttr, (user) =>
|
||||||
|
i18next.t("battlerTags:laserFocusOnAdd", {
|
||||||
|
pokemonNameWithAffix: getPokemonNameWithAffix(user),
|
||||||
|
}),
|
||||||
|
),
|
||||||
new StatusMove(MoveId.GEAR_UP, PokemonType.STEEL, -1, 20, -1, 0, 7)
|
new StatusMove(MoveId.GEAR_UP, PokemonType.STEEL, -1, 20, -1, 0, 7)
|
||||||
.attr(StatStageChangeAttr, [ Stat.ATK, Stat.SPATK ], 1, false, { condition: (user, target, move) => !![ AbilityId.PLUS, AbilityId.MINUS ].find(a => target.hasAbility(a, false)) })
|
.attr(StatStageChangeAttr, [ Stat.ATK, Stat.SPATK ], 1, false, { condition: (user, target, move) => !![ AbilityId.PLUS, AbilityId.MINUS ].find(a => target.hasAbility(a, false)) })
|
||||||
.ignoresSubstitute()
|
.ignoresSubstitute()
|
||||||
|
@ -82,7 +82,7 @@ export const ATrainersTestEncounter: MysteryEncounter = MysteryEncounterBuilder.
|
|||||||
encounter.dialogue.intro = [
|
encounter.dialogue.intro = [
|
||||||
{
|
{
|
||||||
speaker: `trainerNames:${trainerNameKey}`,
|
speaker: `trainerNames:${trainerNameKey}`,
|
||||||
text: `${namespace}:${trainerNameKey}.intro_dialogue`,
|
text: `${namespace}:${trainerNameKey}.introDialogue`,
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
encounter.options[0].dialogue!.selected = [
|
encounter.options[0].dialogue!.selected = [
|
||||||
|
@ -237,7 +237,7 @@ export const AbsoluteAvariceEncounter: MysteryEncounter = MysteryEncounterBuilde
|
|||||||
modifierConfigs: bossModifierConfigs,
|
modifierConfigs: bossModifierConfigs,
|
||||||
tags: [BattlerTagType.MYSTERY_ENCOUNTER_POST_SUMMON],
|
tags: [BattlerTagType.MYSTERY_ENCOUNTER_POST_SUMMON],
|
||||||
mysteryEncounterBattleEffects: (pokemon: Pokemon) => {
|
mysteryEncounterBattleEffects: (pokemon: Pokemon) => {
|
||||||
queueEncounterMessage(`${namespace}:option.1.boss_enraged`);
|
queueEncounterMessage(`${namespace}:option.1.bossEnraged`);
|
||||||
globalScene.phaseManager.unshiftNew(
|
globalScene.phaseManager.unshiftNew(
|
||||||
"StatStageChangePhase",
|
"StatStageChangePhase",
|
||||||
pokemon.getBattlerIndex(),
|
pokemon.getBattlerIndex(),
|
||||||
@ -300,7 +300,7 @@ export const AbsoluteAvariceEncounter: MysteryEncounter = MysteryEncounterBuilde
|
|||||||
globalScene.addModifier(seedModifier, false, false, false, true);
|
globalScene.addModifier(seedModifier, false, false, false, true);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
queueEncounterMessage(`${namespace}:option.1.food_stash`);
|
queueEncounterMessage(`${namespace}:option.1.foodStash`);
|
||||||
};
|
};
|
||||||
|
|
||||||
setEncounterRewards({ fillRemaining: true }, undefined, givePartyPokemonReviverSeeds);
|
setEncounterRewards({ fillRemaining: true }, undefined, givePartyPokemonReviverSeeds);
|
||||||
|
@ -71,7 +71,7 @@ export const AnOfferYouCantRefuseEncounter: MysteryEncounter = MysteryEncounterB
|
|||||||
text: `${namespace}:intro`,
|
text: `${namespace}:intro`,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
text: `${namespace}:intro_dialogue`,
|
text: `${namespace}:introDialogue`,
|
||||||
speaker: `${namespace}:speaker`,
|
speaker: `${namespace}:speaker`,
|
||||||
},
|
},
|
||||||
])
|
])
|
||||||
@ -152,7 +152,7 @@ export const AnOfferYouCantRefuseEncounter: MysteryEncounter = MysteryEncounterB
|
|||||||
.withDialogue({
|
.withDialogue({
|
||||||
buttonLabel: `${namespace}:option.2.label`,
|
buttonLabel: `${namespace}:option.2.label`,
|
||||||
buttonTooltip: `${namespace}:option.2.tooltip`,
|
buttonTooltip: `${namespace}:option.2.tooltip`,
|
||||||
disabledButtonTooltip: `${namespace}:option.2.tooltip_disabled`,
|
disabledButtonTooltip: `${namespace}:option.2.tooltipDisabled`,
|
||||||
selected: [
|
selected: [
|
||||||
{
|
{
|
||||||
speaker: `${namespace}:speaker`,
|
speaker: `${namespace}:speaker`,
|
||||||
|
@ -254,7 +254,7 @@ export const BerriesAboundEncounter: MysteryEncounter = MysteryEncounterBuilder.
|
|||||||
undefined,
|
undefined,
|
||||||
doBerryRewards,
|
doBerryRewards,
|
||||||
);
|
);
|
||||||
await showEncounterText(`${namespace}:option.2.selected_bad`);
|
await showEncounterText(`${namespace}:option.2.selectedBad`);
|
||||||
await initBattleWithEnemyConfig(config);
|
await initBattleWithEnemyConfig(config);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -198,7 +198,7 @@ export const BugTypeSuperfanEncounter: MysteryEncounter = MysteryEncounterBuilde
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
speaker: `${namespace}:speaker`,
|
speaker: `${namespace}:speaker`,
|
||||||
text: `${namespace}:intro_dialogue`,
|
text: `${namespace}:introDialogue`,
|
||||||
},
|
},
|
||||||
])
|
])
|
||||||
.withOnInit(() => {
|
.withOnInit(() => {
|
||||||
@ -312,7 +312,7 @@ export const BugTypeSuperfanEncounter: MysteryEncounter = MysteryEncounterBuilde
|
|||||||
.withDialogue({
|
.withDialogue({
|
||||||
buttonLabel: `${namespace}:option.2.label`,
|
buttonLabel: `${namespace}:option.2.label`,
|
||||||
buttonTooltip: `${namespace}:option.2.tooltip`,
|
buttonTooltip: `${namespace}:option.2.tooltip`,
|
||||||
disabledButtonTooltip: `${namespace}:option.2.disabled_tooltip`,
|
disabledButtonTooltip: `${namespace}:option.2.disabledTooltip`,
|
||||||
})
|
})
|
||||||
.withPreOptionPhase(async () => {
|
.withPreOptionPhase(async () => {
|
||||||
// Player shows off their bug types
|
// Player shows off their bug types
|
||||||
@ -333,7 +333,7 @@ export const BugTypeSuperfanEncounter: MysteryEncounter = MysteryEncounterBuilde
|
|||||||
encounter.selectedOption!.dialogue!.selected = [
|
encounter.selectedOption!.dialogue!.selected = [
|
||||||
{
|
{
|
||||||
speaker: `${namespace}:speaker`,
|
speaker: `${namespace}:speaker`,
|
||||||
text: `${namespace}:option.2.selected_0_to_1`,
|
text: `${namespace}:option.2.selected0To1`,
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
} else if (numBugTypes < 4) {
|
} else if (numBugTypes < 4) {
|
||||||
@ -344,7 +344,7 @@ export const BugTypeSuperfanEncounter: MysteryEncounter = MysteryEncounterBuilde
|
|||||||
encounter.selectedOption!.dialogue!.selected = [
|
encounter.selectedOption!.dialogue!.selected = [
|
||||||
{
|
{
|
||||||
speaker: `${namespace}:speaker`,
|
speaker: `${namespace}:speaker`,
|
||||||
text: `${namespace}:option.2.selected_2_to_3`,
|
text: `${namespace}:option.2.selected2To3`,
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
} else if (numBugTypes < 6) {
|
} else if (numBugTypes < 6) {
|
||||||
@ -355,7 +355,7 @@ export const BugTypeSuperfanEncounter: MysteryEncounter = MysteryEncounterBuilde
|
|||||||
encounter.selectedOption!.dialogue!.selected = [
|
encounter.selectedOption!.dialogue!.selected = [
|
||||||
{
|
{
|
||||||
speaker: `${namespace}:speaker`,
|
speaker: `${namespace}:speaker`,
|
||||||
text: `${namespace}:option.2.selected_4_to_5`,
|
text: `${namespace}:option.2.selected4To5`,
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
} else {
|
} else {
|
||||||
@ -398,7 +398,7 @@ export const BugTypeSuperfanEncounter: MysteryEncounter = MysteryEncounterBuilde
|
|||||||
encounter.selectedOption!.dialogue!.selected = [
|
encounter.selectedOption!.dialogue!.selected = [
|
||||||
{
|
{
|
||||||
speaker: `${namespace}:speaker`,
|
speaker: `${namespace}:speaker`,
|
||||||
text: `${namespace}:option.2.selected_6`,
|
text: `${namespace}:option.2.selected6`,
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
@ -421,17 +421,17 @@ export const BugTypeSuperfanEncounter: MysteryEncounter = MysteryEncounterBuilde
|
|||||||
.withDialogue({
|
.withDialogue({
|
||||||
buttonLabel: `${namespace}:option.3.label`,
|
buttonLabel: `${namespace}:option.3.label`,
|
||||||
buttonTooltip: `${namespace}:option.3.tooltip`,
|
buttonTooltip: `${namespace}:option.3.tooltip`,
|
||||||
disabledButtonTooltip: `${namespace}:option.3.disabled_tooltip`,
|
disabledButtonTooltip: `${namespace}:option.3.disabledTooltip`,
|
||||||
selected: [
|
selected: [
|
||||||
{
|
{
|
||||||
text: `${namespace}:option.3.selected`,
|
text: `${namespace}:option.3.selected`,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
speaker: `${namespace}:speaker`,
|
speaker: `${namespace}:speaker`,
|
||||||
text: `${namespace}:option.3.selected_dialogue`,
|
text: `${namespace}:option.3.selectedDialogue`,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
secondOptionPrompt: `${namespace}:option.3.select_prompt`,
|
secondOptionPrompt: `${namespace}:option.3.selectPrompt`,
|
||||||
})
|
})
|
||||||
.withPreOptionPhase(async (): Promise<boolean> => {
|
.withPreOptionPhase(async (): Promise<boolean> => {
|
||||||
const encounter = globalScene.currentBattle.mysteryEncounter!;
|
const encounter = globalScene.currentBattle.mysteryEncounter!;
|
||||||
@ -476,7 +476,7 @@ export const BugTypeSuperfanEncounter: MysteryEncounter = MysteryEncounterBuilde
|
|||||||
);
|
);
|
||||||
});
|
});
|
||||||
if (!hasValidItem) {
|
if (!hasValidItem) {
|
||||||
return getEncounterText(`${namespace}:option.3.invalid_selection`) ?? null;
|
return getEncounterText(`${namespace}:option.3.invalidSelection`) ?? null;
|
||||||
}
|
}
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
@ -713,7 +713,7 @@ function doBugTypeMoveTutor(): Promise<void> {
|
|||||||
// biome-ignore lint/suspicious/noAsyncPromiseExecutor: TODO explain
|
// biome-ignore lint/suspicious/noAsyncPromiseExecutor: TODO explain
|
||||||
return new Promise<void>(async resolve => {
|
return new Promise<void>(async resolve => {
|
||||||
const moveOptions = globalScene.currentBattle.mysteryEncounter!.misc.moveTutorOptions;
|
const moveOptions = globalScene.currentBattle.mysteryEncounter!.misc.moveTutorOptions;
|
||||||
await showEncounterDialogue(`${namespace}:battle_won`, `${namespace}:speaker`);
|
await showEncounterDialogue(`${namespace}:battleWon`, `${namespace}:speaker`);
|
||||||
|
|
||||||
const moveInfoOverlay = new MoveInfoOverlay({
|
const moveInfoOverlay = new MoveInfoOverlay({
|
||||||
delayVisibility: false,
|
delayVisibility: false,
|
||||||
@ -748,7 +748,7 @@ function doBugTypeMoveTutor(): Promise<void> {
|
|||||||
|
|
||||||
const result = await selectOptionThenPokemon(
|
const result = await selectOptionThenPokemon(
|
||||||
optionSelectItems,
|
optionSelectItems,
|
||||||
`${namespace}:teach_move_prompt`,
|
`${namespace}:teachMovePrompt`,
|
||||||
undefined,
|
undefined,
|
||||||
onHoverOverCancel,
|
onHoverOverCancel,
|
||||||
);
|
);
|
||||||
|
@ -119,7 +119,7 @@ export const ClowningAroundEncounter: MysteryEncounter = MysteryEncounterBuilder
|
|||||||
text: `${namespace}:intro`,
|
text: `${namespace}:intro`,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
text: `${namespace}:intro_dialogue`,
|
text: `${namespace}:introDialogue`,
|
||||||
speaker: `${namespace}:speaker`,
|
speaker: `${namespace}:speaker`,
|
||||||
},
|
},
|
||||||
])
|
])
|
||||||
@ -233,7 +233,7 @@ export const ClowningAroundEncounter: MysteryEncounter = MysteryEncounterBuilder
|
|||||||
// After the battle, offer the player the opportunity to permanently swap ability
|
// After the battle, offer the player the opportunity to permanently swap ability
|
||||||
const abilityWasSwapped = await handleSwapAbility();
|
const abilityWasSwapped = await handleSwapAbility();
|
||||||
if (abilityWasSwapped) {
|
if (abilityWasSwapped) {
|
||||||
await showEncounterText(`${namespace}:option.1.ability_gained`);
|
await showEncounterText(`${namespace}:option.1.abilityGained`);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Play animations once ability swap is complete
|
// Play animations once ability swap is complete
|
||||||
@ -267,10 +267,10 @@ export const ClowningAroundEncounter: MysteryEncounter = MysteryEncounterBuilder
|
|||||||
speaker: `${namespace}:speaker`,
|
speaker: `${namespace}:speaker`,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
text: `${namespace}:option.2.selected_2`,
|
text: `${namespace}:option.2.selected2`,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
text: `${namespace}:option.2.selected_3`,
|
text: `${namespace}:option.2.selected3`,
|
||||||
speaker: `${namespace}:speaker`,
|
speaker: `${namespace}:speaker`,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
@ -359,10 +359,10 @@ export const ClowningAroundEncounter: MysteryEncounter = MysteryEncounterBuilder
|
|||||||
speaker: `${namespace}:speaker`,
|
speaker: `${namespace}:speaker`,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
text: `${namespace}:option.3.selected_2`,
|
text: `${namespace}:option.3.selected2`,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
text: `${namespace}:option.3.selected_3`,
|
text: `${namespace}:option.3.selected3`,
|
||||||
speaker: `${namespace}:speaker`,
|
speaker: `${namespace}:speaker`,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
@ -432,8 +432,8 @@ export const ClowningAroundEncounter: MysteryEncounter = MysteryEncounterBuilder
|
|||||||
async function handleSwapAbility() {
|
async function handleSwapAbility() {
|
||||||
// biome-ignore lint/suspicious/noAsyncPromiseExecutor: TODO: Consider refactoring to avoid async promise executor
|
// biome-ignore lint/suspicious/noAsyncPromiseExecutor: TODO: Consider refactoring to avoid async promise executor
|
||||||
return new Promise<boolean>(async resolve => {
|
return new Promise<boolean>(async resolve => {
|
||||||
await showEncounterDialogue(`${namespace}:option.1.apply_ability_dialogue`, `${namespace}:speaker`);
|
await showEncounterDialogue(`${namespace}:option.1.applyAbilityDialogue`, `${namespace}:speaker`);
|
||||||
await showEncounterText(`${namespace}:option.1.apply_ability_message`);
|
await showEncounterText(`${namespace}:option.1.applyAbilityMessage`);
|
||||||
|
|
||||||
globalScene.ui.setMode(UiMode.MESSAGE).then(() => {
|
globalScene.ui.setMode(UiMode.MESSAGE).then(() => {
|
||||||
displayYesNoOptions(resolve);
|
displayYesNoOptions(resolve);
|
||||||
@ -442,7 +442,7 @@ async function handleSwapAbility() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function displayYesNoOptions(resolve) {
|
function displayYesNoOptions(resolve) {
|
||||||
showEncounterText(`${namespace}:option.1.ability_prompt`, null, 500, false);
|
showEncounterText(`${namespace}:option.1.abilityPrompt`, null, 500, false);
|
||||||
const fullOptions = [
|
const fullOptions = [
|
||||||
{
|
{
|
||||||
label: i18next.t("menu:yes"),
|
label: i18next.t("menu:yes"),
|
||||||
|
@ -174,7 +174,7 @@ export const DancingLessonsEncounter: MysteryEncounter = MysteryEncounterBuilder
|
|||||||
// Gets +1 to all stats except SPD on battle start
|
// Gets +1 to all stats except SPD on battle start
|
||||||
tags: [BattlerTagType.MYSTERY_ENCOUNTER_POST_SUMMON],
|
tags: [BattlerTagType.MYSTERY_ENCOUNTER_POST_SUMMON],
|
||||||
mysteryEncounterBattleEffects: (pokemon: Pokemon) => {
|
mysteryEncounterBattleEffects: (pokemon: Pokemon) => {
|
||||||
queueEncounterMessage(`${namespace}:option.1.boss_enraged`);
|
queueEncounterMessage(`${namespace}:option.1.bossEnraged`);
|
||||||
globalScene.phaseManager.unshiftNew(
|
globalScene.phaseManager.unshiftNew(
|
||||||
"StatStageChangePhase",
|
"StatStageChangePhase",
|
||||||
pokemon.getBattlerIndex(),
|
pokemon.getBattlerIndex(),
|
||||||
@ -273,8 +273,8 @@ export const DancingLessonsEncounter: MysteryEncounter = MysteryEncounterBuilder
|
|||||||
.withDialogue({
|
.withDialogue({
|
||||||
buttonLabel: `${namespace}:option.3.label`,
|
buttonLabel: `${namespace}:option.3.label`,
|
||||||
buttonTooltip: `${namespace}:option.3.tooltip`,
|
buttonTooltip: `${namespace}:option.3.tooltip`,
|
||||||
disabledButtonTooltip: `${namespace}:option.3.disabled_tooltip`,
|
disabledButtonTooltip: `${namespace}:option.3.disabledTooltip`,
|
||||||
secondOptionPrompt: `${namespace}:option.3.select_prompt`,
|
secondOptionPrompt: `${namespace}:option.3.selectPrompt`,
|
||||||
selected: [
|
selected: [
|
||||||
{
|
{
|
||||||
text: `${namespace}:option.3.selected`,
|
text: `${namespace}:option.3.selected`,
|
||||||
@ -316,7 +316,7 @@ export const DancingLessonsEncounter: MysteryEncounter = MysteryEncounterBuilder
|
|||||||
}
|
}
|
||||||
const meetsReqs = encounter.options[2].pokemonMeetsPrimaryRequirements(pokemon);
|
const meetsReqs = encounter.options[2].pokemonMeetsPrimaryRequirements(pokemon);
|
||||||
if (!meetsReqs) {
|
if (!meetsReqs) {
|
||||||
return getEncounterText(`${namespace}:invalid_selection`) ?? null;
|
return getEncounterText(`${namespace}:invalidSelection`) ?? null;
|
||||||
}
|
}
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
|
@ -118,7 +118,7 @@ export const DarkDealEncounter: MysteryEncounter = MysteryEncounterBuilder.withE
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
speaker: `${namespace}:speaker`,
|
speaker: `${namespace}:speaker`,
|
||||||
text: `${namespace}:intro_dialogue`,
|
text: `${namespace}:introDialogue`,
|
||||||
},
|
},
|
||||||
])
|
])
|
||||||
.withSceneWaveRangeRequirement(30, CLASSIC_MODE_MYSTERY_ENCOUNTER_WAVES[1])
|
.withSceneWaveRangeRequirement(30, CLASSIC_MODE_MYSTERY_ENCOUNTER_WAVES[1])
|
||||||
@ -136,10 +136,10 @@ export const DarkDealEncounter: MysteryEncounter = MysteryEncounterBuilder.withE
|
|||||||
selected: [
|
selected: [
|
||||||
{
|
{
|
||||||
speaker: `${namespace}:speaker`,
|
speaker: `${namespace}:speaker`,
|
||||||
text: `${namespace}:option.1.selected_dialogue`,
|
text: `${namespace}:option.1.selectedDialogue`,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
text: `${namespace}:option.1.selected_message`,
|
text: `${namespace}:option.1.selectedMessage`,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
})
|
})
|
||||||
|
@ -193,7 +193,7 @@ export const DelibirdyEncounter: MysteryEncounter = MysteryEncounterBuilder.with
|
|||||||
.withDialogue({
|
.withDialogue({
|
||||||
buttonLabel: `${namespace}:option.2.label`,
|
buttonLabel: `${namespace}:option.2.label`,
|
||||||
buttonTooltip: `${namespace}:option.2.tooltip`,
|
buttonTooltip: `${namespace}:option.2.tooltip`,
|
||||||
secondOptionPrompt: `${namespace}:option.2.select_prompt`,
|
secondOptionPrompt: `${namespace}:option.2.selectPrompt`,
|
||||||
selected: [
|
selected: [
|
||||||
{
|
{
|
||||||
text: `${namespace}:option.2.selected`,
|
text: `${namespace}:option.2.selected`,
|
||||||
@ -229,7 +229,7 @@ export const DelibirdyEncounter: MysteryEncounter = MysteryEncounterBuilder.with
|
|||||||
// If pokemon has valid item, it can be selected
|
// If pokemon has valid item, it can be selected
|
||||||
const meetsReqs = encounter.options[1].pokemonMeetsPrimaryRequirements(pokemon);
|
const meetsReqs = encounter.options[1].pokemonMeetsPrimaryRequirements(pokemon);
|
||||||
if (!meetsReqs) {
|
if (!meetsReqs) {
|
||||||
return getEncounterText(`${namespace}:invalid_selection`) ?? null;
|
return getEncounterText(`${namespace}:invalidSelection`) ?? null;
|
||||||
}
|
}
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
@ -303,7 +303,7 @@ export const DelibirdyEncounter: MysteryEncounter = MysteryEncounterBuilder.with
|
|||||||
.withDialogue({
|
.withDialogue({
|
||||||
buttonLabel: `${namespace}:option.3.label`,
|
buttonLabel: `${namespace}:option.3.label`,
|
||||||
buttonTooltip: `${namespace}:option.3.tooltip`,
|
buttonTooltip: `${namespace}:option.3.tooltip`,
|
||||||
secondOptionPrompt: `${namespace}:option.3.select_prompt`,
|
secondOptionPrompt: `${namespace}:option.3.selectPrompt`,
|
||||||
selected: [
|
selected: [
|
||||||
{
|
{
|
||||||
text: `${namespace}:option.3.selected`,
|
text: `${namespace}:option.3.selected`,
|
||||||
@ -341,7 +341,7 @@ export const DelibirdyEncounter: MysteryEncounter = MysteryEncounterBuilder.with
|
|||||||
// If pokemon has valid item, it can be selected
|
// If pokemon has valid item, it can be selected
|
||||||
const meetsReqs = encounter.options[2].pokemonMeetsPrimaryRequirements(pokemon);
|
const meetsReqs = encounter.options[2].pokemonMeetsPrimaryRequirements(pokemon);
|
||||||
if (!meetsReqs) {
|
if (!meetsReqs) {
|
||||||
return getEncounterText(`${namespace}:invalid_selection`) ?? null;
|
return getEncounterText(`${namespace}:invalidSelection`) ?? null;
|
||||||
}
|
}
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
|
@ -43,7 +43,7 @@ export const DepartmentStoreSaleEncounter: MysteryEncounter = MysteryEncounterBu
|
|||||||
text: `${namespace}:intro`,
|
text: `${namespace}:intro`,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
text: `${namespace}:intro_dialogue`,
|
text: `${namespace}:introDialogue`,
|
||||||
speaker: `${namespace}:speaker`,
|
speaker: `${namespace}:speaker`,
|
||||||
},
|
},
|
||||||
])
|
])
|
||||||
|
@ -56,7 +56,7 @@ export const FieldTripEncounter: MysteryEncounter = MysteryEncounterBuilder.with
|
|||||||
text: `${namespace}:intro`,
|
text: `${namespace}:intro`,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
text: `${namespace}:intro_dialogue`,
|
text: `${namespace}:introDialogue`,
|
||||||
speaker: `${namespace}:speaker`,
|
speaker: `${namespace}:speaker`,
|
||||||
},
|
},
|
||||||
])
|
])
|
||||||
@ -70,7 +70,7 @@ export const FieldTripEncounter: MysteryEncounter = MysteryEncounterBuilder.with
|
|||||||
.withDialogue({
|
.withDialogue({
|
||||||
buttonLabel: `${namespace}:option.1.label`,
|
buttonLabel: `${namespace}:option.1.label`,
|
||||||
buttonTooltip: `${namespace}:option.1.tooltip`,
|
buttonTooltip: `${namespace}:option.1.tooltip`,
|
||||||
secondOptionPrompt: `${namespace}:second_option_prompt`,
|
secondOptionPrompt: `${namespace}:secondOptionPrompt`,
|
||||||
})
|
})
|
||||||
.withPreOptionPhase(async (): Promise<boolean> => {
|
.withPreOptionPhase(async (): Promise<boolean> => {
|
||||||
const encounter = globalScene.currentBattle.mysteryEncounter!;
|
const encounter = globalScene.currentBattle.mysteryEncounter!;
|
||||||
@ -118,7 +118,7 @@ export const FieldTripEncounter: MysteryEncounter = MysteryEncounterBuilder.with
|
|||||||
.withDialogue({
|
.withDialogue({
|
||||||
buttonLabel: `${namespace}:option.2.label`,
|
buttonLabel: `${namespace}:option.2.label`,
|
||||||
buttonTooltip: `${namespace}:option.2.tooltip`,
|
buttonTooltip: `${namespace}:option.2.tooltip`,
|
||||||
secondOptionPrompt: `${namespace}:second_option_prompt`,
|
secondOptionPrompt: `${namespace}:secondOptionPrompt`,
|
||||||
})
|
})
|
||||||
.withPreOptionPhase(async (): Promise<boolean> => {
|
.withPreOptionPhase(async (): Promise<boolean> => {
|
||||||
const encounter = globalScene.currentBattle.mysteryEncounter!;
|
const encounter = globalScene.currentBattle.mysteryEncounter!;
|
||||||
@ -166,7 +166,7 @@ export const FieldTripEncounter: MysteryEncounter = MysteryEncounterBuilder.with
|
|||||||
.withDialogue({
|
.withDialogue({
|
||||||
buttonLabel: `${namespace}:option.3.label`,
|
buttonLabel: `${namespace}:option.3.label`,
|
||||||
buttonTooltip: `${namespace}:option.3.tooltip`,
|
buttonTooltip: `${namespace}:option.3.tooltip`,
|
||||||
secondOptionPrompt: `${namespace}:second_option_prompt`,
|
secondOptionPrompt: `${namespace}:secondOptionPrompt`,
|
||||||
})
|
})
|
||||||
.withPreOptionPhase(async (): Promise<boolean> => {
|
.withPreOptionPhase(async (): Promise<boolean> => {
|
||||||
const encounter = globalScene.currentBattle.mysteryEncounter!;
|
const encounter = globalScene.currentBattle.mysteryEncounter!;
|
||||||
@ -226,7 +226,7 @@ function pokemonAndMoveChosen(pokemon: PlayerPokemon, move: PokemonMove, correct
|
|||||||
speaker: `${namespace}:speaker`,
|
speaker: `${namespace}:speaker`,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
text: `${namespace}:incorrect_exp`,
|
text: `${namespace}:incorrectExp`,
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
setEncounterExp(
|
setEncounterExp(
|
||||||
@ -243,7 +243,7 @@ function pokemonAndMoveChosen(pokemon: PlayerPokemon, move: PokemonMove, correct
|
|||||||
speaker: `${namespace}:speaker`,
|
speaker: `${namespace}:speaker`,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
text: `${namespace}:correct_exp`,
|
text: `${namespace}:correctExp`,
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
setEncounterExp([pokemon.id], 100);
|
setEncounterExp([pokemon.id], 100);
|
||||||
|
@ -247,7 +247,7 @@ export const FieryFalloutEncounter: MysteryEncounter = MysteryEncounterBuilder.w
|
|||||||
// Burn applied
|
// Burn applied
|
||||||
encounter.setDialogueToken("burnedPokemon", chosenPokemon.getNameToRender());
|
encounter.setDialogueToken("burnedPokemon", chosenPokemon.getNameToRender());
|
||||||
encounter.setDialogueToken("abilityName", allAbilities[AbilityId.HEATPROOF].name);
|
encounter.setDialogueToken("abilityName", allAbilities[AbilityId.HEATPROOF].name);
|
||||||
queueEncounterMessage(`${namespace}:option.2.target_burned`);
|
queueEncounterMessage(`${namespace}:option.2.targetBurned`);
|
||||||
|
|
||||||
// Also permanently change the burned Pokemon's ability to Heatproof
|
// Also permanently change the burned Pokemon's ability to Heatproof
|
||||||
applyAbilityOverrideToPokemon(chosenPokemon, AbilityId.HEATPROOF);
|
applyAbilityOverrideToPokemon(chosenPokemon, AbilityId.HEATPROOF);
|
||||||
@ -269,7 +269,7 @@ export const FieryFalloutEncounter: MysteryEncounter = MysteryEncounterBuilder.w
|
|||||||
.withDialogue({
|
.withDialogue({
|
||||||
buttonLabel: `${namespace}:option.3.label`,
|
buttonLabel: `${namespace}:option.3.label`,
|
||||||
buttonTooltip: `${namespace}:option.3.tooltip`,
|
buttonTooltip: `${namespace}:option.3.tooltip`,
|
||||||
disabledButtonTooltip: `${namespace}:option.3.disabled_tooltip`,
|
disabledButtonTooltip: `${namespace}:option.3.disabledTooltip`,
|
||||||
selected: [
|
selected: [
|
||||||
{
|
{
|
||||||
text: `${namespace}:option.3.selected`,
|
text: `${namespace}:option.3.selected`,
|
||||||
@ -313,6 +313,6 @@ function giveLeadPokemonAttackTypeBoostItem() {
|
|||||||
const encounter = globalScene.currentBattle.mysteryEncounter!;
|
const encounter = globalScene.currentBattle.mysteryEncounter!;
|
||||||
encounter.setDialogueToken("itemName", boosterModifierType.name);
|
encounter.setDialogueToken("itemName", boosterModifierType.name);
|
||||||
encounter.setDialogueToken("leadPokemon", leadPokemon.getNameToRender());
|
encounter.setDialogueToken("leadPokemon", leadPokemon.getNameToRender());
|
||||||
queueEncounterMessage(`${namespace}:found_item`);
|
queueEncounterMessage(`${namespace}:foundItem`);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -69,7 +69,7 @@ export const FightOrFlightEncounter: MysteryEncounter = MysteryEncounterBuilder.
|
|||||||
isBoss: true,
|
isBoss: true,
|
||||||
tags: [BattlerTagType.MYSTERY_ENCOUNTER_POST_SUMMON],
|
tags: [BattlerTagType.MYSTERY_ENCOUNTER_POST_SUMMON],
|
||||||
mysteryEncounterBattleEffects: (pokemon: Pokemon) => {
|
mysteryEncounterBattleEffects: (pokemon: Pokemon) => {
|
||||||
queueEncounterMessage(`${namespace}:option.1.stat_boost`);
|
queueEncounterMessage(`${namespace}:option.1.statBoost`);
|
||||||
// Randomly boost 1 stat 2 stages
|
// Randomly boost 1 stat 2 stages
|
||||||
// Cannot boost Spd, Acc, or Evasion
|
// Cannot boost Spd, Acc, or Evasion
|
||||||
globalScene.phaseManager.unshiftNew(
|
globalScene.phaseManager.unshiftNew(
|
||||||
@ -165,7 +165,7 @@ export const FightOrFlightEncounter: MysteryEncounter = MysteryEncounterBuilder.
|
|||||||
.withDialogue({
|
.withDialogue({
|
||||||
buttonLabel: `${namespace}:option.2.label`,
|
buttonLabel: `${namespace}:option.2.label`,
|
||||||
buttonTooltip: `${namespace}:option.2.tooltip`,
|
buttonTooltip: `${namespace}:option.2.tooltip`,
|
||||||
disabledButtonTooltip: `${namespace}:option.2.disabled_tooltip`,
|
disabledButtonTooltip: `${namespace}:option.2.disabledTooltip`,
|
||||||
selected: [
|
selected: [
|
||||||
{
|
{
|
||||||
text: `${namespace}:option.2.selected`,
|
text: `${namespace}:option.2.selected`,
|
||||||
|
@ -78,7 +78,7 @@ export const FunAndGamesEncounter: MysteryEncounter = MysteryEncounterBuilder.wi
|
|||||||
.withIntroDialogue([
|
.withIntroDialogue([
|
||||||
{
|
{
|
||||||
speaker: `${namespace}:speaker`,
|
speaker: `${namespace}:speaker`,
|
||||||
text: `${namespace}:intro_dialogue`,
|
text: `${namespace}:introDialogue`,
|
||||||
},
|
},
|
||||||
])
|
])
|
||||||
.setLocalizationKey(`${namespace}`)
|
.setLocalizationKey(`${namespace}`)
|
||||||
@ -118,7 +118,7 @@ export const FunAndGamesEncounter: MysteryEncounter = MysteryEncounterBuilder.wi
|
|||||||
|
|
||||||
// Only Pokemon that are not KOed/legal can be selected
|
// Only Pokemon that are not KOed/legal can be selected
|
||||||
const selectableFilter = (pokemon: Pokemon) => {
|
const selectableFilter = (pokemon: Pokemon) => {
|
||||||
return isPokemonValidForEncounterOptionSelection(pokemon, `${namespace}:invalid_selection`);
|
return isPokemonValidForEncounterOptionSelection(pokemon, `${namespace}:invalidSelection`);
|
||||||
};
|
};
|
||||||
|
|
||||||
return selectPokemonForOption(onPokemonSelected, undefined, selectableFilter);
|
return selectPokemonForOption(onPokemonSelected, undefined, selectableFilter);
|
||||||
@ -284,25 +284,25 @@ function handleNextTurn() {
|
|||||||
guaranteedModifierTypeFuncs: [modifierTypes.MULTI_LENS],
|
guaranteedModifierTypeFuncs: [modifierTypes.MULTI_LENS],
|
||||||
fillRemaining: false,
|
fillRemaining: false,
|
||||||
});
|
});
|
||||||
resultMessageKey = `${namespace}:best_result`;
|
resultMessageKey = `${namespace}:bestResult`;
|
||||||
} else if (healthRatio < 0.15) {
|
} else if (healthRatio < 0.15) {
|
||||||
// 2nd prize
|
// 2nd prize
|
||||||
setEncounterRewards({
|
setEncounterRewards({
|
||||||
guaranteedModifierTypeFuncs: [modifierTypes.SCOPE_LENS],
|
guaranteedModifierTypeFuncs: [modifierTypes.SCOPE_LENS],
|
||||||
fillRemaining: false,
|
fillRemaining: false,
|
||||||
});
|
});
|
||||||
resultMessageKey = `${namespace}:great_result`;
|
resultMessageKey = `${namespace}:greatResult`;
|
||||||
} else if (healthRatio < 0.33) {
|
} else if (healthRatio < 0.33) {
|
||||||
// 3rd prize
|
// 3rd prize
|
||||||
setEncounterRewards({
|
setEncounterRewards({
|
||||||
guaranteedModifierTypeFuncs: [modifierTypes.WIDE_LENS],
|
guaranteedModifierTypeFuncs: [modifierTypes.WIDE_LENS],
|
||||||
fillRemaining: false,
|
fillRemaining: false,
|
||||||
});
|
});
|
||||||
resultMessageKey = `${namespace}:good_result`;
|
resultMessageKey = `${namespace}:goodResult`;
|
||||||
} else {
|
} else {
|
||||||
// No prize
|
// No prize
|
||||||
isHealPhase = true;
|
isHealPhase = true;
|
||||||
resultMessageKey = `${namespace}:bad_result`;
|
resultMessageKey = `${namespace}:badResult`;
|
||||||
}
|
}
|
||||||
|
|
||||||
// End the battle
|
// End the battle
|
||||||
@ -312,7 +312,7 @@ function handleNextTurn() {
|
|||||||
globalScene.currentBattle.mysteryEncounter!.doContinueEncounter = undefined;
|
globalScene.currentBattle.mysteryEncounter!.doContinueEncounter = undefined;
|
||||||
leaveEncounterWithoutBattle(isHealPhase);
|
leaveEncounterWithoutBattle(isHealPhase);
|
||||||
// Must end the TurnInit phase prematurely so battle phases aren't added to queue
|
// Must end the TurnInit phase prematurely so battle phases aren't added to queue
|
||||||
queueEncounterMessage(`${namespace}:end_game`);
|
queueEncounterMessage(`${namespace}:endGame`);
|
||||||
queueEncounterMessage(resultMessageKey);
|
queueEncounterMessage(resultMessageKey);
|
||||||
|
|
||||||
// Skip remainder of TurnInitPhase
|
// Skip remainder of TurnInitPhase
|
||||||
@ -320,9 +320,9 @@ function handleNextTurn() {
|
|||||||
}
|
}
|
||||||
if (encounter.misc.turnsRemaining < 3) {
|
if (encounter.misc.turnsRemaining < 3) {
|
||||||
// Display charging messages on turns that aren't the initial turn
|
// Display charging messages on turns that aren't the initial turn
|
||||||
queueEncounterMessage(`${namespace}:charging_continue`);
|
queueEncounterMessage(`${namespace}:chargingContinue`);
|
||||||
}
|
}
|
||||||
queueEncounterMessage(`${namespace}:turn_remaining_${encounter.misc.turnsRemaining}`);
|
queueEncounterMessage(`${namespace}:turnRemaining${encounter.misc.turnsRemaining}`);
|
||||||
encounter.misc.turnsRemaining--;
|
encounter.misc.turnsRemaining--;
|
||||||
|
|
||||||
// Don't skip remainder of TurnInitPhase
|
// Don't skip remainder of TurnInitPhase
|
||||||
|
@ -158,7 +158,7 @@ export const GlobalTradeSystemEncounter: MysteryEncounter = MysteryEncounterBuil
|
|||||||
.withDialogue({
|
.withDialogue({
|
||||||
buttonLabel: `${namespace}:option.1.label`,
|
buttonLabel: `${namespace}:option.1.label`,
|
||||||
buttonTooltip: `${namespace}:option.1.tooltip`,
|
buttonTooltip: `${namespace}:option.1.tooltip`,
|
||||||
secondOptionPrompt: `${namespace}:option.1.trade_options_prompt`,
|
secondOptionPrompt: `${namespace}:option.1.tradeOptionsPrompt`,
|
||||||
})
|
})
|
||||||
.withPreOptionPhase(async (): Promise<boolean> => {
|
.withPreOptionPhase(async (): Promise<boolean> => {
|
||||||
const encounter = globalScene.currentBattle.mysteryEncounter!;
|
const encounter = globalScene.currentBattle.mysteryEncounter!;
|
||||||
@ -248,7 +248,7 @@ export const GlobalTradeSystemEncounter: MysteryEncounter = MysteryEncounterBuil
|
|||||||
// Show the trade animation
|
// Show the trade animation
|
||||||
await showTradeBackground();
|
await showTradeBackground();
|
||||||
await doPokemonTradeSequence(tradedPokemon, newPlayerPokemon);
|
await doPokemonTradeSequence(tradedPokemon, newPlayerPokemon);
|
||||||
await showEncounterText(`${namespace}:trade_received`, null, 0, true, 4000);
|
await showEncounterText(`${namespace}:tradeReceived`, null, 0, true, 4000);
|
||||||
globalScene.playBgm(encounter.misc.bgmKey);
|
globalScene.playBgm(encounter.misc.bgmKey);
|
||||||
await addPokemonDataToDexAndValidateAchievements(newPlayerPokemon);
|
await addPokemonDataToDexAndValidateAchievements(newPlayerPokemon);
|
||||||
await hideTradeBackground();
|
await hideTradeBackground();
|
||||||
@ -369,7 +369,7 @@ export const GlobalTradeSystemEncounter: MysteryEncounter = MysteryEncounterBuil
|
|||||||
// Show the trade animation
|
// Show the trade animation
|
||||||
await showTradeBackground();
|
await showTradeBackground();
|
||||||
await doPokemonTradeSequence(tradedPokemon, newPlayerPokemon);
|
await doPokemonTradeSequence(tradedPokemon, newPlayerPokemon);
|
||||||
await showEncounterText(`${namespace}:trade_received`, null, 0, true, 4000);
|
await showEncounterText(`${namespace}:tradeReceived`, null, 0, true, 4000);
|
||||||
globalScene.playBgm(encounter.misc.bgmKey);
|
globalScene.playBgm(encounter.misc.bgmKey);
|
||||||
await addPokemonDataToDexAndValidateAchievements(newPlayerPokemon);
|
await addPokemonDataToDexAndValidateAchievements(newPlayerPokemon);
|
||||||
await hideTradeBackground();
|
await hideTradeBackground();
|
||||||
@ -384,7 +384,7 @@ export const GlobalTradeSystemEncounter: MysteryEncounter = MysteryEncounterBuil
|
|||||||
.withDialogue({
|
.withDialogue({
|
||||||
buttonLabel: `${namespace}:option.3.label`,
|
buttonLabel: `${namespace}:option.3.label`,
|
||||||
buttonTooltip: `${namespace}:option.3.tooltip`,
|
buttonTooltip: `${namespace}:option.3.tooltip`,
|
||||||
secondOptionPrompt: `${namespace}:option.3.trade_options_prompt`,
|
secondOptionPrompt: `${namespace}:option.3.tradeOptionsPrompt`,
|
||||||
})
|
})
|
||||||
.withPreOptionPhase(async (): Promise<boolean> => {
|
.withPreOptionPhase(async (): Promise<boolean> => {
|
||||||
const encounter = globalScene.currentBattle.mysteryEncounter!;
|
const encounter = globalScene.currentBattle.mysteryEncounter!;
|
||||||
@ -416,7 +416,7 @@ export const GlobalTradeSystemEncounter: MysteryEncounter = MysteryEncounterBuil
|
|||||||
return it.isTransferable;
|
return it.isTransferable;
|
||||||
}).length > 0;
|
}).length > 0;
|
||||||
if (!meetsReqs) {
|
if (!meetsReqs) {
|
||||||
return getEncounterText(`${namespace}:option.3.invalid_selection`) ?? null;
|
return getEncounterText(`${namespace}:option.3.invalidSelection`) ?? null;
|
||||||
}
|
}
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
@ -468,7 +468,7 @@ export const GlobalTradeSystemEncounter: MysteryEncounter = MysteryEncounterBuil
|
|||||||
// Generate a trainer name
|
// Generate a trainer name
|
||||||
const traderName = generateRandomTraderName();
|
const traderName = generateRandomTraderName();
|
||||||
encounter.setDialogueToken("tradeTrainerName", traderName.trim());
|
encounter.setDialogueToken("tradeTrainerName", traderName.trim());
|
||||||
await showEncounterText(`${namespace}:item_trade_selected`);
|
await showEncounterText(`${namespace}:itemTradeSelected`);
|
||||||
leaveEncounterWithoutBattle();
|
leaveEncounterWithoutBattle();
|
||||||
})
|
})
|
||||||
.build(),
|
.build(),
|
||||||
@ -740,10 +740,10 @@ function doPokemonTradeSequence(tradedPokemon: PlayerPokemon, receivedPokemon: P
|
|||||||
duration: 500,
|
duration: 500,
|
||||||
onComplete: async () => {
|
onComplete: async () => {
|
||||||
globalScene.fadeOutBgm(1000, false);
|
globalScene.fadeOutBgm(1000, false);
|
||||||
await showEncounterText(`${namespace}:pokemon_trade_selected`);
|
await showEncounterText(`${namespace}:pokemonTradeSelected`);
|
||||||
tradedPokemon.cry();
|
tradedPokemon.cry();
|
||||||
globalScene.playBgm("evolution");
|
globalScene.playBgm("evolution");
|
||||||
await showEncounterText(`${namespace}:pokemon_trade_goodbye`);
|
await showEncounterText(`${namespace}:pokemonTradeGoodbye`);
|
||||||
|
|
||||||
tradedPokeball.setAlpha(0);
|
tradedPokeball.setAlpha(0);
|
||||||
tradedPokeball.setVisible(true);
|
tradedPokeball.setVisible(true);
|
||||||
|
@ -63,9 +63,9 @@ export const LostAtSeaEncounter: MysteryEncounter = MysteryEncounterBuilder.with
|
|||||||
.withPokemonCanLearnMoveRequirement(OPTION_1_REQUIRED_MOVE)
|
.withPokemonCanLearnMoveRequirement(OPTION_1_REQUIRED_MOVE)
|
||||||
.withDialogue({
|
.withDialogue({
|
||||||
buttonLabel: `${namespace}:option.1.label`,
|
buttonLabel: `${namespace}:option.1.label`,
|
||||||
disabledButtonLabel: `${namespace}:option.1.label_disabled`,
|
disabledButtonLabel: `${namespace}:option.1.labelDisabled`,
|
||||||
buttonTooltip: `${namespace}:option.1.tooltip`,
|
buttonTooltip: `${namespace}:option.1.tooltip`,
|
||||||
disabledButtonTooltip: `${namespace}:option.1.tooltip_disabled`,
|
disabledButtonTooltip: `${namespace}:option.1.tooltipDisabled`,
|
||||||
selected: [
|
selected: [
|
||||||
{
|
{
|
||||||
text: `${namespace}:option.1.selected`,
|
text: `${namespace}:option.1.selected`,
|
||||||
@ -81,9 +81,9 @@ export const LostAtSeaEncounter: MysteryEncounter = MysteryEncounterBuilder.with
|
|||||||
.withPokemonCanLearnMoveRequirement(OPTION_2_REQUIRED_MOVE)
|
.withPokemonCanLearnMoveRequirement(OPTION_2_REQUIRED_MOVE)
|
||||||
.withDialogue({
|
.withDialogue({
|
||||||
buttonLabel: `${namespace}:option.2.label`,
|
buttonLabel: `${namespace}:option.2.label`,
|
||||||
disabledButtonLabel: `${namespace}:option.2.label_disabled`,
|
disabledButtonLabel: `${namespace}:option.2.labelDisabled`,
|
||||||
buttonTooltip: `${namespace}:option.2.tooltip`,
|
buttonTooltip: `${namespace}:option.2.tooltip`,
|
||||||
disabledButtonTooltip: `${namespace}:option.2.tooltip_disabled`,
|
disabledButtonTooltip: `${namespace}:option.2.tooltipDisabled`,
|
||||||
selected: [
|
selected: [
|
||||||
{
|
{
|
||||||
text: `${namespace}:option.2.selected`,
|
text: `${namespace}:option.2.selected`,
|
||||||
|
@ -58,7 +58,7 @@ export const PartTimerEncounter: MysteryEncounter = MysteryEncounterBuilder.with
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
speaker: `${namespace}:speaker`,
|
speaker: `${namespace}:speaker`,
|
||||||
text: `${namespace}:intro_dialogue`,
|
text: `${namespace}:introDialogue`,
|
||||||
},
|
},
|
||||||
])
|
])
|
||||||
.withOnInit(() => {
|
.withOnInit(() => {
|
||||||
@ -128,7 +128,7 @@ export const PartTimerEncounter: MysteryEncounter = MysteryEncounterBuilder.with
|
|||||||
|
|
||||||
// Only Pokemon non-KOd pokemon can be selected
|
// Only Pokemon non-KOd pokemon can be selected
|
||||||
const selectableFilter = (pokemon: Pokemon) => {
|
const selectableFilter = (pokemon: Pokemon) => {
|
||||||
return isPokemonValidForEncounterOptionSelection(pokemon, `${namespace}:invalid_selection`);
|
return isPokemonValidForEncounterOptionSelection(pokemon, `${namespace}:invalidSelection`);
|
||||||
};
|
};
|
||||||
|
|
||||||
return selectPokemonForOption(onPokemonSelected, undefined, selectableFilter);
|
return selectPokemonForOption(onPokemonSelected, undefined, selectableFilter);
|
||||||
@ -142,9 +142,9 @@ export const PartTimerEncounter: MysteryEncounter = MysteryEncounterBuilder.with
|
|||||||
|
|
||||||
// Give money and do dialogue
|
// Give money and do dialogue
|
||||||
if (moneyMultiplier > 2.5) {
|
if (moneyMultiplier > 2.5) {
|
||||||
await showEncounterDialogue(`${namespace}:job_complete_good`, `${namespace}:speaker`);
|
await showEncounterDialogue(`${namespace}:jobCompleteGood`, `${namespace}:speaker`);
|
||||||
} else {
|
} else {
|
||||||
await showEncounterDialogue(`${namespace}:job_complete_bad`, `${namespace}:speaker`);
|
await showEncounterDialogue(`${namespace}:jobCompleteBad`, `${namespace}:speaker`);
|
||||||
}
|
}
|
||||||
const moneyChange = globalScene.getWaveMoneyAmount(moneyMultiplier);
|
const moneyChange = globalScene.getWaveMoneyAmount(moneyMultiplier);
|
||||||
updatePlayerMoney(moneyChange, true, false);
|
updatePlayerMoney(moneyChange, true, false);
|
||||||
@ -153,7 +153,7 @@ export const PartTimerEncounter: MysteryEncounter = MysteryEncounterBuilder.with
|
|||||||
amount: moneyChange,
|
amount: moneyChange,
|
||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
await showEncounterText(`${namespace}:pokemon_tired`);
|
await showEncounterText(`${namespace}:pokemonTired`);
|
||||||
|
|
||||||
setEncounterRewards({ fillRemaining: true });
|
setEncounterRewards({ fillRemaining: true });
|
||||||
leaveEncounterWithoutBattle();
|
leaveEncounterWithoutBattle();
|
||||||
@ -210,7 +210,7 @@ export const PartTimerEncounter: MysteryEncounter = MysteryEncounterBuilder.with
|
|||||||
|
|
||||||
// Only Pokemon non-KOd pokemon can be selected
|
// Only Pokemon non-KOd pokemon can be selected
|
||||||
const selectableFilter = (pokemon: Pokemon) => {
|
const selectableFilter = (pokemon: Pokemon) => {
|
||||||
return isPokemonValidForEncounterOptionSelection(pokemon, `${namespace}:invalid_selection`);
|
return isPokemonValidForEncounterOptionSelection(pokemon, `${namespace}:invalidSelection`);
|
||||||
};
|
};
|
||||||
|
|
||||||
return selectPokemonForOption(onPokemonSelected, undefined, selectableFilter);
|
return selectPokemonForOption(onPokemonSelected, undefined, selectableFilter);
|
||||||
@ -224,9 +224,9 @@ export const PartTimerEncounter: MysteryEncounter = MysteryEncounterBuilder.with
|
|||||||
|
|
||||||
// Give money and do dialogue
|
// Give money and do dialogue
|
||||||
if (moneyMultiplier > 2.5) {
|
if (moneyMultiplier > 2.5) {
|
||||||
await showEncounterDialogue(`${namespace}:job_complete_good`, `${namespace}:speaker`);
|
await showEncounterDialogue(`${namespace}:jobCompleteGood`, `${namespace}:speaker`);
|
||||||
} else {
|
} else {
|
||||||
await showEncounterDialogue(`${namespace}:job_complete_bad`, `${namespace}:speaker`);
|
await showEncounterDialogue(`${namespace}:jobCompleteBad`, `${namespace}:speaker`);
|
||||||
}
|
}
|
||||||
const moneyChange = globalScene.getWaveMoneyAmount(moneyMultiplier);
|
const moneyChange = globalScene.getWaveMoneyAmount(moneyMultiplier);
|
||||||
updatePlayerMoney(moneyChange, true, false);
|
updatePlayerMoney(moneyChange, true, false);
|
||||||
@ -235,7 +235,7 @@ export const PartTimerEncounter: MysteryEncounter = MysteryEncounterBuilder.with
|
|||||||
amount: moneyChange,
|
amount: moneyChange,
|
||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
await showEncounterText(`${namespace}:pokemon_tired`);
|
await showEncounterText(`${namespace}:pokemonTired`);
|
||||||
|
|
||||||
setEncounterRewards({ fillRemaining: true });
|
setEncounterRewards({ fillRemaining: true });
|
||||||
leaveEncounterWithoutBattle();
|
leaveEncounterWithoutBattle();
|
||||||
@ -248,7 +248,7 @@ export const PartTimerEncounter: MysteryEncounter = MysteryEncounterBuilder.with
|
|||||||
.withDialogue({
|
.withDialogue({
|
||||||
buttonLabel: `${namespace}:option.3.label`,
|
buttonLabel: `${namespace}:option.3.label`,
|
||||||
buttonTooltip: `${namespace}:option.3.tooltip`,
|
buttonTooltip: `${namespace}:option.3.tooltip`,
|
||||||
disabledButtonTooltip: `${namespace}:option.3.disabled_tooltip`,
|
disabledButtonTooltip: `${namespace}:option.3.disabledTooltip`,
|
||||||
selected: [
|
selected: [
|
||||||
{
|
{
|
||||||
text: `${namespace}:option.3.selected`,
|
text: `${namespace}:option.3.selected`,
|
||||||
@ -282,7 +282,7 @@ export const PartTimerEncounter: MysteryEncounter = MysteryEncounterBuilder.with
|
|||||||
await transitionMysteryEncounterIntroVisuals(false, false);
|
await transitionMysteryEncounterIntroVisuals(false, false);
|
||||||
|
|
||||||
// Give money and do dialogue
|
// Give money and do dialogue
|
||||||
await showEncounterDialogue(`${namespace}:job_complete_good`, `${namespace}:speaker`);
|
await showEncounterDialogue(`${namespace}:jobCompleteGood`, `${namespace}:speaker`);
|
||||||
const moneyChange = globalScene.getWaveMoneyAmount(2.5);
|
const moneyChange = globalScene.getWaveMoneyAmount(2.5);
|
||||||
updatePlayerMoney(moneyChange, true, false);
|
updatePlayerMoney(moneyChange, true, false);
|
||||||
await showEncounterText(
|
await showEncounterText(
|
||||||
@ -290,7 +290,7 @@ export const PartTimerEncounter: MysteryEncounter = MysteryEncounterBuilder.with
|
|||||||
amount: moneyChange,
|
amount: moneyChange,
|
||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
await showEncounterText(`${namespace}:pokemon_tired`);
|
await showEncounterText(`${namespace}:pokemonTired`);
|
||||||
|
|
||||||
setEncounterRewards({ fillRemaining: true });
|
setEncounterRewards({ fillRemaining: true });
|
||||||
leaveEncounterWithoutBattle();
|
leaveEncounterWithoutBattle();
|
||||||
|
@ -205,7 +205,7 @@ const safariZoneGameOptions: MysteryEncounterOption[] = [
|
|||||||
// 80% chance to increase flee stage +1
|
// 80% chance to increase flee stage +1
|
||||||
const fleeChangeResult = tryChangeFleeStage(1, 8);
|
const fleeChangeResult = tryChangeFleeStage(1, 8);
|
||||||
if (!fleeChangeResult) {
|
if (!fleeChangeResult) {
|
||||||
await showEncounterText(getEncounterText(`${namespace}:safari.busy_eating`) ?? "", null, 1000, false);
|
await showEncounterText(getEncounterText(`${namespace}:safari.busyEating`) ?? "", null, 1000, false);
|
||||||
} else {
|
} else {
|
||||||
await showEncounterText(getEncounterText(`${namespace}:safari.eating`) ?? "", null, 1000, false);
|
await showEncounterText(getEncounterText(`${namespace}:safari.eating`) ?? "", null, 1000, false);
|
||||||
}
|
}
|
||||||
@ -233,7 +233,7 @@ const safariZoneGameOptions: MysteryEncounterOption[] = [
|
|||||||
// 80% chance to decrease catch stage -1
|
// 80% chance to decrease catch stage -1
|
||||||
const catchChangeResult = tryChangeCatchStage(-1, 8);
|
const catchChangeResult = tryChangeCatchStage(-1, 8);
|
||||||
if (!catchChangeResult) {
|
if (!catchChangeResult) {
|
||||||
await showEncounterText(getEncounterText(`${namespace}:safari.beside_itself_angry`) ?? "", null, 1000, false);
|
await showEncounterText(getEncounterText(`${namespace}:safari.besideItselfAngry`) ?? "", null, 1000, false);
|
||||||
} else {
|
} else {
|
||||||
await showEncounterText(getEncounterText(`${namespace}:safari.angry`) ?? "", null, 1000, false);
|
await showEncounterText(getEncounterText(`${namespace}:safari.angry`) ?? "", null, 1000, false);
|
||||||
}
|
}
|
||||||
@ -274,7 +274,7 @@ async function summonSafariPokemon() {
|
|||||||
const encounter = globalScene.currentBattle.mysteryEncounter!;
|
const encounter = globalScene.currentBattle.mysteryEncounter!;
|
||||||
// Message pokemon remaining
|
// Message pokemon remaining
|
||||||
encounter.setDialogueToken("remainingCount", encounter.misc.safariPokemonRemaining);
|
encounter.setDialogueToken("remainingCount", encounter.misc.safariPokemonRemaining);
|
||||||
globalScene.phaseManager.queueMessage(getEncounterText(`${namespace}:safari.remaining_count`) ?? "", null, true);
|
globalScene.phaseManager.queueMessage(getEncounterText(`${namespace}:safari.remainingCount`) ?? "", null, true);
|
||||||
|
|
||||||
// Generate pokemon using safariPokemonRemaining so they are always the same pokemon no matter how many turns are taken
|
// Generate pokemon using safariPokemonRemaining so they are always the same pokemon no matter how many turns are taken
|
||||||
// Safari pokemon roll twice on shiny and HA chances, but are otherwise normal
|
// Safari pokemon roll twice on shiny and HA chances, but are otherwise normal
|
||||||
|
@ -70,7 +70,7 @@ export const ShadyVitaminDealerEncounter: MysteryEncounter = MysteryEncounterBui
|
|||||||
text: `${namespace}:intro`,
|
text: `${namespace}:intro`,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
text: `${namespace}:intro_dialogue`,
|
text: `${namespace}:introDialogue`,
|
||||||
speaker: `${namespace}:speaker`,
|
speaker: `${namespace}:speaker`,
|
||||||
},
|
},
|
||||||
])
|
])
|
||||||
@ -119,7 +119,7 @@ export const ShadyVitaminDealerEncounter: MysteryEncounter = MysteryEncounterBui
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
if (!encounter.pokemonMeetsPrimaryRequirements(pokemon)) {
|
if (!encounter.pokemonMeetsPrimaryRequirements(pokemon)) {
|
||||||
return getEncounterText(`${namespace}:invalid_selection`) ?? null;
|
return getEncounterText(`${namespace}:invalidSelection`) ?? null;
|
||||||
}
|
}
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
@ -155,7 +155,7 @@ export const ShadyVitaminDealerEncounter: MysteryEncounter = MysteryEncounterBui
|
|||||||
|
|
||||||
chosenPokemon.setCustomNature(newNature);
|
chosenPokemon.setCustomNature(newNature);
|
||||||
encounter.setDialogueToken("newNature", getNatureName(newNature));
|
encounter.setDialogueToken("newNature", getNatureName(newNature));
|
||||||
queueEncounterMessage(`${namespace}:cheap_side_effects`);
|
queueEncounterMessage(`${namespace}:cheapSideEffects`);
|
||||||
setEncounterExp([chosenPokemon.id], 100);
|
setEncounterExp([chosenPokemon.id], 100);
|
||||||
await chosenPokemon.updateInfo();
|
await chosenPokemon.updateInfo();
|
||||||
})
|
})
|
||||||
@ -193,7 +193,7 @@ export const ShadyVitaminDealerEncounter: MysteryEncounter = MysteryEncounterBui
|
|||||||
|
|
||||||
// Only Pokemon that can gain benefits are unfainted
|
// Only Pokemon that can gain benefits are unfainted
|
||||||
const selectableFilter = (pokemon: Pokemon) => {
|
const selectableFilter = (pokemon: Pokemon) => {
|
||||||
return isPokemonValidForEncounterOptionSelection(pokemon, `${namespace}:invalid_selection`);
|
return isPokemonValidForEncounterOptionSelection(pokemon, `${namespace}:invalidSelection`);
|
||||||
};
|
};
|
||||||
|
|
||||||
return selectPokemonForOption(onPokemonSelected, undefined, selectableFilter);
|
return selectPokemonForOption(onPokemonSelected, undefined, selectableFilter);
|
||||||
@ -215,7 +215,7 @@ export const ShadyVitaminDealerEncounter: MysteryEncounter = MysteryEncounterBui
|
|||||||
const encounter = globalScene.currentBattle.mysteryEncounter!;
|
const encounter = globalScene.currentBattle.mysteryEncounter!;
|
||||||
const chosenPokemon = encounter.misc.chosenPokemon;
|
const chosenPokemon = encounter.misc.chosenPokemon;
|
||||||
|
|
||||||
queueEncounterMessage(`${namespace}:no_bad_effects`);
|
queueEncounterMessage(`${namespace}:noBadEffects`);
|
||||||
setEncounterExp([chosenPokemon.id], 100);
|
setEncounterExp([chosenPokemon.id], 100);
|
||||||
|
|
||||||
await chosenPokemon.updateInfo();
|
await chosenPokemon.updateInfo();
|
||||||
|
@ -157,7 +157,7 @@ export const SlumberingSnorlaxEncounter: MysteryEncounter = MysteryEncounterBuil
|
|||||||
// Fall asleep waiting for Snorlax
|
// Fall asleep waiting for Snorlax
|
||||||
// Full heal party
|
// Full heal party
|
||||||
globalScene.phaseManager.unshiftNew("PartyHealPhase", true);
|
globalScene.phaseManager.unshiftNew("PartyHealPhase", true);
|
||||||
queueEncounterMessage(`${namespace}:option.2.rest_result`);
|
queueEncounterMessage(`${namespace}:option.2.restResult`);
|
||||||
leaveEncounterWithoutBattle();
|
leaveEncounterWithoutBattle();
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
@ -167,7 +167,7 @@ export const SlumberingSnorlaxEncounter: MysteryEncounter = MysteryEncounterBuil
|
|||||||
.withDialogue({
|
.withDialogue({
|
||||||
buttonLabel: `${namespace}:option.3.label`,
|
buttonLabel: `${namespace}:option.3.label`,
|
||||||
buttonTooltip: `${namespace}:option.3.tooltip`,
|
buttonTooltip: `${namespace}:option.3.tooltip`,
|
||||||
disabledButtonTooltip: `${namespace}:option.3.disabled_tooltip`,
|
disabledButtonTooltip: `${namespace}:option.3.disabledTooltip`,
|
||||||
selected: [
|
selected: [
|
||||||
{
|
{
|
||||||
text: `${namespace}:option.3.selected`,
|
text: `${namespace}:option.3.selected`,
|
||||||
|
@ -122,7 +122,7 @@ export const TeleportingHijinksEncounter: MysteryEncounter = MysteryEncounterBui
|
|||||||
.withDialogue({
|
.withDialogue({
|
||||||
buttonLabel: `${namespace}:option.2.label`,
|
buttonLabel: `${namespace}:option.2.label`,
|
||||||
buttonTooltip: `${namespace}:option.2.tooltip`,
|
buttonTooltip: `${namespace}:option.2.tooltip`,
|
||||||
disabledButtonTooltip: `${namespace}:option.2.disabled_tooltip`,
|
disabledButtonTooltip: `${namespace}:option.2.disabledTooltip`,
|
||||||
selected: [
|
selected: [
|
||||||
{
|
{
|
||||||
text: `${namespace}:option.2.selected`,
|
text: `${namespace}:option.2.selected`,
|
||||||
@ -227,7 +227,7 @@ async function doBiomeTransitionDialogueAndBattleInit() {
|
|||||||
isBoss: true,
|
isBoss: true,
|
||||||
tags: [BattlerTagType.MYSTERY_ENCOUNTER_POST_SUMMON],
|
tags: [BattlerTagType.MYSTERY_ENCOUNTER_POST_SUMMON],
|
||||||
mysteryEncounterBattleEffects: (pokemon: Pokemon) => {
|
mysteryEncounterBattleEffects: (pokemon: Pokemon) => {
|
||||||
queueEncounterMessage(`${namespace}:boss_enraged`);
|
queueEncounterMessage(`${namespace}:bossEnraged`);
|
||||||
globalScene.phaseManager.unshiftNew(
|
globalScene.phaseManager.unshiftNew(
|
||||||
"StatStageChangePhase",
|
"StatStageChangePhase",
|
||||||
pokemon.getBattlerIndex(),
|
pokemon.getBattlerIndex(),
|
||||||
|
@ -139,7 +139,7 @@ export const TheExpertPokemonBreederEncounter: MysteryEncounter = MysteryEncount
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
speaker: trainerNameKey,
|
speaker: trainerNameKey,
|
||||||
text: `${namespace}:intro_dialogue`,
|
text: `${namespace}:introDialogue`,
|
||||||
},
|
},
|
||||||
])
|
])
|
||||||
.withOnInit(() => {
|
.withOnInit(() => {
|
||||||
@ -189,13 +189,13 @@ export const TheExpertPokemonBreederEncounter: MysteryEncounter = MysteryEncount
|
|||||||
|
|
||||||
// Dialogue and egg calcs for Pokemon 1
|
// Dialogue and egg calcs for Pokemon 1
|
||||||
const [pokemon1CommonEggs, pokemon1RareEggs] = calculateEggRewardsForPokemon(pokemon1);
|
const [pokemon1CommonEggs, pokemon1RareEggs] = calculateEggRewardsForPokemon(pokemon1);
|
||||||
let pokemon1Tooltip = getEncounterText(`${namespace}:option.1.tooltip_base`)!;
|
let pokemon1Tooltip = getEncounterText(`${namespace}:option.1.tooltipBase`)!;
|
||||||
if (pokemon1RareEggs > 0) {
|
if (pokemon1RareEggs > 0) {
|
||||||
const eggsText = i18next.t(`${namespace}:numEggs`, {
|
const eggsText = i18next.t(`${namespace}:numEggs`, {
|
||||||
count: pokemon1RareEggs,
|
count: pokemon1RareEggs,
|
||||||
rarity: i18next.t("egg:greatTier"),
|
rarity: i18next.t("egg:greatTier"),
|
||||||
});
|
});
|
||||||
pokemon1Tooltip += i18next.t(`${namespace}:eggs_tooltip`, {
|
pokemon1Tooltip += i18next.t(`${namespace}:eggsTooltip`, {
|
||||||
eggs: eggsText,
|
eggs: eggsText,
|
||||||
});
|
});
|
||||||
encounter.setDialogueToken("pokemon1RareEggs", eggsText);
|
encounter.setDialogueToken("pokemon1RareEggs", eggsText);
|
||||||
@ -205,7 +205,7 @@ export const TheExpertPokemonBreederEncounter: MysteryEncounter = MysteryEncount
|
|||||||
count: pokemon1CommonEggs,
|
count: pokemon1CommonEggs,
|
||||||
rarity: i18next.t("egg:defaultTier"),
|
rarity: i18next.t("egg:defaultTier"),
|
||||||
});
|
});
|
||||||
pokemon1Tooltip += i18next.t(`${namespace}:eggs_tooltip`, {
|
pokemon1Tooltip += i18next.t(`${namespace}:eggsTooltip`, {
|
||||||
eggs: eggsText,
|
eggs: eggsText,
|
||||||
});
|
});
|
||||||
encounter.setDialogueToken("pokemon1CommonEggs", eggsText);
|
encounter.setDialogueToken("pokemon1CommonEggs", eggsText);
|
||||||
@ -214,13 +214,13 @@ export const TheExpertPokemonBreederEncounter: MysteryEncounter = MysteryEncount
|
|||||||
|
|
||||||
// Dialogue and egg calcs for Pokemon 2
|
// Dialogue and egg calcs for Pokemon 2
|
||||||
const [pokemon2CommonEggs, pokemon2RareEggs] = calculateEggRewardsForPokemon(pokemon2);
|
const [pokemon2CommonEggs, pokemon2RareEggs] = calculateEggRewardsForPokemon(pokemon2);
|
||||||
let pokemon2Tooltip = getEncounterText(`${namespace}:option.2.tooltip_base`)!;
|
let pokemon2Tooltip = getEncounterText(`${namespace}:option.2.tooltipBase`)!;
|
||||||
if (pokemon2RareEggs > 0) {
|
if (pokemon2RareEggs > 0) {
|
||||||
const eggsText = i18next.t(`${namespace}:numEggs`, {
|
const eggsText = i18next.t(`${namespace}:numEggs`, {
|
||||||
count: pokemon2RareEggs,
|
count: pokemon2RareEggs,
|
||||||
rarity: i18next.t("egg:greatTier"),
|
rarity: i18next.t("egg:greatTier"),
|
||||||
});
|
});
|
||||||
pokemon2Tooltip += i18next.t(`${namespace}:eggs_tooltip`, {
|
pokemon2Tooltip += i18next.t(`${namespace}:eggsTooltip`, {
|
||||||
eggs: eggsText,
|
eggs: eggsText,
|
||||||
});
|
});
|
||||||
encounter.setDialogueToken("pokemon2RareEggs", eggsText);
|
encounter.setDialogueToken("pokemon2RareEggs", eggsText);
|
||||||
@ -230,7 +230,7 @@ export const TheExpertPokemonBreederEncounter: MysteryEncounter = MysteryEncount
|
|||||||
count: pokemon2CommonEggs,
|
count: pokemon2CommonEggs,
|
||||||
rarity: i18next.t("egg:defaultTier"),
|
rarity: i18next.t("egg:defaultTier"),
|
||||||
});
|
});
|
||||||
pokemon2Tooltip += i18next.t(`${namespace}:eggs_tooltip`, {
|
pokemon2Tooltip += i18next.t(`${namespace}:eggsTooltip`, {
|
||||||
eggs: eggsText,
|
eggs: eggsText,
|
||||||
});
|
});
|
||||||
encounter.setDialogueToken("pokemon2CommonEggs", eggsText);
|
encounter.setDialogueToken("pokemon2CommonEggs", eggsText);
|
||||||
@ -239,13 +239,13 @@ export const TheExpertPokemonBreederEncounter: MysteryEncounter = MysteryEncount
|
|||||||
|
|
||||||
// Dialogue and egg calcs for Pokemon 3
|
// Dialogue and egg calcs for Pokemon 3
|
||||||
const [pokemon3CommonEggs, pokemon3RareEggs] = calculateEggRewardsForPokemon(pokemon3);
|
const [pokemon3CommonEggs, pokemon3RareEggs] = calculateEggRewardsForPokemon(pokemon3);
|
||||||
let pokemon3Tooltip = getEncounterText(`${namespace}:option.3.tooltip_base`)!;
|
let pokemon3Tooltip = getEncounterText(`${namespace}:option.3.tooltipBase`)!;
|
||||||
if (pokemon3RareEggs > 0) {
|
if (pokemon3RareEggs > 0) {
|
||||||
const eggsText = i18next.t(`${namespace}:numEggs`, {
|
const eggsText = i18next.t(`${namespace}:numEggs`, {
|
||||||
count: pokemon3RareEggs,
|
count: pokemon3RareEggs,
|
||||||
rarity: i18next.t("egg:greatTier"),
|
rarity: i18next.t("egg:greatTier"),
|
||||||
});
|
});
|
||||||
pokemon3Tooltip += i18next.t(`${namespace}:eggs_tooltip`, {
|
pokemon3Tooltip += i18next.t(`${namespace}:eggsTooltip`, {
|
||||||
eggs: eggsText,
|
eggs: eggsText,
|
||||||
});
|
});
|
||||||
encounter.setDialogueToken("pokemon3RareEggs", eggsText);
|
encounter.setDialogueToken("pokemon3RareEggs", eggsText);
|
||||||
@ -255,7 +255,7 @@ export const TheExpertPokemonBreederEncounter: MysteryEncounter = MysteryEncount
|
|||||||
count: pokemon3CommonEggs,
|
count: pokemon3CommonEggs,
|
||||||
rarity: i18next.t("egg:defaultTier"),
|
rarity: i18next.t("egg:defaultTier"),
|
||||||
});
|
});
|
||||||
pokemon3Tooltip += i18next.t(`${namespace}:eggs_tooltip`, {
|
pokemon3Tooltip += i18next.t(`${namespace}:eggsTooltip`, {
|
||||||
eggs: eggsText,
|
eggs: eggsText,
|
||||||
});
|
});
|
||||||
encounter.setDialogueToken("pokemon3CommonEggs", eggsText);
|
encounter.setDialogueToken("pokemon3CommonEggs", eggsText);
|
||||||
@ -321,14 +321,14 @@ export const TheExpertPokemonBreederEncounter: MysteryEncounter = MysteryEncount
|
|||||||
];
|
];
|
||||||
if (encounter.dialogueTokens.hasOwnProperty("pokemon1CommonEggs")) {
|
if (encounter.dialogueTokens.hasOwnProperty("pokemon1CommonEggs")) {
|
||||||
encounter.dialogue.outro.push({
|
encounter.dialogue.outro.push({
|
||||||
text: i18next.t(`${namespace}:gained_eggs`, {
|
text: i18next.t(`${namespace}:gainedEggs`, {
|
||||||
numEggs: encounter.dialogueTokens["pokemon1CommonEggs"],
|
numEggs: encounter.dialogueTokens["pokemon1CommonEggs"],
|
||||||
}),
|
}),
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
if (encounter.dialogueTokens.hasOwnProperty("pokemon1RareEggs")) {
|
if (encounter.dialogueTokens.hasOwnProperty("pokemon1RareEggs")) {
|
||||||
encounter.dialogue.outro.push({
|
encounter.dialogue.outro.push({
|
||||||
text: i18next.t(`${namespace}:gained_eggs`, {
|
text: i18next.t(`${namespace}:gainedEggs`, {
|
||||||
numEggs: encounter.dialogueTokens["pokemon1RareEggs"],
|
numEggs: encounter.dialogueTokens["pokemon1RareEggs"],
|
||||||
}),
|
}),
|
||||||
});
|
});
|
||||||
@ -380,14 +380,14 @@ export const TheExpertPokemonBreederEncounter: MysteryEncounter = MysteryEncount
|
|||||||
];
|
];
|
||||||
if (encounter.dialogueTokens.hasOwnProperty("pokemon2CommonEggs")) {
|
if (encounter.dialogueTokens.hasOwnProperty("pokemon2CommonEggs")) {
|
||||||
encounter.dialogue.outro.push({
|
encounter.dialogue.outro.push({
|
||||||
text: i18next.t(`${namespace}:gained_eggs`, {
|
text: i18next.t(`${namespace}:gainedEggs`, {
|
||||||
numEggs: encounter.dialogueTokens["pokemon2CommonEggs"],
|
numEggs: encounter.dialogueTokens["pokemon2CommonEggs"],
|
||||||
}),
|
}),
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
if (encounter.dialogueTokens.hasOwnProperty("pokemon2RareEggs")) {
|
if (encounter.dialogueTokens.hasOwnProperty("pokemon2RareEggs")) {
|
||||||
encounter.dialogue.outro.push({
|
encounter.dialogue.outro.push({
|
||||||
text: i18next.t(`${namespace}:gained_eggs`, {
|
text: i18next.t(`${namespace}:gainedEggs`, {
|
||||||
numEggs: encounter.dialogueTokens["pokemon2RareEggs"],
|
numEggs: encounter.dialogueTokens["pokemon2RareEggs"],
|
||||||
}),
|
}),
|
||||||
});
|
});
|
||||||
@ -439,14 +439,14 @@ export const TheExpertPokemonBreederEncounter: MysteryEncounter = MysteryEncount
|
|||||||
];
|
];
|
||||||
if (encounter.dialogueTokens.hasOwnProperty("pokemon3CommonEggs")) {
|
if (encounter.dialogueTokens.hasOwnProperty("pokemon3CommonEggs")) {
|
||||||
encounter.dialogue.outro.push({
|
encounter.dialogue.outro.push({
|
||||||
text: i18next.t(`${namespace}:gained_eggs`, {
|
text: i18next.t(`${namespace}:gainedEggs`, {
|
||||||
numEggs: encounter.dialogueTokens["pokemon3CommonEggs"],
|
numEggs: encounter.dialogueTokens["pokemon3CommonEggs"],
|
||||||
}),
|
}),
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
if (encounter.dialogueTokens.hasOwnProperty("pokemon3RareEggs")) {
|
if (encounter.dialogueTokens.hasOwnProperty("pokemon3RareEggs")) {
|
||||||
encounter.dialogue.outro.push({
|
encounter.dialogue.outro.push({
|
||||||
text: i18next.t(`${namespace}:gained_eggs`, {
|
text: i18next.t(`${namespace}:gainedEggs`, {
|
||||||
numEggs: encounter.dialogueTokens["pokemon3RareEggs"],
|
numEggs: encounter.dialogueTokens["pokemon3RareEggs"],
|
||||||
}),
|
}),
|
||||||
});
|
});
|
||||||
@ -482,7 +482,7 @@ function getPartyConfig(): EnemyPartyConfig {
|
|||||||
trainerType: TrainerType.EXPERT_POKEMON_BREEDER,
|
trainerType: TrainerType.EXPERT_POKEMON_BREEDER,
|
||||||
pokemonConfigs: [
|
pokemonConfigs: [
|
||||||
{
|
{
|
||||||
nickname: i18next.t(`${namespace}:cleffa_1_nickname`, {
|
nickname: i18next.t(`${namespace}:cleffa1Nickname`, {
|
||||||
speciesName: getPokemonSpecies(cleffaSpecies).getName(),
|
speciesName: getPokemonSpecies(cleffaSpecies).getName(),
|
||||||
}),
|
}),
|
||||||
species: getPokemonSpecies(cleffaSpecies),
|
species: getPokemonSpecies(cleffaSpecies),
|
||||||
@ -501,7 +501,7 @@ function getPartyConfig(): EnemyPartyConfig {
|
|||||||
// All 3 members always Cleffa line, but different configs
|
// All 3 members always Cleffa line, but different configs
|
||||||
baseConfig.pokemonConfigs!.push(
|
baseConfig.pokemonConfigs!.push(
|
||||||
{
|
{
|
||||||
nickname: i18next.t(`${namespace}:cleffa_2_nickname`, {
|
nickname: i18next.t(`${namespace}:cleffa2Nickname`, {
|
||||||
speciesName: getPokemonSpecies(cleffaSpecies).getName(),
|
speciesName: getPokemonSpecies(cleffaSpecies).getName(),
|
||||||
}),
|
}),
|
||||||
species: getPokemonSpecies(cleffaSpecies),
|
species: getPokemonSpecies(cleffaSpecies),
|
||||||
@ -514,7 +514,7 @@ function getPartyConfig(): EnemyPartyConfig {
|
|||||||
ivs: [31, 31, 31, 31, 31, 31],
|
ivs: [31, 31, 31, 31, 31, 31],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
nickname: i18next.t(`${namespace}:cleffa_3_nickname`, {
|
nickname: i18next.t(`${namespace}:cleffa3Nickname`, {
|
||||||
speciesName: getPokemonSpecies(cleffaSpecies).getName(),
|
speciesName: getPokemonSpecies(cleffaSpecies).getName(),
|
||||||
}),
|
}),
|
||||||
species: getPokemonSpecies(cleffaSpecies),
|
species: getPokemonSpecies(cleffaSpecies),
|
||||||
@ -647,7 +647,7 @@ function onGameOver() {
|
|||||||
encounter.dialogue.outro = [
|
encounter.dialogue.outro = [
|
||||||
{
|
{
|
||||||
speaker: trainerNameKey,
|
speaker: trainerNameKey,
|
||||||
text: `${namespace}:outro_failed`,
|
text: `${namespace}:outroFailed`,
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@ -66,7 +66,7 @@ export const ThePokemonSalesmanEncounter: MysteryEncounter = MysteryEncounterBui
|
|||||||
text: `${namespace}:intro`,
|
text: `${namespace}:intro`,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
text: `${namespace}:intro_dialogue`,
|
text: `${namespace}:introDialogue`,
|
||||||
speaker: `${namespace}:speaker`,
|
speaker: `${namespace}:speaker`,
|
||||||
},
|
},
|
||||||
])
|
])
|
||||||
@ -178,8 +178,8 @@ export const ThePokemonSalesmanEncounter: MysteryEncounter = MysteryEncounterBui
|
|||||||
// Always max price for shiny (flip HA back to normal), and add special messaging
|
// Always max price for shiny (flip HA back to normal), and add special messaging
|
||||||
priceMultiplier = MAX_POKEMON_PRICE_MULTIPLIER;
|
priceMultiplier = MAX_POKEMON_PRICE_MULTIPLIER;
|
||||||
pokemon.abilityIndex = 0;
|
pokemon.abilityIndex = 0;
|
||||||
encounter.dialogue.encounterOptionsDialogue!.description = `${namespace}:description_shiny`;
|
encounter.dialogue.encounterOptionsDialogue!.description = `${namespace}:descriptionShiny`;
|
||||||
encounter.options[0].dialogue!.buttonTooltip = `${namespace}:option.1.tooltip_shiny`;
|
encounter.options[0].dialogue!.buttonTooltip = `${namespace}:option.1.tooltipShiny`;
|
||||||
}
|
}
|
||||||
const price = globalScene.getWaveMoneyAmount(priceMultiplier);
|
const price = globalScene.getWaveMoneyAmount(priceMultiplier);
|
||||||
encounter.setDialogueToken("purchasePokemon", pokemon.getNameToRender());
|
encounter.setDialogueToken("purchasePokemon", pokemon.getNameToRender());
|
||||||
@ -202,7 +202,7 @@ export const ThePokemonSalesmanEncounter: MysteryEncounter = MysteryEncounterBui
|
|||||||
buttonTooltip: `${namespace}:option.1.tooltip`,
|
buttonTooltip: `${namespace}:option.1.tooltip`,
|
||||||
selected: [
|
selected: [
|
||||||
{
|
{
|
||||||
text: `${namespace}:option.1.selected_message`,
|
text: `${namespace}:option.1.selectedMessage`,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
})
|
})
|
||||||
@ -215,7 +215,7 @@ export const ThePokemonSalesmanEncounter: MysteryEncounter = MysteryEncounterBui
|
|||||||
updatePlayerMoney(-price, true, false);
|
updatePlayerMoney(-price, true, false);
|
||||||
|
|
||||||
// Show dialogue
|
// Show dialogue
|
||||||
await showEncounterDialogue(`${namespace}:option.1.selected_dialogue`, `${namespace}:speaker`);
|
await showEncounterDialogue(`${namespace}:option.1.selectedDialogue`, `${namespace}:speaker`);
|
||||||
await transitionMysteryEncounterIntroVisuals();
|
await transitionMysteryEncounterIntroVisuals();
|
||||||
|
|
||||||
// "Catch" purchased pokemon
|
// "Catch" purchased pokemon
|
||||||
|
@ -115,7 +115,7 @@ export const TheStrongStuffEncounter: MysteryEncounter = MysteryEncounterBuilder
|
|||||||
],
|
],
|
||||||
tags: [BattlerTagType.MYSTERY_ENCOUNTER_POST_SUMMON],
|
tags: [BattlerTagType.MYSTERY_ENCOUNTER_POST_SUMMON],
|
||||||
mysteryEncounterBattleEffects: (pokemon: Pokemon) => {
|
mysteryEncounterBattleEffects: (pokemon: Pokemon) => {
|
||||||
queueEncounterMessage(`${namespace}:option.2.stat_boost`);
|
queueEncounterMessage(`${namespace}:option.2.statBoost`);
|
||||||
globalScene.phaseManager.unshiftNew(
|
globalScene.phaseManager.unshiftNew(
|
||||||
"StatStageChangePhase",
|
"StatStageChangePhase",
|
||||||
pokemon.getBattlerIndex(),
|
pokemon.getBattlerIndex(),
|
||||||
@ -181,7 +181,7 @@ export const TheStrongStuffEncounter: MysteryEncounter = MysteryEncounterBuilder
|
|||||||
|
|
||||||
encounter.setDialogueToken("reductionValue", HIGH_BST_REDUCTION_VALUE.toString());
|
encounter.setDialogueToken("reductionValue", HIGH_BST_REDUCTION_VALUE.toString());
|
||||||
encounter.setDialogueToken("increaseValue", BST_INCREASE_VALUE.toString());
|
encounter.setDialogueToken("increaseValue", BST_INCREASE_VALUE.toString());
|
||||||
await showEncounterText(`${namespace}:option.1.selected_2`, null, undefined, true);
|
await showEncounterText(`${namespace}:option.1.selected2`, null, undefined, true);
|
||||||
|
|
||||||
encounter.dialogue.outro = [
|
encounter.dialogue.outro = [
|
||||||
{
|
{
|
||||||
|
@ -87,7 +87,7 @@ export const TheWinstrateChallengeEncounter: MysteryEncounter = MysteryEncounter
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
speaker: `${namespace}:speaker`,
|
speaker: `${namespace}:speaker`,
|
||||||
text: `${namespace}:intro_dialogue`,
|
text: `${namespace}:introDialogue`,
|
||||||
},
|
},
|
||||||
])
|
])
|
||||||
.withAutoHideIntroVisuals(false)
|
.withAutoHideIntroVisuals(false)
|
||||||
@ -163,7 +163,7 @@ async function spawnNextTrainerOrEndEncounter() {
|
|||||||
globalScene.playSound("item_fanfare");
|
globalScene.playSound("item_fanfare");
|
||||||
await showEncounterText(i18next.t("battle:rewardGain", { modifierName: newModifier?.type.name }));
|
await showEncounterText(i18next.t("battle:rewardGain", { modifierName: newModifier?.type.name }));
|
||||||
|
|
||||||
await showEncounterDialogue(`${namespace}:victory_2`, `${namespace}:speaker`);
|
await showEncounterDialogue(`${namespace}:victory2`, `${namespace}:speaker`);
|
||||||
globalScene.ui.clearText(); // Clears "Winstrate" title from screen as rewards get animated in
|
globalScene.ui.clearText(); // Clears "Winstrate" title from screen as rewards get animated in
|
||||||
const machoBrace = generateModifierTypeOption(modifierTypes.MYSTERY_ENCOUNTER_MACHO_BRACE)!;
|
const machoBrace = generateModifierTypeOption(modifierTypes.MYSTERY_ENCOUNTER_MACHO_BRACE)!;
|
||||||
machoBrace.type.tier = ModifierTier.MASTER;
|
machoBrace.type.tier = ModifierTier.MASTER;
|
||||||
|
@ -90,7 +90,7 @@ export const TrainingSessionEncounter: MysteryEncounter = MysteryEncounterBuilde
|
|||||||
|
|
||||||
// Only Pokemon that are not KOed/legal can be trained
|
// Only Pokemon that are not KOed/legal can be trained
|
||||||
const selectableFilter = (pokemon: Pokemon) => {
|
const selectableFilter = (pokemon: Pokemon) => {
|
||||||
return isPokemonValidForEncounterOptionSelection(pokemon, `${namespace}:invalid_selection`);
|
return isPokemonValidForEncounterOptionSelection(pokemon, `${namespace}:invalidSelection`);
|
||||||
};
|
};
|
||||||
|
|
||||||
return selectPokemonForOption(onPokemonSelected, undefined, selectableFilter);
|
return selectPokemonForOption(onPokemonSelected, undefined, selectableFilter);
|
||||||
@ -174,7 +174,7 @@ export const TrainingSessionEncounter: MysteryEncounter = MysteryEncounterBuilde
|
|||||||
.withDialogue({
|
.withDialogue({
|
||||||
buttonLabel: `${namespace}:option.2.label`,
|
buttonLabel: `${namespace}:option.2.label`,
|
||||||
buttonTooltip: `${namespace}:option.2.tooltip`,
|
buttonTooltip: `${namespace}:option.2.tooltip`,
|
||||||
secondOptionPrompt: `${namespace}:option.2.select_prompt`,
|
secondOptionPrompt: `${namespace}:option.2.selectPrompt`,
|
||||||
selected: [
|
selected: [
|
||||||
{
|
{
|
||||||
text: `${namespace}:option.selected`,
|
text: `${namespace}:option.selected`,
|
||||||
@ -205,7 +205,7 @@ export const TrainingSessionEncounter: MysteryEncounter = MysteryEncounterBuilde
|
|||||||
|
|
||||||
// Only Pokemon that are not KOed/legal can be trained
|
// Only Pokemon that are not KOed/legal can be trained
|
||||||
const selectableFilter = (pokemon: Pokemon) => {
|
const selectableFilter = (pokemon: Pokemon) => {
|
||||||
return isPokemonValidForEncounterOptionSelection(pokemon, `${namespace}:invalid_selection`);
|
return isPokemonValidForEncounterOptionSelection(pokemon, `${namespace}:invalidSelection`);
|
||||||
};
|
};
|
||||||
|
|
||||||
return selectPokemonForOption(onPokemonSelected, undefined, selectableFilter);
|
return selectPokemonForOption(onPokemonSelected, undefined, selectableFilter);
|
||||||
@ -248,7 +248,7 @@ export const TrainingSessionEncounter: MysteryEncounter = MysteryEncounterBuilde
|
|||||||
.withDialogue({
|
.withDialogue({
|
||||||
buttonLabel: `${namespace}:option.3.label`,
|
buttonLabel: `${namespace}:option.3.label`,
|
||||||
buttonTooltip: `${namespace}:option.3.tooltip`,
|
buttonTooltip: `${namespace}:option.3.tooltip`,
|
||||||
secondOptionPrompt: `${namespace}:option.3.select_prompt`,
|
secondOptionPrompt: `${namespace}:option.3.selectPrompt`,
|
||||||
selected: [
|
selected: [
|
||||||
{
|
{
|
||||||
text: `${namespace}:option.selected`,
|
text: `${namespace}:option.selected`,
|
||||||
@ -295,7 +295,7 @@ export const TrainingSessionEncounter: MysteryEncounter = MysteryEncounterBuilde
|
|||||||
|
|
||||||
// Only Pokemon that are not KOed/legal can be trained
|
// Only Pokemon that are not KOed/legal can be trained
|
||||||
const selectableFilter = (pokemon: Pokemon) => {
|
const selectableFilter = (pokemon: Pokemon) => {
|
||||||
return isPokemonValidForEncounterOptionSelection(pokemon, `${namespace}:invalid_selection`);
|
return isPokemonValidForEncounterOptionSelection(pokemon, `${namespace}:invalidSelection`);
|
||||||
};
|
};
|
||||||
|
|
||||||
return selectPokemonForOption(onPokemonSelected, undefined, selectableFilter);
|
return selectPokemonForOption(onPokemonSelected, undefined, selectableFilter);
|
||||||
|
@ -194,7 +194,7 @@ export const TrashToTreasureEncounter: MysteryEncounter = MysteryEncounterBuilde
|
|||||||
.withOptionPhase(async () => {
|
.withOptionPhase(async () => {
|
||||||
// Investigate garbage, battle Gmax Garbodor
|
// Investigate garbage, battle Gmax Garbodor
|
||||||
globalScene.setFieldScale(0.75);
|
globalScene.setFieldScale(0.75);
|
||||||
await showEncounterText(`${namespace}:option.2.selected_2`);
|
await showEncounterText(`${namespace}:option.2.selected2`);
|
||||||
await transitionMysteryEncounterIntroVisuals();
|
await transitionMysteryEncounterIntroVisuals();
|
||||||
|
|
||||||
const encounter = globalScene.currentBattle.mysteryEncounter!;
|
const encounter = globalScene.currentBattle.mysteryEncounter!;
|
||||||
|
@ -97,7 +97,7 @@ export const UncommonBreedEncounter: MysteryEncounter = MysteryEncounterBuilder.
|
|||||||
isBoss: false,
|
isBoss: false,
|
||||||
tags: [BattlerTagType.MYSTERY_ENCOUNTER_POST_SUMMON],
|
tags: [BattlerTagType.MYSTERY_ENCOUNTER_POST_SUMMON],
|
||||||
mysteryEncounterBattleEffects: (pokemon: Pokemon) => {
|
mysteryEncounterBattleEffects: (pokemon: Pokemon) => {
|
||||||
queueEncounterMessage(`${namespace}:option.1.stat_boost`);
|
queueEncounterMessage(`${namespace}:option.1.statBoost`);
|
||||||
globalScene.phaseManager.unshiftNew(
|
globalScene.phaseManager.unshiftNew(
|
||||||
"StatStageChangePhase",
|
"StatStageChangePhase",
|
||||||
pokemon.getBattlerIndex(),
|
pokemon.getBattlerIndex(),
|
||||||
@ -191,7 +191,7 @@ export const UncommonBreedEncounter: MysteryEncounter = MysteryEncounterBuilder.
|
|||||||
.withDialogue({
|
.withDialogue({
|
||||||
buttonLabel: `${namespace}:option.2.label`,
|
buttonLabel: `${namespace}:option.2.label`,
|
||||||
buttonTooltip: `${namespace}:option.2.tooltip`,
|
buttonTooltip: `${namespace}:option.2.tooltip`,
|
||||||
disabledButtonTooltip: `${namespace}:option.2.disabled_tooltip`,
|
disabledButtonTooltip: `${namespace}:option.2.disabledTooltip`,
|
||||||
selected: [
|
selected: [
|
||||||
{
|
{
|
||||||
text: `${namespace}:option.2.selected`,
|
text: `${namespace}:option.2.selected`,
|
||||||
@ -236,7 +236,7 @@ export const UncommonBreedEncounter: MysteryEncounter = MysteryEncounterBuilder.
|
|||||||
.withDialogue({
|
.withDialogue({
|
||||||
buttonLabel: `${namespace}:option.3.label`,
|
buttonLabel: `${namespace}:option.3.label`,
|
||||||
buttonTooltip: `${namespace}:option.3.tooltip`,
|
buttonTooltip: `${namespace}:option.3.tooltip`,
|
||||||
disabledButtonTooltip: `${namespace}:option.3.disabled_tooltip`,
|
disabledButtonTooltip: `${namespace}:option.3.disabledTooltip`,
|
||||||
selected: [
|
selected: [
|
||||||
{
|
{
|
||||||
text: `${namespace}:option.3.selected`,
|
text: `${namespace}:option.3.selected`,
|
||||||
|
@ -143,7 +143,7 @@ export const WeirdDreamEncounter: MysteryEncounter = MysteryEncounterBuilder.wit
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
speaker: `${namespace}:speaker`,
|
speaker: `${namespace}:speaker`,
|
||||||
text: `${namespace}:intro_dialogue`,
|
text: `${namespace}:introDialogue`,
|
||||||
},
|
},
|
||||||
])
|
])
|
||||||
.setLocalizationKey(`${namespace}`)
|
.setLocalizationKey(`${namespace}`)
|
||||||
@ -216,7 +216,7 @@ export const WeirdDreamEncounter: MysteryEncounter = MysteryEncounterBuilder.wit
|
|||||||
await cutsceneDialoguePromise;
|
await cutsceneDialoguePromise;
|
||||||
|
|
||||||
doHideDreamBackground();
|
doHideDreamBackground();
|
||||||
await showEncounterText(`${namespace}:option.1.dream_complete`);
|
await showEncounterText(`${namespace}:option.1.dreamComplete`);
|
||||||
|
|
||||||
await doNewTeamPostProcess(transformations);
|
await doNewTeamPostProcess(transformations);
|
||||||
setEncounterRewards({
|
setEncounterRewards({
|
||||||
@ -329,7 +329,7 @@ export const WeirdDreamEncounter: MysteryEncounter = MysteryEncounterBuilder.wit
|
|||||||
onBeforeRewards,
|
onBeforeRewards,
|
||||||
);
|
);
|
||||||
|
|
||||||
await showEncounterText(`${namespace}:option.2.selected_2`, null, undefined, true);
|
await showEncounterText(`${namespace}:option.2.selected2`, null, undefined, true);
|
||||||
await initBattleWithEnemyConfig(enemyPartyConfig);
|
await initBattleWithEnemyConfig(enemyPartyConfig);
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
|
@ -1,4 +1,3 @@
|
|||||||
import { globalScene } from "#app/global-scene";
|
|
||||||
import { Status } from "#data/status-effect";
|
import { Status } from "#data/status-effect";
|
||||||
import { AbilityId } from "#enums/ability-id";
|
import { AbilityId } from "#enums/ability-id";
|
||||||
import { BattleType } from "#enums/battle-type";
|
import { BattleType } from "#enums/battle-type";
|
||||||
@ -179,18 +178,13 @@ describe("Moves - Whirlwind", () => {
|
|||||||
const eligibleEnemy = enemyParty.filter(p => p.hp > 0 && p.isAllowedInBattle());
|
const eligibleEnemy = enemyParty.filter(p => p.hp > 0 && p.isAllowedInBattle());
|
||||||
expect(eligibleEnemy.length).toBe(1);
|
expect(eligibleEnemy.length).toBe(1);
|
||||||
|
|
||||||
// Spy on the queueMessage function
|
|
||||||
const queueSpy = vi.spyOn(globalScene.phaseManager, "queueMessage");
|
|
||||||
|
|
||||||
// Player uses Whirlwind; opponent uses Splash
|
// Player uses Whirlwind; opponent uses Splash
|
||||||
game.move.select(MoveId.WHIRLWIND);
|
game.move.select(MoveId.WHIRLWIND);
|
||||||
await game.move.selectEnemyMove(MoveId.SPLASH);
|
await game.move.selectEnemyMove(MoveId.SPLASH);
|
||||||
await game.toNextTurn();
|
await game.toNextTurn();
|
||||||
|
|
||||||
// Verify that the failure message is displayed for Whirlwind
|
const player = game.field.getPlayerPokemon();
|
||||||
expect(queueSpy).toHaveBeenCalledWith(expect.stringContaining("But it failed"));
|
expect(player).toHaveUsedMove({ move: MoveId.WHIRLWIND, result: MoveResult.FAIL });
|
||||||
// Verify the opponent's Splash message
|
|
||||||
expect(queueSpy).toHaveBeenCalledWith(expect.stringContaining("But nothing happened!"));
|
|
||||||
});
|
});
|
||||||
|
|
||||||
it("should not pull in the other trainer's pokemon in a partner trainer battle", async () => {
|
it("should not pull in the other trainer's pokemon in a partner trainer battle", async () => {
|
||||||
|
@ -66,7 +66,7 @@ describe("An Offer You Can't Refuse - Mystery Encounter", () => {
|
|||||||
expect(AnOfferYouCantRefuseEncounter.dialogue).toBeDefined();
|
expect(AnOfferYouCantRefuseEncounter.dialogue).toBeDefined();
|
||||||
expect(AnOfferYouCantRefuseEncounter.dialogue.intro).toStrictEqual([
|
expect(AnOfferYouCantRefuseEncounter.dialogue.intro).toStrictEqual([
|
||||||
{ text: `${namespace}:intro` },
|
{ text: `${namespace}:intro` },
|
||||||
{ speaker: `${namespace}:speaker`, text: `${namespace}:intro_dialogue` },
|
{ speaker: `${namespace}:speaker`, text: `${namespace}:introDialogue` },
|
||||||
]);
|
]);
|
||||||
expect(AnOfferYouCantRefuseEncounter.dialogue.encounterOptionsDialogue?.title).toBe(`${namespace}:title`);
|
expect(AnOfferYouCantRefuseEncounter.dialogue.encounterOptionsDialogue?.title).toBe(`${namespace}:title`);
|
||||||
expect(AnOfferYouCantRefuseEncounter.dialogue.encounterOptionsDialogue?.description).toBe(
|
expect(AnOfferYouCantRefuseEncounter.dialogue.encounterOptionsDialogue?.description).toBe(
|
||||||
@ -180,7 +180,7 @@ describe("An Offer You Can't Refuse - Mystery Encounter", () => {
|
|||||||
expect(option.dialogue).toStrictEqual({
|
expect(option.dialogue).toStrictEqual({
|
||||||
buttonLabel: `${namespace}:option.2.label`,
|
buttonLabel: `${namespace}:option.2.label`,
|
||||||
buttonTooltip: `${namespace}:option.2.tooltip`,
|
buttonTooltip: `${namespace}:option.2.tooltip`,
|
||||||
disabledButtonTooltip: `${namespace}:option.2.tooltip_disabled`,
|
disabledButtonTooltip: `${namespace}:option.2.tooltipDisabled`,
|
||||||
selected: [
|
selected: [
|
||||||
{
|
{
|
||||||
speaker: `${namespace}:speaker`,
|
speaker: `${namespace}:speaker`,
|
||||||
|
@ -194,7 +194,7 @@ describe("Berries Abound - Mystery Encounter", () => {
|
|||||||
|
|
||||||
// Should be enraged
|
// Should be enraged
|
||||||
expect(enemyField[0].summonData.statStages).toEqual([0, 1, 0, 1, 1, 0, 0]);
|
expect(enemyField[0].summonData.statStages).toEqual([0, 1, 0, 1, 1, 0, 0]);
|
||||||
expect(encounterTextSpy).toHaveBeenCalledWith(`${namespace}:option.2.selected_bad`);
|
expect(encounterTextSpy).toHaveBeenCalledWith(`${namespace}:option.2.selectedBad`);
|
||||||
});
|
});
|
||||||
|
|
||||||
it("should start battle if fastest pokemon is slower than boss above wave 50", async () => {
|
it("should start battle if fastest pokemon is slower than boss above wave 50", async () => {
|
||||||
@ -218,7 +218,7 @@ describe("Berries Abound - Mystery Encounter", () => {
|
|||||||
|
|
||||||
// Should be enraged
|
// Should be enraged
|
||||||
expect(enemyField[0].summonData.statStages).toEqual([1, 1, 1, 1, 1, 0, 0]);
|
expect(enemyField[0].summonData.statStages).toEqual([1, 1, 1, 1, 1, 0, 0]);
|
||||||
expect(encounterTextSpy).toHaveBeenCalledWith(`${namespace}:option.2.selected_bad`);
|
expect(encounterTextSpy).toHaveBeenCalledWith(`${namespace}:option.2.selectedBad`);
|
||||||
});
|
});
|
||||||
|
|
||||||
it("Should skip battle when fastest pokemon is faster than boss", async () => {
|
it("Should skip battle when fastest pokemon is faster than boss", async () => {
|
||||||
|
@ -181,7 +181,7 @@ describe("Bug-Type Superfan - Mystery Encounter", () => {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
speaker: `${namespace}:speaker`,
|
speaker: `${namespace}:speaker`,
|
||||||
text: `${namespace}:intro_dialogue`,
|
text: `${namespace}:introDialogue`,
|
||||||
},
|
},
|
||||||
]);
|
]);
|
||||||
expect(BugTypeSuperfanEncounter.dialogue.encounterOptionsDialogue?.title).toBe(`${namespace}:title`);
|
expect(BugTypeSuperfanEncounter.dialogue.encounterOptionsDialogue?.title).toBe(`${namespace}:title`);
|
||||||
@ -389,7 +389,7 @@ describe("Bug-Type Superfan - Mystery Encounter", () => {
|
|||||||
expect(option.dialogue).toStrictEqual({
|
expect(option.dialogue).toStrictEqual({
|
||||||
buttonLabel: `${namespace}:option.2.label`,
|
buttonLabel: `${namespace}:option.2.label`,
|
||||||
buttonTooltip: `${namespace}:option.2.tooltip`,
|
buttonTooltip: `${namespace}:option.2.tooltip`,
|
||||||
disabledButtonTooltip: `${namespace}:option.2.disabled_tooltip`,
|
disabledButtonTooltip: `${namespace}:option.2.disabledTooltip`,
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -513,17 +513,17 @@ describe("Bug-Type Superfan - Mystery Encounter", () => {
|
|||||||
expect(option.dialogue).toStrictEqual({
|
expect(option.dialogue).toStrictEqual({
|
||||||
buttonLabel: `${namespace}:option.3.label`,
|
buttonLabel: `${namespace}:option.3.label`,
|
||||||
buttonTooltip: `${namespace}:option.3.tooltip`,
|
buttonTooltip: `${namespace}:option.3.tooltip`,
|
||||||
disabledButtonTooltip: `${namespace}:option.3.disabled_tooltip`,
|
disabledButtonTooltip: `${namespace}:option.3.disabledTooltip`,
|
||||||
selected: [
|
selected: [
|
||||||
{
|
{
|
||||||
text: `${namespace}:option.3.selected`,
|
text: `${namespace}:option.3.selected`,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
speaker: `${namespace}:speaker`,
|
speaker: `${namespace}:speaker`,
|
||||||
text: `${namespace}:option.3.selected_dialogue`,
|
text: `${namespace}:option.3.selectedDialogue`,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
secondOptionPrompt: `${namespace}:option.3.select_prompt`,
|
secondOptionPrompt: `${namespace}:option.3.selectPrompt`,
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -80,7 +80,7 @@ describe("Clowning Around - Mystery Encounter", () => {
|
|||||||
{ text: `${namespace}:intro` },
|
{ text: `${namespace}:intro` },
|
||||||
{
|
{
|
||||||
speaker: `${namespace}:speaker`,
|
speaker: `${namespace}:speaker`,
|
||||||
text: `${namespace}:intro_dialogue`,
|
text: `${namespace}:introDialogue`,
|
||||||
},
|
},
|
||||||
]);
|
]);
|
||||||
expect(ClowningAroundEncounter.dialogue.encounterOptionsDialogue?.title).toBe(`${namespace}:title`);
|
expect(ClowningAroundEncounter.dialogue.encounterOptionsDialogue?.title).toBe(`${namespace}:title`);
|
||||||
@ -249,11 +249,11 @@ describe("Clowning Around - Mystery Encounter", () => {
|
|||||||
text: `${namespace}:option.2.selected`,
|
text: `${namespace}:option.2.selected`,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
text: `${namespace}:option.2.selected_2`,
|
text: `${namespace}:option.2.selected2`,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
speaker: `${namespace}:speaker`,
|
speaker: `${namespace}:speaker`,
|
||||||
text: `${namespace}:option.2.selected_3`,
|
text: `${namespace}:option.2.selected3`,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
});
|
});
|
||||||
@ -334,11 +334,11 @@ describe("Clowning Around - Mystery Encounter", () => {
|
|||||||
text: `${namespace}:option.3.selected`,
|
text: `${namespace}:option.3.selected`,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
text: `${namespace}:option.3.selected_2`,
|
text: `${namespace}:option.3.selected2`,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
speaker: `${namespace}:speaker`,
|
speaker: `${namespace}:speaker`,
|
||||||
text: `${namespace}:option.3.selected_3`,
|
text: `${namespace}:option.3.selected3`,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
});
|
});
|
||||||
|
@ -186,8 +186,8 @@ describe("Dancing Lessons - Mystery Encounter", () => {
|
|||||||
expect(option.dialogue).toStrictEqual({
|
expect(option.dialogue).toStrictEqual({
|
||||||
buttonLabel: `${namespace}:option.3.label`,
|
buttonLabel: `${namespace}:option.3.label`,
|
||||||
buttonTooltip: `${namespace}:option.3.tooltip`,
|
buttonTooltip: `${namespace}:option.3.tooltip`,
|
||||||
disabledButtonTooltip: `${namespace}:option.3.disabled_tooltip`,
|
disabledButtonTooltip: `${namespace}:option.3.disabledTooltip`,
|
||||||
secondOptionPrompt: `${namespace}:option.3.select_prompt`,
|
secondOptionPrompt: `${namespace}:option.3.selectPrompt`,
|
||||||
selected: [
|
selected: [
|
||||||
{
|
{
|
||||||
text: `${namespace}:option.3.selected`,
|
text: `${namespace}:option.3.selected`,
|
||||||
|
@ -186,7 +186,7 @@ describe("Delibird-y - Mystery Encounter", () => {
|
|||||||
expect(option.dialogue).toStrictEqual({
|
expect(option.dialogue).toStrictEqual({
|
||||||
buttonLabel: `${namespace}:option.2.label`,
|
buttonLabel: `${namespace}:option.2.label`,
|
||||||
buttonTooltip: `${namespace}:option.2.tooltip`,
|
buttonTooltip: `${namespace}:option.2.tooltip`,
|
||||||
secondOptionPrompt: `${namespace}:option.2.select_prompt`,
|
secondOptionPrompt: `${namespace}:option.2.selectPrompt`,
|
||||||
selected: [
|
selected: [
|
||||||
{
|
{
|
||||||
text: `${namespace}:option.2.selected`,
|
text: `${namespace}:option.2.selected`,
|
||||||
@ -348,7 +348,7 @@ describe("Delibird-y - Mystery Encounter", () => {
|
|||||||
expect(option.dialogue).toStrictEqual({
|
expect(option.dialogue).toStrictEqual({
|
||||||
buttonLabel: `${namespace}:option.3.label`,
|
buttonLabel: `${namespace}:option.3.label`,
|
||||||
buttonTooltip: `${namespace}:option.3.tooltip`,
|
buttonTooltip: `${namespace}:option.3.tooltip`,
|
||||||
secondOptionPrompt: `${namespace}:option.3.select_prompt`,
|
secondOptionPrompt: `${namespace}:option.3.selectPrompt`,
|
||||||
selected: [
|
selected: [
|
||||||
{
|
{
|
||||||
text: `${namespace}:option.3.selected`,
|
text: `${namespace}:option.3.selected`,
|
||||||
|
@ -61,7 +61,7 @@ describe("Department Store Sale - Mystery Encounter", () => {
|
|||||||
{ text: `${namespace}:intro` },
|
{ text: `${namespace}:intro` },
|
||||||
{
|
{
|
||||||
speaker: `${namespace}:speaker`,
|
speaker: `${namespace}:speaker`,
|
||||||
text: `${namespace}:intro_dialogue`,
|
text: `${namespace}:introDialogue`,
|
||||||
},
|
},
|
||||||
]);
|
]);
|
||||||
expect(DepartmentStoreSaleEncounter.dialogue.encounterOptionsDialogue?.title).toBe(`${namespace}:title`);
|
expect(DepartmentStoreSaleEncounter.dialogue.encounterOptionsDialogue?.title).toBe(`${namespace}:title`);
|
||||||
|
@ -61,7 +61,7 @@ describe("Field Trip - Mystery Encounter", () => {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
speaker: `${namespace}:speaker`,
|
speaker: `${namespace}:speaker`,
|
||||||
text: `${namespace}:intro_dialogue`,
|
text: `${namespace}:introDialogue`,
|
||||||
},
|
},
|
||||||
]);
|
]);
|
||||||
expect(FieldTripEncounter.dialogue.encounterOptionsDialogue?.title).toBe(`${namespace}:title`);
|
expect(FieldTripEncounter.dialogue.encounterOptionsDialogue?.title).toBe(`${namespace}:title`);
|
||||||
@ -78,7 +78,7 @@ describe("Field Trip - Mystery Encounter", () => {
|
|||||||
expect(option.dialogue).toStrictEqual({
|
expect(option.dialogue).toStrictEqual({
|
||||||
buttonLabel: `${namespace}:option.1.label`,
|
buttonLabel: `${namespace}:option.1.label`,
|
||||||
buttonTooltip: `${namespace}:option.1.tooltip`,
|
buttonTooltip: `${namespace}:option.1.tooltip`,
|
||||||
secondOptionPrompt: `${namespace}:second_option_prompt`,
|
secondOptionPrompt: `${namespace}:secondOptionPrompt`,
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -139,7 +139,7 @@ describe("Field Trip - Mystery Encounter", () => {
|
|||||||
expect(option.dialogue).toStrictEqual({
|
expect(option.dialogue).toStrictEqual({
|
||||||
buttonLabel: `${namespace}:option.2.label`,
|
buttonLabel: `${namespace}:option.2.label`,
|
||||||
buttonTooltip: `${namespace}:option.2.tooltip`,
|
buttonTooltip: `${namespace}:option.2.tooltip`,
|
||||||
secondOptionPrompt: `${namespace}:second_option_prompt`,
|
secondOptionPrompt: `${namespace}:secondOptionPrompt`,
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -200,7 +200,7 @@ describe("Field Trip - Mystery Encounter", () => {
|
|||||||
expect(option.dialogue).toStrictEqual({
|
expect(option.dialogue).toStrictEqual({
|
||||||
buttonLabel: `${namespace}:option.3.label`,
|
buttonLabel: `${namespace}:option.3.label`,
|
||||||
buttonTooltip: `${namespace}:option.3.tooltip`,
|
buttonTooltip: `${namespace}:option.3.tooltip`,
|
||||||
secondOptionPrompt: `${namespace}:second_option_prompt`,
|
secondOptionPrompt: `${namespace}:secondOptionPrompt`,
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -253,7 +253,7 @@ describe("Fiery Fallout - Mystery Encounter", () => {
|
|||||||
expect(option1.dialogue).toStrictEqual({
|
expect(option1.dialogue).toStrictEqual({
|
||||||
buttonLabel: `${namespace}:option.3.label`,
|
buttonLabel: `${namespace}:option.3.label`,
|
||||||
buttonTooltip: `${namespace}:option.3.tooltip`,
|
buttonTooltip: `${namespace}:option.3.tooltip`,
|
||||||
disabledButtonTooltip: `${namespace}:option.3.disabled_tooltip`,
|
disabledButtonTooltip: `${namespace}:option.3.disabledTooltip`,
|
||||||
selected: [
|
selected: [
|
||||||
{
|
{
|
||||||
text: `${namespace}:option.3.selected`,
|
text: `${namespace}:option.3.selected`,
|
||||||
|
@ -143,7 +143,7 @@ describe("Fight or Flight - Mystery Encounter", () => {
|
|||||||
expect(option.dialogue).toStrictEqual({
|
expect(option.dialogue).toStrictEqual({
|
||||||
buttonLabel: `${namespace}:option.2.label`,
|
buttonLabel: `${namespace}:option.2.label`,
|
||||||
buttonTooltip: `${namespace}:option.2.tooltip`,
|
buttonTooltip: `${namespace}:option.2.tooltip`,
|
||||||
disabledButtonTooltip: `${namespace}:option.2.disabled_tooltip`,
|
disabledButtonTooltip: `${namespace}:option.2.disabledTooltip`,
|
||||||
selected: [
|
selected: [
|
||||||
{
|
{
|
||||||
text: `${namespace}:option.2.selected`,
|
text: `${namespace}:option.2.selected`,
|
||||||
|
@ -71,7 +71,7 @@ describe("Fun And Games! - Mystery Encounter", () => {
|
|||||||
expect(FunAndGamesEncounter.dialogue.intro).toStrictEqual([
|
expect(FunAndGamesEncounter.dialogue.intro).toStrictEqual([
|
||||||
{
|
{
|
||||||
speaker: `${namespace}:speaker`,
|
speaker: `${namespace}:speaker`,
|
||||||
text: `${namespace}:intro_dialogue`,
|
text: `${namespace}:introDialogue`,
|
||||||
},
|
},
|
||||||
]);
|
]);
|
||||||
expect(FunAndGamesEncounter.dialogue.encounterOptionsDialogue?.title).toBe(`${namespace}:title`);
|
expect(FunAndGamesEncounter.dialogue.encounterOptionsDialogue?.title).toBe(`${namespace}:title`);
|
||||||
|
@ -98,7 +98,7 @@ describe("Global Trade System - Mystery Encounter", () => {
|
|||||||
expect(option.dialogue).toStrictEqual({
|
expect(option.dialogue).toStrictEqual({
|
||||||
buttonLabel: `${namespace}:option.1.label`,
|
buttonLabel: `${namespace}:option.1.label`,
|
||||||
buttonTooltip: `${namespace}:option.1.tooltip`,
|
buttonTooltip: `${namespace}:option.1.tooltip`,
|
||||||
secondOptionPrompt: `${namespace}:option.1.trade_options_prompt`,
|
secondOptionPrompt: `${namespace}:option.1.tradeOptionsPrompt`,
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -210,7 +210,7 @@ describe("Global Trade System - Mystery Encounter", () => {
|
|||||||
expect(option.dialogue).toStrictEqual({
|
expect(option.dialogue).toStrictEqual({
|
||||||
buttonLabel: `${namespace}:option.3.label`,
|
buttonLabel: `${namespace}:option.3.label`,
|
||||||
buttonTooltip: `${namespace}:option.3.tooltip`,
|
buttonTooltip: `${namespace}:option.3.tooltip`,
|
||||||
secondOptionPrompt: `${namespace}:option.3.trade_options_prompt`,
|
secondOptionPrompt: `${namespace}:option.3.tradeOptionsPrompt`,
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -99,9 +99,9 @@ describe("Lost at Sea - Mystery Encounter", () => {
|
|||||||
expect(option1.dialogue).toBeDefined();
|
expect(option1.dialogue).toBeDefined();
|
||||||
expect(option1.dialogue).toStrictEqual({
|
expect(option1.dialogue).toStrictEqual({
|
||||||
buttonLabel: `${namespace}:option.1.label`,
|
buttonLabel: `${namespace}:option.1.label`,
|
||||||
disabledButtonLabel: `${namespace}:option.1.label_disabled`,
|
disabledButtonLabel: `${namespace}:option.1.labelDisabled`,
|
||||||
buttonTooltip: `${namespace}:option.1.tooltip`,
|
buttonTooltip: `${namespace}:option.1.tooltip`,
|
||||||
disabledButtonTooltip: `${namespace}:option.1.tooltip_disabled`,
|
disabledButtonTooltip: `${namespace}:option.1.tooltipDisabled`,
|
||||||
selected: [
|
selected: [
|
||||||
{
|
{
|
||||||
text: `${namespace}:option.1.selected`,
|
text: `${namespace}:option.1.selected`,
|
||||||
@ -162,9 +162,9 @@ describe("Lost at Sea - Mystery Encounter", () => {
|
|||||||
expect(option2.dialogue).toBeDefined();
|
expect(option2.dialogue).toBeDefined();
|
||||||
expect(option2.dialogue).toStrictEqual({
|
expect(option2.dialogue).toStrictEqual({
|
||||||
buttonLabel: `${namespace}:option.2.label`,
|
buttonLabel: `${namespace}:option.2.label`,
|
||||||
disabledButtonLabel: `${namespace}:option.2.label_disabled`,
|
disabledButtonLabel: `${namespace}:option.2.labelDisabled`,
|
||||||
buttonTooltip: `${namespace}:option.2.tooltip`,
|
buttonTooltip: `${namespace}:option.2.tooltip`,
|
||||||
disabledButtonTooltip: `${namespace}:option.2.tooltip_disabled`,
|
disabledButtonTooltip: `${namespace}:option.2.tooltipDisabled`,
|
||||||
selected: [
|
selected: [
|
||||||
{
|
{
|
||||||
text: `${namespace}:option.2.selected`,
|
text: `${namespace}:option.2.selected`,
|
||||||
|
@ -65,7 +65,7 @@ describe("Part-Timer - Mystery Encounter", () => {
|
|||||||
{ text: `${namespace}:intro` },
|
{ text: `${namespace}:intro` },
|
||||||
{
|
{
|
||||||
speaker: `${namespace}:speaker`,
|
speaker: `${namespace}:speaker`,
|
||||||
text: `${namespace}:intro_dialogue`,
|
text: `${namespace}:introDialogue`,
|
||||||
},
|
},
|
||||||
]);
|
]);
|
||||||
expect(PartTimerEncounter.dialogue.encounterOptionsDialogue?.title).toBe(`${namespace}:title`);
|
expect(PartTimerEncounter.dialogue.encounterOptionsDialogue?.title).toBe(`${namespace}:title`);
|
||||||
@ -219,7 +219,7 @@ describe("Part-Timer - Mystery Encounter", () => {
|
|||||||
expect(option.dialogue).toStrictEqual({
|
expect(option.dialogue).toStrictEqual({
|
||||||
buttonLabel: `${namespace}:option.3.label`,
|
buttonLabel: `${namespace}:option.3.label`,
|
||||||
buttonTooltip: `${namespace}:option.3.tooltip`,
|
buttonTooltip: `${namespace}:option.3.tooltip`,
|
||||||
disabledButtonTooltip: `${namespace}:option.3.disabled_tooltip`,
|
disabledButtonTooltip: `${namespace}:option.3.disabledTooltip`,
|
||||||
selected: [
|
selected: [
|
||||||
{
|
{
|
||||||
text: `${namespace}:option.3.selected`,
|
text: `${namespace}:option.3.selected`,
|
||||||
|
@ -207,7 +207,7 @@ describe("Teleporting Hijinks - Mystery Encounter", () => {
|
|||||||
expect(option.dialogue).toStrictEqual({
|
expect(option.dialogue).toStrictEqual({
|
||||||
buttonLabel: `${namespace}:option.2.label`,
|
buttonLabel: `${namespace}:option.2.label`,
|
||||||
buttonTooltip: `${namespace}:option.2.tooltip`,
|
buttonTooltip: `${namespace}:option.2.tooltip`,
|
||||||
disabledButtonTooltip: `${namespace}:option.2.disabled_tooltip`,
|
disabledButtonTooltip: `${namespace}:option.2.disabledTooltip`,
|
||||||
selected: [
|
selected: [
|
||||||
{
|
{
|
||||||
text: `${namespace}:option.2.selected`,
|
text: `${namespace}:option.2.selected`,
|
||||||
|
@ -71,7 +71,7 @@ describe("The Expert Pokémon Breeder - Mystery Encounter", () => {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
speaker: "trainerNames:expert_pokemon_breeder",
|
speaker: "trainerNames:expert_pokemon_breeder",
|
||||||
text: `${namespace}:intro_dialogue`,
|
text: `${namespace}:introDialogue`,
|
||||||
},
|
},
|
||||||
]);
|
]);
|
||||||
expect(TheExpertPokemonBreederEncounter.dialogue.encounterOptionsDialogue?.title).toBe(`${namespace}:title`);
|
expect(TheExpertPokemonBreederEncounter.dialogue.encounterOptionsDialogue?.title).toBe(`${namespace}:title`);
|
||||||
|
@ -67,7 +67,7 @@ describe("The Pokemon Salesman - Mystery Encounter", () => {
|
|||||||
expect(dialogue).toBeDefined();
|
expect(dialogue).toBeDefined();
|
||||||
expect(dialogue.intro).toStrictEqual([
|
expect(dialogue.intro).toStrictEqual([
|
||||||
{ text: `${namespace}:intro` },
|
{ text: `${namespace}:intro` },
|
||||||
{ speaker: `${namespace}:speaker`, text: `${namespace}:intro_dialogue` },
|
{ speaker: `${namespace}:speaker`, text: `${namespace}:introDialogue` },
|
||||||
]);
|
]);
|
||||||
const { title, description, query } = dialogue.encounterOptionsDialogue!;
|
const { title, description, query } = dialogue.encounterOptionsDialogue!;
|
||||||
expect(title).toBe(`${namespace}:title`);
|
expect(title).toBe(`${namespace}:title`);
|
||||||
@ -120,7 +120,7 @@ describe("The Pokemon Salesman - Mystery Encounter", () => {
|
|||||||
buttonTooltip: expect.stringMatching(new RegExp(`^${namespace}\\:option\\.1\\.tooltip(_shiny)?$`)),
|
buttonTooltip: expect.stringMatching(new RegExp(`^${namespace}\\:option\\.1\\.tooltip(_shiny)?$`)),
|
||||||
selected: [
|
selected: [
|
||||||
{
|
{
|
||||||
text: `${namespace}:option.1.selected_message`,
|
text: `${namespace}:option.1.selectedMessage`,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
});
|
});
|
||||||
|
@ -73,7 +73,7 @@ describe("The Winstrate Challenge - Mystery Encounter", () => {
|
|||||||
{ text: `${namespace}:intro` },
|
{ text: `${namespace}:intro` },
|
||||||
{
|
{
|
||||||
speaker: `${namespace}:speaker`,
|
speaker: `${namespace}:speaker`,
|
||||||
text: `${namespace}:intro_dialogue`,
|
text: `${namespace}:introDialogue`,
|
||||||
},
|
},
|
||||||
]);
|
]);
|
||||||
expect(TheWinstrateChallengeEncounter.dialogue.encounterOptionsDialogue?.title).toBe(`${namespace}:title`);
|
expect(TheWinstrateChallengeEncounter.dialogue.encounterOptionsDialogue?.title).toBe(`${namespace}:title`);
|
||||||
|
@ -172,7 +172,7 @@ describe("Uncommon Breed - Mystery Encounter", () => {
|
|||||||
expect(option.dialogue).toStrictEqual({
|
expect(option.dialogue).toStrictEqual({
|
||||||
buttonLabel: `${namespace}:option.2.label`,
|
buttonLabel: `${namespace}:option.2.label`,
|
||||||
buttonTooltip: `${namespace}:option.2.tooltip`,
|
buttonTooltip: `${namespace}:option.2.tooltip`,
|
||||||
disabledButtonTooltip: `${namespace}:option.2.disabled_tooltip`,
|
disabledButtonTooltip: `${namespace}:option.2.disabledTooltip`,
|
||||||
selected: [
|
selected: [
|
||||||
{
|
{
|
||||||
text: `${namespace}:option.2.selected`,
|
text: `${namespace}:option.2.selected`,
|
||||||
@ -237,7 +237,7 @@ describe("Uncommon Breed - Mystery Encounter", () => {
|
|||||||
expect(option.dialogue).toStrictEqual({
|
expect(option.dialogue).toStrictEqual({
|
||||||
buttonLabel: `${namespace}:option.3.label`,
|
buttonLabel: `${namespace}:option.3.label`,
|
||||||
buttonTooltip: `${namespace}:option.3.tooltip`,
|
buttonTooltip: `${namespace}:option.3.tooltip`,
|
||||||
disabledButtonTooltip: `${namespace}:option.3.disabled_tooltip`,
|
disabledButtonTooltip: `${namespace}:option.3.disabledTooltip`,
|
||||||
selected: [
|
selected: [
|
||||||
{
|
{
|
||||||
text: `${namespace}:option.3.selected`,
|
text: `${namespace}:option.3.selected`,
|
||||||
|
@ -68,7 +68,7 @@ describe("Weird Dream - Mystery Encounter", () => {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
speaker: `${namespace}:speaker`,
|
speaker: `${namespace}:speaker`,
|
||||||
text: `${namespace}:intro_dialogue`,
|
text: `${namespace}:introDialogue`,
|
||||||
},
|
},
|
||||||
]);
|
]);
|
||||||
expect(WeirdDreamEncounter.dialogue.encounterOptionsDialogue?.title).toBe(`${namespace}:title`);
|
expect(WeirdDreamEncounter.dialogue.encounterOptionsDialogue?.title).toBe(`${namespace}:title`);
|
||||||
|
Loading…
Reference in New Issue
Block a user