Skip to content

Commit

Permalink
Fix Merge Conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
xsn34kzx committed Sep 2, 2024
2 parents a820eb4 + 89a1ff7 commit 4a5faa8
Show file tree
Hide file tree
Showing 28 changed files with 1,355 additions and 924 deletions.
1,200 changes: 604 additions & 596 deletions public/images/inputs/keyboard.json

Large diffs are not rendered by default.

Binary file modified public/images/inputs/keyboard.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
16 changes: 12 additions & 4 deletions src/battle-scene.ts
Original file line number Diff line number Diff line change
Expand Up @@ -841,12 +841,13 @@ export default class BattleScene extends SceneBase {
}

addEnemyPokemon(species: PokemonSpecies, level: integer, trainerSlot: TrainerSlot, boss: boolean = false, dataSource?: PokemonData, postProcess?: (enemyPokemon: EnemyPokemon) => void): EnemyPokemon {
if (Overrides.OPP_LEVEL_OVERRIDE > 0) {
level = Overrides.OPP_LEVEL_OVERRIDE;
}
if (Overrides.OPP_SPECIES_OVERRIDE) {
species = getPokemonSpecies(Overrides.OPP_SPECIES_OVERRIDE);
}

if (Overrides.OPP_LEVEL_OVERRIDE !== 0) {
level = Overrides.OPP_LEVEL_OVERRIDE;
// The fact that a Pokemon is a boss or not can change based on its Species and level
boss = this.getEncounterBossSegments(this.currentBattle.waveIndex, level, species) > 1;
}

const pokemon = new EnemyPokemon(this, species, level, trainerSlot, boss, dataSource);
Expand Down Expand Up @@ -1327,6 +1328,13 @@ export default class BattleScene extends SceneBase {
}

getEncounterBossSegments(waveIndex: integer, level: integer, species?: PokemonSpecies, forceBoss: boolean = false): integer {
if (Overrides.OPP_HEALTH_SEGMENTS_OVERRIDE > 1) {
return Overrides.OPP_HEALTH_SEGMENTS_OVERRIDE;
} else if (Overrides.OPP_HEALTH_SEGMENTS_OVERRIDE === 1) {
// The rest of the code expects to be returned 0 and not 1 if the enemy is not a boss
return 0;
}

if (this.gameMode.isDaily && this.gameMode.isWaveFinal(waveIndex)) {
return 5;
}
Expand Down
6 changes: 5 additions & 1 deletion src/data/ability.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2377,9 +2377,13 @@ export class PostSummonTransformAbAttr extends PostSummonAbAttr {
pokemon.summonData.moveset = target.getMoveset().map(m => new PokemonMove(m!.moveId, m!.ppUsed, m!.ppUp)); // TODO: are those bangs correct?
pokemon.summonData.types = target.getTypes();


pokemon.scene.playSound("battle_anims/PRSFX- Transform");

pokemon.loadAssets(false).then(() => pokemon.playAnim());
pokemon.loadAssets(false).then(() => {
pokemon.playAnim();
pokemon.updateInfo();
});

pokemon.scene.queueMessage(i18next.t("abilityTriggers:postSummonTransform", { pokemonNameWithAffix: getPokemonNameWithAffix(pokemon), targetName: target.name, }));

Expand Down
2 changes: 0 additions & 2 deletions src/data/challenge.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import { TrainerType } from "#enums/trainer-type";
import { Nature } from "./nature";
import { Moves } from "#app/enums/moves.js";
import { TypeColor, TypeShadow } from "#app/enums/color.js";
import { Gender } from "./gender";
import { pokemonEvolutions } from "./pokemon-evolutions";
import { pokemonFormChanges } from "./pokemon-forms";

Expand Down Expand Up @@ -659,7 +658,6 @@ export class FreshStartChallenge extends Challenge {
pokemon.luck = 0; // No luck
pokemon.shiny = false; // Not shiny
pokemon.variant = 0; // Not shiny
pokemon.gender = Gender.MALE; // Starters default to male
pokemon.formIndex = 0; // Froakie should be base form
pokemon.ivs = [10, 10, 10, 10, 10, 10]; // Default IVs of 10 for all stats
return true;
Expand Down
16 changes: 15 additions & 1 deletion src/data/dialogue.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { BattleSpec } from "#enums/battle-spec";
import { TrainerType } from "#enums/trainer-type";
import {trainerConfigs} from "./trainer-config";
import { trainerConfigs } from "./trainer-config";

export interface TrainerTypeMessages {
encounter?: string | string[],
Expand Down Expand Up @@ -707,6 +707,20 @@ export const trainerTypeDialogue: TrainerTypeDialogue = {
]
}
],
[TrainerType.ROOD]: [
{
encounter: [
"dialogue:rood.encounter.1",
"dialogue:rood.encounter.2",
"dialogue:rood.encounter.3",
],
victory: [
"dialogue:rood.victory.1",
"dialogue:rood.victory.2",
"dialogue:rood.victory.3",
]
}
],
[TrainerType.FLARE_GRUNT]: [
{
encounter: [
Expand Down
1 change: 1 addition & 0 deletions src/data/move.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6026,6 +6026,7 @@ export class TransformAttr extends MoveEffectAttr {

user.loadAssets(false).then(() => {
user.playAnim();
user.updateInfo();
resolve(true);
});
});
Expand Down
22 changes: 9 additions & 13 deletions src/field/pokemon.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4296,7 +4296,7 @@ export class EnemyPokemon extends Pokemon {
//console.log('damage', damage, 'segment', segmentsBypassed + 1, 'segment size', segmentSize, 'damage needed', Math.round(segmentSize * Math.pow(2, segmentsBypassed + 1)));
}

damage = hpRemainder + Math.round(segmentSize * segmentsBypassed);
damage = Utils.toDmgValue(this.hp - hpThreshold + segmentSize * segmentsBypassed);
clearedBossSegmentIndex = s - segmentsBypassed;
}
break;
Expand Down Expand Up @@ -4361,19 +4361,15 @@ export class EnemyPokemon extends Pokemon {
}
}

// Increment the amount of stages the chosen stat will be raised
let stages = 1;
switch (segmentIndex) {
case 1:
if (this.bossSegments >= 3) {
stages++;
}
break;
case 2:
if (this.bossSegments >= 5) {
stages++;
}
break;

// increase the boost if the boss has at least 3 segments and we passed last shield
if (this.bossSegments >= 3 && this.bossSegmentIndex === 1) {
stages++;
}
// increase the boost if the boss has at least 5 segments and we passed the second to last shield
if (this.bossSegments >= 5 && this.bossSegmentIndex === 2) {
stages++;
}

this.scene.unshiftPhase(new StatStageChangePhase(this.scene, this.getBattlerIndex(), true, [ boostedStat! ], stages, true, true));
Expand Down
2 changes: 1 addition & 1 deletion src/locales/de/pokemon-form-battle.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@
"eternamaxChange": "{{preName}} hat sich zu {{pokemonName}} unendynamaximiert!",
"revertChange": "{{pokemonName}} hat seine ursprüngliche Form zurückerlangt!",
"formChange": "{{preName}} hat seine Form geändert!",
"disguiseChange": "Its disguise served it as a decoy!"
"disguiseChange": "Sein Kostüm hat die Attacke absorbiert!"
}
Loading

0 comments on commit 4a5faa8

Please sign in to comment.