mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-06-30 13:33:01 +02:00
Fixed formatting and suttff
This commit is contained in:
parent
f157c405f0
commit
1ee87c4218
@ -28,7 +28,7 @@ import { ArenaTagType } from "#enums/arena-tag-type";
|
|||||||
import { BattlerTagType } from "#enums/battler-tag-type";
|
import { BattlerTagType } from "#enums/battler-tag-type";
|
||||||
import { MoveId } from "#enums/move-id";
|
import { MoveId } from "#enums/move-id";
|
||||||
import { ArenaTagSide } from "#enums/arena-tag-side";
|
import { ArenaTagSide } from "#enums/arena-tag-side";
|
||||||
import { MoveUseMode } from "#enums/move-use-mode"
|
import { MoveUseMode } from "#enums/move-use-mode";
|
||||||
|
|
||||||
export abstract class ArenaTag {
|
export abstract class ArenaTag {
|
||||||
constructor(
|
constructor(
|
||||||
|
@ -285,17 +285,17 @@ export const defaultOverrides = new DefaultOverrides();
|
|||||||
|
|
||||||
export default {
|
export default {
|
||||||
...defaultOverrides,
|
...defaultOverrides,
|
||||||
...overrides
|
...overrides,
|
||||||
} satisfies InstanceType<typeof DefaultOverrides>;
|
} satisfies InstanceType<typeof DefaultOverrides>;
|
||||||
|
|
||||||
export type BattleStyle = "double" | "single" | "even-doubles" | "odd-doubles";
|
export type BattleStyle = "double" | "single" | "even-doubles" | "odd-doubles";
|
||||||
|
|
||||||
export type RandomTrainerOverride = {
|
export type RandomTrainerOverride = {
|
||||||
/** The Type of trainer to force */
|
/** The Type of trainer to force */
|
||||||
trainerType: Exclude<TrainerType, TrainerType.UNKNOWN>,
|
trainerType: Exclude<TrainerType, TrainerType.UNKNOWN>;
|
||||||
/* If the selected trainer type has a double version, it will always use its double version. */
|
/* If the selected trainer type has a double version, it will always use its double version. */
|
||||||
alwaysDouble?: boolean
|
alwaysDouble?: boolean;
|
||||||
}
|
};
|
||||||
|
|
||||||
/** The type of the {@linkcode DefaultOverrides} class */
|
/** The type of the {@linkcode DefaultOverrides} class */
|
||||||
export type OverridesType = typeof DefaultOverrides;
|
export type OverridesType = typeof DefaultOverrides;
|
@ -15,7 +15,6 @@ import type { DelayedAttackTag } from "#app/data/arena-tag";
|
|||||||
import { CommonAnim } from "#enums/move-anims-common";
|
import { CommonAnim } from "#enums/move-anims-common";
|
||||||
import { CenterOfAttentionTag } from "#app/data/battler-tags";
|
import { CenterOfAttentionTag } from "#app/data/battler-tags";
|
||||||
import { BattlerTagLapseType } from "#enums/battler-tag-lapse-type";
|
import { BattlerTagLapseType } from "#enums/battler-tag-lapse-type";
|
||||||
import type { HealStatusEffectAttr } from "#app/data/moves/move";
|
|
||||||
import { applyMoveAttrs } from "#app/data/moves/apply-attrs";
|
import { applyMoveAttrs } from "#app/data/moves/apply-attrs";
|
||||||
import { allMoves } from "#app/data/data-lists";
|
import { allMoves } from "#app/data/data-lists";
|
||||||
import { MoveFlags } from "#enums/MoveFlags";
|
import { MoveFlags } from "#enums/MoveFlags";
|
||||||
@ -263,8 +262,7 @@ export class MovePhase extends BattlePhase {
|
|||||||
!!this.move
|
!!this.move
|
||||||
.getMove()
|
.getMove()
|
||||||
.findAttr(
|
.findAttr(
|
||||||
attr => attr.is("HealStatusEffectAttr")
|
attr => attr.is("HealStatusEffectAttr") && attr.selfTarget && attr.isOfEffect(StatusEffect.FREEZE),
|
||||||
&& attr.selfTarget && attr.isOfEffect(StatusEffect.FREEZE),
|
|
||||||
) ||
|
) ||
|
||||||
(!this.pokemon.randBattleSeedInt(5) && Overrides.STATUS_ACTIVATION_OVERRIDE !== true) ||
|
(!this.pokemon.randBattleSeedInt(5) && Overrides.STATUS_ACTIVATION_OVERRIDE !== true) ||
|
||||||
Overrides.STATUS_ACTIVATION_OVERRIDE === false;
|
Overrides.STATUS_ACTIVATION_OVERRIDE === false;
|
||||||
@ -279,7 +277,8 @@ export class MovePhase extends BattlePhase {
|
|||||||
globalScene.phaseManager.queueMessage(
|
globalScene.phaseManager.queueMessage(
|
||||||
getStatusEffectActivationText(this.pokemon.status.effect, getPokemonNameWithAffix(this.pokemon)),
|
getStatusEffectActivationText(this.pokemon.status.effect, getPokemonNameWithAffix(this.pokemon)),
|
||||||
);
|
);
|
||||||
globalScene.phaseManager.unshiftNew("CommonAnimPhase",
|
globalScene.phaseManager.unshiftNew(
|
||||||
|
"CommonAnimPhase",
|
||||||
this.pokemon.getBattlerIndex(),
|
this.pokemon.getBattlerIndex(),
|
||||||
undefined,
|
undefined,
|
||||||
CommonAnim.POISON + (this.pokemon.status.effect - 1), // offset anim # by effect #
|
CommonAnim.POISON + (this.pokemon.status.effect - 1), // offset anim # by effect #
|
||||||
@ -497,7 +496,6 @@ export class MovePhase extends BattlePhase {
|
|||||||
this.move,
|
this.move,
|
||||||
this.useMode,
|
this.useMode,
|
||||||
);
|
);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -506,7 +504,9 @@ export class MovePhase extends BattlePhase {
|
|||||||
public end(): void {
|
public end(): void {
|
||||||
globalScene.phaseManager.unshiftNew(
|
globalScene.phaseManager.unshiftNew(
|
||||||
"MoveEndPhase",
|
"MoveEndPhase",
|
||||||
this.pokemon.getBattlerIndex(), this.getActiveTargetPokemon(), isVirtual(this.useMode),
|
this.pokemon.getBattlerIndex(),
|
||||||
|
this.getActiveTargetPokemon(),
|
||||||
|
isVirtual(this.useMode),
|
||||||
);
|
);
|
||||||
|
|
||||||
super.end();
|
super.end();
|
||||||
|
@ -173,9 +173,21 @@ export class TurnStartPhase extends FieldPhase {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (pokemon.isPlayer() && turnCommand.cursor === -1) {
|
if (pokemon.isPlayer() && turnCommand.cursor === -1) {
|
||||||
phaseManager.pushNew("MovePhase", pokemon, turnCommand.targets || turnCommand.move!.targets, move, turnCommand.move!.useMode); //TODO: is the bang correct here?
|
phaseManager.pushNew(
|
||||||
|
"MovePhase",
|
||||||
|
pokemon,
|
||||||
|
turnCommand.targets || turnCommand.move!.targets,
|
||||||
|
move,
|
||||||
|
turnCommand.move!.useMode,
|
||||||
|
); //TODO: is the bang correct here?
|
||||||
} else {
|
} else {
|
||||||
phaseManager.pushNew("MovePhase", pokemon, turnCommand.targets || turnCommand.move!.targets, move, queuedMove.useMode); // TODO: is the bang correct here?
|
phaseManager.pushNew(
|
||||||
|
"MovePhase",
|
||||||
|
pokemon,
|
||||||
|
turnCommand.targets || turnCommand.move!.targets,
|
||||||
|
move,
|
||||||
|
queuedMove.useMode,
|
||||||
|
); // TODO: is the bang correct here?
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case Command.BALL:
|
case Command.BALL:
|
||||||
|
@ -32,7 +32,10 @@ const pressAction = i18next.t("settings:pressActionToAssign");
|
|||||||
|
|
||||||
export const settingGamepadOptions = {
|
export const settingGamepadOptions = {
|
||||||
[SettingGamepad.Controller]: [i18next.t("settings:controllerDefault"), i18next.t("settings:controllerChange")],
|
[SettingGamepad.Controller]: [i18next.t("settings:controllerDefault"), i18next.t("settings:controllerChange")],
|
||||||
[SettingGamepad.Gamepad_Support]: [i18next.t("settings:gamepadSupportAuto"), i18next.t("settings:gamepadSupportDisabled")],
|
[SettingGamepad.Gamepad_Support]: [
|
||||||
|
i18next.t("settings:gamepadSupportAuto"),
|
||||||
|
i18next.t("settings:gamepadSupportDisabled"),
|
||||||
|
],
|
||||||
[SettingGamepad.Button_Up]: [`KEY ${Button.UP.toString()}`, pressAction],
|
[SettingGamepad.Button_Up]: [`KEY ${Button.UP.toString()}`, pressAction],
|
||||||
[SettingGamepad.Button_Down]: [`KEY ${Button.DOWN.toString()}`, pressAction],
|
[SettingGamepad.Button_Down]: [`KEY ${Button.DOWN.toString()}`, pressAction],
|
||||||
[SettingGamepad.Button_Left]: [`KEY ${Button.LEFT.toString()}`, pressAction],
|
[SettingGamepad.Button_Left]: [`KEY ${Button.LEFT.toString()}`, pressAction],
|
||||||
|
@ -164,7 +164,11 @@ export default class FightUiHandler extends UiHandler implements InfoToggle {
|
|||||||
break;
|
break;
|
||||||
case Button.ACTION:
|
case Button.ACTION:
|
||||||
if (
|
if (
|
||||||
(globalScene.phaseManager.getCurrentPhase() as CommandPhase).handleCommand(this.fromCommand, cursor, MoveUseMode.NORMAL)
|
(globalScene.phaseManager.getCurrentPhase() as CommandPhase).handleCommand(
|
||||||
|
this.fromCommand,
|
||||||
|
cursor,
|
||||||
|
MoveUseMode.NORMAL,
|
||||||
|
)
|
||||||
) {
|
) {
|
||||||
success = true;
|
success = true;
|
||||||
} else {
|
} else {
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import type { PlayerPokemon , TurnMove} from "#app/field/pokemon";
|
import type { PlayerPokemon, TurnMove } from "#app/field/pokemon";
|
||||||
import type { PokemonMove } from "#app/data/moves/pokemon-move";
|
import type { PokemonMove } from "#app/data/moves/pokemon-move";
|
||||||
import type Pokemon from "#app/field/pokemon";
|
import type Pokemon from "#app/field/pokemon";
|
||||||
import { MoveResult } from "#enums/move-result";
|
import { MoveResult } from "#enums/move-result";
|
||||||
|
@ -13,6 +13,7 @@ import { MoveUseMode } from "#enums/move-use-mode";
|
|||||||
describe("Abilities - Gorilla Tactics", () => {
|
describe("Abilities - Gorilla Tactics", () => {
|
||||||
let phaserGame: Phaser.Game;
|
let phaserGame: Phaser.Game;
|
||||||
let game: GameManager;
|
let game: GameManager;
|
||||||
|
|
||||||
beforeAll(() => {
|
beforeAll(() => {
|
||||||
phaserGame = new Phaser.Game({
|
phaserGame = new Phaser.Game({
|
||||||
type: Phaser.HEADLESS,
|
type: Phaser.HEADLESS,
|
||||||
|
@ -92,7 +92,11 @@ export class MoveHelper extends GameManagerHelper {
|
|||||||
);
|
);
|
||||||
});
|
});
|
||||||
this.game.onNextPrompt("CommandPhase", UiMode.FIGHT, () => {
|
this.game.onNextPrompt("CommandPhase", UiMode.FIGHT, () => {
|
||||||
(this.game.scene.phaseManager.getCurrentPhase() as CommandPhase).handleCommand(Command.TERA, movePosition, MoveUseMode.NORMAL);
|
(this.game.scene.phaseManager.getCurrentPhase() as CommandPhase).handleCommand(
|
||||||
|
Command.TERA,
|
||||||
|
movePosition,
|
||||||
|
MoveUseMode.NORMAL,
|
||||||
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
if (targetIndex !== null) {
|
if (targetIndex !== null) {
|
||||||
|
Loading…
Reference in New Issue
Block a user