Merge branch 'main' into 745-localizedTrainerNames_TrainerClasses_And_Titles
commit
2c97a3b472
|
@ -44,7 +44,8 @@ Check out our [Trello Board](https://trello.com/b/z10B703R/pokerogue-board) to s
|
|||
- Arata Iiyoshi
|
||||
- Atsuhiro Ishizuna
|
||||
- Pokémon Black/White 2
|
||||
- Firel (Additional biome themes)
|
||||
- Firel (Custom Metropolis and Laboratory biome music)
|
||||
- Lmz (Custom Jungle biome music)
|
||||
- edifette (Title screen music)
|
||||
|
||||
### 🎵 Sound Effects
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<title>PokéRogue</title>
|
||||
<meta name="description" content="A Pokémon fangame heavily inspired by the roguelite genre. Battle endlessly while gathering stacking items, exploring many different biomes, and reaching Pokémon stats you never thought possible." />
|
||||
<meta name="theme-color" content="#da3838" />
|
||||
|
@ -12,7 +13,6 @@
|
|||
<link rel="apple-touch-icon" href="./logo512.png" />
|
||||
<link rel="shortcut icon" type="image/png" href="./logo512.png" />
|
||||
<link rel="canonical" href="https://pokerogue.net" />
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, viewport-fit=cover" />
|
||||
<style type="text/css">
|
||||
@font-face {
|
||||
|
|
Binary file not shown.
Binary file not shown.
Before Width: | Height: | Size: 4.2 KiB After Width: | Height: | Size: 60 KiB |
|
@ -3,7 +3,7 @@ import { Type } from "./type";
|
|||
import * as Utils from "../utils";
|
||||
import { BattleStat, getBattleStatName } from "./battle-stat";
|
||||
import { PokemonHealPhase, ShowAbilityPhase, StatChangePhase } from "../phases";
|
||||
import { getPokemonMessage } from "../messages";
|
||||
import { getPokemonMessage, getPokemonPrefix } from "../messages";
|
||||
import { Weather, WeatherType } from "./weather";
|
||||
import { BattlerTag } from "./battler-tags";
|
||||
import { BattlerTagType } from "./enums/battler-tag-type";
|
||||
|
@ -144,7 +144,7 @@ export class BlockRecoilDamageAttr extends AbAttr {
|
|||
}
|
||||
|
||||
getTriggerMessage(pokemon: Pokemon, abilityName: string, ...args: any[]) {
|
||||
return getPokemonMessage(pokemon, `'s ${abilityName}\nprotected it from recoil!`);
|
||||
return i18next.t('abilityTriggers:blockRecoilDamage', {pokemonName: `${getPokemonPrefix(pokemon)}${pokemon.name}`, abilityName: abilityName});
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -715,7 +715,7 @@ export class PostDefendContactApplyStatusEffectAbAttr extends PostDefendAbAttr {
|
|||
applyPostDefend(pokemon: Pokemon, passive: boolean, attacker: Pokemon, move: PokemonMove, hitResult: HitResult, args: any[]): boolean {
|
||||
if (move.getMove().checkFlag(MoveFlags.MAKES_CONTACT, attacker, pokemon) && !attacker.status && (this.chance === -1 || pokemon.randSeedInt(100) < this.chance)) {
|
||||
const effect = this.effects.length === 1 ? this.effects[0] : this.effects[pokemon.randSeedInt(this.effects.length)];
|
||||
return attacker.trySetStatus(effect, true);
|
||||
return attacker.trySetStatus(effect, true, pokemon);
|
||||
}
|
||||
|
||||
return false;
|
||||
|
@ -991,6 +991,42 @@ export class MoveTypeChangeAttr extends PreAttackAbAttr {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Class for abilities that boost the damage of moves
|
||||
* For abilities that boost the base power of moves, see VariableMovePowerAbAttr
|
||||
* @param damageMultiplier the amount to multiply the damage by
|
||||
* @param condition the condition for this ability to be applied
|
||||
*/
|
||||
export class DamageBoostAbAttr extends PreAttackAbAttr {
|
||||
private damageMultiplier: number;
|
||||
private condition: PokemonAttackCondition;
|
||||
|
||||
constructor(damageMultiplier: number, condition: PokemonAttackCondition){
|
||||
super(true);
|
||||
this.damageMultiplier = damageMultiplier;
|
||||
this.condition = condition;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param pokemon the attacker pokemon
|
||||
* @param passive N/A
|
||||
* @param defender the target pokemon
|
||||
* @param move the move used by the attacker pokemon
|
||||
* @param args Utils.NumberHolder as damage
|
||||
* @returns true if the function succeeds
|
||||
*/
|
||||
applyPreAttack(pokemon: Pokemon, passive: boolean, defender: Pokemon, move: PokemonMove, args: any[]): boolean {
|
||||
if (this.condition(pokemon, defender, move.getMove())) {
|
||||
const power = args[0] as Utils.NumberHolder;
|
||||
power.value = Math.floor(power.value * this.damageMultiplier);
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
export class MovePowerBoostAbAttr extends VariableMovePowerAbAttr {
|
||||
private condition: PokemonAttackCondition;
|
||||
private powerMultiplier: number;
|
||||
|
@ -1141,7 +1177,7 @@ export class PostAttackApplyStatusEffectAbAttr extends PostAttackAbAttr {
|
|||
applyPostAttack(pokemon: Pokemon, passive: boolean, attacker: Pokemon, move: PokemonMove, hitResult: HitResult, args: any[]): boolean {
|
||||
if (pokemon != attacker && (!this.contactRequired || move.getMove().checkFlag(MoveFlags.MAKES_CONTACT, attacker, pokemon)) && pokemon.randSeedInt(100) < this.chance && !pokemon.status) {
|
||||
const effect = this.effects.length === 1 ? this.effects[0] : this.effects[pokemon.randSeedInt(this.effects.length)];
|
||||
return attacker.trySetStatus(effect, true);
|
||||
return attacker.trySetStatus(effect, true, pokemon);
|
||||
}
|
||||
|
||||
return false;
|
||||
|
@ -1371,6 +1407,23 @@ export class PostSummonMessageAbAttr extends PostSummonAbAttr {
|
|||
}
|
||||
}
|
||||
|
||||
export class PostSummonUnnamedMessageAbAttr extends PostSummonAbAttr {
|
||||
//Attr doesn't force pokemon name on the message
|
||||
private message: string;
|
||||
|
||||
constructor(message: string) {
|
||||
super(true);
|
||||
|
||||
this.message = message;
|
||||
}
|
||||
|
||||
applyPostSummon(pokemon: Pokemon, passive: boolean, args: any[]): boolean {
|
||||
pokemon.scene.queueMessage(this.message);
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
export class PostSummonAddBattlerTagAbAttr extends PostSummonAbAttr {
|
||||
private tagType: BattlerTagType;
|
||||
private turnCount: integer;
|
||||
|
@ -2595,8 +2648,8 @@ export class NoFusionAbilityAbAttr extends AbAttr {
|
|||
}
|
||||
|
||||
export class IgnoreTypeImmunityAbAttr extends AbAttr {
|
||||
defenderType: Type;
|
||||
allowedMoveTypes: Type[];
|
||||
private defenderType: Type;
|
||||
private allowedMoveTypes: Type[];
|
||||
|
||||
constructor(defenderType: Type, allowedMoveTypes: Type[]) {
|
||||
super(true);
|
||||
|
@ -2613,6 +2666,30 @@ export class IgnoreTypeImmunityAbAttr extends AbAttr {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Ignores the type immunity to Status Effects of the defender if the defender is of a certain type
|
||||
*/
|
||||
export class IgnoreTypeStatusEffectImmunityAbAttr extends AbAttr {
|
||||
private statusEffect: StatusEffect[];
|
||||
private defenderType: Type[];
|
||||
|
||||
constructor(statusEffect: StatusEffect[], defenderType: Type[]) {
|
||||
super(true);
|
||||
|
||||
this.statusEffect = statusEffect;
|
||||
this.defenderType = defenderType;
|
||||
}
|
||||
|
||||
apply(pokemon: Pokemon, passive: boolean, cancelled: Utils.BooleanHolder, args: any[]): boolean {
|
||||
if (this.statusEffect.includes(args[0] as StatusEffect) && this.defenderType.includes(args[1] as Type)) {
|
||||
cancelled.value = true;
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
function applyAbAttrsInternal<TAttr extends AbAttr>(attrType: { new(...args: any[]): TAttr },
|
||||
pokemon: Pokemon, applyFunc: AbAttrApplyFunc<TAttr>, args: any[], isAsync: boolean = false, showAbilityInstant: boolean = false, quiet: boolean = false, passive: boolean = false): Promise<void> {
|
||||
return new Promise(resolve => {
|
||||
|
@ -3025,7 +3102,8 @@ export function initAbilities() {
|
|||
.attr(BlockCritAbAttr)
|
||||
.ignorable(),
|
||||
new Ability(Abilities.AIR_LOCK, 3)
|
||||
.attr(SuppressWeatherEffectAbAttr, true),
|
||||
.attr(SuppressWeatherEffectAbAttr, true)
|
||||
.attr(PostSummonUnnamedMessageAbAttr, "The effects of the weather disappeared."),
|
||||
new Ability(Abilities.TANGLED_FEET, 4)
|
||||
.conditionalAttr(pokemon => !!pokemon.getTag(BattlerTagType.CONFUSED), BattleStatMultiplierAbAttr, BattleStat.EVA, 2)
|
||||
.ignorable(),
|
||||
|
@ -3121,7 +3199,7 @@ export function initAbilities() {
|
|||
.attr(IgnoreOpponentStatChangesAbAttr)
|
||||
.ignorable(),
|
||||
new Ability(Abilities.TINTED_LENS, 4)
|
||||
.attr(MovePowerBoostAbAttr, (user, target, move) => target.getAttackTypeEffectiveness(move.type, user) <= 0.5, 2),
|
||||
.attr(DamageBoostAbAttr, 2, (user, target, move) => target.getAttackTypeEffectiveness(move.type, user) <= 0.5),
|
||||
new Ability(Abilities.FILTER, 4)
|
||||
.attr(ReceivedMoveDamageMultiplierAbAttr,(target, user, move) => target.getAttackTypeEffectiveness(move.type, user) >= 2, 0.75)
|
||||
.ignorable(),
|
||||
|
@ -3427,16 +3505,17 @@ export function initAbilities() {
|
|||
.attr(UnsuppressableAbilityAbAttr)
|
||||
.attr(NoFusionAbilityAbAttr),
|
||||
new Ability(Abilities.POWER_CONSTRUCT, 7) // TODO: 10% Power Construct Zygarde isn't accounted for yet. If changed, update Zygarde's getSpeciesFormIndex entry accordingly
|
||||
.attr(PostBattleInitFormChangeAbAttr, p => p.getHpRatio() <= 0.5 ? 4 : 2)
|
||||
.attr(PostSummonFormChangeAbAttr, p => p.getHpRatio() <= 0.5 ? 4 : 2)
|
||||
.attr(PostTurnFormChangeAbAttr, p => p.getHpRatio() <= 0.5 ? 4 : 2)
|
||||
.attr(PostBattleInitFormChangeAbAttr, p => p.getHpRatio() <= 0.5 || p.getFormKey() === 'complete' ? 4 : 2)
|
||||
.attr(PostSummonFormChangeAbAttr, p => p.getHpRatio() <= 0.5 || p.getFormKey() === 'complete' ? 4 : 2)
|
||||
.attr(PostTurnFormChangeAbAttr, p => p.getHpRatio() <= 0.5 || p.getFormKey() === 'complete' ? 4 : 2)
|
||||
.attr(UncopiableAbilityAbAttr)
|
||||
.attr(UnswappableAbilityAbAttr)
|
||||
.attr(UnsuppressableAbilityAbAttr)
|
||||
.attr(NoFusionAbilityAbAttr)
|
||||
.partial(),
|
||||
new Ability(Abilities.CORROSION, 7)
|
||||
.unimplemented(),
|
||||
new Ability(Abilities.CORROSION, 7) // TODO: Test Corrosion against Magic Bounce once it is implemented
|
||||
.attr(IgnoreTypeStatusEffectImmunityAbAttr, [StatusEffect.POISON, StatusEffect.TOXIC], [Type.STEEL, Type.POISON])
|
||||
.partial(),
|
||||
new Ability(Abilities.COMATOSE, 7)
|
||||
.attr(UncopiableAbilityAbAttr)
|
||||
.attr(UnswappableAbilityAbAttr)
|
||||
|
|
|
@ -316,7 +316,7 @@ class ToxicSpikesTag extends ArenaTrapTag {
|
|||
}
|
||||
} else if (!pokemon.status) {
|
||||
const toxic = this.layers > 1;
|
||||
if (pokemon.trySetStatus(!toxic ? StatusEffect.POISON : StatusEffect.TOXIC, true, null, `the ${this.getMoveName()}`))
|
||||
if (pokemon.trySetStatus(!toxic ? StatusEffect.POISON : StatusEffect.TOXIC, true, null, 0, `the ${this.getMoveName()}`))
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -819,7 +819,7 @@ export class ContactPoisonProtectedTag extends ProtectedTag {
|
|||
const effectPhase = pokemon.scene.getCurrentPhase();
|
||||
if (effectPhase instanceof MoveEffectPhase && effectPhase.move.getMove().hasFlag(MoveFlags.MAKES_CONTACT)) {
|
||||
const attacker = effectPhase.getPokemon();
|
||||
attacker.trySetStatus(StatusEffect.POISON, true);
|
||||
attacker.trySetStatus(StatusEffect.POISON, true, pokemon);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -13,14 +13,15 @@ export interface DailyRunConfig {
|
|||
}
|
||||
|
||||
export function fetchDailyRunSeed(): Promise<string> {
|
||||
return new Promise<string>(resolve => {
|
||||
return new Promise<string>((resolve, reject) => {
|
||||
Utils.apiFetch('daily/seed').then(response => {
|
||||
if (!response.ok) {
|
||||
resolve(null);
|
||||
return;
|
||||
}
|
||||
return response.text();
|
||||
}).then(seed => resolve(seed));
|
||||
}).then(seed => resolve(seed))
|
||||
.catch(err => reject(err));
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
@ -95,9 +95,16 @@ export function getLegendaryGachaSpeciesForTimestamp(scene: BattleScene, timesta
|
|||
|
||||
let ret: Species;
|
||||
|
||||
// 86400000 is the number of miliseconds in one day
|
||||
const timeDate = new Date(timestamp);
|
||||
const dayDate = new Date(Date.UTC(timeDate.getUTCFullYear(), timeDate.getUTCMonth(), timeDate.getUTCDate()));
|
||||
const dayTimestamp = timeDate.getTime(); // Timestamp of current week
|
||||
const offset = Math.floor(Math.floor(dayTimestamp / 86400000) / legendarySpecies.length); // Cycle number
|
||||
const index = Math.floor(dayTimestamp / 86400000) % legendarySpecies.length // Index within cycle
|
||||
|
||||
scene.executeWithSeedOffset(() => {
|
||||
ret = Utils.randSeedItem(legendarySpecies);
|
||||
}, Utils.getSunday(new Date(timestamp)).getTime(), EGG_SEED.toString());
|
||||
ret = Phaser.Math.RND.shuffle(legendarySpecies)[index];
|
||||
}, offset, EGG_SEED.toString());
|
||||
|
||||
return ret;
|
||||
}
|
|
@ -1156,13 +1156,13 @@ export class StatusEffectAttr extends MoveEffectAttr {
|
|||
return false;
|
||||
}
|
||||
if (!pokemon.status || (pokemon.status.effect === this.effect && move.chance < 0))
|
||||
return pokemon.trySetStatus(this.effect, true, this.cureTurn);
|
||||
return pokemon.trySetStatus(this.effect, true, user, this.cureTurn);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
getTargetBenefitScore(user: Pokemon, target: Pokemon, move: Move): number {
|
||||
return !(this.selfTarget ? user : target).status && (this.selfTarget ? user : target).canSetStatus(this.effect, true) ? Math.floor(move.chance * -0.1) : 0;
|
||||
return !(this.selfTarget ? user : target).status && (this.selfTarget ? user : target).canSetStatus(this.effect, true, false, user) ? Math.floor(move.chance * -0.1) : 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1181,7 +1181,7 @@ export class MultiStatusEffectAttr extends StatusEffectAttr {
|
|||
}
|
||||
|
||||
getTargetBenefitScore(user: Pokemon, target: Pokemon, move: Move): number {
|
||||
return !(this.selfTarget ? user : target).status && (this.selfTarget ? user : target).canSetStatus(this.effect, true) ? Math.floor(move.chance * -0.1) : 0;
|
||||
return !(this.selfTarget ? user : target).status && (this.selfTarget ? user : target).canSetStatus(this.effect, true, false, user) ? Math.floor(move.chance * -0.1) : 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1197,7 +1197,7 @@ export class PsychoShiftEffectAttr extends MoveEffectAttr {
|
|||
return false;
|
||||
}
|
||||
if (!target.status || (target.status.effect === statusToApply && move.chance < 0)) {
|
||||
var statusAfflictResult = target.trySetStatus(statusToApply, true);
|
||||
var statusAfflictResult = target.trySetStatus(statusToApply, true, user);
|
||||
if (statusAfflictResult) {
|
||||
user.scene.queueMessage(getPokemonMessage(user, getStatusEffectHealText(user.status.effect)));
|
||||
user.resetStatus();
|
||||
|
@ -1210,7 +1210,7 @@ export class PsychoShiftEffectAttr extends MoveEffectAttr {
|
|||
}
|
||||
|
||||
getTargetBenefitScore(user: Pokemon, target: Pokemon, move: Move): number {
|
||||
return !(this.selfTarget ? user : target).status && (this.selfTarget ? user : target).canSetStatus(user.status?.effect, true) ? Math.floor(move.chance * -0.1) : 0;
|
||||
return !(this.selfTarget ? user : target).status && (this.selfTarget ? user : target).canSetStatus(user.status?.effect, true, false, user) ? Math.floor(move.chance * -0.1) : 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1353,6 +1353,25 @@ export class BypassSleepAttr extends MoveAttr {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Attribute used for moves that bypass the burn damage reduction of physical moves, currently only facade
|
||||
* Called during damage calculation
|
||||
* @param user N/A
|
||||
* @param target N/A
|
||||
* @param move Move with this attribute
|
||||
* @param args Utils.BooleanHolder for burnDamageReductionCancelled
|
||||
* @returns true if the function succeeds
|
||||
*/
|
||||
export class BypassBurnDamageReductionAttr extends MoveAttr {
|
||||
|
||||
/** Prevents the move's damage from being reduced by burn */
|
||||
apply(user: Pokemon, target: Pokemon, move: Move, args: any[]): boolean {
|
||||
(args[0] as Utils.BooleanHolder).value = true;
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
export class WeatherChangeAttr extends MoveEffectAttr {
|
||||
private weatherType: WeatherType;
|
||||
|
||||
|
@ -2657,6 +2676,24 @@ export class WaterSuperEffectTypeMultiplierAttr extends VariableMoveTypeMultipli
|
|||
}
|
||||
}
|
||||
|
||||
export class IceNoEffectTypeAttr extends VariableMoveTypeMultiplierAttr {
|
||||
/**
|
||||
* Checks to see if the Target is Ice-Type or not. If so, the move will have no effect.
|
||||
* @param {Pokemon} user N/A
|
||||
* @param {Pokemon} target Pokemon that is being checked whether Ice-Type or not.
|
||||
* @param {Move} move N/A
|
||||
* @param {any[]} args Sets to false if the target is Ice-Type, so it should do no damage/no effect.
|
||||
* @returns {boolean} Returns true if move is successful, false if Ice-Type.
|
||||
*/
|
||||
apply(user: Pokemon, target: Pokemon, move: Move, args: any[]): boolean {
|
||||
if (target.isOfType(Type.ICE)) {
|
||||
(args[0] as Utils.BooleanHolder).value = false;
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
export class FlyingTypeMultiplierAttr extends VariableMoveTypeMultiplierAttr {
|
||||
apply(user: Pokemon, target: Pokemon, move: Move, args: any[]): boolean {
|
||||
const multiplier = args[0] as Utils.NumberHolder;
|
||||
|
@ -2676,6 +2713,29 @@ export class OneHitKOAccuracyAttr extends VariableAccuracyAttr {
|
|||
}
|
||||
}
|
||||
|
||||
export class SheerColdAccuracyAttr extends OneHitKOAccuracyAttr {
|
||||
/**
|
||||
* Changes the normal One Hit KO Accuracy Attr to implement the Gen VII changes,
|
||||
* where if the user is Ice-Type, it has more accuracy.
|
||||
* @param {Pokemon} user Pokemon that is using the move; checks the Pokemon's level.
|
||||
* @param {Pokemon} target Pokemon that is receiving the move; checks the Pokemon's level.
|
||||
* @param {Move} move N/A
|
||||
* @param {any[]} args Uses the accuracy argument, allowing to change it from either 0 if it doesn't pass
|
||||
* the first if/else, or 30/20 depending on the type of the user Pokemon.
|
||||
* @returns Returns true if move is successful, false if misses.
|
||||
*/
|
||||
apply(user: Pokemon, target: Pokemon, move: Move, args: any[]): boolean {
|
||||
const accuracy = args[0] as Utils.NumberHolder;
|
||||
if (user.level < target.level) {
|
||||
accuracy.value = 0;
|
||||
} else {
|
||||
const baseAccuracy = user.isOfType(Type.ICE) ? 30 : 20;
|
||||
accuracy.value = Math.min(Math.max(baseAccuracy + 100 * (1 - target.level / user.level), 0), 100);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
export class MissEffectAttr extends MoveAttr {
|
||||
private missEffectFunc: UserMoveConditionFunc;
|
||||
|
||||
|
@ -4904,7 +4964,8 @@ export function initMoves() {
|
|||
.attr(StatChangeAttr, [ BattleStat.ATK, BattleStat.SPATK ], -2),
|
||||
new AttackMove(Moves.FACADE, Type.NORMAL, MoveCategory.PHYSICAL, 70, 100, 20, -1, 0, 3)
|
||||
.attr(MovePowerMultiplierAttr, (user, target, move) => user.status
|
||||
&& (user.status.effect === StatusEffect.BURN || user.status.effect === StatusEffect.POISON || user.status.effect === StatusEffect.TOXIC || user.status.effect === StatusEffect.PARALYSIS) ? 2 : 1),
|
||||
&& (user.status.effect === StatusEffect.BURN || user.status.effect === StatusEffect.POISON || user.status.effect === StatusEffect.TOXIC || user.status.effect === StatusEffect.PARALYSIS) ? 2 : 1)
|
||||
.attr(BypassBurnDamageReductionAttr),
|
||||
new AttackMove(Moves.FOCUS_PUNCH, Type.FIGHTING, MoveCategory.PHYSICAL, 150, 100, 20, -1, -3, 3)
|
||||
.punchingMove()
|
||||
.ignoresVirtual()
|
||||
|
@ -5075,9 +5136,10 @@ export function initMoves() {
|
|||
new AttackMove(Moves.SAND_TOMB, Type.GROUND, MoveCategory.PHYSICAL, 35, 85, 15, 100, 0, 3)
|
||||
.attr(TrapAttr, BattlerTagType.SAND_TOMB)
|
||||
.makesContact(false),
|
||||
new AttackMove(Moves.SHEER_COLD, Type.ICE, MoveCategory.SPECIAL, 200, 30, 5, -1, 0, 3)
|
||||
new AttackMove(Moves.SHEER_COLD, Type.ICE, MoveCategory.SPECIAL, 200, 20, 5, -1, 0, 3)
|
||||
.attr(IceNoEffectTypeAttr)
|
||||
.attr(OneHitKOAttr)
|
||||
.attr(OneHitKOAccuracyAttr),
|
||||
.attr(SheerColdAccuracyAttr),
|
||||
new AttackMove(Moves.MUDDY_WATER, Type.WATER, MoveCategory.SPECIAL, 90, 85, 10, 30, 0, 3)
|
||||
.attr(StatChangeAttr, BattleStat.ACC, -1)
|
||||
.target(MoveTarget.ALL_NEAR_ENEMIES),
|
||||
|
@ -5206,7 +5268,7 @@ export function initMoves() {
|
|||
|| user.status?.effect === StatusEffect.TOXIC
|
||||
|| user.status?.effect === StatusEffect.PARALYSIS
|
||||
|| user.status?.effect === StatusEffect.SLEEP)
|
||||
&& target.canSetStatus(user.status?.effect)
|
||||
&& target.canSetStatus(user.status?.effect, false, false, user)
|
||||
),
|
||||
new AttackMove(Moves.TRUMP_CARD, Type.NORMAL, MoveCategory.SPECIAL, -1, -1, 5, -1, 0, 4)
|
||||
.makesContact()
|
||||
|
@ -6201,7 +6263,7 @@ export function initMoves() {
|
|||
.ignoresVirtual(),
|
||||
/* End Unused */
|
||||
new AttackMove(Moves.ZIPPY_ZAP, Type.ELECTRIC, MoveCategory.PHYSICAL, 80, 100, 10, 100, 2, 7)
|
||||
.attr(CritOnlyAttr),
|
||||
.attr(StatChangeAttr, BattleStat.EVA, 1, true),
|
||||
new AttackMove(Moves.SPLISHY_SPLASH, Type.WATER, MoveCategory.SPECIAL, 90, 100, 15, 30, 0, 7)
|
||||
.attr(StatusEffectAttr, StatusEffect.PARALYSIS)
|
||||
.target(MoveTarget.ALL_NEAR_ENEMIES),
|
||||
|
@ -6226,7 +6288,7 @@ export function initMoves() {
|
|||
new AttackMove(Moves.FREEZY_FROST, Type.ICE, MoveCategory.SPECIAL, 100, 90, 10, -1, 0, 7)
|
||||
.attr(ResetStatsAttr),
|
||||
new AttackMove(Moves.SPARKLY_SWIRL, Type.FAIRY, MoveCategory.SPECIAL, 120, 85, 5, -1, 0, 7)
|
||||
.partial(),
|
||||
.attr(PartyStatusCureAttr, null, Abilities.NONE),
|
||||
new AttackMove(Moves.VEEVEE_VOLLEY, Type.NORMAL, MoveCategory.PHYSICAL, -1, -1, 20, -1, 0, 7)
|
||||
.attr(FriendshipPowerAttr),
|
||||
new AttackMove(Moves.DOUBLE_IRON_BASH, Type.STEEL, MoveCategory.PHYSICAL, 60, 100, 5, 30, 0, 7)
|
||||
|
@ -6821,7 +6883,7 @@ export function initMoves() {
|
|||
const turnMove = user.getLastXMoves(1);
|
||||
return !turnMove.length || turnMove[0].move !== move.id || turnMove[0].result !== MoveResult.SUCCESS;
|
||||
}), // TODO Add Instruct/Encore interaction
|
||||
new AttackMove(Moves.COMEUPPANCE, Type.DARK, MoveCategory.PHYSICAL, 1, 100, 10, -1, 0, 9)
|
||||
new AttackMove(Moves.COMEUPPANCE, Type.DARK, MoveCategory.PHYSICAL, -1, 100, 10, -1, 0, 9)
|
||||
.attr(CounterDamageAttr, (move: Move) => (move.category === MoveCategory.PHYSICAL || move.category === MoveCategory.SPECIAL), 1.5)
|
||||
.target(MoveTarget.ATTACKER),
|
||||
new AttackMove(Moves.AQUA_CUTTER, Type.WATER, MoveCategory.PHYSICAL, 70, 100, 20, -1, 0, 9)
|
||||
|
|
|
@ -1385,10 +1385,10 @@ export const pokemonEvolutions: PokemonEvolutions = {
|
|||
new SpeciesEvolution(Species.HELIOLISK, 1, EvolutionItem.SUN_STONE, null, SpeciesWildEvolutionDelay.LONG)
|
||||
],
|
||||
[Species.CHARJABUG]: [
|
||||
new SpeciesEvolution(Species.VIKAVOLT, 1, EvolutionItem.THUNDER_STONE, null)
|
||||
new SpeciesEvolution(Species.VIKAVOLT, 1, EvolutionItem.THUNDER_STONE, null, SpeciesWildEvolutionDelay.LONG)
|
||||
],
|
||||
[Species.CRABRAWLER]: [
|
||||
new SpeciesEvolution(Species.CRABOMINABLE, 1, EvolutionItem.ICE_STONE, null)
|
||||
new SpeciesEvolution(Species.CRABOMINABLE, 1, EvolutionItem.ICE_STONE, null, SpeciesWildEvolutionDelay.LONG)
|
||||
],
|
||||
[Species.ROCKRUFF]: [
|
||||
new SpeciesFormEvolution(Species.LYCANROC, '', 'midday', 25, null, new SpeciesEvolutionCondition(p => (p.scene.arena.getTimeOfDay() === TimeOfDay.DAWN || p.scene.arena.getTimeOfDay() === TimeOfDay.DAY) && (p.formIndex === 0)), null),
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -2759,7 +2759,7 @@ export const speciesStarters = {
|
|||
[Species.GROUDON]: 8,
|
||||
[Species.RAYQUAZA]: 8,
|
||||
[Species.JIRACHI]: 7,
|
||||
[Species.DEOXYS]: 8,
|
||||
[Species.DEOXYS]: 7,
|
||||
|
||||
[Species.TURTWIG]: 3,
|
||||
[Species.CHIMCHAR]: 3,
|
||||
|
@ -2813,7 +2813,7 @@ export const speciesStarters = {
|
|||
[Species.DARKRAI]: 7,
|
||||
[Species.SHAYMIN]: 7,
|
||||
[Species.ARCEUS]: 9,
|
||||
[Species.VICTINI]: 8,
|
||||
[Species.VICTINI]: 7,
|
||||
|
||||
[Species.SNIVY]: 3,
|
||||
[Species.TEPIG]: 3,
|
||||
|
@ -2895,7 +2895,7 @@ export const speciesStarters = {
|
|||
[Species.KYUREM]: 8,
|
||||
[Species.KELDEO]: 7,
|
||||
[Species.MELOETTA]: 7,
|
||||
[Species.GENESECT]: 8,
|
||||
[Species.GENESECT]: 7,
|
||||
|
||||
[Species.CHESPIN]: 3,
|
||||
[Species.FENNEKIN]: 3,
|
||||
|
|
|
@ -617,7 +617,7 @@ export class Arena {
|
|||
case Biome.CONSTRUCTION_SITE:
|
||||
return 1.222;
|
||||
case Biome.JUNGLE:
|
||||
return 2.477;
|
||||
return 0.000;
|
||||
case Biome.FAIRY_CAVE:
|
||||
return 4.542;
|
||||
case Biome.TEMPLE:
|
||||
|
|
|
@ -13,7 +13,7 @@ export default class DamageNumberHandler {
|
|||
add(target: Pokemon, amount: integer, result: DamageResult | HitResult.HEAL = HitResult.EFFECTIVE, critical: boolean = false): void {
|
||||
const scene = target.scene;
|
||||
|
||||
if (!scene.damageNumbersMode)
|
||||
if (!scene?.damageNumbersMode)
|
||||
return;
|
||||
|
||||
const battlerIndex = target.getBattlerIndex();
|
||||
|
|
|
@ -4,7 +4,7 @@ import { Variant, VariantSet, variantColorCache } from '#app/data/variant';
|
|||
import { variantData } from '#app/data/variant';
|
||||
import BattleInfo, { PlayerBattleInfo, EnemyBattleInfo } from '../ui/battle-info';
|
||||
import { Moves } from "../data/enums/moves";
|
||||
import Move, { HighCritAttr, HitsTagAttr, applyMoveAttrs, FixedDamageAttr, VariableAtkAttr, VariablePowerAttr, allMoves, MoveCategory, TypelessAttr, CritOnlyAttr, getMoveTargets, OneHitKOAttr, MultiHitAttr, StatusMoveTypeImmunityAttr, MoveTarget, VariableDefAttr, AttackMove, ModifiedDamageAttr, VariableMoveTypeMultiplierAttr, IgnoreOpponentStatChangesAttr, SacrificialAttr, VariableMoveTypeAttr, VariableMoveCategoryAttr, CounterDamageAttr, StatChangeAttr, RechargeAttr, ChargeAttr, IgnoreWeatherTypeDebuffAttr } from "../data/move";
|
||||
import Move, { HighCritAttr, HitsTagAttr, applyMoveAttrs, FixedDamageAttr, VariableAtkAttr, VariablePowerAttr, allMoves, MoveCategory, TypelessAttr, CritOnlyAttr, getMoveTargets, OneHitKOAttr, MultiHitAttr, StatusMoveTypeImmunityAttr, MoveTarget, VariableDefAttr, AttackMove, ModifiedDamageAttr, VariableMoveTypeMultiplierAttr, IgnoreOpponentStatChangesAttr, SacrificialAttr, VariableMoveTypeAttr, VariableMoveCategoryAttr, CounterDamageAttr, StatChangeAttr, RechargeAttr, ChargeAttr, IgnoreWeatherTypeDebuffAttr, BypassBurnDamageReductionAttr } from "../data/move";
|
||||
import { default as PokemonSpecies, PokemonSpeciesForm, SpeciesFormKey, getFusedSpeciesName, getPokemonSpecies, getPokemonSpeciesForm, getStarterValueFriendshipCap, speciesStarters, starterPassiveAbilities } from '../data/pokemon-species';
|
||||
import * as Utils from '../utils';
|
||||
import { Type, TypeDamageMultiplier, getTypeDamageMultiplier, getTypeRgb } from '../data/type';
|
||||
|
@ -27,7 +27,7 @@ import { TempBattleStat } from '../data/temp-battle-stat';
|
|||
import { ArenaTagSide, WeakenMoveScreenTag, WeakenMoveTypeTag } from '../data/arena-tag';
|
||||
import { ArenaTagType } from "../data/enums/arena-tag-type";
|
||||
import { Biome } from "../data/enums/biome";
|
||||
import { Ability, AbAttr, BattleStatMultiplierAbAttr, BlockCritAbAttr, BonusCritAbAttr, BypassBurnDamageReductionAbAttr, FieldPriorityMoveImmunityAbAttr, FieldVariableMovePowerAbAttr, IgnoreOpponentStatChangesAbAttr, MoveImmunityAbAttr, MoveTypeChangeAttr, NonSuperEffectiveImmunityAbAttr, PreApplyBattlerTagAbAttr, PreDefendFullHpEndureAbAttr, ReceivedMoveDamageMultiplierAbAttr, ReduceStatusEffectDurationAbAttr, StabBoostAbAttr, StatusEffectImmunityAbAttr, TypeImmunityAbAttr, VariableMovePowerAbAttr, VariableMoveTypeAbAttr, WeightMultiplierAbAttr, allAbilities, applyAbAttrs, applyBattleStatMultiplierAbAttrs, applyPostDefendAbAttrs, applyPreApplyBattlerTagAbAttrs, applyPreAttackAbAttrs, applyPreDefendAbAttrs, applyPreSetStatusAbAttrs, UnsuppressableAbilityAbAttr, SuppressFieldAbilitiesAbAttr, NoFusionAbilityAbAttr, MultCritAbAttr, IgnoreTypeImmunityAbAttr } from '../data/ability';
|
||||
import { Ability, AbAttr, BattleStatMultiplierAbAttr, BlockCritAbAttr, BonusCritAbAttr, BypassBurnDamageReductionAbAttr, FieldPriorityMoveImmunityAbAttr, FieldVariableMovePowerAbAttr, IgnoreOpponentStatChangesAbAttr, MoveImmunityAbAttr, MoveTypeChangeAttr, NonSuperEffectiveImmunityAbAttr, PreApplyBattlerTagAbAttr, PreDefendFullHpEndureAbAttr, ReceivedMoveDamageMultiplierAbAttr, ReduceStatusEffectDurationAbAttr, StabBoostAbAttr, StatusEffectImmunityAbAttr, TypeImmunityAbAttr, VariableMovePowerAbAttr, VariableMoveTypeAbAttr, WeightMultiplierAbAttr, allAbilities, applyAbAttrs, applyBattleStatMultiplierAbAttrs, applyPostDefendAbAttrs, applyPreApplyBattlerTagAbAttrs, applyPreAttackAbAttrs, applyPreDefendAbAttrs, applyPreSetStatusAbAttrs, UnsuppressableAbilityAbAttr, SuppressFieldAbilitiesAbAttr, NoFusionAbilityAbAttr, MultCritAbAttr, IgnoreTypeImmunityAbAttr, DamageBoostAbAttr, IgnoreTypeStatusEffectImmunityAbAttr } from '../data/ability';
|
||||
import { Abilities } from "#app/data/enums/abilities";
|
||||
import PokemonData from '../system/pokemon-data';
|
||||
import Battle, { BattlerIndex } from '../battle';
|
||||
|
@ -1225,24 +1225,18 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
|
|||
}
|
||||
}
|
||||
|
||||
if (this.level >= 25) { // No egg moves below level 25
|
||||
if (this.level >= 60) { // No egg moves below level 60
|
||||
for (let i = 0; i < 3; i++) {
|
||||
const moveId = speciesEggMoves[this.species.getRootSpeciesId()][i];
|
||||
if (!movePool.some(m => m[0] === moveId) && !allMoves[moveId].name.endsWith(' (N)'))
|
||||
movePool.push([moveId, Math.min(this.level * 0.5, 40)]);
|
||||
}
|
||||
const moveId = speciesEggMoves[this.species.getRootSpeciesId()][3];
|
||||
if (this.level >= 60 && !movePool.some(m => m[0] === moveId) && !allMoves[moveId].name.endsWith(' (N)')) // No rare egg moves before level 60
|
||||
movePool.push([moveId, Math.min(this.level * 0.2, 20)]);
|
||||
if (this.fusionSpecies) {
|
||||
for (let i = 0; i < 3; i++) {
|
||||
const moveId = speciesEggMoves[this.fusionSpecies.getRootSpeciesId()][i];
|
||||
if (!movePool.some(m => m[0] === moveId) && !allMoves[moveId].name.endsWith(' (N)'))
|
||||
movePool.push([moveId, Math.min(this.level * 0.5, 30)]);
|
||||
}
|
||||
const moveId = speciesEggMoves[this.fusionSpecies.getRootSpeciesId()][3];
|
||||
if (this.level >= 60 && !movePool.some(m => m[0] === moveId) && !allMoves[moveId].name.endsWith(' (N)')) // No rare egg moves before level 60
|
||||
movePool.push([moveId, Math.min(this.level * 0.2, 20)]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1540,11 +1534,16 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
|
|||
if (!isTypeImmune) {
|
||||
damage.value = Math.ceil(((((2 * source.level / 5 + 2) * power.value * sourceAtk.value / targetDef.value) / 50) + 2) * stabMultiplier.value * typeMultiplier.value * arenaAttackTypeMultiplier.value * screenMultiplier.value * ((this.scene.randBattleSeedInt(15) + 85) / 100) * criticalMultiplier.value);
|
||||
if (isPhysical && source.status && source.status.effect === StatusEffect.BURN) {
|
||||
const burnDamageReductionCancelled = new Utils.BooleanHolder(false);
|
||||
applyAbAttrs(BypassBurnDamageReductionAbAttr, source, burnDamageReductionCancelled);
|
||||
if (!burnDamageReductionCancelled.value)
|
||||
damage.value = Math.floor(damage.value / 2);
|
||||
if(!move.getAttrs(BypassBurnDamageReductionAttr).length) {
|
||||
const burnDamageReductionCancelled = new Utils.BooleanHolder(false);
|
||||
applyAbAttrs(BypassBurnDamageReductionAbAttr, source, burnDamageReductionCancelled);
|
||||
if (!burnDamageReductionCancelled.value)
|
||||
damage.value = Math.floor(damage.value / 2);
|
||||
}
|
||||
}
|
||||
|
||||
applyPreAttackAbAttrs(DamageBoostAbAttr, source, this, battlerMove, damage);
|
||||
|
||||
move.getAttrs(HitsTagAttr).map(hta => hta as HitsTagAttr).filter(hta => hta.doubleDamage).forEach(hta => {
|
||||
if (this.getTag(hta.tagType))
|
||||
damage.value *= 2;
|
||||
|
@ -1564,7 +1563,7 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
|
|||
|
||||
if (!result) {
|
||||
if (!typeMultiplier.value)
|
||||
result = HitResult.NO_EFFECT;
|
||||
result = move.id == Moves.SHEER_COLD ? HitResult.IMMUNE : HitResult.NO_EFFECT;
|
||||
else {
|
||||
const oneHitKo = new Utils.BooleanHolder(false);
|
||||
applyMoveAttrs(OneHitKOAttr, source, this, move, oneHitKo);
|
||||
|
@ -1632,6 +1631,9 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
|
|||
case HitResult.NO_EFFECT:
|
||||
this.scene.queueMessage(i18next.t('battle:hitResultNoEffect', { pokemonName: this.name }));
|
||||
break;
|
||||
case HitResult.IMMUNE:
|
||||
this.scene.queueMessage(`${this.name} is unaffected!`);
|
||||
break;
|
||||
case HitResult.ONE_HIT_KO:
|
||||
this.scene.queueMessage(i18next.t('battle:hitResultOneHitKO'));
|
||||
break;
|
||||
|
@ -2025,7 +2027,7 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
|
|||
return this.gender !== Gender.GENDERLESS && pokemon.gender === (this.gender === Gender.MALE ? Gender.FEMALE : Gender.MALE);
|
||||
}
|
||||
|
||||
canSetStatus(effect: StatusEffect, quiet: boolean = false, overrideStatus: boolean = false): boolean {
|
||||
canSetStatus(effect: StatusEffect, quiet: boolean = false, overrideStatus: boolean = false, sourcePokemon: Pokemon = null): boolean {
|
||||
if (effect !== StatusEffect.FAINT) {
|
||||
if (overrideStatus ? this.status?.effect === effect : this.status)
|
||||
return false;
|
||||
|
@ -2033,11 +2035,32 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
|
|||
return false;
|
||||
}
|
||||
|
||||
const types = this.getTypes(true, true);
|
||||
|
||||
switch (effect) {
|
||||
case StatusEffect.POISON:
|
||||
case StatusEffect.TOXIC:
|
||||
if (this.isOfType(Type.POISON) || this.isOfType(Type.STEEL))
|
||||
return false;
|
||||
// Check if the Pokemon is immune to Poison/Toxic or if the source pokemon is canceling the immunity
|
||||
let poisonImmunity = types.map(defType => {
|
||||
// Check if the Pokemon is not immune to Poison/Toxic
|
||||
if (defType !== Type.POISON && defType !== Type.STEEL)
|
||||
return false;
|
||||
|
||||
// Check if the source Pokemon has an ability that cancels the Poison/Toxic immunity
|
||||
const cancelImmunity = new Utils.BooleanHolder(false);
|
||||
if (sourcePokemon) {
|
||||
applyAbAttrs(IgnoreTypeStatusEffectImmunityAbAttr, sourcePokemon, cancelImmunity, effect, defType);
|
||||
if (cancelImmunity.value)
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
})
|
||||
|
||||
if (this.isOfType(Type.POISON) || this.isOfType(Type.STEEL)) {
|
||||
if (poisonImmunity.includes(true))
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
case StatusEffect.PARALYSIS:
|
||||
if (this.isOfType(Type.ELECTRIC))
|
||||
|
@ -2066,12 +2089,12 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
|
|||
return true;
|
||||
}
|
||||
|
||||
trySetStatus(effect: StatusEffect, asPhase: boolean = false, cureTurn: integer = 0, sourceText: string = null): boolean {
|
||||
if (!this.canSetStatus(effect, asPhase))
|
||||
trySetStatus(effect: StatusEffect, asPhase: boolean = false, sourcePokemon: Pokemon = null, cureTurn: integer = 0, sourceText: string = null): boolean {
|
||||
if (!this.canSetStatus(effect, asPhase, false, sourcePokemon))
|
||||
return false;
|
||||
|
||||
if (asPhase) {
|
||||
this.scene.unshiftPhase(new ObtainStatusEffectPhase(this.scene, this.getBattlerIndex(), effect, cureTurn, sourceText));
|
||||
this.scene.unshiftPhase(new ObtainStatusEffectPhase(this.scene, this.getBattlerIndex(), effect, cureTurn, sourceText, sourcePokemon));
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -3340,7 +3363,8 @@ export enum HitResult {
|
|||
HEAL,
|
||||
FAIL,
|
||||
MISS,
|
||||
OTHER
|
||||
OTHER,
|
||||
IMMUNE
|
||||
}
|
||||
|
||||
export type DamageResult = HitResult.EFFECTIVE | HitResult.SUPER_EFFECTIVE | HitResult.NOT_VERY_EFFECTIVE | HitResult.ONE_HIT_KO | HitResult.OTHER;
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
import { SimpleTranslationEntries } from "#app/plugins/i18n";
|
||||
|
||||
export const abilityTriggers: SimpleTranslationEntries = {
|
||||
'blockRecoilDamage' : `{{pokemonName}}'s {{abilityName}}\nprotected it from recoil!`,
|
||||
} as const;
|
|
@ -9,11 +9,11 @@ export const battle: SimpleTranslationEntries = {
|
|||
"trainerComeBack": "{{trainerName}} ruft {{pokemonName}} zurück!",
|
||||
"playerGo": "Los! {{pokemonName}}!",
|
||||
"trainerGo": "{{trainerName}} sendet {{pokemonName}} raus!",
|
||||
"switchQuestion": "Willst du\n{{pokemonName}} auswechseln?",
|
||||
"switchQuestion": "Möchtest du\n{{pokemonName}} auswechseln?",
|
||||
"trainerDefeated": `{{trainerName}}\nwurde besiegt!`,
|
||||
"pokemonCaught": "{{pokemonName}} wurde gefangen!",
|
||||
"pokemon": "Pokémon",
|
||||
"sendOutPokemon": "Los! {{pokemonName}}!",
|
||||
"sendOutPokemon": "Los, {{pokemonName}}!",
|
||||
"hitResultCriticalHit": "Ein Volltreffer!",
|
||||
"hitResultSuperEffective": "Das ist sehr effektiv!",
|
||||
"hitResultNotVeryEffective": "Das ist nicht sehr effektiv…",
|
||||
|
@ -26,28 +26,28 @@ export const battle: SimpleTranslationEntries = {
|
|||
"learnMove": "{{pokemonName}} erlernt\n{{moveName}}!",
|
||||
"learnMovePrompt": "{{pokemonName}} versucht, {{moveName}} zu erlernen.",
|
||||
"learnMoveLimitReached": "Aber {{pokemonName}} kann nur\nmaximal vier Attacken erlernen.",
|
||||
"learnMoveReplaceQuestion": "Soll eine andere Attacke durch\n{{moveName}} ersetzt werden?",
|
||||
"learnMoveReplaceQuestion": "Soll eine bekannte Attacke durch\n{{moveName}} ersetzt werden?",
|
||||
"learnMoveStopTeaching": "{{moveName}} nicht\nerlernen?",
|
||||
"learnMoveNotLearned": "{{pokemonName}} hat\n{{moveName}} nicht erlernt.",
|
||||
"learnMoveForgetQuestion": "Welche Attacke soll vergessen werden?",
|
||||
"learnMoveForgetSuccess": "{{pokemonName}} hat\n{{moveName}} vergessen.",
|
||||
"levelCapUp": "Das Levellimit\nhat sich zu {{levelCap}} erhöht!",
|
||||
"moveNotImplemented": "{{moveName}} ist noch nicht implementiert und kann nicht ausgewählt werden.",
|
||||
"moveNoPP": "Du hast keine AP für\ndiese Attacke mehr übrig!",
|
||||
"moveNoPP": "Es sind keine AP für\ndiese Attacke mehr übrig!",
|
||||
"moveDisabled": "{{moveName}} ist deaktiviert!",
|
||||
"noPokeballForce": "Eine unsichtbare Kraft\nverhindert die Nutzung von Pokébällen.",
|
||||
"noPokeballTrainer": "Du kannst das Pokémon\neines anderen Trainers nicht fangen!",
|
||||
"noPokeballMulti": "Du kannst erst einen Pokéball werden,\nwenn nur noch ein Pokémon übrig ist!",
|
||||
"noPokeballMulti": "Du kannst erst einen Pokéball werfen,\nwenn nur noch ein Pokémon übrig ist!",
|
||||
"noPokeballStrong": "Das Ziel-Pokémon ist zu stark, um gefangen zu werden!\nDu musst es zuerst schwächen!",
|
||||
"noEscapeForce": "Eine unsichtbare Kraft\nverhindert die Flucht.",
|
||||
"noEscapeTrainer": "Du kannst nicht\naus einem Trainerkampf fliehen!",
|
||||
"noEscapePokemon": "{{pokemonName}}'s {{moveName}}\nverhindert {{escapeVerb}}!",
|
||||
"runAwaySuccess": "Du bist entkommen!",
|
||||
"runAwayCannotEscape": 'Du kannst nicht fliehen!',
|
||||
"runAwayCannotEscape": 'Flucht unmöglich!',
|
||||
"escapeVerbSwitch": "auswechseln",
|
||||
"escapeVerbFlee": "flucht",
|
||||
"skipItemQuestion": "Bist du sicher, dass du kein Item nehmen willst?",
|
||||
"notDisabled": "{{pokemonName}}'s {{moveName}} ist\nnicht mehr deaktiviert!",
|
||||
"eggHatching": "Oh?",
|
||||
"ivScannerUseQuestion": "IV-Scanner auf {{pokemonName}} benutzen?"
|
||||
} as const;
|
||||
} as const;
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
import { ability } from "./ability";
|
||||
import { abilityTriggers } from "./ability-trigger";
|
||||
import { battle } from "./battle";
|
||||
import { commandUiHandler } from "./command-ui-handler";
|
||||
import { fightUiHandler } from "./fight-ui-handler";
|
||||
|
@ -17,6 +18,7 @@ import { titles,trainerClasses,trainerNames } from "./trainers";
|
|||
|
||||
export const deConfig = {
|
||||
ability: ability,
|
||||
abilityTriggers: abilityTriggers,
|
||||
battle: battle,
|
||||
commandUiHandler: commandUiHandler,
|
||||
fightUiHandler: fightUiHandler,
|
||||
|
|
|
@ -2915,7 +2915,7 @@ export const move: MoveTranslationEntries = {
|
|||
},
|
||||
"zippyZap": {
|
||||
name: "Britzelturbo",
|
||||
effect: "Ein stürmischer Blitz-Angriff mit hoher Erstschlag- und Volltrefferquote."
|
||||
effect: "The user attacks the target with bursts of electricity at high speed. This move always goes first and raises the user's evasiveness."
|
||||
},
|
||||
"splishySplash": {
|
||||
name: "Plätschersurfer",
|
||||
|
|
|
@ -28,5 +28,8 @@ export const starterSelectUiHandler: SimpleTranslationEntries = {
|
|||
"cycleNature": "N: Wesen Ändern",
|
||||
"cycleVariant": "V: Seltenheit ändern",
|
||||
"enablePassive": "Passiv-Skill aktivieren",
|
||||
"disablePassive": "Passiv-Skill deaktivieren"
|
||||
"disablePassive": "Passiv-Skill deaktivieren",
|
||||
"locked": "Gesperrt",
|
||||
"disabled": "Deaktiviert",
|
||||
"uncaught": "Uncaught"
|
||||
}
|
|
@ -0,0 +1,5 @@
|
|||
import { SimpleTranslationEntries } from "#app/plugins/i18n";
|
||||
|
||||
export const abilityTriggers: SimpleTranslationEntries = {
|
||||
'blockRecoilDamage' : `{{pokemonName}}'s {{abilityName}}\nprotected it from recoil!`,
|
||||
} as const;
|
|
@ -1,4 +1,5 @@
|
|||
import { ability } from "./ability";
|
||||
import { abilityTriggers } from "./ability-trigger";
|
||||
import { battle } from "./battle";
|
||||
import { commandUiHandler } from "./command-ui-handler";
|
||||
import { fightUiHandler } from "./fight-ui-handler";
|
||||
|
@ -15,8 +16,9 @@ import { tutorial } from "./tutorial";
|
|||
import { titles,trainerClasses,trainerNames } from "./trainers";
|
||||
|
||||
|
||||
export const enConfig = {
|
||||
export const enConfig = {
|
||||
ability: ability,
|
||||
abilityTriggers: abilityTriggers,
|
||||
battle: battle,
|
||||
commandUiHandler: commandUiHandler,
|
||||
fightUiHandler: fightUiHandler,
|
||||
|
|
|
@ -2915,7 +2915,7 @@ export const move: MoveTranslationEntries = {
|
|||
},
|
||||
"zippyZap": {
|
||||
name: "Zippy Zap",
|
||||
effect: "The user attacks the target with bursts of electricity at high speed. This move always goes first and results in a critical hit."
|
||||
effect: "The user attacks the target with bursts of electricity at high speed. This move always goes first and raises the user's evasiveness."
|
||||
},
|
||||
"splishySplash": {
|
||||
name: "Splishy Splash",
|
||||
|
|
|
@ -28,5 +28,8 @@ export const starterSelectUiHandler: SimpleTranslationEntries = {
|
|||
"cycleNature": 'N: Cycle Nature',
|
||||
"cycleVariant": 'V: Cycle Variant',
|
||||
"enablePassive": "Enable Passive",
|
||||
"disablePassive": "Disable Passive"
|
||||
"disablePassive": "Disable Passive",
|
||||
"locked": "Locked",
|
||||
"disabled": "Disabled",
|
||||
"uncaught": "Uncaught"
|
||||
}
|
|
@ -0,0 +1,5 @@
|
|||
import { SimpleTranslationEntries } from "#app/plugins/i18n";
|
||||
|
||||
export const abilityTriggers: SimpleTranslationEntries = {
|
||||
'blockRecoilDamage' : `{{pokemonName}}'s {{abilityName}}\nprotected it from recoil!`,
|
||||
} as const;
|
|
@ -1,4 +1,5 @@
|
|||
import { ability } from "./ability";
|
||||
import { abilityTriggers } from "./ability-trigger";
|
||||
import { battle } from "./battle";
|
||||
import { commandUiHandler } from "./command-ui-handler";
|
||||
import { fightUiHandler } from "./fight-ui-handler";
|
||||
|
@ -17,6 +18,7 @@ import { titles,trainerClasses,trainerNames } from "./trainers";
|
|||
|
||||
export const esConfig = {
|
||||
ability: ability,
|
||||
abilityTriggers: abilityTriggers,
|
||||
battle: battle,
|
||||
commandUiHandler: commandUiHandler,
|
||||
fightUiHandler: fightUiHandler,
|
||||
|
|
|
@ -2915,7 +2915,7 @@ export const move: MoveTranslationEntries = {
|
|||
},
|
||||
zippyZap: {
|
||||
name: "Pikaturbo",
|
||||
effect: "Ataque eléctrico a la velocidad del rayo. Este movimiento tiene prioridad alta y propina golpes críticos.",
|
||||
effect: "The user attacks the target with bursts of electricity at high speed. This move always goes first and raises the user's evasiveness.",
|
||||
},
|
||||
splishySplash: {
|
||||
name: "Salpikasurf",
|
||||
|
|
|
@ -28,5 +28,8 @@ export const starterSelectUiHandler: SimpleTranslationEntries = {
|
|||
"cycleNature": 'N: Cambiar Naturaleza',
|
||||
"cycleVariant": 'V: Cambiar Variante',
|
||||
"enablePassive": "Activar Pasiva",
|
||||
"disablePassive": "Desactivar Pasiva"
|
||||
"disablePassive": "Desactivar Pasiva",
|
||||
"locked": "Locked",
|
||||
"disabled": "Disabled",
|
||||
"uncaught": "Uncaught"
|
||||
}
|
|
@ -0,0 +1,5 @@
|
|||
import { SimpleTranslationEntries } from "#app/plugins/i18n";
|
||||
|
||||
export const abilityTriggers: SimpleTranslationEntries = {
|
||||
'blockRecoilDamage' : `{{abilityName}}\nde {{pokemonName}} le protège du contrecoup !`,
|
||||
} as const;
|
|
@ -1,4 +1,5 @@
|
|||
import { ability } from "./ability";
|
||||
import { abilityTriggers } from "./ability-trigger";
|
||||
import { battle } from "./battle";
|
||||
import { commandUiHandler } from "./command-ui-handler";
|
||||
import { fightUiHandler } from "./fight-ui-handler";
|
||||
|
@ -17,6 +18,7 @@ import { titles,trainerClasses,trainerNames } from "./trainers";
|
|||
|
||||
export const frConfig = {
|
||||
ability: ability,
|
||||
abilityTriggers: abilityTriggers,
|
||||
battle: battle,
|
||||
commandUiHandler: commandUiHandler,
|
||||
fightUiHandler: fightUiHandler,
|
||||
|
|
|
@ -2915,7 +2915,7 @@ export const move: MoveTranslationEntries = {
|
|||
},
|
||||
"zippyZap": {
|
||||
name: "Pika-Sprint",
|
||||
effect: "Une attaque électrique rapide comme l’éclair qui inflige un coup critique à coup sûr. Frappe en priorité."
|
||||
effect: "Une attaque électrique rapide comme l’éclair qui auguemente l’esquive. Frappe en priorité."
|
||||
},
|
||||
"splishySplash": {
|
||||
name: "Pika-Splash",
|
||||
|
|
|
@ -28,5 +28,8 @@ export const starterSelectUiHandler: SimpleTranslationEntries = {
|
|||
"cycleNature": "N: » Natures",
|
||||
"cycleVariant": "V: » Variants",
|
||||
"enablePassive": "Activer Passif",
|
||||
"disablePassive": "Désactiver Passif"
|
||||
"disablePassive": "Désactiver Passif",
|
||||
"locked": "Verrouillé",
|
||||
"disabled": "Désactivé",
|
||||
"uncaught": "Uncaught"
|
||||
}
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
import { SimpleTranslationEntries } from "#app/plugins/i18n";
|
||||
|
||||
export const abilityTriggers: SimpleTranslationEntries = {
|
||||
'blockRecoilDamage' : `{{abilityName}} di {{pokemonName}}\nl'ha protetto dal contraccolpo!`,
|
||||
} as const;
|
|
@ -1,4 +1,5 @@
|
|||
import { ability } from "./ability";
|
||||
import { abilityTriggers } from "./ability-trigger";
|
||||
import { battle } from "./battle";
|
||||
import { commandUiHandler } from "./command-ui-handler";
|
||||
import { fightUiHandler } from "./fight-ui-handler";
|
||||
|
@ -17,6 +18,7 @@ import { titles,trainerClasses,trainerNames } from "./trainers";
|
|||
|
||||
export const itConfig = {
|
||||
ability: ability,
|
||||
abilityTriggers: abilityTriggers,
|
||||
battle: battle,
|
||||
commandUiHandler: commandUiHandler,
|
||||
fightUiHandler: fightUiHandler,
|
||||
|
|
|
@ -2915,7 +2915,7 @@ export const move: MoveTranslationEntries = {
|
|||
},
|
||||
zippyZap: {
|
||||
name: "Sprintaboom",
|
||||
effect: "Un attacco elettrico ad altissima velocità. Questa mossa ha priorità alta e infligge sicuramente un brutto colpo.",
|
||||
effect: "The user attacks the target with bursts of electricity at high speed. This move always goes first and raises the user's evasiveness.",
|
||||
},
|
||||
splishySplash: {
|
||||
name: "Surfasplash",
|
||||
|
|
|
@ -28,5 +28,8 @@ export const starterSelectUiHandler: SimpleTranslationEntries = {
|
|||
"cycleNature": 'N: Alterna Natura',
|
||||
"cycleVariant": 'V: Alterna Variante',
|
||||
"enablePassive": "Attiva Passiva",
|
||||
"disablePassive": "Disattiva Passiva"
|
||||
"disablePassive": "Disattiva Passiva",
|
||||
"locked": "Locked",
|
||||
"disabled": "Disabled",
|
||||
"uncaught": "Uncaught"
|
||||
}
|
|
@ -9,7 +9,7 @@ export const battle: SimpleTranslationEntries = {
|
|||
"trainerComeBack": "{{trainerName}} retirou {{pokemonName}} da batalha!",
|
||||
"playerGo": "{{pokemonName}}, eu escolho você!",
|
||||
"trainerGo": "{{trainerName}} enviou {{pokemonName}}!",
|
||||
"switchQuestion": "Quer trocar\n{{pokemonName}}?",
|
||||
"switchQuestion": "Quer trocar\nde {{pokemonName}}?",
|
||||
"trainerDefeated": "Você derrotou\n{{trainerName}}!",
|
||||
"pokemonCaught": "{{pokemonName}} foi capturado!",
|
||||
"pokemon": "Pokémon",
|
||||
|
|
|
@ -2915,7 +2915,7 @@ export const move: MoveTranslationEntries = {
|
|||
},
|
||||
zippyZap: {
|
||||
name: "Zippy Zap",
|
||||
effect: "O usuário ataca o alvo com rajadas de eletricidade em alta velocidade. Este movimento sempre ataca primeiro e resulta em um golpe crítico."
|
||||
effect: "The user attacks the target with bursts of electricity at high speed. This move always goes first and raises the user's evasiveness."
|
||||
},
|
||||
splishySplash: {
|
||||
name: "Splishy Splash",
|
||||
|
|
|
@ -28,5 +28,8 @@ export const starterSelectUiHandler: SimpleTranslationEntries = {
|
|||
"cycleNature": 'N: Mudar Nature',
|
||||
"cycleVariant": 'V: Mudar Variante',
|
||||
"enablePassive": "Ativar Passiva",
|
||||
"disablePassive": "Desativar Passiva"
|
||||
"disablePassive": "Desativar Passiva",
|
||||
"locked": "Bloqueado",
|
||||
"disabled": "Desativado",
|
||||
"uncaught": "Não capturado"
|
||||
}
|
|
@ -1,43 +1,51 @@
|
|||
import { SimpleTranslationEntries } from "#app/plugins/i18n";
|
||||
|
||||
export const tutorial: SimpleTranslationEntries = {
|
||||
"intro": `Bem-vindo ao PokéRogue! Este é um jogo de Pokémon feito por fãs focado em batalha com elementos roguelite.
|
||||
$Este jogo não é monetizado e não reivindicamos propriedade de Pokémon nem dos ativos protegidos por direitos autorais usados.
|
||||
$O jogo é um trabalho em andamento, mas totalmente jogável.\nPara relatórios de bugs, use a comunidade no Discord.
|
||||
$Se o jogo rodar lentamente, certifique-se de que a 'Aceleração de hardware' esteja ativada nas configurações do seu navegador.`,
|
||||
"intro": `Bem-vindo ao PokéRogue! Este é um jogo Pokémon feito por fãs focado em batalhas com elementos roguelite.
|
||||
$Este jogo não é monetizado e não reivindicamos propriedade de Pokémon nem dos ativos protegidos
|
||||
$por direitos autorais usados.
|
||||
$O jogo é um trabalho em andamento, mas é totalmente jogável.
|
||||
$Para relatórios de bugs, use a comunidade no Discord.
|
||||
$Se o jogo estiver rodando lentamente, certifique-se de que a 'Aceleração de hardware' esteja ativada
|
||||
$nas configurações do seu navegador.`,
|
||||
|
||||
"accessMenu": `Para acessar o menu, aperte M ou Esc.
|
||||
$O menu contém configurações e diversas funções.`,
|
||||
|
||||
"menu": `A partir deste menu, você pode acessar as configurações.
|
||||
$Nas configurações, você pode alterar a velocidade do jogo, o estilo da janela e outras opções.
|
||||
$Existem também vários outros recursos aqui, então não deixe de conferir todos eles!`,
|
||||
$Nas configurações, você pode alterar a velocidade do jogo,
|
||||
$o estilo da janela, entre outras opções.
|
||||
$Existem também vários outros recursos disponíveis aqui.
|
||||
$Não deixe de conferir todos eles!`,
|
||||
|
||||
"starterSelect": `Nessa tela, você pode selecionar seus iniciais.\nEsses são os Pokémon iniciais da sua equipe.
|
||||
$Cada inicial tem seu próprio custo. Sua equipe pode ter até \n6 membros contando que o preço não ultrapasse 10.
|
||||
$Você pode também selecionar o gênero, habilidade, e formas dependendo \ndas variantes que você capturou ou chocou.
|
||||
$Os IVs da espécie são os melhores de todos que você \njá capturou ou chocou, então tente conseguir vários Pokémon da mesma espécie!`,
|
||||
"starterSelect": `Aqui você pode escolher seus iniciais.\nEsses serão os primeiro Pokémon da sua equipe.
|
||||
$Cada inicial tem seu custo. Sua equipe pode ter até 6\nmembros, desde que a soma dos custos não ultrapasse 10.
|
||||
$Você pode escolher o gênero, a habilidade\ne até a forma do seu inicial.
|
||||
$Essas opções dependem das variantes dessa\nespécie que você já capturou ou chocou.
|
||||
$Os IVs de cada inicial são os melhores de todos os Pokémon\ndaquela espécie que você já capturou ou chocou.
|
||||
$Sempre capture vários Pokémon de várias espécies!`,
|
||||
|
||||
"pokerus": `Todo dia, 3 Pokémon iniciais ficam com uma borda roxa.
|
||||
"pokerus": `Todo dia, 3 Pokémon iniciais ficam com uma borda roxa.
|
||||
$Caso veja um inicial que você possui com uma dessa, tente\nadicioná-lo a sua equipe. Lembre-se de olhar seu sumário!`,
|
||||
|
||||
"statChange": `As mudanças de estatísticas se mantém depois do combate\ndesde que o Pokémon não seja trocado.
|
||||
"statChange": `As mudanças de atributos se mantém após a batalha desde que o Pokémon não seja trocado.
|
||||
$Seus Pokémon voltam a suas Poké Bolas antes de batalhas contra treinadores e de entrar em um novo bioma.
|
||||
$Também é possível ver as mudanças de estatísticas dos Pokémon em campo mantendo pressionado C ou Shift.`,
|
||||
$Para ver as mudanças de atributos dos Pokémon em campo, mantena C ou Shift pressionado durante a batalha.`,
|
||||
|
||||
"selectItem": `Após cada batalha você pode escolher entre 3 itens aleatórios.\nVocê pode escolher apenas um.
|
||||
$Esses variam entre consumíveis, itens de segurar, e itens passivos permanentes.
|
||||
$A maioria dos efeitos de itens não consumíveis serão acumulados de várias maneiras.
|
||||
$Alguns itens só aparecerão se puderem ser usados, por exemplo, itens de evolução.
|
||||
$Você também pode transferir itens de segurar entre os Pokémon utilizando a opção de transferir.
|
||||
"selectItem": `Após cada batalha, você pode escolher entre 3 itens aleatórios.
|
||||
$Você pode escolher apenas um deles.
|
||||
$Esses itens variam entre consumíveis, itens de segurar e itens passivos permanentes.
|
||||
$A maioria dos efeitos de itens não consumíveis podem ser acumulados.
|
||||
$Alguns itens só aparecerão se puderem ser usados, como os itens de evolução.
|
||||
$Você também pode transferir itens de segurar entre os Pokémon utilizando a opção "Transfer".
|
||||
$A opção de transferir irá aparecer no canto inferior direito assim que você obter um item de segurar.
|
||||
$Você pode comprar itens consumíveis com dinheiro, e uma maior variedade ficará disponível conforme você for mais longe.
|
||||
$Certifique-se de comprá-los antes de escolher seu item aleatório. Ao escolher, a próxima batalha começará.`,
|
||||
$Você pode comprar itens consumíveis com dinheiro, e sua variedade aumentará conforme você for mais longe.
|
||||
$Certifique-se de comprá-los antes de escolher seu item aleatório. Ao escolhê-lo, a próxima batalha começará.`,
|
||||
|
||||
"eggGacha": `Nesta tela você pode trocar seus vouchers\npor ovos de Pokémon.
|
||||
$Ovos ficam mais próximos de chocar depois de cada batalha.\nOvos raros demoram mais para chocar.
|
||||
"eggGacha": `Aqui você pode trocar seus vouchers\npor ovos de Pokémon.
|
||||
$Ovos ficam mais próximos de chocar após cada batalha.\nOvos mais raros demoram mais para chocar.
|
||||
$Pokémon chocados não serão adicionados a sua equipe,\nmas sim aos seus iniciais.
|
||||
$Pokémon chocados geralmente possuem IVs melhores\nque Pokémon selvagens.
|
||||
$Alguns Pokémon só podem ser obtidos através de seus ovos.
|
||||
$Há 3 máquinas, cada uma com um bônus diferente,\nentão escolha a que mais lhe convém!`,
|
||||
$Temos 3 máquinas, cada uma com seu bônus específico,\nentão escolha a que mais lhe convém!`,
|
||||
} as const;
|
|
@ -0,0 +1,5 @@
|
|||
import { SimpleTranslationEntries } from "#app/plugins/i18n";
|
||||
|
||||
export const abilityTriggers: SimpleTranslationEntries = {
|
||||
'blockRecoilDamage' : `{{pokemonName}}'s {{abilityName}}\nprotected it from recoil!`,
|
||||
} as const;
|
|
@ -1,4 +1,5 @@
|
|||
import { ability } from "./ability";
|
||||
import { abilityTriggers } from "./ability-trigger";
|
||||
import { battle } from "./battle";
|
||||
import { commandUiHandler } from "./command-ui-handler";
|
||||
import { fightUiHandler } from "./fight-ui-handler";
|
||||
|
@ -16,6 +17,7 @@ import { nature } from "./nature";
|
|||
|
||||
export const zhCnConfig = {
|
||||
ability: ability,
|
||||
abilityTriggers: abilityTriggers,
|
||||
battle: battle,
|
||||
commandUiHandler: commandUiHandler,
|
||||
fightUiHandler: fightUiHandler,
|
||||
|
|
|
@ -2915,7 +2915,7 @@ export const move: MoveTranslationEntries = {
|
|||
},
|
||||
"zippyZap": {
|
||||
name: "电电加速",
|
||||
effect: "迅猛无比的电击。必定能够\n先制攻击,击中对方的要害",
|
||||
effect: "The user attacks the target with bursts of electricity at high speed. This move always goes first and raises the user's evasiveness.",
|
||||
},
|
||||
"splishySplash": {
|
||||
name: "滔滔冲浪",
|
||||
|
|
|
@ -28,5 +28,8 @@ export const starterSelectUiHandler: SimpleTranslationEntries = {
|
|||
"cycleNature": 'N: 切换性格',
|
||||
"cycleVariant": 'V: 切换变种',
|
||||
"enablePassive": "启用被动",
|
||||
"disablePassive": "禁用被动"
|
||||
"disablePassive": "禁用被动",
|
||||
"locked": "Locked",
|
||||
"disabled": "Disabled",
|
||||
"uncaught": "Uncaught"
|
||||
}
|
|
@ -554,10 +554,10 @@ export class EvolutionItemModifierType extends PokemonModifierType implements Ge
|
|||
super(Utils.toReadableString(EvolutionItem[evolutionItem]), `Causes certain Pokémon to evolve`, (_type, args) => new Modifiers.EvolutionItemModifier(this, (args[0] as PlayerPokemon).id),
|
||||
(pokemon: PlayerPokemon) => {
|
||||
if (pokemonEvolutions.hasOwnProperty(pokemon.species.speciesId) && pokemonEvolutions[pokemon.species.speciesId].filter(e => e.item === this.evolutionItem
|
||||
&& (!e.condition || e.condition.predicate(pokemon))).length)
|
||||
&& (!e.condition || e.condition.predicate(pokemon))).length && (pokemon.getFormKey() !== SpeciesFormKey.GIGANTAMAX))
|
||||
return null;
|
||||
else if (pokemon.isFusion() && pokemonEvolutions.hasOwnProperty(pokemon.fusionSpecies.speciesId) && pokemonEvolutions[pokemon.fusionSpecies.speciesId].filter(e => e.item === this.evolutionItem
|
||||
&& (!e.condition || e.condition.predicate(pokemon))).length)
|
||||
&& (!e.condition || e.condition.predicate(pokemon))).length && (pokemon.getFusionFormKey() !== SpeciesFormKey.GIGANTAMAX))
|
||||
return null;
|
||||
|
||||
return PartyUiHandler.NoEffectMessage;
|
||||
|
|
|
@ -635,6 +635,9 @@ export class PokemonBaseStatModifier extends PokemonHeldItemModifier {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Applies Specific Type item boosts (e.g., Magnet)
|
||||
*/
|
||||
export class AttackTypeBoosterModifier extends PokemonHeldItemModifier {
|
||||
private moveType: Type;
|
||||
private boostMultiplier: number;
|
||||
|
@ -667,8 +670,15 @@ export class AttackTypeBoosterModifier extends PokemonHeldItemModifier {
|
|||
return super.shouldApply(args) && args.length === 3 && typeof args[1] === 'number' && args[2] instanceof Utils.NumberHolder;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {Array<any>} args Array
|
||||
* - Index 0: {Pokemon} Pokemon
|
||||
* - Index 1: {number} Move type
|
||||
* - Index 2: {Utils.NumberHolder} Move power
|
||||
* @returns {boolean} Returns true if boosts have been applied to the move.
|
||||
*/
|
||||
apply(args: any[]): boolean {
|
||||
if (args[1] === this.moveType) {
|
||||
if (args[1] === this.moveType && (args[2] as Utils.NumberHolder).value >= 1) {
|
||||
(args[2] as Utils.NumberHolder).value = Math.floor((args[2] as Utils.NumberHolder).value * (1 + (this.getStackCount() * this.boostMultiplier)));
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -289,7 +289,7 @@ export class TitlePhase extends Phase {
|
|||
}
|
||||
this.scene.sessionSlotId = slotId;
|
||||
|
||||
fetchDailyRunSeed().then(seed => {
|
||||
const generateDaily = (seed: string) => {
|
||||
this.scene.gameMode = gameModes[GameModes.DAILY];
|
||||
|
||||
this.scene.setSeed(seed);
|
||||
|
@ -332,9 +332,18 @@ export class TitlePhase extends Phase {
|
|||
this.scene.sessionPlayTime = 0;
|
||||
this.end();
|
||||
});
|
||||
}).catch(err => {
|
||||
console.error("Failed to load daily run:\n", err);
|
||||
});
|
||||
};
|
||||
|
||||
// If Online, calls seed fetch from db to generate daily run. If Offline, generates a daily run based on current date.
|
||||
if (!Utils.isLocal) {
|
||||
fetchDailyRunSeed().then(seed => {
|
||||
generateDaily(seed);
|
||||
}).catch(err => {
|
||||
console.error("Failed to load daily run:\n", err);
|
||||
});
|
||||
} else {
|
||||
generateDaily(btoa(new Date().toISOString().substring(0, 10)));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -2931,19 +2940,21 @@ export class ObtainStatusEffectPhase extends PokemonPhase {
|
|||
private statusEffect: StatusEffect;
|
||||
private cureTurn: integer;
|
||||
private sourceText: string;
|
||||
private sourcePokemon: Pokemon;
|
||||
|
||||
constructor(scene: BattleScene, battlerIndex: BattlerIndex, statusEffect: StatusEffect, cureTurn?: integer, sourceText?: string) {
|
||||
constructor(scene: BattleScene, battlerIndex: BattlerIndex, statusEffect: StatusEffect, cureTurn?: integer, sourceText?: string, sourcePokemon?: Pokemon) {
|
||||
super(scene, battlerIndex);
|
||||
|
||||
this.statusEffect = statusEffect;
|
||||
this.cureTurn = cureTurn;
|
||||
this.sourceText = sourceText;
|
||||
this.sourcePokemon = sourcePokemon; // For tracking which Pokemon caused the status effect
|
||||
}
|
||||
|
||||
start() {
|
||||
const pokemon = this.getPokemon();
|
||||
if (!pokemon.status) {
|
||||
if (pokemon.trySetStatus(this.statusEffect)) {
|
||||
if (pokemon.trySetStatus(this.statusEffect, false, this.sourcePokemon)) {
|
||||
if (this.cureTurn)
|
||||
pokemon.status.cureTurn = this.cureTurn;
|
||||
pokemon.updateInfo(true);
|
||||
|
@ -3610,10 +3621,20 @@ export class GameOverPhase extends BattlePhase {
|
|||
});
|
||||
});
|
||||
};
|
||||
|
||||
/* Added a local check to see if the game is running offline on victory
|
||||
If Online, execute apiFetch as intended
|
||||
If Offline, execute offlineNewClear(), a localStorage implementation of newClear daily run checks */
|
||||
if (this.victory) {
|
||||
Utils.apiFetch(`savedata/newclear?slot=${this.scene.sessionSlotId}`, true)
|
||||
if (!Utils.isLocal) {
|
||||
Utils.apiFetch(`savedata/newclear?slot=${this.scene.sessionSlotId}`, true)
|
||||
.then(response => response.json())
|
||||
.then(newClear => doGameOver(newClear));
|
||||
} else {
|
||||
this.scene.gameData.offlineNewClear(this.scene).then(result => {
|
||||
doGameOver(result);
|
||||
});
|
||||
}
|
||||
} else
|
||||
doGameOver(false);
|
||||
}
|
||||
|
|
|
@ -104,7 +104,8 @@ declare module 'i18next' {
|
|||
menu: SimpleTranslationEntries;
|
||||
menuUiHandler: SimpleTranslationEntries;
|
||||
move: MoveTranslationEntries;
|
||||
battle: SimpleTranslationEntries,
|
||||
battle: SimpleTranslationEntries;
|
||||
abilityTriggers: SimpleTranslationEntries;
|
||||
ability: AbilityTranslationEntries;
|
||||
pokeball: SimpleTranslationEntries;
|
||||
pokemon: SimpleTranslationEntries;
|
||||
|
|
|
@ -759,6 +759,36 @@ export class GameData {
|
|||
});
|
||||
}
|
||||
|
||||
/* Defines a localStorage item 'daily' to check on clears, offline implementation of savedata/newclear API
|
||||
If a GameModes clear other than Daily is checked, newClear = true as usual
|
||||
If a Daily mode is cleared, checks if it was already cleared before, based on seed, and returns true only to new daily clear runs */
|
||||
offlineNewClear(scene: BattleScene): Promise<boolean> {
|
||||
return new Promise<boolean>(resolve => {
|
||||
const sessionData = this.getSessionSaveData(scene);
|
||||
const seed = sessionData.seed;
|
||||
let daily: string[] = [];
|
||||
|
||||
if (sessionData.gameMode == GameModes.DAILY) {
|
||||
if (localStorage.hasOwnProperty('daily')) {
|
||||
daily = JSON.parse(atob(localStorage.getItem('daily')));
|
||||
if (daily.includes(seed)) {
|
||||
return resolve(false);
|
||||
} else {
|
||||
daily.push(seed);
|
||||
localStorage.setItem('daily', btoa(JSON.stringify(daily)));
|
||||
return resolve(true);
|
||||
}
|
||||
} else {
|
||||
daily.push(seed);
|
||||
localStorage.setItem('daily', btoa(JSON.stringify(daily)));
|
||||
return resolve(true);
|
||||
}
|
||||
} else {
|
||||
return resolve(true);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
tryClearSession(scene: BattleScene, slotId: integer): Promise<[success: boolean, newClear: boolean]> {
|
||||
return new Promise<[boolean, boolean]>(resolve => {
|
||||
if (bypassLogin) {
|
||||
|
|
|
@ -206,19 +206,20 @@ export function setSetting(scene: BattleScene, setting: Setting, value: integer)
|
|||
label: 'Deutsch',
|
||||
handler: () => changeLocaleHandler('de')
|
||||
},
|
||||
{
|
||||
label: '简体中文',
|
||||
handler: () => changeLocaleHandler('zh_CN')
|
||||
},
|
||||
{
|
||||
label: 'Português (BR)',
|
||||
handler: () => changeLocaleHandler('pt_BR')
|
||||
},
|
||||
{
|
||||
label: '简体中文',
|
||||
handler: () => changeLocaleHandler('zh_CN')
|
||||
},
|
||||
{
|
||||
label: 'Cancel',
|
||||
handler: () => cancelHandler()
|
||||
}
|
||||
]
|
||||
],
|
||||
maxOptions: 7
|
||||
});
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -1,34 +1,34 @@
|
|||
import BattleScene, { starterColors } from "../battle-scene";
|
||||
import PokemonSpecies, { allSpecies, getPokemonSpecies, getPokemonSpeciesForm, speciesStarters, starterPassiveAbilities, getStarterValueFriendshipCap } from "../data/pokemon-species";
|
||||
import { Species } from "../data/enums/species";
|
||||
import { TextStyle, addBBCodeTextObject, addTextObject } from "./text";
|
||||
import { Mode } from "./ui";
|
||||
import MessageUiHandler from "./message-ui-handler";
|
||||
import { Gender, getGenderColor, getGenderSymbol } from "../data/gender";
|
||||
import { allAbilities } from "../data/ability";
|
||||
import { GameModes, gameModes } from "../game-mode";
|
||||
import { GrowthRate, getGrowthRateColor } from "../data/exp";
|
||||
import { AbilityAttr, DexAttr, DexAttrProps, DexEntry, Passive as PassiveAttr, StarterFormMoveData, StarterMoveset } from "../system/game-data";
|
||||
import * as Utils from "../utils";
|
||||
import PokemonIconAnimHandler, { PokemonIconAnimMode } from "./pokemon-icon-anim-handler";
|
||||
import { StatsContainer } from "./stats-container";
|
||||
import { addWindow } from "./ui-theme";
|
||||
import { Nature, getNatureName } from "../data/nature";
|
||||
import BBCodeText from "phaser3-rex-plugins/plugins/bbcodetext";
|
||||
import { pokemonFormChanges } from "../data/pokemon-forms";
|
||||
import { Tutorial, handleTutorial } from "../tutorial";
|
||||
import { LevelMoves, pokemonFormLevelMoves, pokemonSpeciesLevelMoves } from "../data/pokemon-level-moves";
|
||||
import { allMoves } from "../data/move";
|
||||
import { Type } from "../data/type";
|
||||
import { Moves } from "../data/enums/moves";
|
||||
import { speciesEggMoves } from "../data/egg-moves";
|
||||
import { TitlePhase } from "../phases";
|
||||
import { argbFromRgba } from "@material/material-color-utilities";
|
||||
import { OptionSelectItem } from "./abstact-option-select-ui-handler";
|
||||
import { pokemonPrevolutions } from "#app/data/pokemon-evolutions";
|
||||
import { Variant, getVariantTint } from "#app/data/variant";
|
||||
import { argbFromRgba } from "@material/material-color-utilities";
|
||||
import i18next from "i18next";
|
||||
import {Button} from "../enums/buttons";
|
||||
import BBCodeText from "phaser3-rex-plugins/plugins/bbcodetext";
|
||||
import BattleScene, { starterColors } from "../battle-scene";
|
||||
import { allAbilities } from "../data/ability";
|
||||
import { speciesEggMoves } from "../data/egg-moves";
|
||||
import { Moves } from "../data/enums/moves";
|
||||
import { Species } from "../data/enums/species";
|
||||
import { GrowthRate, getGrowthRateColor } from "../data/exp";
|
||||
import { Gender, getGenderColor, getGenderSymbol } from "../data/gender";
|
||||
import { allMoves } from "../data/move";
|
||||
import { Nature, getNatureName } from "../data/nature";
|
||||
import { pokemonFormChanges } from "../data/pokemon-forms";
|
||||
import { LevelMoves, pokemonFormLevelMoves, pokemonSpeciesLevelMoves } from "../data/pokemon-level-moves";
|
||||
import PokemonSpecies, { allSpecies, getPokemonSpecies, getPokemonSpeciesForm, getStarterValueFriendshipCap, speciesStarters, starterPassiveAbilities } from "../data/pokemon-species";
|
||||
import { Type } from "../data/type";
|
||||
import { Button } from "../enums/buttons";
|
||||
import { GameModes, gameModes } from "../game-mode";
|
||||
import { TitlePhase } from "../phases";
|
||||
import { AbilityAttr, DexAttr, DexAttrProps, DexEntry, Passive as PassiveAttr, StarterFormMoveData, StarterMoveset } from "../system/game-data";
|
||||
import { Tutorial, handleTutorial } from "../tutorial";
|
||||
import * as Utils from "../utils";
|
||||
import { OptionSelectItem } from "./abstact-option-select-ui-handler";
|
||||
import MessageUiHandler from "./message-ui-handler";
|
||||
import PokemonIconAnimHandler, { PokemonIconAnimMode } from "./pokemon-icon-anim-handler";
|
||||
import { StatsContainer } from "./stats-container";
|
||||
import { TextStyle, addBBCodeTextObject, addTextObject } from "./text";
|
||||
import { Mode } from "./ui";
|
||||
import { addWindow } from "./ui-theme";
|
||||
|
||||
export type StarterSelectCallback = (starters: Starter[]) => void;
|
||||
|
||||
|
@ -241,7 +241,7 @@ export default class StarterSelectUiHandler extends MessageUiHandler {
|
|||
this.pokemonGenderText.setOrigin(0, 0);
|
||||
this.starterSelectContainer.add(this.pokemonGenderText);
|
||||
|
||||
this.pokemonUncaughtText = addTextObject(this.scene, 6, 127, 'Uncaught', TextStyle.SUMMARY_ALT, { fontSize: '56px' });
|
||||
this.pokemonUncaughtText = addTextObject(this.scene, 6, 127, i18next.t("starterSelectUiHandler:uncaught"), TextStyle.SUMMARY_ALT, { fontSize: '56px' });
|
||||
this.pokemonUncaughtText.setOrigin(0, 0);
|
||||
this.starterSelectContainer.add(this.pokemonUncaughtText);
|
||||
|
||||
|
@ -357,6 +357,7 @@ export default class StarterSelectUiHandler extends MessageUiHandler {
|
|||
icon.setScale(0.5);
|
||||
icon.setOrigin(0, 0);
|
||||
icon.setFrame(species.getIconId(defaultProps.female, defaultProps.formIndex, defaultProps.shiny, defaultProps.variant));
|
||||
this.checkIconId(icon, species, defaultProps.female, defaultProps.formIndex, defaultProps.shiny, defaultProps.variant);
|
||||
icon.setTint(0);
|
||||
this.starterSelectGenIconContainers[g].add(icon);
|
||||
this.iconAnimHandler.addOrUpdate(icon, PokemonIconAnimMode.NONE);
|
||||
|
@ -792,6 +793,7 @@ export default class StarterSelectUiHandler extends MessageUiHandler {
|
|||
const props = this.scene.gameData.getSpeciesDexAttrProps(species, this.dexAttrCursor);
|
||||
this.starterIcons[this.starterCursors.length].setTexture(species.getIconAtlasKey(props.formIndex, props.shiny, props.variant));
|
||||
this.starterIcons[this.starterCursors.length].setFrame(species.getIconId(props.female, props.formIndex, props.shiny, props.variant));
|
||||
this.checkIconId(this.starterIcons[this.starterCursors.length], species, props.female, props.formIndex, props.shiny, props.variant);
|
||||
this.starterGens.push(this.getGenCursorWithScroll());
|
||||
this.starterCursors.push(this.cursor);
|
||||
this.starterAttr.push(this.dexAttrCursor);
|
||||
|
@ -1306,6 +1308,7 @@ export default class StarterSelectUiHandler extends MessageUiHandler {
|
|||
const props = this.scene.gameData.getSpeciesDexAttrProps(this.lastSpecies, dexAttr);
|
||||
const lastSpeciesIcon = (this.starterSelectGenIconContainers[this.lastSpecies.generation - 1].getAt(this.genSpecies[this.lastSpecies.generation - 1].indexOf(this.lastSpecies)) as Phaser.GameObjects.Sprite);
|
||||
lastSpeciesIcon.setTexture(this.lastSpecies.getIconAtlasKey(props.formIndex, props.shiny, props.variant), this.lastSpecies.getIconId(props.female, props.formIndex, props.shiny, props.variant));
|
||||
this.checkIconId(lastSpeciesIcon, this.lastSpecies, props.female, props.formIndex, props.shiny, props.variant);
|
||||
this.iconAnimHandler.addOrUpdate(lastSpeciesIcon, PokemonIconAnimMode.NONE);
|
||||
}
|
||||
|
||||
|
@ -1548,12 +1551,7 @@ export default class StarterSelectUiHandler extends MessageUiHandler {
|
|||
|
||||
(this.starterSelectGenIconContainers[this.getGenCursorWithScroll()].getAt(this.cursor) as Phaser.GameObjects.Sprite)
|
||||
.setTexture(species.getIconAtlasKey(formIndex, shiny, variant), species.getIconId(female, formIndex, shiny, variant));
|
||||
// Temporary fix to show pokemon's default icon if variant icon doesn't exist
|
||||
if ((this.starterSelectGenIconContainers[this.getGenCursorWithScroll()].getAt(this.cursor) as Phaser.GameObjects.Sprite).frame.name != species.getIconId(female, formIndex, shiny, variant)) {
|
||||
console.log(`${species.name}'s variant icon does not exist. Replacing with default.`);
|
||||
(this.starterSelectGenIconContainers[this.getGenCursorWithScroll()].getAt(this.cursor) as Phaser.GameObjects.Sprite).setTexture(species.getIconAtlasKey(formIndex, false, variant));
|
||||
(this.starterSelectGenIconContainers[this.getGenCursorWithScroll()].getAt(this.cursor) as Phaser.GameObjects.Sprite).setFrame(species.getIconId(female, formIndex, false, variant));
|
||||
}
|
||||
this.checkIconId((this.starterSelectGenIconContainers[this.getGenCursorWithScroll()].getAt(this.cursor) as Phaser.GameObjects.Sprite), species, female, formIndex, shiny, variant);
|
||||
this.canCycleShiny = !!(dexEntry.caughtAttr & DexAttr.NON_SHINY && dexEntry.caughtAttr & DexAttr.SHINY);
|
||||
this.canCycleGender = !!(dexEntry.caughtAttr & DexAttr.MALE && dexEntry.caughtAttr & DexAttr.FEMALE);
|
||||
this.canCycleAbility = [ abilityAttr & AbilityAttr.ABILITY_1, (abilityAttr & AbilityAttr.ABILITY_2) && species.ability2, abilityAttr & AbilityAttr.ABILITY_HIDDEN ].filter(a => a).length > 1;
|
||||
|
@ -1580,7 +1578,7 @@ export default class StarterSelectUiHandler extends MessageUiHandler {
|
|||
this.pokemonAbilityText.setShadowColor(this.getTextColor(!isHidden ? TextStyle.SUMMARY_ALT : TextStyle.SUMMARY_GOLD, true));
|
||||
|
||||
const passiveAttr = this.scene.gameData.starterData[species.speciesId].passiveAttr;
|
||||
this.pokemonPassiveText.setText(passiveAttr & PassiveAttr.UNLOCKED ? passiveAttr & PassiveAttr.ENABLED ? allAbilities[starterPassiveAbilities[this.lastSpecies.speciesId]].name : 'Disabled' : 'Locked');
|
||||
this.pokemonPassiveText.setText(passiveAttr & PassiveAttr.UNLOCKED ? passiveAttr & PassiveAttr.ENABLED ? allAbilities[starterPassiveAbilities[this.lastSpecies.speciesId]].name : i18next.t("starterSelectUiHandler:disabled") : i18next.t("starterSelectUiHandler:locked"));
|
||||
this.pokemonPassiveText.setColor(this.getTextColor(passiveAttr === (PassiveAttr.UNLOCKED | PassiveAttr.ENABLED) ? TextStyle.SUMMARY_ALT : TextStyle.SUMMARY_GRAY));
|
||||
this.pokemonPassiveText.setShadowColor(this.getTextColor(passiveAttr === (PassiveAttr.UNLOCKED | PassiveAttr.ENABLED) ? TextStyle.SUMMARY_ALT : TextStyle.SUMMARY_GRAY, true));
|
||||
|
||||
|
@ -1827,4 +1825,12 @@ export default class StarterSelectUiHandler extends MessageUiHandler {
|
|||
if (this.statsMode)
|
||||
this.toggleStatsMode(false);
|
||||
}
|
||||
|
||||
checkIconId(icon: Phaser.GameObjects.Sprite, species: PokemonSpecies, female, formIndex, shiny, variant) {
|
||||
if (icon.frame.name != species.getIconId(female, formIndex, shiny, variant)) {
|
||||
console.log(`${species.name}'s variant icon does not exist. Replacing with default.`);
|
||||
icon.setTexture(species.getIconAtlasKey(formIndex, false, variant));
|
||||
icon.setFrame(species.getIconId(female, formIndex, false, variant));
|
||||
}
|
||||
}
|
||||
}
|
|
@ -116,13 +116,6 @@ export function randSeedEasedWeightedItem<T>(items: T[], easingFunction: string
|
|||
return items[Math.floor(easedValue * items.length)];
|
||||
}
|
||||
|
||||
export function getSunday(date: Date): Date {
|
||||
const day = date.getUTCDay();
|
||||
const diff = date.getUTCDate() - day;
|
||||
const newDate = new Date(date.setUTCDate(diff));
|
||||
return new Date(Date.UTC(newDate.getUTCFullYear(), newDate.getUTCMonth(), newDate.getUTCDate()));
|
||||
}
|
||||
|
||||
export function getFrameMs(frameCount: integer): integer {
|
||||
return Math.floor((1 / 60) * 1000 * frameCount);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue