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

[P1] Make getAlly() check for player legal Pokemon #858

Merged
merged 13 commits into from
Mar 23, 2025
Merged

[P1] Make getAlly() check for player legal Pokemon #858

merged 13 commits into from
Mar 23, 2025

Conversation

Tempo-anon
Copy link
Contributor

@Tempo-anon Tempo-anon commented Mar 19, 2025

What are the changes the user will see?

Fusion flare/bolt will no longer crash the game if the user's ally is not allowed in battle

Why am I making these changes?

Fixes #840

What are the changes from a developer perspective?

Created a new PlayerPokemon.getAlly() function that overrides Pokemon.getAlly() and updated usages of it across the code base

Screenshots/Videos

image

How to test the changes?

Mono fighting challenge with mankey + type:null

BATTLE_TYPE_OVERRIDE: "double",
MOVESET_OVERRIDE: [MoveId.FUSION_FLARE, MoveId.FUSION_BOLT],

Checklist

  • ⚠️ If this is a PR for main (such as a hotfix), has the game version been updated (npm run update-version:patch / npm run update version:minor?
  • Otherwise: I'm using beta as my base branch
  • There is no overlap with another PR?
  • The PR is self-contained and cannot be split into smaller PRs?
  • Have I provided a clear explanation of the changes?
  • Have I tested the changes manually?
  • Are all unit tests still passing? (npm run test:silent)
    • Have I created new automated tests (npm run test:create) or updated existing tests related to the PR's changes?
  • Have I provided screenshots/videos of the changes (if applicable)?
    • Have I made sure that any UI change works for both UI themes (dark and light)?

Are there any localization additions or changes? If so:

  • Has a locales PR been created on the locales repo?
    • If so, please leave a link to it here:
  • Have I added the Localization tag to this PR?

If there are no locale changes:

  • Have I made sure not to commit any changes to the locale repo on this branch?

@Tempo-anon Tempo-anon added Move For move implementations/interactions P1 Bug Major bug. Used for when a specific move/ability/interaction causes the game to softlock or crash. labels Mar 19, 2025
Copy link
Contributor

@flx-sta flx-sta left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using Mono-Type: Fight Challenge with only Mankey in my team stil seems to break it


Details

Fusion Bolt

fusion-bolt.mov

Fusion Flare

fusion-flare.mov

Console Error

fusion-flare-bolt-error

@Tempo-anon Tempo-anon changed the title [P1] Fix fusion flare/bolt crashing with illegal ally [P1] Make getAlly() check for player legal Mar 19, 2025
@Tempo-anon Tempo-anon changed the title [P1] Make getAlly() check for player legal [P1] Make getAlly() check for player legal Pokemon Mar 19, 2025
Copy link
Contributor

@DayKev DayKev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Tempo-anon Tempo-anon requested a review from flx-sta March 20, 2025 08:04
Copy link
Contributor

@MokaStitcher MokaStitcher left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

few nits, not playtested yet

DayKev
DayKev previously approved these changes Mar 21, 2025
Copy link
Contributor

@torranx torranx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

few questions, otherwise lgtm

@DayKev DayKev merged commit edc0512 into beta Mar 23, 2025
8 checks passed
@DayKev DayKev deleted the i840 branch March 23, 2025 22:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Move For move implementations/interactions P1 Bug Major bug. Used for when a specific move/ability/interaction causes the game to softlock or crash.
Projects
None yet
6 participants