Merge branch 'beta' into WorkingDiscardFunction
@ -40,6 +40,7 @@
|
||||
## Backgrounds
|
||||
- Squip (Paid Commissions)
|
||||
- Contributions by Someonealive-QN
|
||||
- Contributions by redactedinlight
|
||||
|
||||
## UI
|
||||
- GAMEFREAK
|
||||
|
@ -15,4 +15,6 @@ post-merge:
|
||||
post-checkout:
|
||||
commands:
|
||||
update-submodules:
|
||||
run: git submodule update --init --recursive
|
||||
# cf https://git-scm.com/docs/githooks#_post_checkout:
|
||||
# The 3rd argument is 1 for branch checkouts and 0 for file checkouts.
|
||||
run: if test {3} -eq "1"; then git submodule update --init --recursive; fi
|
BIN
public/images/arenas/plains_b_1.png
Normal file
After Width: | Height: | Size: 1.9 KiB |
BIN
public/images/arenas/plains_b_2.png
Normal file
After Width: | Height: | Size: 1.7 KiB |
BIN
public/images/arenas/plains_b_3.png
Normal file
After Width: | Height: | Size: 1.9 KiB |
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 2.4 KiB |
Before Width: | Height: | Size: 441 B After Width: | Height: | Size: 423 B |
Before Width: | Height: | Size: 2.2 KiB After Width: | Height: | Size: 419 B |
Before Width: | Height: | Size: 2.3 KiB After Width: | Height: | Size: 459 B |
Before Width: | Height: | Size: 2.8 KiB After Width: | Height: | Size: 412 B |
Before Width: | Height: | Size: 2.3 KiB After Width: | Height: | Size: 440 B |
Before Width: | Height: | Size: 2.3 KiB After Width: | Height: | Size: 440 B |
Before Width: | Height: | Size: 2.7 KiB After Width: | Height: | Size: 449 B |
Before Width: | Height: | Size: 2.4 KiB After Width: | Height: | Size: 441 B |
Before Width: | Height: | Size: 2.9 KiB After Width: | Height: | Size: 466 B |
Before Width: | Height: | Size: 441 B After Width: | Height: | Size: 431 B |
Before Width: | Height: | Size: 519 B After Width: | Height: | Size: 438 B |
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 431 B |
Before Width: | Height: | Size: 2.0 KiB After Width: | Height: | Size: 436 B |
Before Width: | Height: | Size: 441 B After Width: | Height: | Size: 423 B |
Before Width: | Height: | Size: 441 B After Width: | Height: | Size: 423 B |
Before Width: | Height: | Size: 441 B After Width: | Height: | Size: 423 B |
Before Width: | Height: | Size: 4.4 KiB After Width: | Height: | Size: 1.9 KiB |
Before Width: | Height: | Size: 6.2 KiB After Width: | Height: | Size: 2.0 KiB |
Before Width: | Height: | Size: 6.1 KiB After Width: | Height: | Size: 1.9 KiB |
Before Width: | Height: | Size: 2.6 KiB After Width: | Height: | Size: 1.9 KiB |
Before Width: | Height: | Size: 5.8 KiB After Width: | Height: | Size: 1.9 KiB |
Before Width: | Height: | Size: 6.1 KiB After Width: | Height: | Size: 2.0 KiB |
Before Width: | Height: | Size: 7.3 KiB After Width: | Height: | Size: 1.9 KiB |
Before Width: | Height: | Size: 6.2 KiB After Width: | Height: | Size: 1.9 KiB |
Before Width: | Height: | Size: 6.9 KiB After Width: | Height: | Size: 2.1 KiB |
Before Width: | Height: | Size: 4.0 KiB After Width: | Height: | Size: 2.1 KiB |
Before Width: | Height: | Size: 5.8 KiB After Width: | Height: | Size: 1.9 KiB |
Before Width: | Height: | Size: 6.4 KiB After Width: | Height: | Size: 2.0 KiB |
Before Width: | Height: | Size: 7.5 KiB After Width: | Height: | Size: 2.1 KiB |
Before Width: | Height: | Size: 6.0 KiB After Width: | Height: | Size: 2.0 KiB |
Before Width: | Height: | Size: 5.5 KiB After Width: | Height: | Size: 2.0 KiB |
Before Width: | Height: | Size: 4.4 KiB After Width: | Height: | Size: 2.0 KiB |
@ -1 +1 @@
|
||||
Subproject commit 288ffa034d07a90ea227710703eb1331b99ffed0
|
||||
Subproject commit 362b2c4fcc20b31a7be6c2dab537055fbaeb247f
|
@ -1117,7 +1117,6 @@ export class TrickRoomTag extends ArenaTag {
|
||||
globalScene.phaseManager.queueMessage(
|
||||
i18next.t("arenaTag:trickRoomOnAdd", {
|
||||
moveName: this.getMoveName(),
|
||||
opponentDesc: source.getOpponentDescriptor(),
|
||||
}),
|
||||
);
|
||||
}
|
||||
|
@ -305,10 +305,11 @@ export abstract class Move implements Localizable {
|
||||
|
||||
/**
|
||||
* Checks if the move is immune to certain types.
|
||||
*
|
||||
* Currently looks at cases of Grass types with powder moves and Dark types with moves affected by Prankster.
|
||||
* @param {Pokemon} user the source of this move
|
||||
* @param {Pokemon} target the target of this move
|
||||
* @param {PokemonType} type the type of the move's target
|
||||
* @param user - The source of this move
|
||||
* @param target - The target of this move
|
||||
* @param type - The type of the move's target
|
||||
* @returns boolean
|
||||
*/
|
||||
isTypeImmune(user: Pokemon, target: Pokemon, type: PokemonType): boolean {
|
||||
|
@ -925,6 +925,7 @@ export function getBiomeKey(biome: BiomeId): string {
|
||||
|
||||
export function getBiomeHasProps(biomeType: BiomeId): boolean {
|
||||
switch (biomeType) {
|
||||
case BiomeId.PLAINS:
|
||||
case BiomeId.METROPOLIS:
|
||||
case BiomeId.BEACH:
|
||||
case BiomeId.LAKE:
|
||||
|
@ -3382,10 +3382,6 @@ export abstract class Pokemon extends Phaser.GameObjects.Container {
|
||||
}
|
||||
|
||||
getOpponentDescriptor(): string {
|
||||
const opponents = this.getOpponents();
|
||||
if (opponents.length === 1) {
|
||||
return opponents[0].name;
|
||||
}
|
||||
return this.isPlayer() ? i18next.t("arenaTag:opposingTeam") : i18next.t("arenaTag:yourTeam");
|
||||
}
|
||||
|
||||
|
@ -1,3 +1,6 @@
|
||||
import "#app/polyfills";
|
||||
// All polyfills MUST be loaded first for side effects
|
||||
|
||||
import { InvertPostFX } from "#app/pipelines/invert";
|
||||
import { initI18n } from "#app/plugins/i18n";
|
||||
import { version } from "#package.json";
|
||||
|
21
src/polyfills.ts
Normal file
@ -0,0 +1,21 @@
|
||||
/*
|
||||
Manual rolling of polyfills desired by the project.
|
||||
|
||||
IMPORTANT: When adding / removing polyfills, ensure that typescript becomes
|
||||
aware of their existence, either by creating `src/typings/polyfills.d.ts`
|
||||
and defining them there, or or by adding the appropriate field polyfill to the
|
||||
`lib` property in `tsconfig.json`.
|
||||
*/
|
||||
|
||||
if (typeof Promise.withResolvers === "undefined") {
|
||||
Promise.withResolvers = <T>() => {
|
||||
// Bangs are OK here; they are guaranteed to be defined when the promise is invoked.
|
||||
let resolve!: (value: T | PromiseLike<T>) => void;
|
||||
let reject!: (reason?: unknown) => void;
|
||||
const promise = new Promise<T>((res, rej) => {
|
||||
resolve = res;
|
||||
reject = rej;
|
||||
});
|
||||
return { promise, resolve, reject };
|
||||
};
|
||||
}
|
@ -322,7 +322,6 @@ export class FightUiHandler extends UiHandler implements InfoToggle {
|
||||
|
||||
/**
|
||||
* Gets multiplier text for a pokemon's move against a specific opponent
|
||||
* Returns undefined if it's a status move
|
||||
*/
|
||||
private getEffectivenessText(pokemon: Pokemon, opponent: Pokemon, pokemonMove: PokemonMove): string | undefined {
|
||||
const effectiveness = opponent.getMoveEffectiveness(
|
||||
@ -333,8 +332,11 @@ export class FightUiHandler extends UiHandler implements InfoToggle {
|
||||
undefined,
|
||||
true,
|
||||
);
|
||||
if (effectiveness === undefined) {
|
||||
return undefined;
|
||||
if (pokemonMove.getMove().category === MoveCategory.STATUS) {
|
||||
if (effectiveness === 0) {
|
||||
return "0x";
|
||||
}
|
||||
return "1x";
|
||||
}
|
||||
|
||||
return `${effectiveness}x`;
|
||||
@ -391,7 +393,12 @@ export class FightUiHandler extends UiHandler implements InfoToggle {
|
||||
),
|
||||
)
|
||||
.sort((a, b) => b - a)
|
||||
.map(effectiveness => getTypeDamageMultiplierColor(effectiveness ?? 0, "offense"));
|
||||
.map(effectiveness => {
|
||||
if (pokemonMove.getMove().category === MoveCategory.STATUS && effectiveness !== 0) {
|
||||
return undefined;
|
||||
}
|
||||
return getTypeDamageMultiplierColor(effectiveness ?? 0, "offense");
|
||||
});
|
||||
|
||||
return moveColors[0];
|
||||
}
|
||||
|
@ -1420,17 +1420,18 @@ export class PartyUiHandler extends MessageUiHandler {
|
||||
const allowBatonModifierSwitch = this.allowBatonModifierSwitch();
|
||||
const isBatonPassMove = this.isBatonPassMove();
|
||||
|
||||
if (allowBatonModifierSwitch && !isBatonPassMove) {
|
||||
// the BATON modifier gives an extra switch option for
|
||||
// pokemon-command switches, allowing buffs to be optionally passed
|
||||
this.options.push(PartyOption.PASS_BATON);
|
||||
}
|
||||
|
||||
// isBatonPassMove and allowBatonModifierSwitch shouldn't ever be true
|
||||
// at the same time, because they both explicitly check for a mutually
|
||||
// exclusive partyUiMode. But better safe than sorry.
|
||||
this.options.push(
|
||||
isBatonPassMove && !allowBatonModifierSwitch ? PartyOption.PASS_BATON : PartyOption.SEND_OUT,
|
||||
);
|
||||
if (allowBatonModifierSwitch && !isBatonPassMove) {
|
||||
// the BATON modifier gives an extra switch option for
|
||||
// pokemon-command switches, allowing buffs to be optionally passed
|
||||
this.options.push(PartyOption.PASS_BATON);
|
||||
}
|
||||
}
|
||||
this.addCommonOptions(pokemon);
|
||||
if (this.partyUiMode === PartyUiMode.SWITCH) {
|
||||
@ -1470,13 +1471,13 @@ export class PartyUiHandler extends MessageUiHandler {
|
||||
this.addCommonOptions(pokemon);
|
||||
break;
|
||||
case PartyUiMode.CHECK:
|
||||
this.addCommonOptions(pokemon);
|
||||
if (globalScene.phaseManager.getCurrentPhase()?.is("SelectModifierPhase")) {
|
||||
const formChangeItemModifiers = this.getFormChangeItemsModifiers(pokemon);
|
||||
for (let i = 0; i < formChangeItemModifiers.length; i++) {
|
||||
this.options.push(PartyOption.FORM_CHANGE_ITEM + i);
|
||||
}
|
||||
}
|
||||
this.addCommonOptions(pokemon);
|
||||
break;
|
||||
case PartyUiMode.SELECT:
|
||||
this.options.push(PartyOption.SELECT);
|
||||
|
@ -2,6 +2,17 @@
|
||||
"compilerOptions": {
|
||||
"target": "ES2020",
|
||||
"module": "ES2020",
|
||||
// Modifying this option requires all values to be set manually because the defaults get overridden
|
||||
// Values other than "ES2024.Promise" taken from https://github.com/microsoft/TypeScript/blob/main/src/lib/es2020.full.d.ts
|
||||
"lib": [
|
||||
"ES2020",
|
||||
"ES2024.Promise",
|
||||
"DOM",
|
||||
"DOM.AsyncIterable",
|
||||
"DOM.Iterable",
|
||||
"ScriptHost",
|
||||
"WebWorker.ImportScripts"
|
||||
],
|
||||
"moduleResolution": "bundler",
|
||||
"resolveJsonModule": true,
|
||||
"esModuleInterop": true,
|
||||
|