Special evolutions #5

Closed
palmmc wants to merge 1 commit from master into feature/evolutions
palmmc commented 2025-10-18 21:33:49 +00:00 (Migrated from github.com)
  • Complete Inkay -> Malamar evolution.
  • Complete Nosepass -> Probopass evolution.
  • Complete Bisharp -> Kingambit Evolution
  • Complete Sligoo -> Goodra evolution.
  • Complete Stantler evolution !(needs to be tested)

Note

Implements comprehensive special-evolution support and team-selection/rules hooks, adds Gen9 FFA and broad Random Battles updates, fixes several core mechanics with tests, and refactors module loading/subprocess and teams DB infrastructure.

  • Core mechanics:
    • Implement special evolution conditions (nicknames, steps, party/forms, happiness, etc.) enabling cases like Inkay→Malamar, Nosepass→Probopass, Bisharp→Kingambit, Sliggoo→Goodra, Stantler.
    • Add team selection hook onChooseTeam; enforce Max Total Level, Force Select, and new clauses (accuracytrap, speedpass, samecolor, lgpe normal).
    • Mechanics fixes: Cud Chew (re-activation + NGas), Recycle with knocked-off, OHKO vs subs/Gen3 damage, Rage Powder (Gen5), Conversion 2 behavior; broaden Fair Aura with Mold Breaker; numerous new tests.
  • Random Battles:
    • Introduce gen9freeforallrandombattle with new sets/teams; many set/level/role tweaks across gens; team builders enforce SR / items tweaks.
  • Infrastructure:
    • Replace dynamic requires with generated static module maps; consolidate subprocess config under subprocesses.
    • Migrate teams storage to generic PGDatabase/SQL; remove CGT leveling; various server process spawn/name/config cleanups.

Written by Cursor Bugbot for commit 47b1269035. This will update automatically on new commits. Configure here.

- Complete Inkay -> Malamar evolution. - Complete Nosepass -> Probopass evolution. - Complete Bisharp -> Kingambit Evolution - Complete Sligoo -> Goodra evolution. - Complete Stantler evolution !(needs to be tested) <!-- CURSOR_SUMMARY --> --- > [!NOTE] > Implements comprehensive special-evolution support and team-selection/rules hooks, adds Gen9 FFA and broad Random Battles updates, fixes several core mechanics with tests, and refactors module loading/subprocess and teams DB infrastructure. > > - **Core mechanics**: > - Implement special evolution conditions (nicknames, steps, party/forms, happiness, etc.) enabling cases like Inkay→Malamar, Nosepass→Probopass, Bisharp→Kingambit, Sliggoo→Goodra, Stantler. > - Add team selection hook `onChooseTeam`; enforce `Max Total Level`, `Force Select`, and new clauses (`accuracytrap`, `speedpass`, `samecolor`, `lgpe normal`). > - Mechanics fixes: Cud Chew (re-activation + NGas), Recycle with knocked-off, OHKO vs subs/Gen3 damage, Rage Powder (Gen5), Conversion 2 behavior; broaden Fair Aura with Mold Breaker; numerous new tests. > - **Random Battles**: > - Introduce `gen9freeforallrandombattle` with new sets/teams; many set/level/role tweaks across gens; team builders enforce SR / items tweaks. > - **Infrastructure**: > - Replace dynamic requires with generated static module maps; consolidate subprocess config under `subprocesses`. > - Migrate teams storage to generic `PGDatabase`/`SQL`; remove CGT leveling; various server process spawn/name/config cleanups. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit 47b1269035bd2afe1836efe8ff404a07ebbb972d. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY -->
coderabbitai[bot] commented 2025-10-18 21:34:23 +00:00 (Migrated from github.com)

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

<!-- This is an auto-generated comment: summarize by coderabbit.ai --> <!-- This is an auto-generated comment: skip review by coderabbit.ai --> > [!IMPORTANT] > ## Review skipped > > Auto reviews are disabled on base/target branches other than the default branch. > > > > Please check the settings in the CodeRabbit UI or the `.coderabbit.yaml` file in this repository. To trigger a single review, invoke the `@coderabbitai review` command. > > You can disable this status message by setting the `reviews.review_status` to `false` in the CodeRabbit configuration file. <!-- end of auto-generated comment: skip review by coderabbit.ai --> <!-- finishing_touch_checkbox_start --> <details> <summary>✨ Finishing touches</summary> <details> <summary>🧪 Generate unit tests (beta)</summary> - [ ] <!-- {"checkboxId": "f47ac10b-58cc-4372-a567-0e02b2c3d479", "radioGroupId": "utg-output-choice-group-unknown_comment_id"} --> Create PR with unit tests - [ ] <!-- {"checkboxId": "07f1e7d6-8a8e-4e23-9900-8731c2c87f58", "radioGroupId": "utg-output-choice-group-unknown_comment_id"} --> Post copyable unit tests in a comment </details> </details> <!-- finishing_touch_checkbox_end --> <!-- tips_start --> --- Thanks for using [CodeRabbit](https://coderabbit.ai?utm_source=oss&utm_medium=github&utm_campaign=smell-of-curry/pokebedrock-showdown&utm_content=5)! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. <details> <summary>❤️ Share</summary> - [X](https://twitter.com/intent/tweet?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A&url=https%3A//coderabbit.ai) - [Mastodon](https://mastodon.social/share?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A%20https%3A%2F%2Fcoderabbit.ai) - [Reddit](https://www.reddit.com/submit?title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&text=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code.%20Check%20it%20out%3A%20https%3A//coderabbit.ai) - [LinkedIn](https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fcoderabbit.ai&mini=true&title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&summary=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code) </details> <sub>Comment `@coderabbitai help` to get the list of available commands and usage tips.</sub> <!-- tips_end -->
cursor[bot] (Migrated from github.com) reviewed 2025-12-19 17:29:24 +00:00
cursor[bot] (Migrated from github.com) commented 2025-12-19 17:29:24 +00:00

Bug: Cud Chew state persists incorrectly across switches

The Cud Chew ability refactor stores berry and counter in this.effectState (which is abilityState) instead of using a volatile. Unlike volatiles, abilityState is not cleared when a Pokemon switches out—only abilityState.started is deleted in clearVolatile. This causes the pending berry effect to incorrectly persist across switches. If a Pokemon eats a berry, switches out before the second activation, and later switches back in, the berry will still trigger after the residual countdown completes, which differs from the original behavior where the volatile was properly cleared on switch-out.

Fix in Cursor Fix in Web

### Bug: Cud Chew state persists incorrectly across switches <!-- **Medium Severity** --> <!-- DESCRIPTION START --> The Cud Chew ability refactor stores `berry` and `counter` in `this.effectState` (which is `abilityState`) instead of using a volatile. Unlike volatiles, `abilityState` is not cleared when a Pokemon switches out—only `abilityState.started` is deleted in `clearVolatile`. This causes the pending berry effect to incorrectly persist across switches. If a Pokemon eats a berry, switches out before the second activation, and later switches back in, the berry will still trigger after the residual countdown completes, which differs from the original behavior where the volatile was properly cleared on switch-out. <!-- DESCRIPTION END --> <!-- LOCATIONS START data/abilities.ts#L742-L766 LOCATIONS END --> <a href="https://cursor.com/open?data=eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6ImJ1Z2JvdC12MiJ9.eyJ2ZXJzaW9uIjoxLCJ0eXBlIjoiQlVHQk9UX0ZJWF9JTl9DVVJTT1IiLCJkYXRhIjp7InJlZGlzS2V5IjoiYnVnYm90OjMzMjFkNzJhLTQyZmItNGY4ZS04YWViLTA1N2FiYTllMTRhOCIsImVuY3J5cHRpb25LZXkiOiJOWlJvTEFzYjU3OTFVUk4xMTNOTzZ6ejNzeExNekgyTGhwb0VZbkRhVnljIiwiYnJhbmNoIjoibWFzdGVyIn0sImlhdCI6MTc2NjE2NTM2MywiZXhwIjoxNzY4NzU3MzYzfQ.KrqutuSmwsSnwMnyYTtS61FhfG9H6DQSqBg2XQ1Hd3R7kz1X1UZb0-FBIinahFGxZPaetnYIb21fP4VipenxdxtmxpQbEti7RSf-tGme1pyKZIA4MQ-mlcyt1tNtSM31CHX-7gMLqY6FmdGllV5w7OcsQA11Migmr2qYbAG0JUGcK-JvD9yLDrpw6BMsQDJgGiM5aFowFHqW2GPfBhtqu5FdplYJ5b_OpOAntXjv8u-M01qtedhAecTWSWBxlKBXsdZ4lz60BqlEpWc9MSBQJzvYp7PTY1rX6gFq-nJrkrBBbWlF3hTu1LobgnQXZdkZtet6sa0XZd3QUSMSCQJC7w" target="_blank" rel="noopener noreferrer"><picture><source media="(prefers-color-scheme: dark)" srcset="https://cursor.com/fix-in-cursor-dark.svg"><source media="(prefers-color-scheme: light)" srcset="https://cursor.com/fix-in-cursor-light.svg"><img alt="Fix in Cursor" src="https://cursor.com/fix-in-cursor.svg"></picture></a>&nbsp;<a href="https://cursor.com/agents?data=eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6ImJ1Z2JvdC12MiJ9.eyJ2ZXJzaW9uIjoxLCJ0eXBlIjoiQlVHQk9UX0ZJWF9JTl9XRUIiLCJkYXRhIjp7InJlZGlzS2V5IjoiYnVnYm90OjMzMjFkNzJhLTQyZmItNGY4ZS04YWViLTA1N2FiYTllMTRhOCIsImVuY3J5cHRpb25LZXkiOiJOWlJvTEFzYjU3OTFVUk4xMTNOTzZ6ejNzeExNekgyTGhwb0VZbkRhVnljIiwiYnJhbmNoIjoibWFzdGVyIiwicmVwb093bmVyIjoic21lbGwtb2YtY3VycnkiLCJyZXBvTmFtZSI6InBva2ViZWRyb2NrLXNob3dkb3duIiwicHJOdW1iZXIiOjUsImNvbW1pdFNoYSI6IjQ3YjEyNjkwMzViZDJhZmUxODM2ZWZlOGZmNDA0YTA3ZWJiYjk3MmQiLCJwcm92aWRlciI6ImdpdGh1YiJ9LCJpYXQiOjE3NjYxNjUzNjMsImV4cCI6MTc2ODc1NzM2M30.UIIuVeQTpP6aSpNsWCDZHNhAhpOON7x5WFT6YVBQOjbBsoPrTCT43aE9e_dVwBKkcBp0hh2or2MiBz4TAk7E1o58wCOrCSNxOb_JI_Is6MVB1Ls-swJkFDwOO1On_A22g19l5D5_0nTLv-UaB8ty08MuI2oAEBafgwSYTZ0yXj_qrUrodvpFFr1S_c6NimlVojhacVm__og5Q5lV6Y-Pzi4YEBvhuQVoEshhurLpJkrtzOKLeP8CeqOC8tF7Ew2JiPYTJWUacBcFtvgg9jQZhrKHfjZZcLMssxnzZF9vdA__simq407VqXVdqw2jSznzPSQ49-HY2ytSPOyFWM4Feg" target="_blank" rel="noopener noreferrer"><picture><source media="(prefers-color-scheme: dark)" srcset="https://cursor.com/fix-in-web-dark.svg"><source media="(prefers-color-scheme: light)" srcset="https://cursor.com/fix-in-web-light.svg"><img alt="Fix in Web" src="https://cursor.com/fix-in-web.svg"></picture></a>

Pull request closed

Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
pokebedrock/pokebedrock-showdown!5
No description provided.