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

[Bug] Game freezes after attack lowering stats (e.g Bulldoze) when Mist has been used before #4737

Open
herbyliciouss opened this issue Oct 27, 2024 · 2 comments · Fixed by #4746
Labels
Move Affects a move P1 Bug Major. Game crashing move/ability/interaction

Comments

@herbyliciouss
Copy link

Describe the bug

Game freezed multiple times every time my Pokemons where being hit by a lowering stat attack after having Volcanion using Mist. It freezes after the attack dealt its normal damage and before the lowering stat message appears

Reproduction

In my scenario here's what happened:

  1. Have Volcanion use Mist to prevent stats being lowered
  2. Volcanion dies the turn after
  3. Sent Mega Gyarados to then take a Bulldoze
  4. Games freezes on message saying Foe Wailord uses Bulldoze

Expected behavior

Game should not freeze and stat should not be lowered.
Maybe skip the lowering stat message or have a message saying something like Mist protects [your pokemon name] from having its stat lowered

Screenshots / Videos

No response

Session export file

sessionData_jaugeobese.txt

User data export file

data_jaugeobese.txt

Additional context

No response

@herbyliciouss herbyliciouss added the Triage The issue needs triage label Oct 27, 2024
@Snailman11
Copy link
Collaborator

Snailman11 commented Oct 28, 2024

ah

Mist

Growl

Growl.mp4

Icy Wind

Mist.mp4

Occurs whenever Mist would block a stat drop

@Snailman11 Snailman11 added P1 Bug Major. Game crashing move/ability/interaction Move Affects a move and removed Triage The issue needs triage labels Oct 28, 2024
@Snailman11
Copy link
Collaborator

This code from Infiltrator's implementation

   * Cancels the lowering of stats
   * @param arena the {@linkcode Arena} containing this effect
   * @param simulated `true` if the effect should be applied quietly
   * @param cancelled a {@linkcode BooleanHolder} whose value is set to `true`
   * to flag the stat reduction as cancelled
   * @returns `true` if a stat reduction was cancelled; `false` otherwise
   */
  override apply(arena: Arena, simulated: boolean, attacker: Pokemon, cancelled: BooleanHolder): boolean {
    // `StatStageChangePhase` currently doesn't have a reference to the source of stat drops,
    // so this code currently has no effect on gameplay.
    if (attacker) {
      const bypassed = new BooleanHolder(false);
      // TODO: Allow this to be simulated
      applyAbAttrs(InfiltratorAbAttr, attacker, null, false, bypassed);
      if (bypassed.value) {
        return false;
      }
    }

@innerthunder

@innerthunder innerthunder linked a pull request Oct 28, 2024 that will close this issue
7 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Move Affects a move P1 Bug Major. Game crashing move/ability/interaction
Projects
Status: In review
Development

Successfully merging a pull request may close this issue.

2 participants