mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-17 22:02:18 +02:00
Merge branch 'beta' into tera-starstorm-testing
This commit is contained in:
commit
c33a59f89d
2
.github/workflows/deploy-beta.yml
vendored
2
.github/workflows/deploy-beta.yml
vendored
@ -15,7 +15,7 @@ jobs:
|
|||||||
submodules: 'recursive'
|
submodules: 'recursive'
|
||||||
- uses: actions/setup-node@v4
|
- uses: actions/setup-node@v4
|
||||||
with:
|
with:
|
||||||
node-version: "20"
|
node-version-file: '.nvmrc'
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: npm ci
|
run: npm ci
|
||||||
- name: Build
|
- name: Build
|
||||||
|
2
.github/workflows/deploy.yml
vendored
2
.github/workflows/deploy.yml
vendored
@ -18,7 +18,7 @@ jobs:
|
|||||||
submodules: 'recursive'
|
submodules: 'recursive'
|
||||||
- uses: actions/setup-node@v4
|
- uses: actions/setup-node@v4
|
||||||
with:
|
with:
|
||||||
node-version: "20"
|
node-version-file: '.nvmrc'
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: npm ci
|
run: npm ci
|
||||||
- name: Build
|
- name: Build
|
||||||
|
10
.github/workflows/github-pages.yml
vendored
10
.github/workflows/github-pages.yml
vendored
@ -24,7 +24,7 @@ jobs:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository for Typedoc
|
- name: Checkout repository for Typedoc
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
submodules: 'recursive'
|
submodules: 'recursive'
|
||||||
path: pokerogue_docs
|
path: pokerogue_docs
|
||||||
@ -34,14 +34,14 @@ jobs:
|
|||||||
sudo apt update
|
sudo apt update
|
||||||
sudo apt install -y git openssh-client
|
sudo apt install -y git openssh-client
|
||||||
|
|
||||||
- name: Setup Node 20.13.1
|
- name: Setup Node 22.14.1
|
||||||
uses: actions/setup-node@v1
|
uses: actions/setup-node@v4
|
||||||
with:
|
with:
|
||||||
node-version: 20
|
node-version: 22
|
||||||
|
|
||||||
- name: Checkout repository for Github Pages
|
- name: Checkout repository for Github Pages
|
||||||
if: github.event_name == 'push'
|
if: github.event_name == 'push'
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
path: pokerogue_gh
|
path: pokerogue_gh
|
||||||
ref: gh-pages
|
ref: gh-pages
|
||||||
|
1
.github/workflows/quality.yml
vendored
1
.github/workflows/quality.yml
vendored
@ -29,6 +29,7 @@ jobs:
|
|||||||
uses: actions/setup-node@v4 # Use the setup-node action version 4
|
uses: actions/setup-node@v4 # Use the setup-node action version 4
|
||||||
with:
|
with:
|
||||||
node-version-file: '.nvmrc'
|
node-version-file: '.nvmrc'
|
||||||
|
cache: 'npm'
|
||||||
|
|
||||||
- name: Install Node.js dependencies # Step to install Node.js dependencies
|
- name: Install Node.js dependencies # Step to install Node.js dependencies
|
||||||
run: npm ci # Use 'npm ci' to install dependencies
|
run: npm ci # Use 'npm ci' to install dependencies
|
||||||
|
5
.github/workflows/test-shard-template.yml
vendored
5
.github/workflows/test-shard-template.yml
vendored
@ -19,13 +19,14 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Check out Git repository
|
- name: Check out Git repository
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4.2.2
|
||||||
with:
|
with:
|
||||||
submodules: 'recursive'
|
submodules: 'recursive'
|
||||||
- name: Set up Node.js
|
- name: Set up Node.js
|
||||||
uses: actions/setup-node@v4
|
uses: actions/setup-node@v4
|
||||||
with:
|
with:
|
||||||
node-version: 20
|
node-version-file: '.nvmrc'
|
||||||
|
cache: 'npm'
|
||||||
- name: Install Node.js dependencies
|
- name: Install Node.js dependencies
|
||||||
run: npm ci
|
run: npm ci
|
||||||
- name: Run tests
|
- name: Run tests
|
||||||
|
@ -12,7 +12,7 @@ If you have the motivation and experience with Typescript/Javascript (or are wil
|
|||||||
|
|
||||||
#### Prerequisites
|
#### Prerequisites
|
||||||
|
|
||||||
- node: 20.13.1
|
- node: 22.14.0
|
||||||
- npm: [how to install](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm)
|
- npm: [how to install](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm)
|
||||||
|
|
||||||
#### Running Locally
|
#### Running Locally
|
||||||
|
17
package-lock.json
generated
17
package-lock.json
generated
@ -27,7 +27,7 @@
|
|||||||
"@hpcc-js/wasm": "^2.22.4",
|
"@hpcc-js/wasm": "^2.22.4",
|
||||||
"@stylistic/eslint-plugin-ts": "^4.1.0",
|
"@stylistic/eslint-plugin-ts": "^4.1.0",
|
||||||
"@types/jsdom": "^21.1.7",
|
"@types/jsdom": "^21.1.7",
|
||||||
"@types/node": "^20.12.13",
|
"@types/node": "^22.13.14",
|
||||||
"@typescript-eslint/eslint-plugin": "^8.28.0",
|
"@typescript-eslint/eslint-plugin": "^8.28.0",
|
||||||
"@typescript-eslint/parser": "^8.28.0",
|
"@typescript-eslint/parser": "^8.28.0",
|
||||||
"@vitest/coverage-istanbul": "^3.0.9",
|
"@vitest/coverage-istanbul": "^3.0.9",
|
||||||
@ -2582,12 +2582,13 @@
|
|||||||
"license": "MIT"
|
"license": "MIT"
|
||||||
},
|
},
|
||||||
"node_modules/@types/node": {
|
"node_modules/@types/node": {
|
||||||
"version": "20.14.11",
|
"version": "22.13.14",
|
||||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-20.14.11.tgz",
|
"resolved": "https://registry.npmjs.org/@types/node/-/node-22.13.14.tgz",
|
||||||
"integrity": "sha512-kprQpL8MMeszbz6ojB5/tU8PLN4kesnN8Gjzw349rDlNgsSzg90lAVj3llK99Dh7JON+t9AuscPPFW6mPbTnSA==",
|
"integrity": "sha512-Zs/Ollc1SJ8nKUAgc7ivOEdIBM8JAKgrqqUYi2J997JuKO7/tpQC+WCetQ1sypiKCQWHdvdg9wBNpUPEWZae7w==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"undici-types": "~5.26.4"
|
"undici-types": "~6.20.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@types/statuses": {
|
"node_modules/@types/statuses": {
|
||||||
@ -7312,9 +7313,9 @@
|
|||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"node_modules/undici-types": {
|
"node_modules/undici-types": {
|
||||||
"version": "5.26.5",
|
"version": "6.20.0",
|
||||||
"resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz",
|
"resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.20.0.tgz",
|
||||||
"integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==",
|
"integrity": "sha512-Ny6QZ2Nju20vw1SRHe3d9jVu6gJ+4e3+MMpqu7pqE5HT6WsTSlce++GQmK5UXS8mzV8DSYHrQH+Xrf2jVcuKNg==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "MIT"
|
"license": "MIT"
|
||||||
},
|
},
|
||||||
|
@ -33,7 +33,7 @@
|
|||||||
"@hpcc-js/wasm": "^2.22.4",
|
"@hpcc-js/wasm": "^2.22.4",
|
||||||
"@stylistic/eslint-plugin-ts": "^4.1.0",
|
"@stylistic/eslint-plugin-ts": "^4.1.0",
|
||||||
"@types/jsdom": "^21.1.7",
|
"@types/jsdom": "^21.1.7",
|
||||||
"@types/node": "^20.12.13",
|
"@types/node": "^22.13.14",
|
||||||
"@typescript-eslint/eslint-plugin": "^8.28.0",
|
"@typescript-eslint/eslint-plugin": "^8.28.0",
|
||||||
"@typescript-eslint/parser": "^8.28.0",
|
"@typescript-eslint/parser": "^8.28.0",
|
||||||
"@vitest/coverage-istanbul": "^3.0.9",
|
"@vitest/coverage-istanbul": "^3.0.9",
|
||||||
@ -67,6 +67,6 @@
|
|||||||
"phaser3-rex-plugins": "^1.80.14"
|
"phaser3-rex-plugins": "^1.80.14"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=20.0.0"
|
"node": ">=22.0.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -116,7 +116,6 @@ export class TrainerConfig {
|
|||||||
public modifierRewardFuncs: ModifierTypeFunc[] = [];
|
public modifierRewardFuncs: ModifierTypeFunc[] = [];
|
||||||
public partyTemplates: TrainerPartyTemplate[];
|
public partyTemplates: TrainerPartyTemplate[];
|
||||||
public partyTemplateFunc: PartyTemplateFunc;
|
public partyTemplateFunc: PartyTemplateFunc;
|
||||||
public eventRewardFuncs: ModifierTypeFunc[] = [];
|
|
||||||
public partyMemberFuncs: PartyMemberFuncs = {};
|
public partyMemberFuncs: PartyMemberFuncs = {};
|
||||||
public speciesPools: TrainerTierPools;
|
public speciesPools: TrainerTierPools;
|
||||||
public speciesFilter: PokemonSpeciesFilter;
|
public speciesFilter: PokemonSpeciesFilter;
|
||||||
@ -517,16 +516,6 @@ export class TrainerConfig {
|
|||||||
// return ret;
|
// return ret;
|
||||||
// }
|
// }
|
||||||
|
|
||||||
/**
|
|
||||||
* Sets eventRewardFuncs to the active event rewards for the specified wave
|
|
||||||
* @param wave Associated with {@linkcode getFixedBattleEventRewards}
|
|
||||||
* @returns this
|
|
||||||
*/
|
|
||||||
setEventModifierRewardFuncs(wave: number): TrainerConfig {
|
|
||||||
this.eventRewardFuncs = timedEventManager.getFixedBattleEventRewards(wave).map(r => modifierTypes[r]);
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
setModifierRewardFuncs(...modifierTypeFuncs: (() => ModifierTypeFunc)[]): TrainerConfig {
|
setModifierRewardFuncs(...modifierTypeFuncs: (() => ModifierTypeFunc)[]): TrainerConfig {
|
||||||
this.modifierRewardFuncs = modifierTypeFuncs.map(func => () => {
|
this.modifierRewardFuncs = modifierTypeFuncs.map(func => () => {
|
||||||
const modifierTypeFunc = func();
|
const modifierTypeFunc = func();
|
||||||
@ -1329,7 +1318,16 @@ export const trainerConfigs: TrainerConfigs = {
|
|||||||
[TrainerPoolTier.RARE]: [Species.BELLOSSOM, Species.HITMONTOP, Species.MIME_JR, Species.ORICORIO],
|
[TrainerPoolTier.RARE]: [Species.BELLOSSOM, Species.HITMONTOP, Species.MIME_JR, Species.ORICORIO],
|
||||||
[TrainerPoolTier.SUPER_RARE]: [Species.QUAXLY, Species.JANGMO_O],
|
[TrainerPoolTier.SUPER_RARE]: [Species.QUAXLY, Species.JANGMO_O],
|
||||||
}),
|
}),
|
||||||
[TrainerType.DEPOT_AGENT]: new TrainerConfig(++t).setMoneyMultiplier(1.45).setEncounterBgm(TrainerType.CLERK),
|
[TrainerType.DEPOT_AGENT]: new TrainerConfig(++t)
|
||||||
|
.setMoneyMultiplier(1.45)
|
||||||
|
.setEncounterBgm(TrainerType.CLERK)
|
||||||
|
.setPartyTemplates(
|
||||||
|
trainerPartyTemplates.TWO_AVG,
|
||||||
|
trainerPartyTemplates.THREE_WEAK,
|
||||||
|
trainerPartyTemplates.THREE_AVG,
|
||||||
|
trainerPartyTemplates.FOUR_WEAK,
|
||||||
|
)
|
||||||
|
.setSpeciesFilter(s => s.isOfType(PokemonType.GROUND)),
|
||||||
[TrainerType.DOCTOR]: new TrainerConfig(++t)
|
[TrainerType.DOCTOR]: new TrainerConfig(++t)
|
||||||
.setHasGenders("Nurse", "lass")
|
.setHasGenders("Nurse", "lass")
|
||||||
.setHasDouble("Medical Team")
|
.setHasDouble("Medical Team")
|
||||||
@ -1380,7 +1378,6 @@ export const trainerConfigs: TrainerConfigs = {
|
|||||||
Species.CHINCHOU,
|
Species.CHINCHOU,
|
||||||
Species.CORSOLA,
|
Species.CORSOLA,
|
||||||
Species.WAILMER,
|
Species.WAILMER,
|
||||||
Species.BARBOACH,
|
|
||||||
Species.CLAMPERL,
|
Species.CLAMPERL,
|
||||||
Species.LUVDISC,
|
Species.LUVDISC,
|
||||||
Species.MANTYKE,
|
Species.MANTYKE,
|
||||||
@ -3692,7 +3689,6 @@ export const trainerConfigs: TrainerConfigs = {
|
|||||||
() => modifierTypes.SUPER_EXP_CHARM,
|
() => modifierTypes.SUPER_EXP_CHARM,
|
||||||
() => modifierTypes.EXP_SHARE,
|
() => modifierTypes.EXP_SHARE,
|
||||||
)
|
)
|
||||||
.setEventModifierRewardFuncs(8)
|
|
||||||
.setPartyMemberFunc(
|
.setPartyMemberFunc(
|
||||||
0,
|
0,
|
||||||
getRandomPartyMemberFunc(
|
getRandomPartyMemberFunc(
|
||||||
@ -3760,7 +3756,6 @@ export const trainerConfigs: TrainerConfigs = {
|
|||||||
.setMixedBattleBgm("battle_rival")
|
.setMixedBattleBgm("battle_rival")
|
||||||
.setPartyTemplates(trainerPartyTemplates.RIVAL_2)
|
.setPartyTemplates(trainerPartyTemplates.RIVAL_2)
|
||||||
.setModifierRewardFuncs(() => modifierTypes.EXP_SHARE)
|
.setModifierRewardFuncs(() => modifierTypes.EXP_SHARE)
|
||||||
.setEventModifierRewardFuncs(25)
|
|
||||||
.setPartyMemberFunc(
|
.setPartyMemberFunc(
|
||||||
0,
|
0,
|
||||||
getRandomPartyMemberFunc(
|
getRandomPartyMemberFunc(
|
||||||
|
@ -26,12 +26,6 @@ export class TrainerVictoryPhase extends BattlePhase {
|
|||||||
globalScene.unshiftPhase(new ModifierRewardPhase(modifierRewardFunc));
|
globalScene.unshiftPhase(new ModifierRewardPhase(modifierRewardFunc));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (timedEventManager.isEventActive()) {
|
|
||||||
for (const rewardFunc of globalScene.currentBattle.trainer?.config.eventRewardFuncs!) {
|
|
||||||
globalScene.unshiftPhase(new ModifierRewardPhase(rewardFunc));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
const trainerType = globalScene.currentBattle.trainer?.config.trainerType!; // TODO: is this bang correct?
|
const trainerType = globalScene.currentBattle.trainer?.config.trainerType!; // TODO: is this bang correct?
|
||||||
// Validate Voucher for boss trainers
|
// Validate Voucher for boss trainers
|
||||||
if (vouchers.hasOwnProperty(TrainerType[trainerType])) {
|
if (vouchers.hasOwnProperty(TrainerType[trainerType])) {
|
||||||
|
@ -13,6 +13,7 @@ import { SelectModifierPhase } from "./select-modifier-phase";
|
|||||||
import { TrainerVictoryPhase } from "./trainer-victory-phase";
|
import { TrainerVictoryPhase } from "./trainer-victory-phase";
|
||||||
import { handleMysteryEncounterVictory } from "#app/data/mystery-encounters/utils/encounter-phase-utils";
|
import { handleMysteryEncounterVictory } from "#app/data/mystery-encounters/utils/encounter-phase-utils";
|
||||||
import { globalScene } from "#app/global-scene";
|
import { globalScene } from "#app/global-scene";
|
||||||
|
import { timedEventManager } from "#app/global-event-manager";
|
||||||
|
|
||||||
export class VictoryPhase extends PokemonPhase {
|
export class VictoryPhase extends PokemonPhase {
|
||||||
/** If true, indicates that the phase is intended for EXP purposes only, and not to continue a battle to next phase */
|
/** If true, indicates that the phase is intended for EXP purposes only, and not to continue a battle to next phase */
|
||||||
@ -53,12 +54,20 @@ export class VictoryPhase extends PokemonPhase {
|
|||||||
}
|
}
|
||||||
if (globalScene.gameMode.isEndless || !globalScene.gameMode.isWaveFinal(globalScene.currentBattle.waveIndex)) {
|
if (globalScene.gameMode.isEndless || !globalScene.gameMode.isWaveFinal(globalScene.currentBattle.waveIndex)) {
|
||||||
globalScene.pushPhase(new EggLapsePhase());
|
globalScene.pushPhase(new EggLapsePhase());
|
||||||
if (
|
if (globalScene.gameMode.isClassic) {
|
||||||
globalScene.gameMode.isClassic &&
|
switch (globalScene.currentBattle.waveIndex) {
|
||||||
globalScene.currentBattle.waveIndex === ClassicFixedBossWaves.EVIL_BOSS_2
|
case ClassicFixedBossWaves.RIVAL_1:
|
||||||
) {
|
case ClassicFixedBossWaves.RIVAL_2:
|
||||||
// Should get Lock Capsule on 165 before shop phase so it can be used in the rewards shop
|
// Get event modifiers for this wave
|
||||||
globalScene.pushPhase(new ModifierRewardPhase(modifierTypes.LOCK_CAPSULE));
|
timedEventManager
|
||||||
|
.getFixedBattleEventRewards(globalScene.currentBattle.waveIndex)
|
||||||
|
.map(r => globalScene.pushPhase(new ModifierRewardPhase(modifierTypes[r])));
|
||||||
|
break;
|
||||||
|
case ClassicFixedBossWaves.EVIL_BOSS_2:
|
||||||
|
// Should get Lock Capsule on 165 before shop phase so it can be used in the rewards shop
|
||||||
|
globalScene.pushPhase(new ModifierRewardPhase(modifierTypes.LOCK_CAPSULE));
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (globalScene.currentBattle.waveIndex % 10) {
|
if (globalScene.currentBattle.waveIndex % 10) {
|
||||||
globalScene.pushPhase(new SelectModifierPhase(undefined, undefined, this.getFixedBattleCustomModifiers()));
|
globalScene.pushPhase(new SelectModifierPhase(undefined, undefined, this.getFixedBattleCustomModifiers()));
|
||||||
|
Loading…
Reference in New Issue
Block a user