Address formatting

This commit is contained in:
AJ Fontaine 2025-06-03 15:39:27 -04:00
parent a5af779af1
commit 446d6455c5
2 changed files with 23 additions and 14 deletions

View File

@ -86,8 +86,7 @@ type TyrogueMove = Moves.LOW_SWEEP | Moves.MACH_PUNCH | Moves.RAPID_SPIN;
export type EvolutionLevel = [species: Species, level: number];
enum EvoCondKey {
NONE,
FRIENDSHIP,
FRIENDSHIP = 1,
TIME,
MOVE,
MOVE_TYPE,
@ -119,7 +118,7 @@ type EvolutionConditionData =
{key: EvoCondKey.NATURE, nature: Nature[]} |
{key: EvoCondKey.WEATHER, weather: WeatherType[]} |
{key: EvoCondKey.TYROGUE, move: TyrogueMove} |
{key: EvoCondKey.SHEDINJA | EvoCondKey.NONE}
{key: EvoCondKey.SHEDINJA}
;
export class SpeciesEvolutionCondition {
@ -162,10 +161,10 @@ export class SpeciesEvolutionCondition {
case EvoCondKey.RECOIL_DAMAGE_COUNT:
return i18next.t("pokemonEvolutions:recoil");
case EvoCondKey.HELD_ITEM:
return i18next.t("pokemonEvolutions:heldItem");
return i18next.t(`pokemonEvolutions:heldItem.${cond.itemKey}`);
}
}).filter(s => !isNullOrUndefined(s)); // Filter out stringless conditions
return str.join(i18next.t("pokemonEvolutions:connector"));
return str.join(i18next.t("pokemonEvolutions:connector")); // A comma or something of the sort
}
public conditionsFulfilled(pokemon: Pokemon): boolean {

View File

@ -790,15 +790,8 @@ export class MoveEffectPhase extends PokemonPhase {
globalScene.triggerPokemonFormChange(user, SpeciesFormChangePostMoveTrigger);
// Increment evo counter for Primeape and Stantler
if (
(user.isPlayer() &&
((user.hasSpecies(Species.PRIMEAPE) && this.move.id === Moves.RAGE_FIST) ||
(user.hasSpecies(Species.STANTLER) && this.move.id === Moves.PSYSHIELD_BASH)))) {
const modifier = (this.move.id === Moves.RAGE_FIST ?
modifierTypes.EVOLUTION_TRACKER_PRIMEAPE().withIdFromFunc(modifierTypes.EVOLUTION_TRACKER_PRIMEAPE) :
modifierTypes.EVOLUTION_TRACKER_STANTLER().withIdFromFunc(modifierTypes.EVOLUTION_TRACKER_STANTLER))
.newModifier(user) as EvoTrackerMoveUseModifier;
globalScene.addModifier(modifier);
if (user.isPlayer()) {
this.incrementMoveUseEvoCounters(user);
}
// Multi-hit check for Wimp Out/Emergency Exit
@ -808,6 +801,23 @@ export class MoveEffectPhase extends PokemonPhase {
}
}
/**
* Increments evolution tracker stack for "Use move X times" evolutions, namely Primeape and Stantler
* @param user {@linkcode Pokemon} the move's user
*/
incrementMoveUseEvoCounters(user: Pokemon) {
// Increment evo counter for Primeape and Stantler
if (
((user.hasSpecies(Species.PRIMEAPE) && this.move.id === Moves.RAGE_FIST) ||
(user.hasSpecies(Species.STANTLER) && this.move.id === Moves.PSYSHIELD_BASH))) {
const modifier = (this.move.id === Moves.RAGE_FIST ?
modifierTypes.EVOLUTION_TRACKER_PRIMEAPE().withIdFromFunc(modifierTypes.EVOLUTION_TRACKER_PRIMEAPE) :
modifierTypes.EVOLUTION_TRACKER_STANTLER().withIdFromFunc(modifierTypes.EVOLUTION_TRACKER_STANTLER))
.newModifier(user) as EvoTrackerMoveUseModifier;
globalScene.addModifier(modifier); // Adds modifier or increments existing stack
}
}
/**
* Sub-method of for {@linkcode applyMoveEffects} that applies damage to the target.
*