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] Certain Partial Trapping Moves (Whirlpool, Sand Tomb) Crash when the User and Opponent Faints at the Same Time #5122

Open
Snailman11 opened this issue Jan 13, 2025 · 0 comments
Labels
Move Affects a move P1 Bug Major. Game crashing move/ability/interaction

Comments

@Snailman11
Copy link
Collaborator

Snailman11 commented Jan 13, 2025

Describe the bug

When Animations are set to ON, and a damaging trapping move faints a Pokemon at the same time as the trappee to end-of-turn damage the game crashes.

  • Whirlpool, Fire Spin, and Sand Tomb, crash the game while Infestation and Snap Trap does not.
  • Replacing the animation for Sand Tomb for Infestation's in battler-tags.ts does not result in a Crash when Sand Tomb is used.
  • Turning Move Animations OFF prevents a crash from occurring.
    -Does not require Salt Cure, Leech Seed/Sappy Seed and cannot crash from taking Future Sight damage.

Link to Discord's Bug Report (Game crash on end-of-turn damage?)
https://discord.com/channels/1125469663833370665/1328079300112678954

Reproduction

Move Animations ON

Choose a Starter weak to the Opposing Trapping move. Use Salt Cure.
-Using Infestation or Snap Trap does not Crash.

Modify OPP_HELD_ITEMS_OVERRIDE: type: Type. to the type of the move used in OPP_MOVESET_OVERRIDE

	MOVESET_OVERRIDE: [Moves.SALT_CURE],
	ABILITY_OVERRIDE: Abilities.STURDY,

	OPP_LEVEL_OVERRIDE: 5,
	OPP_SPECIES_OVERRIDE: Species.FLETCHINDER,
	OPP_MOVESET_OVERRIDE: [Moves.FIRE_SPIN],
	OPP_IVS_OVERRIDE: [0, 31, 0, 31, 0, 0],
	OPP_ABILITY_OVERRIDE: Abilities.STURDY,

	STARTING_HELD_ITEMS_OVERRIDE: [{name: "ATTACK_TYPE_BOOSTER", type: Type.ROCK, count: 50}],
	OPP_HELD_ITEMS_OVERRIDE: [{name: "ATTACK_TYPE_BOOSTER", type: Type.FIRE, count: 50}],

Try replacing

super(BattlerTagType.FIRE_SPIN, CommonAnim.FIRE_SPIN, turnCount, Moves.FIRE_SPIN, sourceId);

With

super(BattlerTagType.FIRE_SPIN, CommonAnim.INFESTATION, turnCount, Moves.FIRE_SPIN, sourceId);

Expected behavior

The game shouldn't crash when Pokemon faint to secondary damage while the Opponent faints to Partial Trapping. or vise-versa. Specifically Fire Spin, Sand Tomb, and Whirlpool. (There are probably others, and other exceptions.)

In addition, Pokemon should not take turn-end damage related to partial-trapping if the Trappee faints before them from turn-end damage due to having a higher Speed stat.

-Pokemon should also take turn-end damage in order of their Speed, with Leech Seed and Salt Cure going before Trapping Damage. Rather than it always starting with the Player's.
https://replay.pokemonshowdown.com/gen9customgame-2281249171

Screenshots / Videos

Screenshot (543)

Player and Opponent's side (Enemy Trapping Move, Player Chip Damage)
Player.Salt.Enemy.Whirlpool.-CRASH.mp4

Player Trapping Move (Whirlpool), Enemy Chip Damage. (Leech only works if the Enemy used it)

Player.Whirlpool.Enemy.Leech.-.Crash.mp4
Player Salt Cure and Enemy Salt Cure does not Crash
Salt.Cure.Salt.Cure.-.NoCRASH.mp4
Certain Moves Crash Player's Salt Cure and Enemy's Sand Tomb Crashes
Player.Salt.Enemy.Sand.Tomb.-CRASH.mp4

Player's Salt Cure and Enemy's Fire Spin Crashes

Player.Salt.Enemy.Fire.Spin.-CRASH.mp4

Player's Salt Cure and Enemy's Infestation does not Crash

Player.Salt.Enemy.Infestation.-No.crash.mp4

Player's Salt Cure and Enemy's Snap Trap does not Crash

Player.Salt.Enemy.Snap.-noCrash.mp4
Move Animation OFF Fire Spin does not Crash

Player Salt Cure Enemy Fire Spin Anims OFF

FireSpin.NOANIMS.noCRASH.mp4

Session export file

No response

User data export file

No response

Additional context

When a Faster Pokemon faints from Salt Cure, and the other Pokemon is bound by a Partial Trapping Move, the Partial Trapping effect should wear off the MOMENT the Pokemon (Trappee) faints, even if by passive damage (Salt Cure)

https://replay.pokemonshowdown.com/gen9customgame-2280390566

Snap.Trap.Damage.even.after.taking.damage.to.0.mp4

Caterpie is 9 speed, Fletchling is 12

Partial.Trapping.not.immediate.mp4
@Snailman11 Snailman11 added Move Affects a move P1 Bug Major. Game crashing move/ability/interaction labels Jan 13, 2025
@Snailman11 Snailman11 moved this from To triage to Ready in PokéRogue Bug Management Jan 13, 2025
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: Ready
Development

No branches or pull requests

1 participant