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

[Move] Fully Implement Uproar #699

Draft
wants to merge 9 commits into
base: beta
Choose a base branch
from
Draft

[Move] Fully Implement Uproar #699

wants to merge 9 commits into from

Conversation

innerthunder
Copy link
Contributor

@innerthunder innerthunder commented Feb 18, 2025

What are the changes the user will see?

Uproar is now fully implemented.

Why am I making these changes?

📈

What are the changes from a developer perspective?

  • Added the new battler tag UproarTag which inherits from MoveLockTag to implement Uproar's execution and sleep-preventing effects
  • Uproar has 2 new attributes:
    • An AddBattlerTagAttr to add the aforementioned uproar tag onto the user
    • A MessageHeaderAttr to play "{pokemon} is making an uproar!" at the start of the turn when the user's uproar is in effect.
  • Torment no longer interrupts any moves while the afflicted Pokemon is under the effects of a MoveLockTag. With this, Torment's edgeCase is removed.

Screenshots/Videos

WIP

How to test the changes?

npm run test uproar

Checklist

  • 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:

@PigeonBar
Copy link
Contributor

One final Frenzy check to change to MoveLockTagTypes:

// ...or if any player Pokemon has an effect that prevents the checked Pokemon from switching
if (
pokemon.getTag(BattlerTagType.FRENZY)
|| pokemon.isTrapped()
|| globalScene.getPlayerField().some((p) => p.getTag(BattlerTagType.COMMANDED))
) {
return this.end();
}

Co-Authored-By: PigeonBar <56974298+PigeonBar@users.noreply.github.com>
@PigeonBar
Copy link
Contributor

Every new battler tag needs to be added to this list:

getTagTargetBenefitScore(): number {
switch (this.tagType) {

@Tempo-anon Tempo-anon added the Move For move implementations/interactions label Feb 18, 2025
Tempo-anon
Tempo-anon previously approved these changes Feb 22, 2025
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.

The uproar never stops if the wave finishes before it expires. It will also always fail in the next wave, resulting in an infinite loop

Steps to reproduce
 STARTING_LEVEL_OVERRIDE: 50,
 MOVESET_OVERRIDE: MoveId.UPROAR,
 ENEMY_MOVESET_OVERRIDE: MoveId.SPLASH,
  • start a run
  • use uproar
  • go to the next wave

.attr(MessageHeaderAttr, (user, _move) =>
!!user.getTag(BattlerTagType.UPROAR)
? // "{pokemonNameWithAffix} is making an uproar!"
i18next.t("moveTriggers:isMakingAnUproar", { pokemonNameWithAffix: getPokemonNameWithAffix(user) })
Copy link
Contributor

Choose a reason for hiding this comment

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

this gives pokemonNameWithAffix but the text expects just pokemonName
image

@innerthunder
Copy link
Contributor Author

The uproar never stops if the wave finishes before it expires. It will also always fail in the next wave, resulting in an infinite loop

Steps to reproduce

 STARTING_LEVEL_OVERRIDE: 50,
 MOVESET_OVERRIDE: MoveId.UPROAR,
 ENEMY_MOVESET_OVERRIDE: MoveId.SPLASH,
  • start a run
  • use uproar
  • go to the next wave

This seems to be an issue with frenzy moves as well... As far as I can tell it's related to MoveLockTag trying to resolve the target of the next queued move immediately after using the move. Random target selection only considers battler indexes with active Pokemon at the time, so all moves queued afterward have an empty targets array.

I'll put this in draft and make another PR with a fix since the issue isn't exclusive to Uproar

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Move For move implementations/interactions
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants