Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[P2 Bug] Forewarn treats self status moves as 80bp #3872

Open
Tempo-anon opened this issue Aug 28, 2024 · 1 comment
Open

[P2 Bug] Forewarn treats self status moves as 80bp #3872

Tempo-anon opened this issue Aug 28, 2024 · 1 comment
Labels
Ability Affects an ability Move Affects a move P2 Bug Minor. Non crashing Incorrect move/ability/interaction Refactor Rewriting existing code related

Comments

@Tempo-anon
Copy link
Collaborator

Describe the bug

Right now Forewarn treats StatusMoves as 1 base power correctly: https://github.com/pagefaultgames/pokerogue/blob/main/src/data/ability.ts#L2865

The issue arises because SelfStatusMoves extend Move rather than StatusMove so self status moves do not have their base power set to 1 but instead -1 which is then treated as 80 for Forewarn.

export class StatusMove extends Move {
  constructor(id: Moves, type: Type, accuracy: integer, pp: integer, chance: integer, priority: integer, generation: integer) {
    super(id, type, MoveCategory.STATUS, MoveTarget.NEAR_OTHER, -1, accuracy, pp, chance, priority, generation);
  }
}

export class SelfStatusMove extends Move {
  constructor(id: Moves, type: Type, accuracy: integer, pp: integer, chance: integer, priority: integer, generation: integer) {
    super(id, type, MoveCategory.STATUS, MoveTarget.USER, -1, accuracy, pp, chance, priority, generation);
  }
}

A bit of a refactor and as far as I can tell the only difference between SelfStatusMove and StatusMove is the MoveTarget but want to make sure that there will be no breaking changes.

Session export file

No response

User data export file

No response

Expected behavior

SelfStatusMoves should be treated as 1bp rather than -1 (80)

Screenshots / Videos

No response

What OS did you observe the bug on?

PC/Windows

If other please specify

No response

Which browser do you use?

Firefox

If other please specify

No response

Additional context

No response

@Tempo-anon Tempo-anon added (Legacy) Bug Legacy Label, don't apply to new issues/PRs Move Affects a move Ability Affects an ability Refactor Rewriting existing code related P2 Bug Minor. Non crashing Incorrect move/ability/interaction labels Aug 28, 2024
@flx-sta flx-sta removed the (Legacy) Bug Legacy Label, don't apply to new issues/PRs label Sep 5, 2024
@Snailman11
Copy link
Collaborator

Discord Bug Report (Forewarn warning about Quiver Dance)
https://discord.com/channels/1125469663833370665/1278168794472120342

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Ability Affects an ability Move Affects a move P2 Bug Minor. Non crashing Incorrect move/ability/interaction Refactor Rewriting existing code related
Projects
Status: Ready
Development

No branches or pull requests

3 participants