mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-12 19:32:17 +02:00
Compare commits
No commits in common. "44c0d29c1d7b070f61ed9961e556f25c8dd78ff9" and "512016faef74ab77f821d3b22863be8bcee1c520" have entirely different histories.
44c0d29c1d
...
512016faef
File diff suppressed because it is too large
Load Diff
Binary file not shown.
Before Width: | Height: | Size: 50 KiB After Width: | Height: | Size: 50 KiB |
Binary file not shown.
Before Width: | Height: | Size: 217 B |
@ -14,22 +14,13 @@ export function updateUserInfo(): Promise<[boolean, integer]> {
|
||||
if (bypassLogin) {
|
||||
loggedInUser = { username: 'Guest', lastSessionSlot: -1 };
|
||||
let lastSessionSlot = -1;
|
||||
for (let s = 0; s < 5; s++) {
|
||||
for (let s = 0; s < 2; s++) {
|
||||
if (localStorage.getItem(`sessionData${s ? s : ''}_${loggedInUser.username}`)) {
|
||||
lastSessionSlot = s;
|
||||
break;
|
||||
}
|
||||
}
|
||||
loggedInUser.lastSessionSlot = lastSessionSlot;
|
||||
// Migrate old data from before the username was appended
|
||||
[ 'data', 'sessionData', 'sessionData1', 'sessionData2', 'sessionData3', 'sessionData4' ].map(d => {
|
||||
if (localStorage.hasOwnProperty(d)) {
|
||||
if (localStorage.hasOwnProperty(`${d}_${loggedInUser.username}`))
|
||||
localStorage.setItem(`${d}_${loggedInUser.username}_bak`, localStorage.getItem(`${d}_${loggedInUser.username}`));
|
||||
localStorage.setItem(`${d}_${loggedInUser.username}`, localStorage.getItem(d));
|
||||
localStorage.removeItem(d);
|
||||
}
|
||||
});
|
||||
return resolve([ true, 200 ]);
|
||||
}
|
||||
Utils.apiFetch('account/info', true).then(response => {
|
||||
|
@ -1755,7 +1755,7 @@ export class StatusEffectImmunityAbAttr extends PreSetStatusAbAttr {
|
||||
}
|
||||
|
||||
getTriggerMessage(pokemon: Pokemon, abilityName: string, ...args: any[]): string {
|
||||
return getPokemonMessage(pokemon, `'s ${abilityName}\nprevents ${this.immuneEffects.length ? getStatusEffectDescriptor(args[0] as StatusEffect) : 'status problems'}!`);
|
||||
return getPokemonMessage(pokemon, `'s ${abilityName}\nprevents ${this.immuneEffects.length ? getStatusEffectDescriptor(this.immuneEffects[0]) : 'status problems'}!`);
|
||||
}
|
||||
}
|
||||
|
||||
@ -2825,7 +2825,7 @@ export function applyPostStatChangeAbAttrs(attrType: { new(...args: any[]): Post
|
||||
export function applyPreSetStatusAbAttrs(attrType: { new(...args: any[]): PreSetStatusAbAttr },
|
||||
pokemon: Pokemon, effect: StatusEffect, cancelled: Utils.BooleanHolder, ...args: any[]): Promise<void> {
|
||||
const simulated = args.length > 1 && args[1];
|
||||
return applyAbAttrsInternal<PreSetStatusAbAttr>(attrType, pokemon, (attr, passive) => attr.applyPreSetStatus(pokemon, passive, effect, cancelled, args), args, false, false, !simulated);
|
||||
return applyAbAttrsInternal<PreSetStatusAbAttr>(attrType, pokemon, (attr, passive) => attr.applyPreSetStatus(pokemon, passive, effect, cancelled, args), args, false, false, simulated);
|
||||
}
|
||||
|
||||
export function applyPreApplyBattlerTagAbAttrs(attrType: { new(...args: any[]): PreApplyBattlerTagAbAttr },
|
||||
@ -3456,7 +3456,7 @@ export function initAbilities() {
|
||||
.attr(MovePowerBoostAbAttr, (user, target, move) => user.scene.currentBattle.turnCommands[target.getBattlerIndex()].command === Command.POKEMON, 2),
|
||||
new Ability(Abilities.WATER_BUBBLE, 7)
|
||||
.attr(ReceivedTypeDamageMultiplierAbAttr, Type.FIRE, 0.5)
|
||||
.attr(MoveTypePowerBoostAbAttr, Type.WATER, 2)
|
||||
.attr(MoveTypePowerBoostAbAttr, Type.WATER, 1)
|
||||
.attr(StatusEffectImmunityAbAttr, StatusEffect.BURN)
|
||||
.ignorable(),
|
||||
new Ability(Abilities.STEELWORKER, 7)
|
||||
|
@ -544,33 +544,6 @@ export class AquaRingTag extends BattlerTag {
|
||||
}
|
||||
}
|
||||
|
||||
/** Tag used to allow moves that interact with {@link Moves.MINIMIZE} to function */
|
||||
export class MinimizeTag extends BattlerTag {
|
||||
constructor() {
|
||||
super(BattlerTagType.MINIMIZED, BattlerTagLapseType.TURN_END, 1, Moves.MINIMIZE, undefined);
|
||||
}
|
||||
|
||||
canAdd(pokemon: Pokemon): boolean {
|
||||
return !pokemon.isMax();
|
||||
}
|
||||
|
||||
onAdd(pokemon: Pokemon): void {
|
||||
super.onAdd(pokemon);
|
||||
}
|
||||
|
||||
lapse(pokemon: Pokemon, lapseType: BattlerTagLapseType): boolean {
|
||||
//If a pokemon dynamaxes they lose minimized status
|
||||
if(pokemon.isMax()){
|
||||
return false
|
||||
}
|
||||
return lapseType !== BattlerTagLapseType.CUSTOM || super.lapse(pokemon, lapseType);
|
||||
}
|
||||
|
||||
onRemove(pokemon: Pokemon): void {
|
||||
super.onRemove(pokemon);
|
||||
}
|
||||
}
|
||||
|
||||
export class DrowsyTag extends BattlerTag {
|
||||
constructor() {
|
||||
super(BattlerTagType.DROWSY, BattlerTagLapseType.TURN_END, 2, Moves.YAWN);
|
||||
@ -1385,8 +1358,6 @@ export function getBattlerTag(tagType: BattlerTagType, turnCount: integer, sourc
|
||||
return new TypeBoostTag(tagType, sourceMove, Type.ELECTRIC, 2, true);
|
||||
case BattlerTagType.MAGNET_RISEN:
|
||||
return new MagnetRisenTag(tagType, sourceMove);
|
||||
case BattlerTagType.MINIMIZED:
|
||||
return new MinimizeTag();
|
||||
case BattlerTagType.NONE:
|
||||
default:
|
||||
return new BattlerTag(tagType, BattlerTagLapseType.CUSTOM, turnCount, sourceMove, sourceId);
|
||||
|
@ -55,6 +55,5 @@ export enum BattlerTagType {
|
||||
CURSED = "CURSED",
|
||||
CHARGED = "CHARGED",
|
||||
GROUNDED = "GROUNDED",
|
||||
MAGNET_RISEN = "MAGNET_RISEN",
|
||||
MINIMIZED = "MINIMIZED"
|
||||
MAGNET_RISEN = "MAGNET_RISEN"
|
||||
}
|
||||
|
@ -2480,30 +2480,6 @@ export class ThunderAccuracyAttr extends VariableAccuracyAttr {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Attribute used for moves which never miss
|
||||
* against Pokemon with the {@link BattlerTagType.MINIMIZED}
|
||||
* @see {@link apply}
|
||||
* @param user N/A
|
||||
* @param target Target of the move
|
||||
* @param move N/A
|
||||
* @param args [0] Accuracy of the move to be modified
|
||||
* @returns true if the function succeeds
|
||||
*/
|
||||
export class MinimizeAccuracyAttr extends VariableAccuracyAttr{
|
||||
|
||||
apply(user: Pokemon, target: Pokemon, move: Move, args: any[]): boolean {
|
||||
if (target.getTag(BattlerTagType.MINIMIZED)){
|
||||
const accuracy = args[0] as Utils.NumberHolder
|
||||
accuracy.value = -1;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
export class ToxicAccuracyAttr extends VariableAccuracyAttr {
|
||||
apply(user: Pokemon, target: Pokemon, move: Move, args: any[]): boolean {
|
||||
if (user.isOfType(Type.POISON)) {
|
||||
@ -3259,11 +3235,8 @@ export class FaintCountdownAttr extends AddBattlerTagAttr {
|
||||
}
|
||||
}
|
||||
|
||||
/** Attribute used when a move hits a {@link BattlerTagType} for double damage */
|
||||
export class HitsTagAttr extends MoveAttr {
|
||||
/** The {@link BattlerTagType} this move hits */
|
||||
public tagType: BattlerTagType;
|
||||
/** Should this move deal double damage against {@link HitsTagAttr.tagType}? */
|
||||
public doubleDamage: boolean;
|
||||
|
||||
constructor(tagType: BattlerTagType, doubleDamage?: boolean) {
|
||||
@ -4430,8 +4403,6 @@ export function initMoves() {
|
||||
new AttackMove(Moves.SLAM, Type.NORMAL, MoveCategory.PHYSICAL, 80, 75, 20, -1, 0, 1),
|
||||
new AttackMove(Moves.VINE_WHIP, Type.GRASS, MoveCategory.PHYSICAL, 45, 100, 25, -1, 0, 1),
|
||||
new AttackMove(Moves.STOMP, Type.NORMAL, MoveCategory.PHYSICAL, 65, 100, 20, 30, 0, 1)
|
||||
.attr(MinimizeAccuracyAttr)
|
||||
.attr(HitsTagAttr, BattlerTagType.MINIMIZED, true)
|
||||
.attr(FlinchAttr),
|
||||
new AttackMove(Moves.DOUBLE_KICK, Type.FIGHTING, MoveCategory.PHYSICAL, 30, 100, 30, -1, 0, 1)
|
||||
.attr(MultiHitAttr, MultiHitType._2),
|
||||
@ -4455,8 +4426,6 @@ export function initMoves() {
|
||||
.attr(OneHitKOAccuracyAttr),
|
||||
new AttackMove(Moves.TACKLE, Type.NORMAL, MoveCategory.PHYSICAL, 40, 100, 35, -1, 0, 1),
|
||||
new AttackMove(Moves.BODY_SLAM, Type.NORMAL, MoveCategory.PHYSICAL, 85, 100, 15, 30, 0, 1)
|
||||
.attr(MinimizeAccuracyAttr)
|
||||
.attr(HitsTagAttr, BattlerTagType.MINIMIZED, true)
|
||||
.attr(StatusEffectAttr, StatusEffect.PARALYSIS),
|
||||
new AttackMove(Moves.WRAP, Type.NORMAL, MoveCategory.PHYSICAL, 15, 90, 20, 100, 0, 1)
|
||||
.attr(TrapAttr, BattlerTagType.WRAP),
|
||||
@ -4654,7 +4623,6 @@ export function initMoves() {
|
||||
new SelfStatusMove(Moves.HARDEN, Type.NORMAL, -1, 30, -1, 0, 1)
|
||||
.attr(StatChangeAttr, BattleStat.DEF, 1, true),
|
||||
new SelfStatusMove(Moves.MINIMIZE, Type.NORMAL, -1, 10, -1, 0, 1)
|
||||
.attr(AddBattlerTagAttr, BattlerTagType.MINIMIZED, true, false)
|
||||
.attr(StatChangeAttr, BattleStat.EVA, 2, true),
|
||||
new StatusMove(Moves.SMOKESCREEN, Type.NORMAL, 100, 20, -1, 0, 1)
|
||||
.attr(StatChangeAttr, BattleStat.ACC, -1),
|
||||
@ -5105,7 +5073,7 @@ export function initMoves() {
|
||||
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)
|
||||
.attr(BypassBurnDamageReductionAttr),
|
||||
.attr(BypassBurnDamageReductionAttr),
|
||||
new AttackMove(Moves.FOCUS_PUNCH, Type.FIGHTING, MoveCategory.PHYSICAL, 150, 100, 20, -1, -3, 3)
|
||||
.punchingMove()
|
||||
.ignoresVirtual()
|
||||
@ -5494,8 +5462,6 @@ export function initMoves() {
|
||||
new AttackMove(Moves.DRAGON_PULSE, Type.DRAGON, MoveCategory.SPECIAL, 85, 100, 10, -1, 0, 4)
|
||||
.pulseMove(),
|
||||
new AttackMove(Moves.DRAGON_RUSH, Type.DRAGON, MoveCategory.PHYSICAL, 100, 75, 10, 20, 0, 4)
|
||||
.attr(MinimizeAccuracyAttr)
|
||||
.attr(HitsTagAttr, BattlerTagType.MINIMIZED, true)
|
||||
.attr(FlinchAttr),
|
||||
new AttackMove(Moves.POWER_GEM, Type.ROCK, MoveCategory.SPECIAL, 80, 100, 20, -1, 0, 4),
|
||||
new AttackMove(Moves.DRAIN_PUNCH, Type.FIGHTING, MoveCategory.PHYSICAL, 75, 100, 10, -1, 0, 4)
|
||||
@ -5705,9 +5671,7 @@ export function initMoves() {
|
||||
.attr(StatChangeAttr, [ BattleStat.SPATK, BattleStat.SPDEF, BattleStat.SPD ], 1, true)
|
||||
.danceMove(),
|
||||
new AttackMove(Moves.HEAVY_SLAM, Type.STEEL, MoveCategory.PHYSICAL, -1, 100, 10, -1, 0, 5)
|
||||
.attr(MinimizeAccuracyAttr)
|
||||
.attr(CompareWeightPowerAttr)
|
||||
.attr(HitsTagAttr, BattlerTagType.MINIMIZED, true)
|
||||
.condition(failOnMaxCondition),
|
||||
new AttackMove(Moves.SYNCHRONOISE, Type.PSYCHIC, MoveCategory.SPECIAL, 120, 100, 10, -1, 0, 5)
|
||||
.target(MoveTarget.ALL_NEAR_OTHERS)
|
||||
@ -5838,9 +5802,7 @@ export function initMoves() {
|
||||
.attr(StatChangeAttr, BattleStat.DEF, -1)
|
||||
.slicingMove(),
|
||||
new AttackMove(Moves.HEAT_CRASH, Type.FIRE, MoveCategory.PHYSICAL, -1, 100, 10, -1, 0, 5)
|
||||
.attr(MinimizeAccuracyAttr)
|
||||
.attr(CompareWeightPowerAttr)
|
||||
.attr(HitsTagAttr, BattlerTagType.MINIMIZED, true)
|
||||
.condition(failOnMaxCondition),
|
||||
new AttackMove(Moves.LEAF_TORNADO, Type.GRASS, MoveCategory.SPECIAL, 65, 90, 10, 50, 0, 5)
|
||||
.attr(StatChangeAttr, BattleStat.ACC, -1),
|
||||
@ -5911,9 +5873,7 @@ export function initMoves() {
|
||||
.makesContact(false)
|
||||
.partial(),
|
||||
new AttackMove(Moves.FLYING_PRESS, Type.FIGHTING, MoveCategory.PHYSICAL, 100, 95, 10, -1, 0, 6)
|
||||
.attr(MinimizeAccuracyAttr)
|
||||
.attr(FlyingTypeMultiplierAttr)
|
||||
.attr(HitsTagAttr, BattlerTagType.MINIMIZED, true)
|
||||
.condition(failOnGravityCondition),
|
||||
new StatusMove(Moves.MAT_BLOCK, Type.FIGHTING, -1, 10, -1, 0, 6)
|
||||
.unimplemented(),
|
||||
|
@ -855,20 +855,14 @@ export const trainerConfigs: TrainerConfigs = {
|
||||
}),
|
||||
[TrainerType.RIVAL_6]: new TrainerConfig(++t).setName('Finn').setHasGenders('Ivy').setHasCharSprite().setTitle('Rival').setBoss().setStaticParty().setMoneyMultiplier(3).setEncounterBgm('final').setBattleBgm('battle_rival_3').setPartyTemplates(trainerPartyTemplates.RIVAL_6)
|
||||
.setPartyMemberFunc(0, getRandomPartyMemberFunc([ Species.VENUSAUR, Species.CHARIZARD, Species.BLASTOISE, Species.MEGANIUM, Species.TYPHLOSION, Species.FERALIGATR, Species.SCEPTILE, Species.BLAZIKEN, Species.SWAMPERT, Species.TORTERRA, Species.INFERNAPE, Species.EMPOLEON, Species.SERPERIOR, Species.EMBOAR, Species.SAMUROTT, Species.CHESNAUGHT, Species.DELPHOX, Species.GRENINJA, Species.DECIDUEYE, Species.INCINEROAR, Species.PRIMARINA, Species.RILLABOOM, Species.CINDERACE, Species.INTELEON, Species.MEOWSCARADA, Species.SKELEDIRGE, Species.QUAQUAVAL ], TrainerSlot.TRAINER, true,
|
||||
p => {
|
||||
p.setBoss(true, 3);
|
||||
p.generateAndPopulateMoveset();
|
||||
}))
|
||||
p => p.setBoss(true, 3))
|
||||
)
|
||||
.setPartyMemberFunc(1, getRandomPartyMemberFunc([ Species.PIDGEOT, Species.NOCTOWL, Species.SWELLOW, Species.STARAPTOR, Species.UNFEZANT, Species.TALONFLAME, Species.TOUCANNON, Species.CORVIKNIGHT, Species.KILOWATTREL ], TrainerSlot.TRAINER, true,
|
||||
p => {
|
||||
p.setBoss(true, 2);
|
||||
p.generateAndPopulateMoveset();
|
||||
}))
|
||||
p => p.setBoss(true, 2)))
|
||||
.setPartyMemberFunc(2, getSpeciesFilterRandomPartyMemberFunc((species: PokemonSpecies) => !pokemonEvolutions.hasOwnProperty(species.speciesId) && !pokemonPrevolutions.hasOwnProperty(species.speciesId) && species.baseTotal >= 450))
|
||||
.setSpeciesFilter(species => species.baseTotal >= 540)
|
||||
.setPartyMemberFunc(5, getRandomPartyMemberFunc([ Species.RAYQUAZA ], TrainerSlot.TRAINER, true, p => {
|
||||
p.setBoss();
|
||||
p.generateAndPopulateMoveset();
|
||||
p.pokeball = PokeballType.MASTER_BALL;
|
||||
p.shiny = true;
|
||||
p.variant = 1;
|
||||
|
@ -206,7 +206,6 @@ export class Arena {
|
||||
case Biome.TALL_GRASS:
|
||||
return Type.GRASS;
|
||||
case Biome.FOREST:
|
||||
case Biome.JUNGLE:
|
||||
return Type.BUG;
|
||||
case Biome.SLUM:
|
||||
case Biome.SWAMP:
|
||||
@ -238,10 +237,8 @@ export class Arena {
|
||||
case Biome.TEMPLE:
|
||||
return Type.GHOST;
|
||||
case Biome.DOJO:
|
||||
case Biome.CONSTRUCTION_SITE:
|
||||
return Type.FIGHTING;
|
||||
case Biome.FACTORY:
|
||||
case Biome.LABORATORY:
|
||||
return Type.STEEL;
|
||||
case Biome.RUINS:
|
||||
case Biome.SPACE:
|
||||
@ -251,8 +248,6 @@ export class Arena {
|
||||
return Type.DRAGON;
|
||||
case Biome.ABYSS:
|
||||
return Type.DARK;
|
||||
default:
|
||||
return Type.UNKNOWN;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1229,20 +1229,14 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
|
||||
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, 40]);
|
||||
movePool.push([moveId, Math.min(this.level * 0.5, 40)]);
|
||||
}
|
||||
const moveId = speciesEggMoves[this.species.getRootSpeciesId()][3];
|
||||
if (this.level >= 170 && !movePool.some(m => m[0] === moveId) && !allMoves[moveId].name.endsWith(' (N)') && !this.isBoss()) // No rare egg moves before e4
|
||||
movePool.push([moveId, 30]);
|
||||
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, 40]);
|
||||
movePool.push([moveId, Math.min(this.level * 0.5, 30)]);
|
||||
}
|
||||
const moveId = speciesEggMoves[this.fusionSpecies.getRootSpeciesId()][3];
|
||||
if (this.level >= 170 && !movePool.some(m => m[0] === moveId) && !allMoves[moveId].name.endsWith(' (N)') && !this.isBoss()) // No rare egg moves before e4
|
||||
movePool.push([moveId, 30]);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1550,12 +1544,6 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
|
||||
|
||||
applyPreAttackAbAttrs(DamageBoostAbAttr, source, this, battlerMove, damage);
|
||||
|
||||
/**
|
||||
* For each {@link HitsTagAttr} the move has, doubles the damage of the move if:
|
||||
* The target has a {@link BattlerTagType} that this move interacts with
|
||||
* AND
|
||||
* The move doubles damage when used against that tag
|
||||
* */
|
||||
move.getAttrs(HitsTagAttr).map(hta => hta as HitsTagAttr).filter(hta => hta.doubleDamage).forEach(hta => {
|
||||
if (this.getTag(hta.tagType))
|
||||
damage.value *= 2;
|
||||
|
@ -31,8 +31,6 @@ export const battle: SimpleTranslationEntries = {
|
||||
"learnMoveNotLearned": "{{pokemonName}} hat\n{{moveName}} nicht erlernt.",
|
||||
"learnMoveForgetQuestion": "Welche Attacke soll vergessen werden?",
|
||||
"learnMoveForgetSuccess": "{{pokemonName}} hat\n{{moveName}} vergessen.",
|
||||
"countdownPoof": "@d{32}Eins, @d{15}zwei @d{15}und@d{15}… @d{15}… @d{15}… @d{15}@s{pb_bounce_1}schwupp!",
|
||||
"learnMoveAnd": "Und…",
|
||||
"levelCapUp": "Das Levellimit\nhat sich zu {{levelCap}} erhöht!",
|
||||
"moveNotImplemented": "{{moveName}} ist noch nicht implementiert und kann nicht ausgewählt werden.",
|
||||
"moveNoPP": "Es sind keine AP für\ndiese Attacke mehr übrig!",
|
||||
@ -45,7 +43,7 @@ export const battle: SimpleTranslationEntries = {
|
||||
"noEscapeTrainer": "Du kannst nicht\naus einem Trainerkampf fliehen!",
|
||||
"noEscapePokemon": "{{pokemonName}}'s {{moveName}}\nverhindert {{escapeVerb}}!",
|
||||
"runAwaySuccess": "Du bist entkommen!",
|
||||
"runAwayCannotEscape": 'Flucht gescheitert!',
|
||||
"runAwayCannotEscape": 'Flucht unmöglich!',
|
||||
"escapeVerbSwitch": "auswechseln",
|
||||
"escapeVerbFlee": "flucht",
|
||||
"skipItemQuestion": "Bist du sicher, dass du kein Item nehmen willst?",
|
||||
|
@ -9,7 +9,7 @@ export const menuUiHandler: SimpleTranslationEntries = {
|
||||
"EGG_GACHA": "Eier-Gacha",
|
||||
"MANAGE_DATA": "Daten verwalten",
|
||||
"COMMUNITY": "Community",
|
||||
"SAVE_AND_QUIT": "Save and Quit",
|
||||
"RETURN_TO_TITLE": "Zurück zum Titelbildschirm",
|
||||
"LOG_OUT": "Ausloggen",
|
||||
"slot": "Slot {{slotNumber}}",
|
||||
"importSession": "Sitzung importieren",
|
||||
|
@ -7,15 +7,6 @@ import { SimpleTranslationEntries } from "#app/plugins/i18n";
|
||||
*/
|
||||
export const starterSelectUiHandler: SimpleTranslationEntries = {
|
||||
"confirmStartTeam": "Mit diesen Pokémon losziehen?",
|
||||
"gen1": "I",
|
||||
"gen2": "II",
|
||||
"gen3": "III",
|
||||
"gen4": "IV",
|
||||
"gen5": "V",
|
||||
"gen6": "VI",
|
||||
"gen7": "VII",
|
||||
"gen8": "VIII",
|
||||
"gen9": "IX",
|
||||
"growthRate": "Wachstum:",
|
||||
"ability": "Fhgkeit:",
|
||||
"passive": "Passiv:",
|
||||
@ -41,4 +32,4 @@ export const starterSelectUiHandler: SimpleTranslationEntries = {
|
||||
"locked": "Gesperrt",
|
||||
"disabled": "Deaktiviert",
|
||||
"uncaught": "Uncaught"
|
||||
}
|
||||
}
|
@ -31,8 +31,6 @@ export const battle: SimpleTranslationEntries = {
|
||||
"learnMoveNotLearned": "{{pokemonName}} did not learn the\nmove {{moveName}}.",
|
||||
"learnMoveForgetQuestion": "Which move should be forgotten?",
|
||||
"learnMoveForgetSuccess": "{{pokemonName}} forgot how to\nuse {{moveName}}.",
|
||||
"countdownPoof": "@d{32}1, @d{15}2, and@d{15}… @d{15}… @d{15}… @d{15}@s{pb_bounce_1}Poof!",
|
||||
"learnMoveAnd": "And…",
|
||||
"levelCapUp": "The level cap\nhas increased to {{levelCap}}!",
|
||||
"moveNotImplemented": "{{moveName}} is not yet implemented and cannot be selected.",
|
||||
"moveNoPP": "There's no PP left for\nthis move!",
|
||||
|
@ -9,7 +9,7 @@ export const menuUiHandler: SimpleTranslationEntries = {
|
||||
"EGG_GACHA": "Egg Gacha",
|
||||
"MANAGE_DATA": "Manage Data",
|
||||
"COMMUNITY": "Community",
|
||||
"SAVE_AND_QUIT": "Save and Quit",
|
||||
"RETURN_TO_TITLE": "Return To Title",
|
||||
"LOG_OUT": "Log Out",
|
||||
"slot": "Slot {{slotNumber}}",
|
||||
"importSession": "Import Session",
|
||||
|
@ -7,15 +7,6 @@ import { SimpleTranslationEntries } from "#app/plugins/i18n";
|
||||
*/
|
||||
export const starterSelectUiHandler: SimpleTranslationEntries = {
|
||||
"confirmStartTeam":'Begin with these Pokémon?',
|
||||
"gen1": "I",
|
||||
"gen2": "II",
|
||||
"gen3": "III",
|
||||
"gen4": "IV",
|
||||
"gen5": "V",
|
||||
"gen6": "VI",
|
||||
"gen7": "VII",
|
||||
"gen8": "VIII",
|
||||
"gen9": "IX",
|
||||
"growthRate": "Growth Rate:",
|
||||
"ability": "Ability:",
|
||||
"passive": "Passive:",
|
||||
@ -41,4 +32,4 @@ export const starterSelectUiHandler: SimpleTranslationEntries = {
|
||||
"locked": "Locked",
|
||||
"disabled": "Disabled",
|
||||
"uncaught": "Uncaught"
|
||||
}
|
||||
}
|
@ -31,8 +31,6 @@ export const battle: SimpleTranslationEntries = {
|
||||
"learnMoveNotLearned": "{{pokemonName}} no ha aprendido {{moveName}}.",
|
||||
"learnMoveForgetQuestion": "¿Qué movimiento quieres que olvide?",
|
||||
"learnMoveForgetSuccess": "{{pokemonName}} ha olvidado cómo utilizar {{moveName}}.",
|
||||
"countdownPoof": "@d{32}1, @d{15}2, @d{15}y@d{15}… @d{15}… @d{15}… @d{15}@s{pb_bounce_1}¡Puf!",
|
||||
"learnMoveAnd": "Y…",
|
||||
"levelCapUp": "¡Se ha incrementado el\nnivel máximo a {{levelCap}}!",
|
||||
"moveNotImplemented": "{{moveName}} aún no está implementado y no se puede seleccionar.",
|
||||
"moveNoPP": "There's no PP left for\nthis move!",
|
||||
|
@ -9,7 +9,7 @@ export const menuUiHandler: SimpleTranslationEntries = {
|
||||
"EGG_GACHA": "Gacha de Huevos",
|
||||
"MANAGE_DATA": "Gestionar Datos",
|
||||
"COMMUNITY": "Comunidad",
|
||||
"SAVE_AND_QUIT": "Save and Quit",
|
||||
"RETURN_TO_TITLE": "Volver al Título",
|
||||
"LOG_OUT": "Cerrar Sesión",
|
||||
"slot": "Ranura {{slotNumber}}",
|
||||
"importSession": "Importar Sesión",
|
||||
|
@ -7,15 +7,6 @@ import { SimpleTranslationEntries } from "#app/plugins/i18n";
|
||||
*/
|
||||
export const starterSelectUiHandler: SimpleTranslationEntries = {
|
||||
"confirmStartTeam":'¿Comenzar con estos Pokémon?',
|
||||
"gen1": "I",
|
||||
"gen2": "II",
|
||||
"gen3": "III",
|
||||
"gen4": "IV",
|
||||
"gen5": "V",
|
||||
"gen6": "VI",
|
||||
"gen7": "VII",
|
||||
"gen8": "VIII",
|
||||
"gen9": "IX",
|
||||
"growthRate": "Crecimiento:",
|
||||
"ability": "Habilid:",
|
||||
"passive": "Pasiva:",
|
||||
@ -41,4 +32,4 @@ export const starterSelectUiHandler: SimpleTranslationEntries = {
|
||||
"locked": "Locked",
|
||||
"disabled": "Disabled",
|
||||
"uncaught": "Uncaught"
|
||||
}
|
||||
}
|
@ -31,8 +31,6 @@ export const battle: SimpleTranslationEntries = {
|
||||
"learnMoveNotLearned": "{{pokemonName}} n’a pas appris\n{{moveName}}.",
|
||||
"learnMoveForgetQuestion": "Quelle capacité doit être oubliée ?",
|
||||
"learnMoveForgetSuccess": "{{pokemonName}} oublie comment\nutiliser {{moveName}}.",
|
||||
"countdownPoof": "@d{32}1, @d{15}2, @d{15}et@d{15}… @d{15}… @d{15}… @d{15}@s{pb_bounce_1}Tadaaa !",
|
||||
"learnMoveAnd": "Et…",
|
||||
"levelCapUp": "La limite de niveau\na été augmentée à {{levelCap}} !",
|
||||
"moveNotImplemented": "{{moveName}} n’est pas encore implémenté et ne peut pas être sélectionné.",
|
||||
"moveNoPP": "Il n’y a plus de PP pour\ncette capacité !",
|
||||
|
@ -9,7 +9,7 @@ export const menuUiHandler: SimpleTranslationEntries = {
|
||||
"EGG_GACHA": "Gacha-Œufs",
|
||||
"MANAGE_DATA": "Mes données",
|
||||
"COMMUNITY": "Communauté",
|
||||
"SAVE_AND_QUIT": "Sauver & quitter",
|
||||
"RETURN_TO_TITLE": "Écran titre",
|
||||
"LOG_OUT": "Déconnexion",
|
||||
"slot": "Emplacement {{slotNumber}}",
|
||||
"importSession": "Importer session",
|
||||
|
@ -7,15 +7,6 @@ import { SimpleTranslationEntries } from "#app/plugins/i18n";
|
||||
*/
|
||||
export const starterSelectUiHandler: SimpleTranslationEntries = {
|
||||
"confirmStartTeam":'Commencer avec ces Pokémon ?',
|
||||
"gen1": "1G",
|
||||
"gen2": "2G",
|
||||
"gen3": "3G",
|
||||
"gen4": "4G",
|
||||
"gen5": "5G",
|
||||
"gen6": "6G",
|
||||
"gen7": "7G",
|
||||
"gen8": "8G",
|
||||
"gen9": "9G",
|
||||
"growthRate": "Croissance :",
|
||||
"ability": "Talent :",
|
||||
"passive": "Passif :",
|
||||
@ -40,5 +31,5 @@ export const starterSelectUiHandler: SimpleTranslationEntries = {
|
||||
"disablePassive": "Désactiver Passif",
|
||||
"locked": "Verrouillé",
|
||||
"disabled": "Désactivé",
|
||||
"uncaught": "Non-capturé"
|
||||
"uncaught": "Uncaught"
|
||||
}
|
||||
|
@ -31,8 +31,6 @@ export const battle: SimpleTranslationEntries = {
|
||||
"learnMoveNotLearned": "{{pokemonName}} non ha imparato\n{{moveName}}.",
|
||||
"learnMoveForgetQuestion": "Quale mossa deve dimenticare?",
|
||||
"learnMoveForgetSuccess": "{{pokemonName}} ha dimenticato la mossa\n{{moveName}}.",
|
||||
"countdownPoof": "@d{32}1, @d{15}2, @d{15}e@d{15}… @d{15}… @d{15}… @d{15}@s{pb_bounce_1}Puff!",
|
||||
"learnMoveAnd": "E…",
|
||||
"levelCapUp": "Il livello massimo\nè aumentato a {{levelCap}}!",
|
||||
"moveNotImplemented": "{{moveName}} non è ancora implementata e non può essere selezionata.",
|
||||
"moveNoPP": "Non ci sono PP rimanenti\nper questa mossa!",
|
||||
|
@ -9,7 +9,7 @@ export const menuUiHandler: SimpleTranslationEntries = {
|
||||
"EGG_GACHA": "Gacha Uova",
|
||||
"MANAGE_DATA": "Gestisci Dati",
|
||||
"COMMUNITY": "Community",
|
||||
"SAVE_AND_QUIT": "Save and Quit",
|
||||
"RETURN_TO_TITLE": "Ritorna al Titolo",
|
||||
"LOG_OUT": "Disconnettiti",
|
||||
"slot": "Slot {{slotNumber}}",
|
||||
"importSession": "Importa Sessione",
|
||||
|
@ -7,15 +7,6 @@ import { SimpleTranslationEntries } from "#app/plugins/i18n";
|
||||
*/
|
||||
export const starterSelectUiHandler: SimpleTranslationEntries = {
|
||||
"confirmStartTeam":'Vuoi iniziare con questi Pokémon?',
|
||||
"gen1": "I",
|
||||
"gen2": "II",
|
||||
"gen3": "III",
|
||||
"gen4": "IV",
|
||||
"gen5": "V",
|
||||
"gen6": "VI",
|
||||
"gen7": "VII",
|
||||
"gen8": "VIII",
|
||||
"gen9": "IX",
|
||||
"growthRate": "Vel. Crescita:",
|
||||
"ability": "Abilità:",
|
||||
"passive": "Passiva:",
|
||||
@ -38,7 +29,7 @@ export const starterSelectUiHandler: SimpleTranslationEntries = {
|
||||
"cycleVariant": 'V: Alterna Variante',
|
||||
"enablePassive": "Attiva Passiva",
|
||||
"disablePassive": "Disattiva Passiva",
|
||||
"locked": "Bloccato",
|
||||
"disabled": "Disabilitato",
|
||||
"uncaught": "Non Catturato"
|
||||
"locked": "Locked",
|
||||
"disabled": "Disabled",
|
||||
"uncaught": "Uncaught"
|
||||
}
|
@ -31,8 +31,6 @@ export const battle: SimpleTranslationEntries = {
|
||||
"learnMoveNotLearned": "{{pokemonName}} não aprendeu {{moveName}}.",
|
||||
"learnMoveForgetQuestion": "Qual movimento quer esquecer?",
|
||||
"learnMoveForgetSuccess": "{{pokemonName}} esqueceu como usar {{moveName}}.",
|
||||
"countdownPoof": "@d{32}1, @d{15}2, @d{15}e@d{15}… @d{15}… @d{15}… @d{15}@s{pb_bounce_1}Puf!",
|
||||
"learnMoveAnd": "E…",
|
||||
"levelCapUp": "O nível máximo aumentou\npara {{levelCap}}!",
|
||||
"moveNotImplemented": "{{moveName}} ainda não foi implementado e não pode ser usado.",
|
||||
"moveNoPP": "Não há mais PP\npara esse movimento!",
|
||||
|
@ -9,7 +9,7 @@ export const menuUiHandler: SimpleTranslationEntries = {
|
||||
"EGG_GACHA": "Gacha de Ovos",
|
||||
"MANAGE_DATA": "Gerenciar Dados",
|
||||
"COMMUNITY": "Comunidade",
|
||||
"SAVE_AND_QUIT": "Save and Quit",
|
||||
"RETURN_TO_TITLE": "Voltar ao Início",
|
||||
"LOG_OUT": "Logout",
|
||||
"slot": "Slot {{slotNumber}}",
|
||||
"importSession": "Importar Sessão",
|
||||
|
@ -8,7 +8,7 @@ export const nature: SimpleTranslationEntries = {
|
||||
"Naughty": "Teimosa",
|
||||
"Bold": "Corajosa",
|
||||
"Docile": "Dócil",
|
||||
"Relaxed": "Relaxada",
|
||||
"Relaxed": "Descontraída",
|
||||
"Impish": "Inquieta",
|
||||
"Lax": "Relaxada",
|
||||
"Timid": "Tímida",
|
||||
@ -20,7 +20,7 @@ export const nature: SimpleTranslationEntries = {
|
||||
"Mild": "Mansa",
|
||||
"Quiet": "Quieta",
|
||||
"Bashful": "Atrapalhada",
|
||||
"Rash": "Rabugenta",
|
||||
"Rash": "Imprudente",
|
||||
"Calm": "Calma",
|
||||
"Gentle": "Gentil",
|
||||
"Sassy": "Atrevida",
|
||||
|
@ -7,19 +7,10 @@ import { SimpleTranslationEntries } from "#app/plugins/i18n";
|
||||
*/
|
||||
export const starterSelectUiHandler: SimpleTranslationEntries = {
|
||||
"confirmStartTeam": 'Começar com esses Pokémon?',
|
||||
"gen1": "I",
|
||||
"gen2": "II",
|
||||
"gen3": "III",
|
||||
"gen4": "IV",
|
||||
"gen5": "V",
|
||||
"gen6": "VI",
|
||||
"gen7": "VII",
|
||||
"gen8": "VIII",
|
||||
"gen9": "IX",
|
||||
"growthRate": "Crescimento:",
|
||||
"ability": "Habilidade:",
|
||||
"ability": "Hab.:",
|
||||
"passive": "Passiva:",
|
||||
"nature": "Natureza:",
|
||||
"nature": "Nature:",
|
||||
"eggMoves": "Mov. de Ovo",
|
||||
"start": "Iniciar",
|
||||
"addToParty": "Adicionar à equipe",
|
||||
@ -34,11 +25,11 @@ export const starterSelectUiHandler: SimpleTranslationEntries = {
|
||||
"cycleForm": 'F: Mudar Forma',
|
||||
"cycleGender": 'G: Mudar Gênero',
|
||||
"cycleAbility": 'E: Mudar Habilidade',
|
||||
"cycleNature": 'N: Mudar Natureza',
|
||||
"cycleNature": 'N: Mudar Nature',
|
||||
"cycleVariant": 'V: Mudar Variante',
|
||||
"enablePassive": "Ativar Passiva",
|
||||
"disablePassive": "Desativar Passiva",
|
||||
"locked": "Bloqueada",
|
||||
"disabled": "Desativada",
|
||||
"locked": "Bloqueado",
|
||||
"disabled": "Desativado",
|
||||
"uncaught": "Não capturado"
|
||||
}
|
||||
}
|
@ -31,8 +31,6 @@ export const battle: SimpleTranslationEntries = {
|
||||
"learnMoveNotLearned": "{{pokemonName}} 没有学会 {{moveName}}。",
|
||||
"learnMoveForgetQuestion": "要忘记哪个技能?",
|
||||
"learnMoveForgetSuccess": "{{pokemonName}} 忘记了\n如何使用 {{moveName}}。",
|
||||
"countdownPoof": "@d{32}1, @d{15}2, @d{15}和@d{15}… @d{15}… @d{15}… @d{15}@s{pb_bounce_1}噗!",
|
||||
"learnMoveAnd": "和…",
|
||||
"levelCapUp": "等级上限提升到 {{levelCap}}!",
|
||||
"moveNotImplemented": "{{moveName}} 尚未实装,无法选择。",
|
||||
"moveNoPP": "这个技能的 PP 用完了",
|
||||
|
@ -9,7 +9,7 @@ export const menuUiHandler: SimpleTranslationEntries = {
|
||||
"EGG_GACHA": "扭蛋机",
|
||||
"MANAGE_DATA": "管理数据",
|
||||
"COMMUNITY": "社区",
|
||||
"SAVE_AND_QUIT": "Save and Quit",
|
||||
"RETURN_TO_TITLE": "返回标题画面",
|
||||
"LOG_OUT": "登出",
|
||||
"slot": "存档位 {{slotNumber}}",
|
||||
"importSession": "导入存档",
|
||||
|
@ -7,15 +7,6 @@ import { SimpleTranslationEntries } from "#app/plugins/i18n";
|
||||
*/
|
||||
export const starterSelectUiHandler: SimpleTranslationEntries = {
|
||||
"confirmStartTeam":'使用这些宝可梦开始游戏吗?',
|
||||
"gen1": "I",
|
||||
"gen2": "II",
|
||||
"gen3": "III",
|
||||
"gen4": "IV",
|
||||
"gen5": "V",
|
||||
"gen6": "VI",
|
||||
"gen7": "VII",
|
||||
"gen8": "VIII",
|
||||
"gen9": "IX",
|
||||
"growthRate": "成长速度:",
|
||||
"ability": "特性:",
|
||||
"passive": "被动:",
|
||||
@ -41,4 +32,4 @@ export const starterSelectUiHandler: SimpleTranslationEntries = {
|
||||
"locked": "Locked",
|
||||
"disabled": "Disabled",
|
||||
"uncaught": "Uncaught"
|
||||
}
|
||||
}
|
@ -925,9 +925,6 @@ export const modifierTypes = {
|
||||
FOCUS_BAND: () => new PokemonHeldItemModifierType('Focus Band', 'Adds a 10% chance to survive with 1 HP after being damaged enough to faint',
|
||||
(type, args) => new Modifiers.SurviveDamageModifier(type, (args[0] as Pokemon).id)),
|
||||
|
||||
QUICK_CLAW: () => new PokemonHeldItemModifierType('Quick Claw', 'Adds a 10% chance to move first regardless of speed (after priority)',
|
||||
(type, args) => new Modifiers.BypassSpeedChanceModifier(type, (args[0] as Pokemon).id)),
|
||||
|
||||
KINGS_ROCK: () => new PokemonHeldItemModifierType('King\'s Rock', 'Adds a 10% chance an attack move will cause the opponent to flinch',
|
||||
(type, args) => new Modifiers.FlinchChanceModifier(type, (args[0] as Pokemon).id)),
|
||||
|
||||
@ -1090,7 +1087,6 @@ const modifierPool: ModifierPool = {
|
||||
new WeightedModifierType(modifierTypes.SOOTHE_BELL, 4),
|
||||
new WeightedModifierType(modifierTypes.ABILITY_CHARM, 6),
|
||||
new WeightedModifierType(modifierTypes.FOCUS_BAND, 5),
|
||||
new WeightedModifierType(modifierTypes.QUICK_CLAW, 3),
|
||||
new WeightedModifierType(modifierTypes.KINGS_ROCK, 3),
|
||||
new WeightedModifierType(modifierTypes.LOCK_CAPSULE, 3),
|
||||
new WeightedModifierType(modifierTypes.SUPER_EXP_CHARM, 10),
|
||||
@ -1142,7 +1138,6 @@ const trainerModifierPool: ModifierPool = {
|
||||
new WeightedModifierType(modifierTypes.REVIVER_SEED, 2),
|
||||
new WeightedModifierType(modifierTypes.FOCUS_BAND, 2),
|
||||
new WeightedModifierType(modifierTypes.LUCKY_EGG, 4),
|
||||
new WeightedModifierType(modifierTypes.QUICK_CLAW, 1),
|
||||
new WeightedModifierType(modifierTypes.GRIP_CLAW, 1),
|
||||
new WeightedModifierType(modifierTypes.WIDE_LENS, 1),
|
||||
].map(m => { m.setTier(ModifierTier.ROGUE); return m; }),
|
||||
@ -1203,7 +1198,6 @@ const dailyStarterModifierPool: ModifierPool = {
|
||||
new WeightedModifierType(modifierTypes.GRIP_CLAW, 5),
|
||||
new WeightedModifierType(modifierTypes.BATON, 2),
|
||||
new WeightedModifierType(modifierTypes.FOCUS_BAND, 5),
|
||||
new WeightedModifierType(modifierTypes.QUICK_CLAW, 3),
|
||||
new WeightedModifierType(modifierTypes.KINGS_ROCK, 3),
|
||||
].map(m => { m.setTier(ModifierTier.ROGUE); return m; }),
|
||||
[ModifierTier.MASTER]: [
|
||||
|
@ -731,40 +731,6 @@ export class SurviveDamageModifier extends PokemonHeldItemModifier {
|
||||
}
|
||||
}
|
||||
|
||||
export class BypassSpeedChanceModifier extends PokemonHeldItemModifier {
|
||||
constructor(type: ModifierType, pokemonId: integer, stackCount?: integer) {
|
||||
super(type, pokemonId, stackCount);
|
||||
}
|
||||
|
||||
matchType(modifier: Modifier) {
|
||||
return modifier instanceof BypassSpeedChanceModifier;
|
||||
}
|
||||
|
||||
clone() {
|
||||
return new BypassSpeedChanceModifier(this.type, this.pokemonId, this.stackCount);
|
||||
}
|
||||
|
||||
shouldApply(args: any[]): boolean {
|
||||
return super.shouldApply(args) && args.length === 2 && args[1] instanceof Utils.BooleanHolder;
|
||||
}
|
||||
|
||||
apply(args: any[]): boolean {
|
||||
const pokemon = args[0] as Pokemon;
|
||||
const bypassSpeed = args[1] as Utils.BooleanHolder;
|
||||
|
||||
if (!bypassSpeed.value && pokemon.randSeedInt(10) < this.getStackCount()) {
|
||||
bypassSpeed.value = true;
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
getMaxHeldItemCount(pokemon: Pokemon): integer {
|
||||
return 3;
|
||||
}
|
||||
}
|
||||
|
||||
export class FlinchChanceModifier extends PokemonHeldItemModifier {
|
||||
constructor(type: ModifierType, pokemonId: integer, stackCount?: integer) {
|
||||
super(type, pokemonId, stackCount);
|
||||
|
@ -6,7 +6,7 @@ import { allMoves, applyMoveAttrs, BypassSleepAttr, ChargeAttr, applyFilteredMov
|
||||
import { Mode } from './ui/ui';
|
||||
import { Command } from "./ui/command-ui-handler";
|
||||
import { Stat } from "./data/pokemon-stat";
|
||||
import { BerryModifier, ContactHeldItemTransferChanceModifier, EnemyAttackStatusEffectChanceModifier, EnemyPersistentModifier, EnemyStatusEffectHealChanceModifier, EnemyTurnHealModifier, ExpBalanceModifier, ExpBoosterModifier, ExpShareModifier, ExtraModifierModifier, FlinchChanceModifier, FusePokemonModifier, HealingBoosterModifier, HitHealModifier, LapsingPersistentModifier, MapModifier, Modifier, MultipleParticipantExpBonusModifier, PersistentModifier, PokemonExpBoosterModifier, PokemonHeldItemModifier, PokemonInstantReviveModifier, SwitchEffectTransferModifier, TempBattleStatBoosterModifier, TurnHealModifier, TurnHeldItemTransferModifier, MoneyMultiplierModifier, MoneyInterestModifier, IvScannerModifier, LapsingPokemonHeldItemModifier, PokemonMultiHitModifier, PokemonMoveAccuracyBoosterModifier, overrideModifiers, overrideHeldItems, BypassSpeedChanceModifier } from "./modifier/modifier";
|
||||
import { BerryModifier, ContactHeldItemTransferChanceModifier, EnemyAttackStatusEffectChanceModifier, EnemyPersistentModifier, EnemyStatusEffectHealChanceModifier, EnemyTurnHealModifier, ExpBalanceModifier, ExpBoosterModifier, ExpShareModifier, ExtraModifierModifier, FlinchChanceModifier, FusePokemonModifier, HealingBoosterModifier, HitHealModifier, LapsingPersistentModifier, MapModifier, Modifier, MultipleParticipantExpBonusModifier, PersistentModifier, PokemonExpBoosterModifier, PokemonHeldItemModifier, PokemonInstantReviveModifier, SwitchEffectTransferModifier, TempBattleStatBoosterModifier, TurnHealModifier, TurnHeldItemTransferModifier, MoneyMultiplierModifier, MoneyInterestModifier, IvScannerModifier, LapsingPokemonHeldItemModifier, PokemonMultiHitModifier, PokemonMoveAccuracyBoosterModifier, overrideModifiers, overrideHeldItems } from "./modifier/modifier";
|
||||
import PartyUiHandler, { PartyOption, PartyUiMode } from "./ui/party-ui-handler";
|
||||
import { doPokeballBounceAnim, getPokeballAtlasKey, getPokeballCatchMultiplier, getPokeballTintColor, PokeballType } from "./data/pokeball";
|
||||
import { CommonAnim, CommonBattleAnim, MoveAnim, initMoveAnim, loadMoveAnimAssets } from "./data/battle-anims";
|
||||
@ -1970,14 +1970,6 @@ export class TurnStartPhase extends FieldPhase {
|
||||
const field = this.scene.getField();
|
||||
const order = this.getOrder();
|
||||
|
||||
const battlerBypassSpeed = {};
|
||||
|
||||
this.scene.getField(true).filter(p => p.summonData).map(p => {
|
||||
const bypassSpeed = new Utils.BooleanHolder(false);
|
||||
this.scene.applyModifiers(BypassSpeedChanceModifier, p.isPlayer(), p, bypassSpeed);
|
||||
battlerBypassSpeed[p.getBattlerIndex()] = bypassSpeed;
|
||||
});
|
||||
|
||||
const moveOrder = order.slice(0);
|
||||
|
||||
moveOrder.sort((a, b) => {
|
||||
@ -2002,9 +1994,6 @@ export class TurnStartPhase extends FieldPhase {
|
||||
if (aPriority.value !== bPriority.value)
|
||||
return aPriority.value < bPriority.value ? 1 : -1;
|
||||
}
|
||||
|
||||
if (battlerBypassSpeed[a].value !== battlerBypassSpeed[b].value)
|
||||
return battlerBypassSpeed[a].value ? -1 : 1;
|
||||
|
||||
const aIndex = order.indexOf(a);
|
||||
const bIndex = order.indexOf(b);
|
||||
@ -3967,9 +3956,9 @@ export class LearnMovePhase extends PlayerPartyMemberPokemonPhase {
|
||||
return;
|
||||
}
|
||||
this.scene.ui.setMode(messageMode).then(() => {
|
||||
this.scene.ui.showText(i18next.t('battle:countdownPoof'), null, () => {
|
||||
this.scene.ui.showText('@d{32}1, @d{15}2, and@d{15}… @d{15}… @d{15}… @d{15}@s{pb_bounce_1}Poof!', null, () => {
|
||||
this.scene.ui.showText(i18next.t('battle:learnMoveForgetSuccess', { pokemonName: pokemon.name, moveName: pokemon.moveset[moveIndex].getName() }), null, () => {
|
||||
this.scene.ui.showText(i18next.t('battle:learnMoveAnd'), null, () => {
|
||||
this.scene.ui.showText('And…', null, () => {
|
||||
pokemon.setMove(moveIndex, Moves.NONE);
|
||||
this.scene.unshiftPhase(new LearnMovePhase(this.scene, this.partyMemberIndex, this.moveId));
|
||||
this.end();
|
||||
|
@ -355,18 +355,16 @@ export class GameData {
|
||||
|
||||
if (cachedSystemDataStr) {
|
||||
let cachedSystemData = this.parseSystemData(cachedSystemDataStr);
|
||||
console.log(cachedSystemData.timestamp, systemData.timestamp)
|
||||
if (cachedSystemData.timestamp > systemData.timestamp) {
|
||||
console.debug('Use cached system');
|
||||
systemData = cachedSystemData;
|
||||
systemDataStr = cachedSystemDataStr;
|
||||
} else
|
||||
this.clearLocalData();
|
||||
}
|
||||
|
||||
console.debug(systemData);
|
||||
|
||||
localStorage.setItem(`data_${loggedInUser.username}`, encrypt(systemDataStr, bypassLogin));
|
||||
|
||||
/*const versions = [ this.scene.game.config.gameVersion, data.gameVersion || '0.0.0' ];
|
||||
|
||||
if (versions[0] !== versions[1]) {
|
||||
@ -879,7 +877,7 @@ export class GameData {
|
||||
}) as SessionSaveData;
|
||||
}
|
||||
|
||||
saveAll(scene: BattleScene, skipVerification: boolean = false, sync: boolean = false, useCachedSession: boolean = false, useCachedSystem: boolean = false): Promise<boolean> {
|
||||
saveAll(scene: BattleScene, skipVerification: boolean = false, sync: boolean = false, useCachedSession: boolean = false): Promise<boolean> {
|
||||
return new Promise<boolean>(resolve => {
|
||||
Utils.executeIf(!skipVerification, updateUserInfo).then(success => {
|
||||
if (success !== null && !success)
|
||||
@ -889,7 +887,7 @@ export class GameData {
|
||||
const sessionData = useCachedSession ? this.parseSessionData(decrypt(localStorage.getItem(`sessionData${scene.sessionSlotId ? scene.sessionSlotId : ''}_${loggedInUser.username}`), bypassLogin)) : this.getSessionSaveData(scene);
|
||||
|
||||
const maxIntAttrValue = Math.pow(2, 31);
|
||||
const systemData = useCachedSystem ? this.parseSystemData(decrypt(localStorage.getItem(`data_${loggedInUser.username}`), bypassLogin)) : this.getSystemSaveData();
|
||||
const systemData = this.getSystemSaveData();
|
||||
|
||||
const request = {
|
||||
system: systemData,
|
||||
|
@ -20,7 +20,7 @@ export enum MenuOptions {
|
||||
EGG_GACHA,
|
||||
MANAGE_DATA,
|
||||
COMMUNITY,
|
||||
SAVE_AND_QUIT,
|
||||
RETURN_TO_TITLE,
|
||||
LOG_OUT
|
||||
}
|
||||
|
||||
@ -297,18 +297,15 @@ export default class MenuUiHandler extends MessageUiHandler {
|
||||
ui.setOverlayMode(Mode.MENU_OPTION_SELECT, this.communityConfig);
|
||||
success = true;
|
||||
break;
|
||||
case MenuOptions.SAVE_AND_QUIT:
|
||||
case MenuOptions.RETURN_TO_TITLE:
|
||||
if (this.scene.currentBattle) {
|
||||
success = true;
|
||||
if (this.scene.currentBattle.turn > 1) {
|
||||
ui.showText(i18next.t("menuUiHandler:losingProgressionWarning"), null, () => {
|
||||
ui.setOverlayMode(Mode.CONFIRM, () => this.scene.gameData.saveAll(this.scene, true, true, true, true).then(() => this.scene.reset(true)), () => {
|
||||
ui.revertMode();
|
||||
ui.showText(null, 0);
|
||||
}, false, -98);
|
||||
});
|
||||
} else
|
||||
this.scene.gameData.saveAll(this.scene, true, true, true, true).then(() => this.scene.reset(true));
|
||||
ui.showText(i18next.t("menuUiHandler:losingProgressionWarning"), null, () => {
|
||||
ui.setOverlayMode(Mode.CONFIRM, () => this.scene.reset(true), () => {
|
||||
ui.revertMode();
|
||||
ui.showText(null, 0);
|
||||
}, false, -98);
|
||||
});
|
||||
} else
|
||||
error = true;
|
||||
break;
|
||||
|
@ -86,17 +86,7 @@ function getValueReductionCandyCounts(baseValue: integer): [integer, integer] {
|
||||
}
|
||||
}
|
||||
|
||||
const gens = [
|
||||
i18next.t("starterSelectUiHandler:gen1"),
|
||||
i18next.t("starterSelectUiHandler:gen2"),
|
||||
i18next.t("starterSelectUiHandler:gen3"),
|
||||
i18next.t("starterSelectUiHandler:gen4"),
|
||||
i18next.t("starterSelectUiHandler:gen5"),
|
||||
i18next.t("starterSelectUiHandler:gen6"),
|
||||
i18next.t("starterSelectUiHandler:gen7"),
|
||||
i18next.t("starterSelectUiHandler:gen8"),
|
||||
i18next.t("starterSelectUiHandler:gen9")
|
||||
];
|
||||
const gens = [ 'I', 'II', 'III', 'IV', 'V', 'VI', 'VII', 'VIII', 'IX' ];
|
||||
|
||||
export default class StarterSelectUiHandler extends MessageUiHandler {
|
||||
private starterSelectContainer: Phaser.GameObjects.Container;
|
||||
@ -255,54 +245,30 @@ export default class StarterSelectUiHandler extends MessageUiHandler {
|
||||
this.pokemonUncaughtText.setOrigin(0, 0);
|
||||
this.starterSelectContainer.add(this.pokemonUncaughtText);
|
||||
|
||||
let starterInfoXPosition = 31; // Only text
|
||||
// The position should be set per language
|
||||
const currentLanguage = i18next.language;
|
||||
switch (currentLanguage) {
|
||||
case 'pt_BR':
|
||||
starterInfoXPosition = 32;
|
||||
break;
|
||||
default:
|
||||
starterInfoXPosition = 31;
|
||||
break
|
||||
}
|
||||
|
||||
let starterInfoTextSize = '56px'; // Labels and text
|
||||
// The font size should be set per language
|
||||
// currentLanguage is already defined
|
||||
switch (currentLanguage) {
|
||||
case 'pt_BR':
|
||||
starterInfoTextSize = '47px';
|
||||
break;
|
||||
default:
|
||||
starterInfoTextSize = '56px';
|
||||
break
|
||||
}
|
||||
|
||||
this.pokemonAbilityLabelText = addTextObject(this.scene, 6, 127, i18next.t("starterSelectUiHandler:ability"), TextStyle.SUMMARY_ALT, { fontSize: starterInfoTextSize });
|
||||
this.pokemonAbilityLabelText = addTextObject(this.scene, 6, 127, i18next.t("starterSelectUiHandler:ability"), TextStyle.SUMMARY_ALT, { fontSize: '56px' });
|
||||
this.pokemonAbilityLabelText.setOrigin(0, 0);
|
||||
this.pokemonAbilityLabelText.setVisible(false);
|
||||
this.starterSelectContainer.add(this.pokemonAbilityLabelText);
|
||||
|
||||
this.pokemonAbilityText = addTextObject(this.scene, starterInfoXPosition, 127, '', TextStyle.SUMMARY_ALT, { fontSize: starterInfoTextSize });
|
||||
this.pokemonAbilityText = addTextObject(this.scene, 31, 127, '', TextStyle.SUMMARY_ALT, { fontSize: '56px' });
|
||||
this.pokemonAbilityText.setOrigin(0, 0);
|
||||
this.starterSelectContainer.add(this.pokemonAbilityText);
|
||||
|
||||
this.pokemonPassiveLabelText = addTextObject(this.scene, 6, 136, i18next.t("starterSelectUiHandler:passive"), TextStyle.SUMMARY_ALT, { fontSize: starterInfoTextSize });
|
||||
this.pokemonPassiveLabelText = addTextObject(this.scene, 6, 136, i18next.t("starterSelectUiHandler:passive"), TextStyle.SUMMARY_ALT, { fontSize: '56px' });
|
||||
this.pokemonPassiveLabelText.setOrigin(0, 0);
|
||||
this.pokemonPassiveLabelText.setVisible(false);
|
||||
this.starterSelectContainer.add(this.pokemonPassiveLabelText);
|
||||
|
||||
this.pokemonPassiveText = addTextObject(this.scene, starterInfoXPosition, 136, '', TextStyle.SUMMARY_ALT, { fontSize: starterInfoTextSize });
|
||||
this.pokemonPassiveText = addTextObject(this.scene, 31, 136, '', TextStyle.SUMMARY_ALT, { fontSize: '56px' });
|
||||
this.pokemonPassiveText.setOrigin(0, 0);
|
||||
this.starterSelectContainer.add(this.pokemonPassiveText);
|
||||
|
||||
this.pokemonNatureLabelText = addTextObject(this.scene, 6, 145, i18next.t("starterSelectUiHandler:nature"), TextStyle.SUMMARY_ALT, { fontSize: starterInfoTextSize });
|
||||
this.pokemonNatureLabelText = addTextObject(this.scene, 6, 145, i18next.t("starterSelectUiHandler:nature"), TextStyle.SUMMARY_ALT, { fontSize: '56px' });
|
||||
this.pokemonNatureLabelText.setOrigin(0, 0);
|
||||
this.pokemonNatureLabelText.setVisible(false);
|
||||
this.starterSelectContainer.add(this.pokemonNatureLabelText);
|
||||
|
||||
this.pokemonNatureText = addBBCodeTextObject(this.scene, starterInfoXPosition, 145, '', TextStyle.SUMMARY_ALT, { fontSize: starterInfoTextSize });
|
||||
this.pokemonNatureText = addBBCodeTextObject(this.scene, 31, 145, '', TextStyle.SUMMARY_ALT, { fontSize: '56px' });
|
||||
this.pokemonNatureText.setOrigin(0, 0);
|
||||
this.starterSelectContainer.add(this.pokemonNatureText);
|
||||
|
||||
@ -590,11 +556,8 @@ export default class StarterSelectUiHandler extends MessageUiHandler {
|
||||
|
||||
let instructionTextSize = '42px';
|
||||
// The font size should be set per language
|
||||
// currentLanguage is already defined in the previous code block
|
||||
const currentLanguage = i18next.language;
|
||||
switch (currentLanguage) {
|
||||
case 'de':
|
||||
instructionTextSize = '35px';
|
||||
break;
|
||||
case 'en':
|
||||
instructionTextSize = '42px';
|
||||
break;
|
||||
@ -604,10 +567,10 @@ export default class StarterSelectUiHandler extends MessageUiHandler {
|
||||
case 'fr':
|
||||
instructionTextSize = '42px';
|
||||
break;
|
||||
case 'it':
|
||||
instructionTextSize = '38px';
|
||||
case 'de':
|
||||
instructionTextSize = '35px';
|
||||
break;
|
||||
case 'pt_BR':
|
||||
case 'it':
|
||||
instructionTextSize = '38px';
|
||||
break;
|
||||
case 'zh_CN':
|
||||
@ -1297,17 +1260,15 @@ export default class StarterSelectUiHandler extends MessageUiHandler {
|
||||
updateGenOptions(): void {
|
||||
let text = '';
|
||||
for (let g = this.genScrollCursor; g <= this.genScrollCursor + 2; g++) {
|
||||
let optionText = '';
|
||||
if (g === this.genScrollCursor && this.genScrollCursor)
|
||||
optionText = '↑';
|
||||
else if (g === this.genScrollCursor + 2 && this.genScrollCursor < gens.length - 3)
|
||||
optionText = '↓'
|
||||
else
|
||||
optionText = i18next.t(`starterSelectUiHandler:gen${g + 1}`);
|
||||
text += `${text ? '\n' : ''}${optionText}`;
|
||||
let optionText = gens[g];
|
||||
if (g === this.genScrollCursor && this.genScrollCursor)
|
||||
optionText = '↑';
|
||||
else if (g === this.genScrollCursor + 2 && this.genScrollCursor < gens.length - 3)
|
||||
optionText = '↓'
|
||||
text += `${text ? '\n' : ''}${optionText}`;
|
||||
}
|
||||
this.genOptionsText.setText(text);
|
||||
}
|
||||
}
|
||||
|
||||
setGenMode(genMode: boolean): boolean {
|
||||
this.genCursorObj.setVisible(genMode && !this.startCursorObj.visible);
|
||||
@ -1872,4 +1833,4 @@ export default class StarterSelectUiHandler extends MessageUiHandler {
|
||||
icon.setFrame(species.getIconId(female, formIndex, false, variant));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user