mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-06-29 21:12:45 +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 { MoveId } from "#enums/move-id";
|
||||
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 {
|
||||
constructor(
|
||||
|
@ -272,7 +272,7 @@ class DefaultOverrides {
|
||||
|
||||
/**
|
||||
* Set all non-scripted waves to use the selected battle type.
|
||||
*
|
||||
*
|
||||
* Ignored if set to {@linkcode BattleType.TRAINER} and `DISABLE_STANDARD_TRAINERS_OVERRIDE` is `true`.
|
||||
*/
|
||||
readonly BATTLE_TYPE_OVERRIDE: Exclude<BattleType, BattleType.CLEAR> | null = null;
|
||||
@ -285,17 +285,17 @@ export const defaultOverrides = new DefaultOverrides();
|
||||
|
||||
export default {
|
||||
...defaultOverrides,
|
||||
...overrides
|
||||
...overrides,
|
||||
} satisfies InstanceType<typeof DefaultOverrides>;
|
||||
|
||||
export type BattleStyle = "double" | "single" | "even-doubles" | "odd-doubles";
|
||||
|
||||
export type RandomTrainerOverride = {
|
||||
/** 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. */
|
||||
alwaysDouble?: boolean
|
||||
}
|
||||
alwaysDouble?: boolean;
|
||||
};
|
||||
|
||||
/** 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 { CenterOfAttentionTag } from "#app/data/battler-tags";
|
||||
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 { allMoves } from "#app/data/data-lists";
|
||||
import { MoveFlags } from "#enums/MoveFlags";
|
||||
@ -263,8 +262,7 @@ export class MovePhase extends BattlePhase {
|
||||
!!this.move
|
||||
.getMove()
|
||||
.findAttr(
|
||||
attr => attr.is("HealStatusEffectAttr")
|
||||
&& attr.selfTarget && attr.isOfEffect(StatusEffect.FREEZE),
|
||||
attr => attr.is("HealStatusEffectAttr") && attr.selfTarget && attr.isOfEffect(StatusEffect.FREEZE),
|
||||
) ||
|
||||
(!this.pokemon.randBattleSeedInt(5) && Overrides.STATUS_ACTIVATION_OVERRIDE !== true) ||
|
||||
Overrides.STATUS_ACTIVATION_OVERRIDE === false;
|
||||
@ -279,10 +277,11 @@ export class MovePhase extends BattlePhase {
|
||||
globalScene.phaseManager.queueMessage(
|
||||
getStatusEffectActivationText(this.pokemon.status.effect, getPokemonNameWithAffix(this.pokemon)),
|
||||
);
|
||||
globalScene.phaseManager.unshiftNew("CommonAnimPhase",
|
||||
this.pokemon.getBattlerIndex(),
|
||||
undefined,
|
||||
CommonAnim.POISON + (this.pokemon.status.effect - 1), // offset anim # by effect #
|
||||
globalScene.phaseManager.unshiftNew(
|
||||
"CommonAnimPhase",
|
||||
this.pokemon.getBattlerIndex(),
|
||||
undefined,
|
||||
CommonAnim.POISON + (this.pokemon.status.effect - 1), // offset anim # by effect #
|
||||
);
|
||||
} else if (healed) {
|
||||
// cure status and play effect
|
||||
@ -497,7 +496,6 @@ export class MovePhase extends BattlePhase {
|
||||
this.move,
|
||||
this.useMode,
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@ -506,7 +504,9 @@ export class MovePhase extends BattlePhase {
|
||||
public end(): void {
|
||||
globalScene.phaseManager.unshiftNew(
|
||||
"MoveEndPhase",
|
||||
this.pokemon.getBattlerIndex(), this.getActiveTargetPokemon(), isVirtual(this.useMode),
|
||||
this.pokemon.getBattlerIndex(),
|
||||
this.getActiveTargetPokemon(),
|
||||
isVirtual(this.useMode),
|
||||
);
|
||||
|
||||
super.end();
|
||||
|
@ -173,9 +173,21 @@ export class TurnStartPhase extends FieldPhase {
|
||||
}
|
||||
|
||||
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 {
|
||||
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;
|
||||
case Command.BALL:
|
||||
|
@ -32,7 +32,10 @@ const pressAction = i18next.t("settings:pressActionToAssign");
|
||||
|
||||
export const settingGamepadOptions = {
|
||||
[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_Down]: [`KEY ${Button.DOWN.toString()}`, pressAction],
|
||||
[SettingGamepad.Button_Left]: [`KEY ${Button.LEFT.toString()}`, pressAction],
|
||||
|
@ -164,7 +164,11 @@ export default class FightUiHandler extends UiHandler implements InfoToggle {
|
||||
break;
|
||||
case Button.ACTION:
|
||||
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;
|
||||
} 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 Pokemon from "#app/field/pokemon";
|
||||
import { MoveResult } from "#enums/move-result";
|
||||
|
@ -13,6 +13,7 @@ import { MoveUseMode } from "#enums/move-use-mode";
|
||||
describe("Abilities - Gorilla Tactics", () => {
|
||||
let phaserGame: Phaser.Game;
|
||||
let game: GameManager;
|
||||
|
||||
beforeAll(() => {
|
||||
phaserGame = new Phaser.Game({
|
||||
type: Phaser.HEADLESS,
|
||||
|
@ -92,7 +92,11 @@ export class MoveHelper extends GameManagerHelper {
|
||||
);
|
||||
});
|
||||
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) {
|
||||
|
Loading…
Reference in New Issue
Block a user