Feature/pokemon evolutions update #9

Merged
gamezaSRC merged 9 commits from feature/pokemon-evolutions-update into master 2026-04-30 14:24:41 +00:00
gamezaSRC commented 2026-03-12 18:21:06 +00:00 (Migrated from github.com)

Add evoPartyForms, evoNickname, evoWeather fields to SpeciesData
Add evolution fields to pokedex for special evolutions

Summary by CodeRabbit

  • New Features

    • Expanded evolution triggers: many species now evolve via items, nicknames, explicit weather, biome requirements, party forms/species, minimum damage/recoil thresholds, gender, and refined level gates. Updated species include Probopass, Malamar, Goodra (and Hisui), Meltan→Melmetal, Runerigus, Wyrdeer, Basculegion (including F), and Kingambit.
  • Bug Fixes / UX

    • Improved in-battle form/change messaging: nicknamed Pokémon keep custom names and form-change sources are reported more reliably.
Add evoPartyForms, evoNickname, evoWeather fields to SpeciesData Add evolution fields to pokedex for special evolutions <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Expanded evolution triggers: many species now evolve via items, nicknames, explicit weather, biome requirements, party forms/species, minimum damage/recoil thresholds, gender, and refined level gates. Updated species include Probopass, Malamar, Goodra (and Hisui), Meltan→Melmetal, Runerigus, Wyrdeer, Basculegion (including F), and Kingambit. * **Bug Fixes / UX** * Improved in-battle form/change messaging: nicknamed Pokémon keep custom names and form-change sources are reported more reliably. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
coderabbitai[bot] commented 2026-03-12 18:23:55 +00:00 (Migrated from github.com)

Warning

Rate limit exceeded

@smell-of-curry has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 47 minutes and 25 seconds before requesting another review.

To keep reviews running without waiting, you can enable usage-based add-on for your organization. This allows additional reviews beyond the hourly cap. Account admins can enable it under billing.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 538ea4a5-1e46-4539-9b3c-ca60755bb364

📥 Commits

Reviewing files that changed from the base of the PR and between b01042d00f and e78a4cea39.

📒 Files selected for processing (3)
  • sim/battle-stream.ts
  • sim/global-types.ts
  • sim/pokemon.ts
📝 Walkthrough

Walkthrough

Added new evolution condition fields to the Species model and updated Pokédex entries to use them; adjusted battle/forme-change handling to preserve nicknames and conditionally include source info in detailschange messages for permanent evolutions.

Changes

Cohort / File(s) Summary
Species Type Definitions
sim/dex-species.ts
Expanded Species typings: `evoPartySpecies?: string
Pokedex Data
data/pokedex.ts
Rewrote multiple species evolution entries to use new structured fields: item-based evo (e.g., Probopass → useItem + evoItem), nickname-gated evo (Malamar), explicit evoWeather for Goodra variants, added meltan.evos, structured biome/min-damage/recoil/party-form/gender gates (e.g., Runerigus, Wyrdeer, Basculegion, Kingambit).
Battle stream identity updates
sim/battle-stream.ts
On permanent forme/evolution, record pre-evo species and call formeChange(...), then update the battle Pokémon's name/fullname only when it was not nicknamed before sending updates.
Detailschange messaging
sim/pokemon.ts
When formeChange is permanent, detailschange now conditionally appends [from] ${source.id} for non-standard custom effect types; preserves original three-arg signature for excluded effect types or missing source.

Sequence Diagram(s)

(silently omitted)

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

  • smell-of-curry/pokebedrock-showdown#3: Modifies sim/dex-species.ts to add evolution-related fields (nickname/minDamage/minRecoilDamage equivalents), closely related to the typings and fields added here.

Poem

🐰 I hopped through entries, nudged each branch to bloom,

Stones, storms, and nicknames — a coded garden's room.
I shuffled bits and paths with joyful, jittery art,
Evolutions set in rows — a carrot-led restart! 🥕✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'Feature/pokemon evolutions update' is partially related to the changeset. It accurately describes that this PR updates Pokémon evolution mechanics, which is the primary intent, but is somewhat generic and doesn't capture the specific technical details of adding new evolution fields and updating evolution logic across multiple files.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/pokemon-evolutions-update

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
Review rate limit: 0/1 reviews remaining, refill in 47 minutes and 25 seconds.

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: rate limited by coderabbit.ai --> > [!WARNING] > ## Rate limit exceeded > > `@smell-of-curry` has exceeded the limit for the number of commits that can be reviewed per hour. Please wait **47 minutes and 25 seconds** before requesting another review. > > To keep reviews running without waiting, you can enable usage-based add-on for your organization. This allows additional reviews beyond the hourly cap. Account admins can enable it under [billing](https://app.coderabbit.ai/settings/subscription?tab=usage). > > <details> > <summary>⌛ How to resolve this issue?</summary> > > After the wait time has elapsed, a review can be triggered using the `@coderabbitai review` command as a PR comment. Alternatively, push new commits to this PR. > > We recommend that you space out your commits to avoid hitting the rate limit. > > </details> > > > <details> > <summary>🚦 How do rate limits work?</summary> > > CodeRabbit enforces hourly rate limits for each developer per organization. > > Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. > > Please see our [FAQ](https://docs.coderabbit.ai/faq) for further information. > > </details> > > <details> > <summary>ℹ️ Review info</summary> > > <details> > <summary>⚙️ Run configuration</summary> > > **Configuration used**: defaults > > **Review profile**: CHILL > > **Plan**: Pro > > **Run ID**: `538ea4a5-1e46-4539-9b3c-ca60755bb364` > > </details> > > <details> > <summary>📥 Commits</summary> > > Reviewing files that changed from the base of the PR and between b01042d00fc5e4f2bb687989ca3af143912f6f08 and e78a4cea39a44314c6e4f3cfa0bc03a7d47201f6. > > </details> > > <details> > <summary>📒 Files selected for processing (3)</summary> > > * `sim/battle-stream.ts` > * `sim/global-types.ts` > * `sim/pokemon.ts` > > </details> > > </details> <!-- end of auto-generated comment: rate limited by coderabbit.ai --> <!-- walkthrough_start --> <details> <summary>📝 Walkthrough</summary> ## Walkthrough Added new evolution condition fields to the Species model and updated Pokédex entries to use them; adjusted battle/forme-change handling to preserve nicknames and conditionally include source info in detailschange messages for permanent evolutions. ## Changes |Cohort / File(s)|Summary| |---|---| |**Species Type Definitions** <br> `sim/dex-species.ts`|Expanded `Species` typings: `evoPartySpecies?: string | string[]`; added `evoPartyForms?: string[]`, `evoNickname?: string`, `evoWeather?: keyof typeof WeatherType`, `evoMinDamage?: number`, `evoMinRecoilDamage?: number`; imported `WeatherType`.| |**Pokedex Data** <br> `data/pokedex.ts`|Rewrote multiple species evolution entries to use new structured fields: item-based evo (e.g., `Probopass` → `useItem` + `evoItem`), nickname-gated evo (`Malamar`), explicit `evoWeather` for `Goodra` variants, added `meltan.evos`, structured biome/min-damage/recoil/party-form/gender gates (e.g., `Runerigus`, `Wyrdeer`, `Basculegion`, `Kingambit`).| |**Battle stream identity updates** <br> `sim/battle-stream.ts`|On permanent forme/evolution, record pre-evo species and call `formeChange(...)`, then update the battle Pokémon's `name`/`fullname` only when it was not nicknamed before sending updates.| |**Detailschange messaging** <br> `sim/pokemon.ts`|When `formeChange` is permanent, `detailschange` now conditionally appends `[from] ${source.id}` for non-standard custom effect types; preserves original three-arg signature for excluded effect types or missing `source`.| ## Sequence Diagram(s) (silently omitted) ## Estimated code review effort 🎯 4 (Complex) | ⏱️ ~45 minutes ## Possibly related PRs - smell-of-curry/pokebedrock-showdown#3: Modifies `sim/dex-species.ts` to add evolution-related fields (nickname/minDamage/minRecoilDamage equivalents), closely related to the typings and fields added here. ## Poem > 🐰 I hopped through entries, nudged each branch to bloom, > > Stones, storms, and nicknames — a coded garden's room. > > I shuffled bits and paths with joyful, jittery art, > > Evolutions set in rows — a carrot-led restart! 🥕✨ </details> <!-- walkthrough_end --> <!-- pre_merge_checks_walkthrough_start --> <details> <summary>🚥 Pre-merge checks | ✅ 5</summary> <details> <summary>✅ Passed checks (5 passed)</summary> | Check name | Status | Explanation | | :------------------------: | :------- | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | Description Check | ✅ Passed | Check skipped - CodeRabbit’s high-level summary is enabled. | | Title check | ✅ Passed | The title 'Feature/pokemon evolutions update' is partially related to the changeset. It accurately describes that this PR updates Pokémon evolution mechanics, which is the primary intent, but is somewhat generic and doesn't capture the specific technical details of adding new evolution fields and updating evolution logic across multiple files. | | Docstring Coverage | ✅ Passed | No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. | | Linked Issues check | ✅ Passed | Check skipped because no linked issues were found for this pull request. | | Out of Scope Changes check | ✅ Passed | Check skipped because no linked issues were found for this pull request. | </details> <sub>✏️ Tip: You can configure your own custom pre-merge checks in the settings.</sub> </details> <!-- pre_merge_checks_walkthrough_end --> <!-- 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": "6ba7b810-9dad-11d1-80b4-00c04fd430c8", "radioGroupId": "utg-output-choice-group-unknown_comment_id"} --> Commit unit tests in branch `feature/pokemon-evolutions-update` </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=9)! 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> <!-- review_rate_limit_status_start --> <sub>Review rate limit: 0/1 reviews remaining, refill in 47 minutes and 25 seconds.</sub> <!-- review_rate_limit_status_end --> <sub>Comment `@coderabbitai help` to get the list of available commands and usage tips.</sub> <!-- tips_end --> <!-- internal state start --> <!-- DwQgtGAEAqAWCWBnSTIEMB26CuAXA9mAOYCmGJATmriQCaQDG+Ats2bgFyQAOFk+AIwBWJBrngA3EsgEBPRvlqU0AgfFwA6NPEgQAfACgjoCEYDEZyAAUASpETZWaCrKPR1AGxJcAYiWrYFCQA9Nz4ANYkzPhYJBL4HnjwMcjY3LTUJJAAFLaQZg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B6wNkV3rp9Bgu6YNM7lac687WG7bWCYhfQiAQQJbSaG795i7Qay7HRlbWovA+N9c679d9aB6m6W6vFFg7d7tAbSAhHXaHbe6uAWbpH3bMAR76FoSfQiEa4UgvS+EkDt6nDWVecPI4h6xsB9wfq9GmADGYyQw/aKwRY/G/qToAnlBQYm7U6eH952HtVlbka0E1tdGInMs5j8xnpfgPjWwkAPNzkvR2Z/IjpEARh5BGD8BAnPJtsCU4npG+H6EBHjojHYbZHS6O7m6FH6Fwmzltba6XaNG7atGemYM6CZbRZ5b4Smb4mTHtazG+aLGh6rHkxvaunfb/b2I5gbDGFYdHkMBJmCmFbIAukqUaoiFWUsnl7gJWsFbNA2neGwL+HnBBH4mOmPB5HTb6Fpa6A5aHBpBjgpoUpakVHVc1HVdhnXbRnvmYM+xgHc57gmAqQ4pYDtpZnpH5m+74nLHPaYh1m1rNn3TTNRB0KGj7YDmjnpmJDKAmZ3g+E2ybnBg7npAHn4mmns7XnWn3nzYS7PmuntGi68A+wRgkWZdHDdpEAgWsEppQXa7y8wVVbCRbBzaRavb6FhQbKJLNXFKGBaB7K+RuRhQGABBaANLaBhQOKdXJL2RMrtL2QmRhQ0AqqcUPL+USA+RvL+V2QOLvK5K0rrKRRLLWH95U9cBbA27laOKOKRgpQj8j8ORDWBAIqtL+URK6A+Q4rvXPgOQpRuQ+QChU24rDLeKE2mQOrkSvKCg0BJ1TKmQTWWQ+M4z2L5rFrlqm76KZqAq5r0KCAKDLVGFmK6ISAh3WL04DBwzQ3qJ9RTtjhcAh0o5mMTqRrcB4oiFcBrqWRm2hrAre38B+2yWR2HaR2u3V4gA== --> <!-- internal state end -->
coderabbitai[bot] (Migrated from github.com) reviewed 2026-03-12 18:39:28 +00:00
coderabbitai[bot] (Migrated from github.com) left a comment

Actionable comments posted: 6

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@data/pokedex.ts`:
- Around line 5644-5645: The evoItem values use inconsistent naming and some
target-side evolution rules are outdated; update all useItem evoItem values to
the canonical display names (e.g., "Thunder Stone", "Metal Coat", "Leader's
Crest" or the project's preferred canonical strings) and adjust the target
Pokémon entries (e.g., probopass, kingambit) to include the correct target-side
evolution requirements/rules to match the rest of the schema; search for
occurrences of evoType: "useItem" and the specific symbols evoItem, probopass,
and kingambit to update their evoItem strings and ensure the corresponding
evolution rule logic/fields are consistent with the canonical naming convention
used elsewhere in this file.
- Around line 10300-10302: The evoBiomes field is inconsistent (mixing human
names like "Cold Taiga" with namespaced IDs like "minecraft:desert"); normalize
all evoBiomes entries to a single canonical format (prefer project-wide
standard, e.g., use namespaced biome IDs like "minecraft:cold_taiga") across
this file, update the specific entry shown to use the same format (replace
"minecraft:desert" style or the human-readable names to the chosen format) and
also make the corresponding change for the runerigus entry so its target-side
condition matches the normalized evoBiomes representation; search for and update
any other evoBiomes occurrences in data/pokedex.ts to the same canonical format.
- Around line 10064-10066: The evoGender field is applied at the parent
evolution entry and wrongly blocks the male branch—move the gender restriction
down to the specific evolution target(s) so only the female branch is gated;
locate the evolution entry for Basculin-White-Striped (references:
"Basculin-White-Striped", "Basculegion", "Basculegion-F") and either (A) split
the evolutions into two separate objects with evoGender: "F" on the
Basculegion-F target and no evoGender on the Basculegion target, or (B) change
the structure so each target inside the evolutions array has its own evoGender
property instead of a single evoGender on the parent entry.
- Around line 4663-4664: The evolution-condition fields you added on the source
entries must also be applied to their evolved target entries (the entries
referenced by prevo) so the repo's evolution logic keeps them in sync; update
the target species entries for wyrdeer, malamar, goodra, and goodrahisui to
include the same evoLevel/evoPartyForms (or other trigger fields) you added on
the source side and remove any contradictory triggers (specifically reconcile
goodrahisui's "thunder" vs the target entry's "rain" so both match). Ensure the
target entries' evolution fields mirror the source-side keys exactly so the
prevo-based evolution rules behave consistently.
- Around line 11607-11608: The resolute form is disconnected: add a forward evo
link from the base species to the resolute form so the evo* fields resolve;
specifically, update the Keldeo base entry (symbol "Keldeo") to include evos:
["keldeoresolute"] (or the exact form id used for the resolute form) so that
keldeoresolute's changesFrom: "Keldeo" and its evoLevel/evoPartySpecies link
correctly; alternatively, if your model expects evo* fields on the base species,
move evoLevel/evoPartySpecies into the "Keldeo" entry and keep keldeoresolute as
changesFrom: "Keldeo".

In `@sim/dex-species.ts`:
- Around line 300-304: The evoWeather field is typed as keyof typeof WeatherType
(expects enum member casing like "Clear"/"Rain"/"Thunder") but the pokedex data
uses lowercase strings; update the pokedex entries that set evoWeather to use
the exact capitalized WeatherType enum member names to match the evoWeather
typing (look for evoWeather in species objects and ensure values match
WeatherType casing) so evolution checks using WeatherType keys succeed at
runtime.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: c825e3eb-3330-4e8e-921f-9ec067ee2372

📥 Commits

Reviewing files that changed from the base of the PR and between ea21efe692 and 54a1f9fd16.

📒 Files selected for processing (2)
  • data/pokedex.ts
  • sim/dex-species.ts
**Actionable comments posted: 6** <details> <summary>🤖 Prompt for all review comments with AI agents</summary> ``` Verify each finding against the current code and only fix it if needed. Inline comments: In `@data/pokedex.ts`: - Around line 5644-5645: The evoItem values use inconsistent naming and some target-side evolution rules are outdated; update all useItem evoItem values to the canonical display names (e.g., "Thunder Stone", "Metal Coat", "Leader's Crest" or the project's preferred canonical strings) and adjust the target Pokémon entries (e.g., probopass, kingambit) to include the correct target-side evolution requirements/rules to match the rest of the schema; search for occurrences of evoType: "useItem" and the specific symbols evoItem, probopass, and kingambit to update their evoItem strings and ensure the corresponding evolution rule logic/fields are consistent with the canonical naming convention used elsewhere in this file. - Around line 10300-10302: The evoBiomes field is inconsistent (mixing human names like "Cold Taiga" with namespaced IDs like "minecraft:desert"); normalize all evoBiomes entries to a single canonical format (prefer project-wide standard, e.g., use namespaced biome IDs like "minecraft:cold_taiga") across this file, update the specific entry shown to use the same format (replace "minecraft:desert" style or the human-readable names to the chosen format) and also make the corresponding change for the runerigus entry so its target-side condition matches the normalized evoBiomes representation; search for and update any other evoBiomes occurrences in data/pokedex.ts to the same canonical format. - Around line 10064-10066: The evoGender field is applied at the parent evolution entry and wrongly blocks the male branch—move the gender restriction down to the specific evolution target(s) so only the female branch is gated; locate the evolution entry for Basculin-White-Striped (references: "Basculin-White-Striped", "Basculegion", "Basculegion-F") and either (A) split the evolutions into two separate objects with evoGender: "F" on the Basculegion-F target and no evoGender on the Basculegion target, or (B) change the structure so each target inside the evolutions array has its own evoGender property instead of a single evoGender on the parent entry. - Around line 4663-4664: The evolution-condition fields you added on the source entries must also be applied to their evolved target entries (the entries referenced by prevo) so the repo's evolution logic keeps them in sync; update the target species entries for wyrdeer, malamar, goodra, and goodrahisui to include the same evoLevel/evoPartyForms (or other trigger fields) you added on the source side and remove any contradictory triggers (specifically reconcile goodrahisui's "thunder" vs the target entry's "rain" so both match). Ensure the target entries' evolution fields mirror the source-side keys exactly so the prevo-based evolution rules behave consistently. - Around line 11607-11608: The resolute form is disconnected: add a forward evo link from the base species to the resolute form so the evo* fields resolve; specifically, update the Keldeo base entry (symbol "Keldeo") to include evos: ["keldeoresolute"] (or the exact form id used for the resolute form) so that keldeoresolute's changesFrom: "Keldeo" and its evoLevel/evoPartySpecies link correctly; alternatively, if your model expects evo* fields on the base species, move evoLevel/evoPartySpecies into the "Keldeo" entry and keep keldeoresolute as changesFrom: "Keldeo". In `@sim/dex-species.ts`: - Around line 300-304: The evoWeather field is typed as keyof typeof WeatherType (expects enum member casing like "Clear"/"Rain"/"Thunder") but the pokedex data uses lowercase strings; update the pokedex entries that set evoWeather to use the exact capitalized WeatherType enum member names to match the evoWeather typing (look for evoWeather in species objects and ensure values match WeatherType casing) so evolution checks using WeatherType keys succeed at runtime. ``` </details> --- <details> <summary>ℹ️ Review info</summary> <details> <summary>⚙️ Run configuration</summary> **Configuration used**: defaults **Review profile**: CHILL **Plan**: Pro **Run ID**: `c825e3eb-3330-4e8e-921f-9ec067ee2372` </details> <details> <summary>📥 Commits</summary> Reviewing files that changed from the base of the PR and between ea21efe6925bb696ecba8e3d7e70e22af5f58fdd and 54a1f9fd16843b2e47049fa2a87fb6a16fee5a60. </details> <details> <summary>📒 Files selected for processing (2)</summary> * `data/pokedex.ts` * `sim/dex-species.ts` </details> </details> <!-- This is an auto-generated comment by CodeRabbit for review status -->
coderabbitai[bot] (Migrated from github.com) commented 2026-03-12 18:39:27 +00:00

⚠️ Potential issue | 🟠 Major

Mirror these conditions onto the evolved species too.

This dex’s evolution data is keyed off the target entry via prevo. wyrdeer, malamar, goodra, and goodrahisui still carry the old triggers, so these new source-side fields won’t change the in-repo evolution rules; goodrahisui is now also contradictory (thunder here vs rain on the target entry).

Also applies to: 12530-12531, 12783-12784, 12802-12803

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@data/pokedex.ts` around lines 4663 - 4664, The evolution-condition fields you
added on the source entries must also be applied to their evolved target entries
(the entries referenced by prevo) so the repo's evolution logic keeps them in
sync; update the target species entries for wyrdeer, malamar, goodra, and
goodrahisui to include the same evoLevel/evoPartyForms (or other trigger fields)
you added on the source side and remove any contradictory triggers (specifically
reconcile goodrahisui's "thunder" vs the target entry's "rain" so both match).
Ensure the target entries' evolution fields mirror the source-side keys exactly
so the prevo-based evolution rules behave consistently.

✅ Addressed in commits 62ea003 to 2e1411b

_⚠️ Potential issue_ | _🟠 Major_ **Mirror these conditions onto the evolved species too.** This dex’s evolution data is keyed off the target entry via `prevo`. `wyrdeer`, `malamar`, `goodra`, and `goodrahisui` still carry the old triggers, so these new source-side fields won’t change the in-repo evolution rules; `goodrahisui` is now also contradictory (`thunder` here vs rain on the target entry). Also applies to: 12530-12531, 12783-12784, 12802-12803 <details> <summary>🤖 Prompt for AI Agents</summary> ``` Verify each finding against the current code and only fix it if needed. In `@data/pokedex.ts` around lines 4663 - 4664, The evolution-condition fields you added on the source entries must also be applied to their evolved target entries (the entries referenced by prevo) so the repo's evolution logic keeps them in sync; update the target species entries for wyrdeer, malamar, goodra, and goodrahisui to include the same evoLevel/evoPartyForms (or other trigger fields) you added on the source side and remove any contradictory triggers (specifically reconcile goodrahisui's "thunder" vs the target entry's "rain" so both match). Ensure the target entries' evolution fields mirror the source-side keys exactly so the prevo-based evolution rules behave consistently. ``` </details> <!-- fingerprinting:phantom:medusa:grasshopper --> <!-- This is an auto-generated comment by CodeRabbit --> ✅ Addressed in commits 62ea003 to 2e1411b
coderabbitai[bot] (Migrated from github.com) commented 2026-03-12 18:39:27 +00:00

⚠️ Potential issue | 🟠 Major

Use canonical item names and update the target-side rules.

evoItem values elsewhere in this file use display names like "Thunder Stone" and "Metal Coat". "thunder_stone" and "leaders_crest" break that convention, and probopass/kingambit still keep the old target-side evolution requirements.

♻️ Suggested names if you want this file to stay schema-consistent
@@
-		evoItem: "thunder_stone",
+		evoItem: "Thunder Stone",
@@
-		evoItem: "leaders_crest",
+		evoItem: "Leader's Crest",

Also applies to: 11216-11217

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@data/pokedex.ts` around lines 5644 - 5645, The evoItem values use
inconsistent naming and some target-side evolution rules are outdated; update
all useItem evoItem values to the canonical display names (e.g., "Thunder
Stone", "Metal Coat", "Leader's Crest" or the project's preferred canonical
strings) and adjust the target Pokémon entries (e.g., probopass, kingambit) to
include the correct target-side evolution requirements/rules to match the rest
of the schema; search for occurrences of evoType: "useItem" and the specific
symbols evoItem, probopass, and kingambit to update their evoItem strings and
ensure the corresponding evolution rule logic/fields are consistent with the
canonical naming convention used elsewhere in this file.

✅ Addressed in commits 62ea003 to a3952d4

_⚠️ Potential issue_ | _🟠 Major_ **Use canonical item names and update the target-side rules.** `evoItem` values elsewhere in this file use display names like `"Thunder Stone"` and `"Metal Coat"`. `"thunder_stone"` and `"leaders_crest"` break that convention, and `probopass`/`kingambit` still keep the old target-side evolution requirements. <details> <summary>♻️ Suggested names if you want this file to stay schema-consistent</summary> ```diff @@ - evoItem: "thunder_stone", + evoItem: "Thunder Stone", @@ - evoItem: "leaders_crest", + evoItem: "Leader's Crest", ``` </details> Also applies to: 11216-11217 <details> <summary>🤖 Prompt for AI Agents</summary> ``` Verify each finding against the current code and only fix it if needed. In `@data/pokedex.ts` around lines 5644 - 5645, The evoItem values use inconsistent naming and some target-side evolution rules are outdated; update all useItem evoItem values to the canonical display names (e.g., "Thunder Stone", "Metal Coat", "Leader's Crest" or the project's preferred canonical strings) and adjust the target Pokémon entries (e.g., probopass, kingambit) to include the correct target-side evolution requirements/rules to match the rest of the schema; search for occurrences of evoType: "useItem" and the specific symbols evoItem, probopass, and kingambit to update their evoItem strings and ensure the corresponding evolution rule logic/fields are consistent with the canonical naming convention used elsewhere in this file. ``` </details> <!-- fingerprinting:phantom:medusa:grasshopper --> <!-- This is an auto-generated comment by CodeRabbit --> ✅ Addressed in commits 62ea003 to a3952d4
coderabbitai[bot] (Migrated from github.com) commented 2026-03-12 18:39:27 +00:00

⚠️ Potential issue | 🟠 Major

evoGender here makes the male Basculegion branch unreachable.

Basculin-White-Striped points to both "Basculegion" and "Basculegion-F", but a single source-level evoGender: "F" applies to the whole entry. Any consumer that reads these new fields will gate off the male branch too.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@data/pokedex.ts` around lines 10064 - 10066, The evoGender field is applied
at the parent evolution entry and wrongly blocks the male branch—move the gender
restriction down to the specific evolution target(s) so only the female branch
is gated; locate the evolution entry for Basculin-White-Striped (references:
"Basculin-White-Striped", "Basculegion", "Basculegion-F") and either (A) split
the evolutions into two separate objects with evoGender: "F" on the
Basculegion-F target and no evoGender on the Basculegion target, or (B) change
the structure so each target inside the evolutions array has its own evoGender
property instead of a single evoGender on the parent entry.

✅ Addressed in commits 62ea003 to 0830d77

_⚠️ Potential issue_ | _🟠 Major_ **`evoGender` here makes the male Basculegion branch unreachable.** `Basculin-White-Striped` points to both `"Basculegion"` and `"Basculegion-F"`, but a single source-level `evoGender: "F"` applies to the whole entry. Any consumer that reads these new fields will gate off the male branch too. <details> <summary>🤖 Prompt for AI Agents</summary> ``` Verify each finding against the current code and only fix it if needed. In `@data/pokedex.ts` around lines 10064 - 10066, The evoGender field is applied at the parent evolution entry and wrongly blocks the male branch—move the gender restriction down to the specific evolution target(s) so only the female branch is gated; locate the evolution entry for Basculin-White-Striped (references: "Basculin-White-Striped", "Basculegion", "Basculegion-F") and either (A) split the evolutions into two separate objects with evoGender: "F" on the Basculegion-F target and no evoGender on the Basculegion target, or (B) change the structure so each target inside the evolutions array has its own evoGender property instead of a single evoGender on the parent entry. ``` </details> <!-- fingerprinting:phantom:medusa:grasshopper --> <!-- This is an auto-generated comment by CodeRabbit --> ✅ Addressed in commits 62ea003 to 0830d77
coderabbitai[bot] (Migrated from github.com) commented 2026-03-12 18:39:27 +00:00

⚠️ Potential issue | 🟠 Major

Normalize evoBiomes before mixing namespace IDs into this field.

Existing evoBiomes values in this file use biome names like "Cold Taiga" and "Roofed Forest". Introducing minecraft:* IDs here makes the field heterogeneous, and runerigus still keeps a different target-side condition.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@data/pokedex.ts` around lines 10300 - 10302, The evoBiomes field is
inconsistent (mixing human names like "Cold Taiga" with namespaced IDs like
"minecraft:desert"); normalize all evoBiomes entries to a single canonical
format (prefer project-wide standard, e.g., use namespaced biome IDs like
"minecraft:cold_taiga") across this file, update the specific entry shown to use
the same format (replace "minecraft:desert" style or the human-readable names to
the chosen format) and also make the corresponding change for the runerigus
entry so its target-side condition matches the normalized evoBiomes
representation; search for and update any other evoBiomes occurrences in
data/pokedex.ts to the same canonical format.
_⚠️ Potential issue_ | _🟠 Major_ **Normalize `evoBiomes` before mixing namespace IDs into this field.** Existing `evoBiomes` values in this file use biome names like `"Cold Taiga"` and `"Roofed Forest"`. Introducing `minecraft:*` IDs here makes the field heterogeneous, and `runerigus` still keeps a different target-side condition. <details> <summary>🤖 Prompt for AI Agents</summary> ``` Verify each finding against the current code and only fix it if needed. In `@data/pokedex.ts` around lines 10300 - 10302, The evoBiomes field is inconsistent (mixing human names like "Cold Taiga" with namespaced IDs like "minecraft:desert"); normalize all evoBiomes entries to a single canonical format (prefer project-wide standard, e.g., use namespaced biome IDs like "minecraft:cold_taiga") across this file, update the specific entry shown to use the same format (replace "minecraft:desert" style or the human-readable names to the chosen format) and also make the corresponding change for the runerigus entry so its target-side condition matches the normalized evoBiomes representation; search for and update any other evoBiomes occurrences in data/pokedex.ts to the same canonical format. ``` </details> <!-- fingerprinting:phantom:medusa:grasshopper --> <!-- This is an auto-generated comment by CodeRabbit -->
coderabbitai[bot] (Migrated from github.com) commented 2026-03-12 18:39:27 +00:00

⚠️ Potential issue | 🟠 Major

This Keldeo form change has no resolvable evolution target.

Keldeo has no evos, and keldeoresolute is still modeled as changesFrom: "Keldeo" plus changeEvent: "learnMove". In the current dex model, these new evo* fields are disconnected from the only target form.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@data/pokedex.ts` around lines 11607 - 11608, The resolute form is
disconnected: add a forward evo link from the base species to the resolute form
so the evo* fields resolve; specifically, update the Keldeo base entry (symbol
"Keldeo") to include evos: ["keldeoresolute"] (or the exact form id used for the
resolute form) so that keldeoresolute's changesFrom: "Keldeo" and its
evoLevel/evoPartySpecies link correctly; alternatively, if your model expects
evo* fields on the base species, move evoLevel/evoPartySpecies into the "Keldeo"
entry and keep keldeoresolute as changesFrom: "Keldeo".

✅ Addressed in commits 07dbfd2 to 26afdd3

_⚠️ Potential issue_ | _🟠 Major_ **This Keldeo form change has no resolvable evolution target.** `Keldeo` has no `evos`, and `keldeoresolute` is still modeled as `changesFrom: "Keldeo"` plus `changeEvent: "learnMove"`. In the current dex model, these new `evo*` fields are disconnected from the only target form. <details> <summary>🤖 Prompt for AI Agents</summary> ``` Verify each finding against the current code and only fix it if needed. In `@data/pokedex.ts` around lines 11607 - 11608, The resolute form is disconnected: add a forward evo link from the base species to the resolute form so the evo* fields resolve; specifically, update the Keldeo base entry (symbol "Keldeo") to include evos: ["keldeoresolute"] (or the exact form id used for the resolute form) so that keldeoresolute's changesFrom: "Keldeo" and its evoLevel/evoPartySpecies link correctly; alternatively, if your model expects evo* fields on the base species, move evoLevel/evoPartySpecies into the "Keldeo" entry and keep keldeoresolute as changesFrom: "Keldeo". ``` </details> <!-- fingerprinting:phantom:medusa:grasshopper --> <!-- This is an auto-generated comment by CodeRabbit --> ✅ Addressed in commits 07dbfd2 to 26afdd3
coderabbitai[bot] (Migrated from github.com) commented 2026-03-12 18:39:27 +00:00

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🌐 Web query:

In the current @minecraft/serverAPI, what are the exactWeatherType member names and literal values?

💡 Result:

In the current @minecraft/server Script API, WeatherType has these members (name = literal value):

  • WeatherType.Clear = "Clear" [1]
  • WeatherType.Rain = "Rain" [1]
  • WeatherType.Thunder = "Thunder" [1]

Sources: [1] (learn.microsoft.com), [2] (stirante.com)

Citations:


🏁 Script executed:

# Check if the evoWeather field exists at the claimed location in dex-species.ts
sed -n '300,304p' sim/dex-species.ts

Repository: smell-of-curry/pokebedrock-showdown

Length of output: 200


🏁 Script executed:

# Check the claimed evoWeather entries in pokedex.ts at lines 12779-12806
sed -n '12779,12806p' data/pokedex.ts | head -50

Repository: smell-of-curry/pokebedrock-showdown

Length of output: 744


🏁 Script executed:

# Search for all evoWeather assignments to see the pattern of values used
rg 'evoWeather\s*:\s*' data/pokedex.ts -A 1 -B 1

Repository: smell-of-curry/pokebedrock-showdown

Length of output: 206


Align evoWeather with the enum member casing.

evoWeather is typed as keyof typeof WeatherType, which means it expects capitalized enum members ("Clear", "Rain", "Thunder"). However, data/pokedex.ts stores lowercase values ("rain", "thunder"). This mismatch will cause evolution checks to fail at runtime. Change the data values to use capitalized strings matching the actual WeatherType enum members.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@sim/dex-species.ts` around lines 300 - 304, The evoWeather field is typed as
keyof typeof WeatherType (expects enum member casing like
"Clear"/"Rain"/"Thunder") but the pokedex data uses lowercase strings; update
the pokedex entries that set evoWeather to use the exact capitalized WeatherType
enum member names to match the evoWeather typing (look for evoWeather in species
objects and ensure values match WeatherType casing) so evolution checks using
WeatherType keys succeed at runtime.

✅ Addressed in commit 227faea

_⚠️ Potential issue_ | _🟠 Major_ <details> <summary>🧩 Analysis chain</summary> 🌐 Web query: `In the current `@minecraft/server` API, what are the exact `WeatherType` member names and literal values?` 💡 Result: In the current `@minecraft/server` Script API, `WeatherType` has these members (name = literal value): - `WeatherType.Clear = "Clear"` [1] - `WeatherType.Rain = "Rain"` [1] - `WeatherType.Thunder = "Thunder"` [1] **Sources:** [1] ([learn.microsoft.com](https://learn.microsoft.com/lv-lv/minecraft/creator/scriptapi/minecraft/server/weathertype?view=minecraft-bedrock-stable)), [2] ([stirante.com](https://stirante.com/script/server/1.7.0-beta.1.20.40-preview.24/enums/WeatherType.html)) Citations: - 1: https://learn.microsoft.com/lv-lv/minecraft/creator/scriptapi/minecraft/server/weathertype?view=minecraft-bedrock-stable - 2: https://stirante.com/script/server/1.7.0-beta.1.20.40-preview.24/enums/WeatherType.html --- 🏁 Script executed: ```shell # Check if the evoWeather field exists at the claimed location in dex-species.ts sed -n '300,304p' sim/dex-species.ts ``` Repository: smell-of-curry/pokebedrock-showdown Length of output: 200 --- 🏁 Script executed: ```shell # Check the claimed evoWeather entries in pokedex.ts at lines 12779-12806 sed -n '12779,12806p' data/pokedex.ts | head -50 ``` Repository: smell-of-curry/pokebedrock-showdown Length of output: 744 --- 🏁 Script executed: ```shell # Search for all evoWeather assignments to see the pattern of values used rg 'evoWeather\s*:\s*' data/pokedex.ts -A 1 -B 1 ``` Repository: smell-of-curry/pokebedrock-showdown Length of output: 206 --- </details> **Align `evoWeather` with the enum member casing.** `evoWeather` is typed as `keyof typeof WeatherType`, which means it expects capitalized enum members (`"Clear"`, `"Rain"`, `"Thunder"`). However, `data/pokedex.ts` stores lowercase values (`"rain"`, `"thunder"`). This mismatch will cause evolution checks to fail at runtime. Change the data values to use capitalized strings matching the actual `WeatherType` enum members. <details> <summary>🤖 Prompt for AI Agents</summary> ``` Verify each finding against the current code and only fix it if needed. In `@sim/dex-species.ts` around lines 300 - 304, The evoWeather field is typed as keyof typeof WeatherType (expects enum member casing like "Clear"/"Rain"/"Thunder") but the pokedex data uses lowercase strings; update the pokedex entries that set evoWeather to use the exact capitalized WeatherType enum member names to match the evoWeather typing (look for evoWeather in species objects and ensure values match WeatherType casing) so evolution checks using WeatherType keys succeed at runtime. ``` </details> <!-- fingerprinting:phantom:medusa:grasshopper --> <!-- This is an auto-generated comment by CodeRabbit --> ✅ Addressed in commit 227faea
coderabbitai[bot] (Migrated from github.com) reviewed 2026-04-16 13:58:04 +00:00
coderabbitai[bot] (Migrated from github.com) left a comment
🧹 Nitpick comments (1)
sim/dex-species.ts (1)

290-314: New evolution fields are not yet reflected in evo info UX.

Lines 290-314 add conditions (evoPartyForms, evoNickname, evoWeather, evoMinDamage, evoMinRecoilDamage), but the info formatter in server/chat-commands/info.ts (Lines 671-700) still only renders legacy triggers. Consider extending that output so users can see the full evolution requirements.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@sim/dex-species.ts` around lines 290 - 314, The info command's evolution
formatter in server/chat-commands/info.ts currently only outputs legacy trigger
text and must be extended to include the new species fields evoPartyForms,
evoNickname, evoWeather, evoMinDamage, and evoMinRecoilDamage; update the
function that builds evo requirement strings (the evo info rendering block) to
check for each of these optional properties on the Species (or evolution) object
and append human-readable clauses (e.g., "requires party forms: ...", "nickname:
...", "weather: ...", "min damage: X", "min recoil: Y") to the existing trigger
description so the chat/info output shows all evolution conditions. Ensure you
reference the same property names (evoPartyForms, evoNickname, evoWeather,
evoMinDamage, evoMinRecoilDamage) and preserve existing legacy trigger text
behavior when those new fields are absent.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@sim/dex-species.ts`:
- Around line 290-314: The info command's evolution formatter in
server/chat-commands/info.ts currently only outputs legacy trigger text and must
be extended to include the new species fields evoPartyForms, evoNickname,
evoWeather, evoMinDamage, and evoMinRecoilDamage; update the function that
builds evo requirement strings (the evo info rendering block) to check for each
of these optional properties on the Species (or evolution) object and append
human-readable clauses (e.g., "requires party forms: ...", "nickname: ...",
"weather: ...", "min damage: X", "min recoil: Y") to the existing trigger
description so the chat/info output shows all evolution conditions. Ensure you
reference the same property names (evoPartyForms, evoNickname, evoWeather,
evoMinDamage, evoMinRecoilDamage) and preserve existing legacy trigger text
behavior when those new fields are absent.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 41e4135f-ca10-4a83-ba01-c377f917687c

📥 Commits

Reviewing files that changed from the base of the PR and between 54a1f9fd16 and 26afdd3ac8.

📒 Files selected for processing (2)
  • data/pokedex.ts
  • sim/dex-species.ts
🚧 Files skipped from review as they are similar to previous changes (1)
  • data/pokedex.ts
<details> <summary>🧹 Nitpick comments (1)</summary><blockquote> <details> <summary>sim/dex-species.ts (1)</summary><blockquote> `290-314`: **New evolution fields are not yet reflected in evo info UX.** Lines 290-314 add conditions (`evoPartyForms`, `evoNickname`, `evoWeather`, `evoMinDamage`, `evoMinRecoilDamage`), but the info formatter in `server/chat-commands/info.ts` (Lines 671-700) still only renders legacy triggers. Consider extending that output so users can see the full evolution requirements. <details> <summary>🤖 Prompt for AI Agents</summary> ``` Verify each finding against the current code and only fix it if needed. In `@sim/dex-species.ts` around lines 290 - 314, The info command's evolution formatter in server/chat-commands/info.ts currently only outputs legacy trigger text and must be extended to include the new species fields evoPartyForms, evoNickname, evoWeather, evoMinDamage, and evoMinRecoilDamage; update the function that builds evo requirement strings (the evo info rendering block) to check for each of these optional properties on the Species (or evolution) object and append human-readable clauses (e.g., "requires party forms: ...", "nickname: ...", "weather: ...", "min damage: X", "min recoil: Y") to the existing trigger description so the chat/info output shows all evolution conditions. Ensure you reference the same property names (evoPartyForms, evoNickname, evoWeather, evoMinDamage, evoMinRecoilDamage) and preserve existing legacy trigger text behavior when those new fields are absent. ``` </details> </blockquote></details> </blockquote></details> <details> <summary>🤖 Prompt for all review comments with AI agents</summary> ``` Verify each finding against the current code and only fix it if needed. Nitpick comments: In `@sim/dex-species.ts`: - Around line 290-314: The info command's evolution formatter in server/chat-commands/info.ts currently only outputs legacy trigger text and must be extended to include the new species fields evoPartyForms, evoNickname, evoWeather, evoMinDamage, and evoMinRecoilDamage; update the function that builds evo requirement strings (the evo info rendering block) to check for each of these optional properties on the Species (or evolution) object and append human-readable clauses (e.g., "requires party forms: ...", "nickname: ...", "weather: ...", "min damage: X", "min recoil: Y") to the existing trigger description so the chat/info output shows all evolution conditions. Ensure you reference the same property names (evoPartyForms, evoNickname, evoWeather, evoMinDamage, evoMinRecoilDamage) and preserve existing legacy trigger text behavior when those new fields are absent. ``` </details> --- <details> <summary>ℹ️ Review info</summary> <details> <summary>⚙️ Run configuration</summary> **Configuration used**: defaults **Review profile**: CHILL **Plan**: Pro **Run ID**: `41e4135f-ca10-4a83-ba01-c377f917687c` </details> <details> <summary>📥 Commits</summary> Reviewing files that changed from the base of the PR and between 54a1f9fd16843b2e47049fa2a87fb6a16fee5a60 and 26afdd3ac84bab1fae33f533597c9d2d9c2d221e. </details> <details> <summary>📒 Files selected for processing (2)</summary> * `data/pokedex.ts` * `sim/dex-species.ts` </details> <details> <summary>🚧 Files skipped from review as they are similar to previous changes (1)</summary> * data/pokedex.ts </details> </details> <!-- This is an auto-generated comment by CodeRabbit for review status -->
coderabbitai[bot] (Migrated from github.com) reviewed 2026-04-16 16:29:46 +00:00
coderabbitai[bot] (Migrated from github.com) left a comment

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@sim/battle-stream.ts`:
- Around line 196-198: The code unconditionally overwrites battlePokemon.name
and battlePokemon.fullname with speciesName, wiping custom nicknames; change it
so you only replace the display name when the current name equals the original
species name (i.e. it wasn't nicknamed). Concretely, read the pokemon's original
species name via (battlePokemon as any).species?.name (or fallback to
(battlePokemon as any).species), compare it to (battlePokemon as any).name, and
only set (battlePokemon as any).name = speciesName and (battlePokemon as
any).fullname = `${battlePokemon.side.id}: ${speciesName}` when they match;
otherwise preserve the existing name and update fullname using the preserved
nickname (`${battlePokemon.side.id}: ${battlePokemon.name}`) so downstream
protocol idents remain correct.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: c068de30-30fe-4b4b-a665-8009f4582f1e

📥 Commits

Reviewing files that changed from the base of the PR and between 26afdd3ac8 and 14c7ba8689.

📒 Files selected for processing (3)
  • data/pokedex.ts
  • sim/battle-stream.ts
  • sim/pokemon.ts
🚧 Files skipped from review as they are similar to previous changes (1)
  • data/pokedex.ts
**Actionable comments posted: 1** <details> <summary>🤖 Prompt for all review comments with AI agents</summary> ``` Verify each finding against the current code and only fix it if needed. Inline comments: In `@sim/battle-stream.ts`: - Around line 196-198: The code unconditionally overwrites battlePokemon.name and battlePokemon.fullname with speciesName, wiping custom nicknames; change it so you only replace the display name when the current name equals the original species name (i.e. it wasn't nicknamed). Concretely, read the pokemon's original species name via (battlePokemon as any).species?.name (or fallback to (battlePokemon as any).species), compare it to (battlePokemon as any).name, and only set (battlePokemon as any).name = speciesName and (battlePokemon as any).fullname = `${battlePokemon.side.id}: ${speciesName}` when they match; otherwise preserve the existing name and update fullname using the preserved nickname (`${battlePokemon.side.id}: ${battlePokemon.name}`) so downstream protocol idents remain correct. ``` </details> <details> <summary>🪄 Autofix (Beta)</summary> Fix all unresolved CodeRabbit comments on this PR: - [ ] <!-- {"checkboxId": "4b0d0e0a-96d7-4f10-b296-3a18ea78f0b9"} --> Push a commit to this branch (recommended) - [ ] <!-- {"checkboxId": "ff5b1114-7d8c-49e6-8ac1-43f82af23a33"} --> Create a new PR with the fixes </details> --- <details> <summary>ℹ️ Review info</summary> <details> <summary>⚙️ Run configuration</summary> **Configuration used**: defaults **Review profile**: CHILL **Plan**: Pro **Run ID**: `c068de30-30fe-4b4b-a665-8009f4582f1e` </details> <details> <summary>📥 Commits</summary> Reviewing files that changed from the base of the PR and between 26afdd3ac84bab1fae33f533597c9d2d9c2d221e and 14c7ba868959fa2b9b1090b5e76f63a1a40a804b. </details> <details> <summary>📒 Files selected for processing (3)</summary> * `data/pokedex.ts` * `sim/battle-stream.ts` * `sim/pokemon.ts` </details> <details> <summary>🚧 Files skipped from review as they are similar to previous changes (1)</summary> * data/pokedex.ts </details> </details> <!-- This is an auto-generated comment by CodeRabbit for review status -->
@ -192,6 +192,9 @@ export class BattleStream extends Streams.ObjectReadWriteStream<string> {
} :
null;
coderabbitai[bot] (Migrated from github.com) commented 2026-04-16 16:29:46 +00:00

⚠️ Potential issue | 🟠 Major

Preserve nicknames when syncing evolved identity.

Line 197-Line 198 unconditionally replaces the Pokémon’s display identity with speciesName, which erases custom nicknames and can produce incorrect ident values in downstream protocol messages.

Proposed fix
-					battlePokemon.formeChange(speciesName, sourceEffect, true);
-					// `@pokebedrock` - Update identity for true evolutions so protocol messages use the new name
-					(battlePokemon as any).name = speciesName;
-					(battlePokemon as any).fullname = `${battlePokemon.side.id}: ${speciesName}`;
+					const oldName = battlePokemon.name;
+					const oldBaseSpecies = battlePokemon.baseSpecies.baseSpecies;
+					battlePokemon.formeChange(speciesName, sourceEffect, true);
+					// Only refresh name/fullname when this mon was not nicknamed pre-evolution
+					if (oldName === oldBaseSpecies) {
+						(battlePokemon as any).name = speciesName;
+						(battlePokemon as any).fullname = `${battlePokemon.side.id}: ${speciesName}`;
+					}
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@sim/battle-stream.ts` around lines 196 - 198, The code unconditionally
overwrites battlePokemon.name and battlePokemon.fullname with speciesName,
wiping custom nicknames; change it so you only replace the display name when the
current name equals the original species name (i.e. it wasn't nicknamed).
Concretely, read the pokemon's original species name via (battlePokemon as
any).species?.name (or fallback to (battlePokemon as any).species), compare it
to (battlePokemon as any).name, and only set (battlePokemon as any).name =
speciesName and (battlePokemon as any).fullname = `${battlePokemon.side.id}:
${speciesName}` when they match; otherwise preserve the existing name and update
fullname using the preserved nickname (`${battlePokemon.side.id}:
${battlePokemon.name}`) so downstream protocol idents remain correct.

✅ Addressed in commit ea3b6a3

_⚠️ Potential issue_ | _🟠 Major_ **Preserve nicknames when syncing evolved identity.** Line 197-Line 198 unconditionally replaces the Pokémon’s display identity with `speciesName`, which erases custom nicknames and can produce incorrect `ident` values in downstream protocol messages. <details> <summary>Proposed fix</summary> ```diff - battlePokemon.formeChange(speciesName, sourceEffect, true); - // `@pokebedrock` - Update identity for true evolutions so protocol messages use the new name - (battlePokemon as any).name = speciesName; - (battlePokemon as any).fullname = `${battlePokemon.side.id}: ${speciesName}`; + const oldName = battlePokemon.name; + const oldBaseSpecies = battlePokemon.baseSpecies.baseSpecies; + battlePokemon.formeChange(speciesName, sourceEffect, true); + // Only refresh name/fullname when this mon was not nicknamed pre-evolution + if (oldName === oldBaseSpecies) { + (battlePokemon as any).name = speciesName; + (battlePokemon as any).fullname = `${battlePokemon.side.id}: ${speciesName}`; + } ``` </details> <details> <summary>🤖 Prompt for AI Agents</summary> ``` Verify each finding against the current code and only fix it if needed. In `@sim/battle-stream.ts` around lines 196 - 198, The code unconditionally overwrites battlePokemon.name and battlePokemon.fullname with speciesName, wiping custom nicknames; change it so you only replace the display name when the current name equals the original species name (i.e. it wasn't nicknamed). Concretely, read the pokemon's original species name via (battlePokemon as any).species?.name (or fallback to (battlePokemon as any).species), compare it to (battlePokemon as any).name, and only set (battlePokemon as any).name = speciesName and (battlePokemon as any).fullname = `${battlePokemon.side.id}: ${speciesName}` when they match; otherwise preserve the existing name and update fullname using the preserved nickname (`${battlePokemon.side.id}: ${battlePokemon.name}`) so downstream protocol idents remain correct. ``` </details> <!-- fingerprinting:phantom:poseidon:hawk:5d919115-a509-4bd5-a13f-12dfa66e1bca --> <!-- This is an auto-generated comment by CodeRabbit --> ✅ Addressed in commit ea3b6a3
coderabbitai[bot] (Migrated from github.com) reviewed 2026-04-29 01:20:57 +00:00
coderabbitai[bot] (Migrated from github.com) left a comment

Actionable comments posted: 3

♻️ Duplicate comments (1)
data/pokedex.ts (1)

18254-18256: ⚠️ Potential issue | 🟠 Major

Use the canonical Leader's Crest item string here.

Line 18255 still says "Leaders Crest". If item resolution is an exact display-name match, this makes the custom evolution unreachable.

♻️ Suggested fix
-		evoItem: "Leaders Crest",
+		evoItem: "Leader's Crest",
#!/bin/bash
set -euo pipefail

echo "=== current Kingambit entry ==="
sed -n '18253,18256p' data/pokedex.ts

echo "=== repo-wide item name variants ==="
rg -n "Leader's Crest|Leaders Crest|leaders_crest" .

Expected result: one canonical spelling should be shared by item data and all call sites. If the repo item definition uses Leader's Crest, this entry should match it.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@data/pokedex.ts` around lines 18254 - 18256, The evo entry for Kingambit uses
the non-canonical evoItem string "Leaders Crest", which must exactly match the
canonical item display name; update the evoItem value to "Leader's Crest" and
adjust evoCondition to match that wording if needed (e.g., "use a Leader's
Crest"), and search other references that use evoItem/evoCondition for this
evolution rule (fields: evoType, evoItem, evoCondition) to ensure all call sites
and item data use the same canonical "Leader's Crest" spelling.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@data/pokedex.ts`:
- Around line 12535-12536: The new evo fields (evoNickname, evoWeather,
evoPartyForms, evoMinDamage, evoMinRecoilDamage) declared in sim/dex-species.ts
and populated in data/pokedex.ts are not enforced because the evolution checks
in sim/team-validator.ts only look at evoLevel and evoMove; update the validator
(the evolution/validation logic inside sim/team-validator.ts—e.g., validateSet
or the function that checks species evolution requirements) to read and enforce
these new fields: verify evoNickname matches the nickname, evoWeather matches
current battle weather, evoPartyForms checks for required partner/party forms,
and evoMinDamage/evoMinRecoilDamage check the appropriate accumulated damage
thresholds before allowing the evolution; ensure you reference the species' evo*
properties when evaluating evolution conditions so those Pokémon
(Malamar/Goodra/Runerigus/Wyrdeer/Basculegion) are validated correctly.

In `@sim/battle-stream.ts`:
- Around line 195-205: The nickname check is using battlePokemon.species.name
(the current forme) which misdetects defaults for formes; change the hadNickname
detection before calling formeChange to compare battlePokemon.name against the
Pokémon's base/default species name (e.g., battlePokemon.baseSpecies.name or the
equivalent baseSpecies property on battlePokemon) so that only true custom
nicknames suppress the identity update; then keep the existing logic that sets
(battlePokemon as any).name and .fullname after
battlePokemon.formeChange(speciesName, sourceEffect, true) when hadNickname is
false.

In `@sim/dex-species.ts`:
- Line 3: The code imports MoonPhase and WeatherType as type-only but later uses
"keyof typeof MoonPhase" and "keyof typeof WeatherType", which require runtime
values; change the imports to regular runtime imports (import { MoonPhase,
WeatherType } from '@minecraft/server') so those symbols exist at runtime, or
keep type-only imports and change the type expressions to import type queries
(e.g. use "keyof import('@minecraft/server')['MoonPhase']" and similarly for
WeatherType) so the compiler can resolve them in strict mode; update the usages
of MoonPhase and WeatherType accordingly.

---

Duplicate comments:
In `@data/pokedex.ts`:
- Around line 18254-18256: The evo entry for Kingambit uses the non-canonical
evoItem string "Leaders Crest", which must exactly match the canonical item
display name; update the evoItem value to "Leader's Crest" and adjust
evoCondition to match that wording if needed (e.g., "use a Leader's Crest"), and
search other references that use evoItem/evoCondition for this evolution rule
(fields: evoType, evoItem, evoCondition) to ensure all call sites and item data
use the same canonical "Leader's Crest" spelling.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 840423b6-fc43-4ca5-8996-db833ad1ace5

📥 Commits

Reviewing files that changed from the base of the PR and between 14c7ba8689 and b01042d00f.

📒 Files selected for processing (4)
  • data/pokedex.ts
  • sim/battle-stream.ts
  • sim/dex-species.ts
  • sim/pokemon.ts
🚧 Files skipped from review as they are similar to previous changes (1)
  • sim/pokemon.ts
**Actionable comments posted: 3** <details> <summary>♻️ Duplicate comments (1)</summary><blockquote> <details> <summary>data/pokedex.ts (1)</summary><blockquote> `18254-18256`: _⚠️ Potential issue_ | _🟠 Major_ **Use the canonical `Leader's Crest` item string here.** Line 18255 still says `"Leaders Crest"`. If item resolution is an exact display-name match, this makes the custom evolution unreachable. <details> <summary>♻️ Suggested fix</summary> ```diff - evoItem: "Leaders Crest", + evoItem: "Leader's Crest", ``` </details> ```shell #!/bin/bash set -euo pipefail echo "=== current Kingambit entry ===" sed -n '18253,18256p' data/pokedex.ts echo "=== repo-wide item name variants ===" rg -n "Leader's Crest|Leaders Crest|leaders_crest" . ``` Expected result: one canonical spelling should be shared by item data and all call sites. If the repo item definition uses `Leader's Crest`, this entry should match it. <details> <summary>🤖 Prompt for AI Agents</summary> ``` Verify each finding against the current code and only fix it if needed. In `@data/pokedex.ts` around lines 18254 - 18256, The evo entry for Kingambit uses the non-canonical evoItem string "Leaders Crest", which must exactly match the canonical item display name; update the evoItem value to "Leader's Crest" and adjust evoCondition to match that wording if needed (e.g., "use a Leader's Crest"), and search other references that use evoItem/evoCondition for this evolution rule (fields: evoType, evoItem, evoCondition) to ensure all call sites and item data use the same canonical "Leader's Crest" spelling. ``` </details> </blockquote></details> </blockquote></details> <details> <summary>🤖 Prompt for all review comments with AI agents</summary> ``` Verify each finding against the current code and only fix it if needed. Inline comments: In `@data/pokedex.ts`: - Around line 12535-12536: The new evo fields (evoNickname, evoWeather, evoPartyForms, evoMinDamage, evoMinRecoilDamage) declared in sim/dex-species.ts and populated in data/pokedex.ts are not enforced because the evolution checks in sim/team-validator.ts only look at evoLevel and evoMove; update the validator (the evolution/validation logic inside sim/team-validator.ts—e.g., validateSet or the function that checks species evolution requirements) to read and enforce these new fields: verify evoNickname matches the nickname, evoWeather matches current battle weather, evoPartyForms checks for required partner/party forms, and evoMinDamage/evoMinRecoilDamage check the appropriate accumulated damage thresholds before allowing the evolution; ensure you reference the species' evo* properties when evaluating evolution conditions so those Pokémon (Malamar/Goodra/Runerigus/Wyrdeer/Basculegion) are validated correctly. In `@sim/battle-stream.ts`: - Around line 195-205: The nickname check is using battlePokemon.species.name (the current forme) which misdetects defaults for formes; change the hadNickname detection before calling formeChange to compare battlePokemon.name against the Pokémon's base/default species name (e.g., battlePokemon.baseSpecies.name or the equivalent baseSpecies property on battlePokemon) so that only true custom nicknames suppress the identity update; then keep the existing logic that sets (battlePokemon as any).name and .fullname after battlePokemon.formeChange(speciesName, sourceEffect, true) when hadNickname is false. In `@sim/dex-species.ts`: - Line 3: The code imports MoonPhase and WeatherType as type-only but later uses "keyof typeof MoonPhase" and "keyof typeof WeatherType", which require runtime values; change the imports to regular runtime imports (import { MoonPhase, WeatherType } from '@minecraft/server') so those symbols exist at runtime, or keep type-only imports and change the type expressions to import type queries (e.g. use "keyof import('@minecraft/server')['MoonPhase']" and similarly for WeatherType) so the compiler can resolve them in strict mode; update the usages of MoonPhase and WeatherType accordingly. --- Duplicate comments: In `@data/pokedex.ts`: - Around line 18254-18256: The evo entry for Kingambit uses the non-canonical evoItem string "Leaders Crest", which must exactly match the canonical item display name; update the evoItem value to "Leader's Crest" and adjust evoCondition to match that wording if needed (e.g., "use a Leader's Crest"), and search other references that use evoItem/evoCondition for this evolution rule (fields: evoType, evoItem, evoCondition) to ensure all call sites and item data use the same canonical "Leader's Crest" spelling. ``` </details> <details> <summary>🪄 Autofix (Beta)</summary> Fix all unresolved CodeRabbit comments on this PR: - [ ] <!-- {"checkboxId": "4b0d0e0a-96d7-4f10-b296-3a18ea78f0b9"} --> Push a commit to this branch (recommended) - [ ] <!-- {"checkboxId": "ff5b1114-7d8c-49e6-8ac1-43f82af23a33"} --> Create a new PR with the fixes </details> --- <details> <summary>ℹ️ Review info</summary> <details> <summary>⚙️ Run configuration</summary> **Configuration used**: defaults **Review profile**: CHILL **Plan**: Pro **Run ID**: `840423b6-fc43-4ca5-8996-db833ad1ace5` </details> <details> <summary>📥 Commits</summary> Reviewing files that changed from the base of the PR and between 14c7ba868959fa2b9b1090b5e76f63a1a40a804b and b01042d00fc5e4f2bb687989ca3af143912f6f08. </details> <details> <summary>📒 Files selected for processing (4)</summary> * `data/pokedex.ts` * `sim/battle-stream.ts` * `sim/dex-species.ts` * `sim/pokemon.ts` </details> <details> <summary>🚧 Files skipped from review as they are similar to previous changes (1)</summary> * sim/pokemon.ts </details> </details> <!-- This is an auto-generated comment by CodeRabbit for review status -->
coderabbitai[bot] (Migrated from github.com) commented 2026-04-29 01:20:54 +00:00

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "=== consumers for new evolution fields ==="
for field in evoNickname evoWeather evoPartyForms evoMinDamage evoMinRecoilDamage; do
  echo "--- $field ---"
  rg -n --glob '!data/pokedex.ts' --glob '!sim/dex-species.ts' "\\b${field}\\b" .
  echo
done

echo "=== current validator behavior ==="
rg -n -C2 '\bevoLevel\b' sim/team-validator.ts

Repository: smell-of-curry/pokebedrock-showdown

Length of output: 142


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "=== Search for new evolution fields across codebase ==="
for field in evoNickname evoWeather evoPartyForms evoMinDamage evoMinRecoilDamage; do
  echo "--- $field ---"
  count=$(rg --glob '!data/pokedex.ts' --glob '!sim/dex-species.ts' "\\b${field}\\b" . 2>/dev/null | wc -l)
  echo "Found in $count locations"
  rg --glob '!data/pokedex.ts' --glob '!sim/dex-species.ts' "\\b${field}\\b" . 2>/dev/null | head -5
done

echo ""
echo "=== Field declarations in dex-species.ts ==="
rg -n "evo(Nickname|Weather|PartyForms|MinDamage|MinRecoilDamage)" sim/dex-species.ts | head -20

echo ""
echo "=== Evolution validation logic ==="
rg -n "evo" sim/team-validator.ts | head -20

Repository: smell-of-curry/pokebedrock-showdown

Length of output: 155


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "=== Check evolution-related methods in dex-species.ts ==="
cat sim/dex-species.ts | grep -n "canEvolve\|getEvolution" | head -20

Repository: smell-of-curry/pokebedrock-showdown

Length of output: 137


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "=== Search for evolution condition processing ==="
rg -n "evoCondition|getEvoChain" sim/ --type ts --type js | head -30

Repository: smell-of-curry/pokebedrock-showdown

Length of output: 193


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "=== Check if files exist ==="
ls -la sim/dex-species.ts data/pokedex.ts sim/team-validator.ts 2>&1 || echo "Files may not exist"

echo ""
echo "=== dex-species.ts field declarations around line 211 ==="
sed -n '190,230p' sim/dex-species.ts

Repository: smell-of-curry/pokebedrock-showdown

Length of output: 1635


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "=== Search for all evo* field declarations in dex-species.ts ==="
rg -n "^\s*(readonly\s+)?evo" sim/dex-species.ts

echo ""
echo "=== Search for any use of evolution fields in sim/ ==="
rg "evo(Nickname|Weather|PartyForms|MinDamage|MinRecoilDamage)" sim/ --type ts

Repository: smell-of-curry/pokebedrock-showdown

Length of output: 1486


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "=== Check pokedex.ts lines mentioned in review ==="
echo "Lines 12535-12536:"
sed -n '12535,12536p' data/pokedex.ts

echo ""
echo "Lines 12808-12809:"
sed -n '12808,12809p' data/pokedex.ts

echo ""
echo "=== Check if these are actual evolution field usages ==="
sed -n '12530,12545p' data/pokedex.ts

Repository: smell-of-curry/pokebedrock-showdown

Length of output: 784


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "=== Evolution validation in team-validator.ts ==="
rg -n "evoLevel|evoItem|evoMove|evolve" sim/team-validator.ts | head -30

echo ""
echo "=== Search for evolution checking logic ==="
rg -n "function.*evo|canEvolve|checkEvo" sim/ --type ts -A 5 | head -50

Repository: smell-of-curry/pokebedrock-showdown

Length of output: 1621


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "=== Check what evolution fields are actually checked ==="
grep -n "evo" sim/team-validator.ts | grep -v "^[[:space:]]*\*" | head -30

Repository: smell-of-curry/pokebedrock-showdown

Length of output: 2310


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "=== Look for where evolution conditions are evaluated ==="
rg -n "evoCondition|evoLevel|evoItem|evoMove" sim/ --type ts | grep -v "dex-species.ts:.*declare\|dex-species.ts:.*readonly"

Repository: smell-of-curry/pokebedrock-showdown

Length of output: 973


These new custom evo* fields are not wired into evolution validation.

evoNickname, evoWeather, evoPartyForms, evoMinDamage, and evoMinRecoilDamage are declared in sim/dex-species.ts and populated in data/pokedex.ts, but the evolution validator in sim/team-validator.ts only checks evoLevel and evoMove. The new fields are not referenced anywhere else in the simulator, so Malamar/Goodra/Runerigus/Wyrdeer/Basculegion will ignore these restrictions until the validator logic is updated to consume them.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@data/pokedex.ts` around lines 12535 - 12536, The new evo fields (evoNickname,
evoWeather, evoPartyForms, evoMinDamage, evoMinRecoilDamage) declared in
sim/dex-species.ts and populated in data/pokedex.ts are not enforced because the
evolution checks in sim/team-validator.ts only look at evoLevel and evoMove;
update the validator (the evolution/validation logic inside
sim/team-validator.ts—e.g., validateSet or the function that checks species
evolution requirements) to read and enforce these new fields: verify evoNickname
matches the nickname, evoWeather matches current battle weather, evoPartyForms
checks for required partner/party forms, and evoMinDamage/evoMinRecoilDamage
check the appropriate accumulated damage thresholds before allowing the
evolution; ensure you reference the species' evo* properties when evaluating
evolution conditions so those Pokémon
(Malamar/Goodra/Runerigus/Wyrdeer/Basculegion) are validated correctly.
_⚠️ Potential issue_ | _🟠 Major_ <details> <summary>🧩 Analysis chain</summary> 🏁 Script executed: ```shell #!/bin/bash set -euo pipefail echo "=== consumers for new evolution fields ===" for field in evoNickname evoWeather evoPartyForms evoMinDamage evoMinRecoilDamage; do echo "--- $field ---" rg -n --glob '!data/pokedex.ts' --glob '!sim/dex-species.ts' "\\b${field}\\b" . echo done echo "=== current validator behavior ===" rg -n -C2 '\bevoLevel\b' sim/team-validator.ts ``` Repository: smell-of-curry/pokebedrock-showdown Length of output: 142 --- 🏁 Script executed: ```shell #!/bin/bash set -euo pipefail echo "=== Search for new evolution fields across codebase ===" for field in evoNickname evoWeather evoPartyForms evoMinDamage evoMinRecoilDamage; do echo "--- $field ---" count=$(rg --glob '!data/pokedex.ts' --glob '!sim/dex-species.ts' "\\b${field}\\b" . 2>/dev/null | wc -l) echo "Found in $count locations" rg --glob '!data/pokedex.ts' --glob '!sim/dex-species.ts' "\\b${field}\\b" . 2>/dev/null | head -5 done echo "" echo "=== Field declarations in dex-species.ts ===" rg -n "evo(Nickname|Weather|PartyForms|MinDamage|MinRecoilDamage)" sim/dex-species.ts | head -20 echo "" echo "=== Evolution validation logic ===" rg -n "evo" sim/team-validator.ts | head -20 ``` Repository: smell-of-curry/pokebedrock-showdown Length of output: 155 --- 🏁 Script executed: ```shell #!/bin/bash set -euo pipefail echo "=== Check evolution-related methods in dex-species.ts ===" cat sim/dex-species.ts | grep -n "canEvolve\|getEvolution" | head -20 ``` Repository: smell-of-curry/pokebedrock-showdown Length of output: 137 --- 🏁 Script executed: ```shell #!/bin/bash set -euo pipefail echo "=== Search for evolution condition processing ===" rg -n "evoCondition|getEvoChain" sim/ --type ts --type js | head -30 ``` Repository: smell-of-curry/pokebedrock-showdown Length of output: 193 --- 🏁 Script executed: ```shell #!/bin/bash set -euo pipefail echo "=== Check if files exist ===" ls -la sim/dex-species.ts data/pokedex.ts sim/team-validator.ts 2>&1 || echo "Files may not exist" echo "" echo "=== dex-species.ts field declarations around line 211 ===" sed -n '190,230p' sim/dex-species.ts ``` Repository: smell-of-curry/pokebedrock-showdown Length of output: 1635 --- 🏁 Script executed: ```shell #!/bin/bash set -euo pipefail echo "=== Search for all evo* field declarations in dex-species.ts ===" rg -n "^\s*(readonly\s+)?evo" sim/dex-species.ts echo "" echo "=== Search for any use of evolution fields in sim/ ===" rg "evo(Nickname|Weather|PartyForms|MinDamage|MinRecoilDamage)" sim/ --type ts ``` Repository: smell-of-curry/pokebedrock-showdown Length of output: 1486 --- 🏁 Script executed: ```shell #!/bin/bash set -euo pipefail echo "=== Check pokedex.ts lines mentioned in review ===" echo "Lines 12535-12536:" sed -n '12535,12536p' data/pokedex.ts echo "" echo "Lines 12808-12809:" sed -n '12808,12809p' data/pokedex.ts echo "" echo "=== Check if these are actual evolution field usages ===" sed -n '12530,12545p' data/pokedex.ts ``` Repository: smell-of-curry/pokebedrock-showdown Length of output: 784 --- 🏁 Script executed: ```shell #!/bin/bash set -euo pipefail echo "=== Evolution validation in team-validator.ts ===" rg -n "evoLevel|evoItem|evoMove|evolve" sim/team-validator.ts | head -30 echo "" echo "=== Search for evolution checking logic ===" rg -n "function.*evo|canEvolve|checkEvo" sim/ --type ts -A 5 | head -50 ``` Repository: smell-of-curry/pokebedrock-showdown Length of output: 1621 --- 🏁 Script executed: ```shell #!/bin/bash set -euo pipefail echo "=== Check what evolution fields are actually checked ===" grep -n "evo" sim/team-validator.ts | grep -v "^[[:space:]]*\*" | head -30 ``` Repository: smell-of-curry/pokebedrock-showdown Length of output: 2310 --- 🏁 Script executed: ```shell #!/bin/bash set -euo pipefail echo "=== Look for where evolution conditions are evaluated ===" rg -n "evoCondition|evoLevel|evoItem|evoMove" sim/ --type ts | grep -v "dex-species.ts:.*declare\|dex-species.ts:.*readonly" ``` Repository: smell-of-curry/pokebedrock-showdown Length of output: 973 --- </details> **These new custom `evo*` fields are not wired into evolution validation.** `evoNickname`, `evoWeather`, `evoPartyForms`, `evoMinDamage`, and `evoMinRecoilDamage` are declared in `sim/dex-species.ts` and populated in `data/pokedex.ts`, but the evolution validator in `sim/team-validator.ts` only checks `evoLevel` and `evoMove`. The new fields are not referenced anywhere else in the simulator, so Malamar/Goodra/Runerigus/Wyrdeer/Basculegion will ignore these restrictions until the validator logic is updated to consume them. <details> <summary>🤖 Prompt for AI Agents</summary> ``` Verify each finding against the current code and only fix it if needed. In `@data/pokedex.ts` around lines 12535 - 12536, The new evo fields (evoNickname, evoWeather, evoPartyForms, evoMinDamage, evoMinRecoilDamage) declared in sim/dex-species.ts and populated in data/pokedex.ts are not enforced because the evolution checks in sim/team-validator.ts only look at evoLevel and evoMove; update the validator (the evolution/validation logic inside sim/team-validator.ts—e.g., validateSet or the function that checks species evolution requirements) to read and enforce these new fields: verify evoNickname matches the nickname, evoWeather matches current battle weather, evoPartyForms checks for required partner/party forms, and evoMinDamage/evoMinRecoilDamage check the appropriate accumulated damage thresholds before allowing the evolution; ensure you reference the species' evo* properties when evaluating evolution conditions so those Pokémon (Malamar/Goodra/Runerigus/Wyrdeer/Basculegion) are validated correctly. ``` </details> <!-- fingerprinting:phantom:medusa:grasshopper:016e7b13-cfe3-43f8-99e8-3d44b832de7b --> <!-- 4e71b3a2 --> <!-- This is an auto-generated comment by CodeRabbit -->
@ -192,6 +192,9 @@ export class BattleStream extends Streams.ObjectReadWriteStream<string> {
} :
coderabbitai[bot] (Migrated from github.com) commented 2026-04-29 01:20:54 +00:00

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Verify how Pokemon default names are initialized relative to species/baseSpecies.
rg -nP --type=ts -C5 '\bthis\.name\s*=' sim/pokemon.ts
rg -nP --type=ts -C5 '\bbaseSpecies\b' sim/pokemon.ts

Repository: smell-of-curry/pokebedrock-showdown

Length of output: 5346


Nickname detection during evolution can incorrectly skip identity refresh if Pokémon are in formes with differing display names.

When hadNickname compares only against battlePokemon.species.name, it misclassifies default (non-nicknamed) Pokémon as "nicknamed" if they occupy a forme where the display name differs from species.name. For example, Greninja in a Bond forme has name = "Greninja" (the base species default from initialization in sim/pokemon.ts line 332) but species.name = "Greninja-Bond", causing the check to incorrectly flag it as nicknamed and skip the name and fullname updates during evolution, leaving stale identity in protocol messages.

Proposed fix
-					const previousSpeciesName = battlePokemon.species.name;
-					const hadNickname = battlePokemon.name !== previousSpeciesName;
+					const previousSpeciesName = battlePokemon.species.name;
+					const previousBaseSpeciesName = battlePokemon.species.baseSpecies;
+					const previousName = battlePokemon.name;
+					const hadNickname =
+						previousName !== previousSpeciesName &&
+						previousName !== previousBaseSpeciesName;
@@
-					if (!hadNickname) {
-						(battlePokemon as any).name = speciesName;
-						(battlePokemon as any).fullname = `${battlePokemon.side.id}: ${speciesName}`;
-					}
+					if (!hadNickname) (battlePokemon as any).name = speciesName;
+					(battlePokemon as any).fullname = `${battlePokemon.side.id}: ${(battlePokemon as any).name}`;
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@sim/battle-stream.ts` around lines 195 - 205, The nickname check is using
battlePokemon.species.name (the current forme) which misdetects defaults for
formes; change the hadNickname detection before calling formeChange to compare
battlePokemon.name against the Pokémon's base/default species name (e.g.,
battlePokemon.baseSpecies.name or the equivalent baseSpecies property on
battlePokemon) so that only true custom nicknames suppress the identity update;
then keep the existing logic that sets (battlePokemon as any).name and .fullname
after battlePokemon.formeChange(speciesName, sourceEffect, true) when
hadNickname is false.

✅ Addressed in commits ea3b6a3 to e78a4ce

_⚠️ Potential issue_ | _🟠 Major_ <details> <summary>🧩 Analysis chain</summary> 🏁 Script executed: ```shell #!/bin/bash # Verify how Pokemon default names are initialized relative to species/baseSpecies. rg -nP --type=ts -C5 '\bthis\.name\s*=' sim/pokemon.ts rg -nP --type=ts -C5 '\bbaseSpecies\b' sim/pokemon.ts ``` Repository: smell-of-curry/pokebedrock-showdown Length of output: 5346 --- </details> **Nickname detection during evolution can incorrectly skip identity refresh if Pokémon are in formes with differing display names.** When `hadNickname` compares only against `battlePokemon.species.name`, it misclassifies default (non-nicknamed) Pokémon as "nicknamed" if they occupy a forme where the display name differs from `species.name`. For example, Greninja in a Bond forme has `name = "Greninja"` (the base species default from initialization in `sim/pokemon.ts` line 332) but `species.name = "Greninja-Bond"`, causing the check to incorrectly flag it as nicknamed and skip the `name` and `fullname` updates during evolution, leaving stale identity in protocol messages. <details> <summary>Proposed fix</summary> ```diff - const previousSpeciesName = battlePokemon.species.name; - const hadNickname = battlePokemon.name !== previousSpeciesName; + const previousSpeciesName = battlePokemon.species.name; + const previousBaseSpeciesName = battlePokemon.species.baseSpecies; + const previousName = battlePokemon.name; + const hadNickname = + previousName !== previousSpeciesName && + previousName !== previousBaseSpeciesName; @@ - if (!hadNickname) { - (battlePokemon as any).name = speciesName; - (battlePokemon as any).fullname = `${battlePokemon.side.id}: ${speciesName}`; - } + if (!hadNickname) (battlePokemon as any).name = speciesName; + (battlePokemon as any).fullname = `${battlePokemon.side.id}: ${(battlePokemon as any).name}`; ``` </details> <details> <summary>🤖 Prompt for AI Agents</summary> ``` Verify each finding against the current code and only fix it if needed. In `@sim/battle-stream.ts` around lines 195 - 205, The nickname check is using battlePokemon.species.name (the current forme) which misdetects defaults for formes; change the hadNickname detection before calling formeChange to compare battlePokemon.name against the Pokémon's base/default species name (e.g., battlePokemon.baseSpecies.name or the equivalent baseSpecies property on battlePokemon) so that only true custom nicknames suppress the identity update; then keep the existing logic that sets (battlePokemon as any).name and .fullname after battlePokemon.formeChange(speciesName, sourceEffect, true) when hadNickname is false. ``` </details> <!-- fingerprinting:phantom:poseidon:hawk:099db108-2ebc-4997-ab9c-2fef86bafca4 --> <!-- 4e71b3a2 --> <!-- This is an auto-generated comment by CodeRabbit --> ✅ Addressed in commits ea3b6a3 to e78a4ce
@ -2,3 +2,3 @@
import { Utils } from '../lib/utils';
import { type MoonPhase } from '@minecraft/server';
import { type MoonPhase, type WeatherType } from '@minecraft/server';
coderabbitai[bot] (Migrated from github.com) commented 2026-04-29 01:20:54 +00:00

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🌐 Web query:

In TypeScript, can keyof typeof WeatherTypebe used whenWeatherTypeis imported viaimport type? If not, is keyof typeof import("module").WeatherType the correct type-only alternative?

💡 Result:

No—if you import a symbol with import type, you can’t use it in a typeof query. keyof typeof WeatherType requires typeof WeatherType, which needs a value-space symbol; a type-only import erases the import from the JS/value side. Correct type-only alternative: use an import type query, e.g. keyof import("module").WeatherType. Example: import type { WeatherType } from "./weather"; // type Keys1 = keyof typeof WeatherType; // ❌ not valid: WeatherType is type-only type Keys2 = keyof import("./weather").WeatherType; // ✅ type-only Why: TypeScript’s module reference docs explain that import type imports only declarations for type positions and is erased from JS emit, and they also show import types as a way to reference exported types from a module without an import declaration.

Citations:


🏁 Script executed:

# Check the actual code at the flagged lines
cd sim && cat -n dex-species.ts | sed -n '1,10p;280,310p'

Repository: smell-of-curry/pokebedrock-showdown

Length of output: 1465


🏁 Script executed:

# Find TypeScript config
find . -name "tsconfig*.json" -type f | head -5

# Check for build/type-check scripts in package.json
cat package.json | grep -A 5 '"scripts"'

# Search for any type errors or build logs
find . -name "*.log" -o -name ".tsbuildinfo" -o -name "diagnostics.json" 2>/dev/null | head -10

Repository: smell-of-curry/pokebedrock-showdown

Length of output: 649


🏁 Script executed:

# Check both tsconfig files to see what's included
echo "=== ./sim/tsconfig.json ==="
cat ./sim/tsconfig.json

echo ""
echo "=== ./tsconfig.json ==="
cat ./tsconfig.json

# Check if dex-species is imported by the compiled files
echo ""
echo "=== Checking imports in sim/index.ts and sim/global-types.ts ==="
grep -n "dex-species" sim/index.ts sim/global-types.ts 2>/dev/null || echo "No direct imports found"

# Search for dex-species imports anywhere
echo ""
echo "=== Searching for any imports of dex-species ==="
rg "from.*dex-species" --type ts -A 1 | head -20

Repository: smell-of-curry/pokebedrock-showdown

Length of output: 3118


🏁 Script executed:

# Verify by checking the actual TypeScript error that would occur
# Try to compile dex-species.ts to see if it fails
cd sim && npx tsc dex-species.ts --strict --noEmit --moduleResolution node --lib es2020 2>&1 | head -30

Repository: smell-of-curry/pokebedrock-showdown

Length of output: 2699


🏁 Script executed:

# Run the official test command that includes proper context
npm run test-npm 2>&1 | grep -A 5 "dex-species\|WeatherType\|MoonPhase\|keyof typeof" || echo "No specific errors found for the review concern"

# Also check the full output for any compilation errors
npm run test-npm 2>&1 | tail -50

Repository: smell-of-curry/pokebedrock-showdown

Length of output: 772


🏁 Script executed:

# Try to compile with the full root tsconfig but skip lib checking
npx tsc --project tsconfig.json --noEmit 2>&1 | grep -E "dex-species|WeatherType|MoonPhase|keyof typeof|error TS" | head -20

# Also check if there's a CI workflow that shows build status
find .github -name "*.yml" -o -name "*.yaml" 2>/dev/null | head -5

Repository: smell-of-curry/pokebedrock-showdown

Length of output: 3332


🏁 Script executed:

# Check the test workflow to see what actual type-checking is done
cat .github/workflows/test.yml

# Also check if there are recent workflow runs
git log --oneline --all -20 2>/dev/null | head -20

Repository: smell-of-curry/pokebedrock-showdown

Length of output: 3813


🏁 Script executed:

# Get the full npm scripts section
cat package.json | grep -A 30 '"scripts"'

Repository: smell-of-curry/pokebedrock-showdown

Length of output: 1500


Remove import type or use import type queries instead of keyof typeof.

Line 3 imports MoonPhase and WeatherType as type-only, but lines 284 and 304 use keyof typeof with these symbols. In TypeScript strict mode, typeof requires a runtime value; type-only imports don't provide one.

Either import as regular imports, or use import type query syntax:

Correct fix (type-only)
-import { type MoonPhase, type WeatherType } from '@minecraft/server';
+import type { MoonPhase, WeatherType } from '@minecraft/server';

-	readonly evoMoonPhase?: keyof typeof MoonPhase;
+	readonly evoMoonPhase?: keyof import('@minecraft/server').MoonPhase;

-	readonly evoWeather?: keyof typeof WeatherType;
+	readonly evoWeather?: keyof import('@minecraft/server').WeatherType;

Also applies to: 304-304

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@sim/dex-species.ts` at line 3, The code imports MoonPhase and WeatherType as
type-only but later uses "keyof typeof MoonPhase" and "keyof typeof
WeatherType", which require runtime values; change the imports to regular
runtime imports (import { MoonPhase, WeatherType } from '@minecraft/server') so
those symbols exist at runtime, or keep type-only imports and change the type
expressions to import type queries (e.g. use "keyof
import('@minecraft/server')['MoonPhase']" and similarly for WeatherType) so the
compiler can resolve them in strict mode; update the usages of MoonPhase and
WeatherType accordingly.
_⚠️ Potential issue_ | _🟠 Major_ <details> <summary>🧩 Analysis chain</summary> 🌐 Web query: `In TypeScript, can `keyof typeof WeatherType` be used when `WeatherType` is imported via `import type`? If not, is `keyof typeof import("module").WeatherType` the correct type-only alternative?` 💡 Result: No—if you import a symbol with import type, you can’t use it in a typeof query. keyof typeof WeatherType requires typeof WeatherType, which needs a value-space symbol; a type-only import erases the import from the JS/value side. Correct type-only alternative: use an import type query, e.g. keyof import("module").WeatherType. Example: import type { WeatherType } from "./weather"; // type Keys1 = keyof typeof WeatherType; // ❌ not valid: WeatherType is type-only type Keys2 = keyof import("./weather").WeatherType; // ✅ type-only Why: TypeScript’s module reference docs explain that import type imports only declarations for type positions and is erased from JS emit, and they also show import types as a way to reference exported types from a module without an import declaration. Citations: - 1: https://www.typescriptlang.org/docs/handbook/modules/reference - 2: https://www.typescripts.org/docs/handbook/modules/reference.html - 3: https://www.typescriptlang.org/docs/handbook/release-notes/typescript-3-8.html --- 🏁 Script executed: ```shell # Check the actual code at the flagged lines cd sim && cat -n dex-species.ts | sed -n '1,10p;280,310p' ``` Repository: smell-of-curry/pokebedrock-showdown Length of output: 1465 --- 🏁 Script executed: ```shell # Find TypeScript config find . -name "tsconfig*.json" -type f | head -5 # Check for build/type-check scripts in package.json cat package.json | grep -A 5 '"scripts"' # Search for any type errors or build logs find . -name "*.log" -o -name ".tsbuildinfo" -o -name "diagnostics.json" 2>/dev/null | head -10 ``` Repository: smell-of-curry/pokebedrock-showdown Length of output: 649 --- 🏁 Script executed: ```shell # Check both tsconfig files to see what's included echo "=== ./sim/tsconfig.json ===" cat ./sim/tsconfig.json echo "" echo "=== ./tsconfig.json ===" cat ./tsconfig.json # Check if dex-species is imported by the compiled files echo "" echo "=== Checking imports in sim/index.ts and sim/global-types.ts ===" grep -n "dex-species" sim/index.ts sim/global-types.ts 2>/dev/null || echo "No direct imports found" # Search for dex-species imports anywhere echo "" echo "=== Searching for any imports of dex-species ===" rg "from.*dex-species" --type ts -A 1 | head -20 ``` Repository: smell-of-curry/pokebedrock-showdown Length of output: 3118 --- 🏁 Script executed: ```shell # Verify by checking the actual TypeScript error that would occur # Try to compile dex-species.ts to see if it fails cd sim && npx tsc dex-species.ts --strict --noEmit --moduleResolution node --lib es2020 2>&1 | head -30 ``` Repository: smell-of-curry/pokebedrock-showdown Length of output: 2699 --- 🏁 Script executed: ```shell # Run the official test command that includes proper context npm run test-npm 2>&1 | grep -A 5 "dex-species\|WeatherType\|MoonPhase\|keyof typeof" || echo "No specific errors found for the review concern" # Also check the full output for any compilation errors npm run test-npm 2>&1 | tail -50 ``` Repository: smell-of-curry/pokebedrock-showdown Length of output: 772 --- 🏁 Script executed: ```shell # Try to compile with the full root tsconfig but skip lib checking npx tsc --project tsconfig.json --noEmit 2>&1 | grep -E "dex-species|WeatherType|MoonPhase|keyof typeof|error TS" | head -20 # Also check if there's a CI workflow that shows build status find .github -name "*.yml" -o -name "*.yaml" 2>/dev/null | head -5 ``` Repository: smell-of-curry/pokebedrock-showdown Length of output: 3332 --- 🏁 Script executed: ```shell # Check the test workflow to see what actual type-checking is done cat .github/workflows/test.yml # Also check if there are recent workflow runs git log --oneline --all -20 2>/dev/null | head -20 ``` Repository: smell-of-curry/pokebedrock-showdown Length of output: 3813 --- 🏁 Script executed: ```shell # Get the full npm scripts section cat package.json | grep -A 30 '"scripts"' ``` Repository: smell-of-curry/pokebedrock-showdown Length of output: 1500 --- </details> **Remove `import type` or use import type queries instead of `keyof typeof`.** Line 3 imports `MoonPhase` and `WeatherType` as type-only, but lines 284 and 304 use `keyof typeof` with these symbols. In TypeScript strict mode, `typeof` requires a runtime value; type-only imports don't provide one. Either import as regular imports, or use import type query syntax: <details> <summary>Correct fix (type-only)</summary> ```diff -import { type MoonPhase, type WeatherType } from '@minecraft/server'; +import type { MoonPhase, WeatherType } from '@minecraft/server'; - readonly evoMoonPhase?: keyof typeof MoonPhase; + readonly evoMoonPhase?: keyof import('@minecraft/server').MoonPhase; - readonly evoWeather?: keyof typeof WeatherType; + readonly evoWeather?: keyof import('@minecraft/server').WeatherType; ``` </details> Also applies to: 304-304 <details> <summary>🤖 Prompt for AI Agents</summary> ``` Verify each finding against the current code and only fix it if needed. In `@sim/dex-species.ts` at line 3, The code imports MoonPhase and WeatherType as type-only but later uses "keyof typeof MoonPhase" and "keyof typeof WeatherType", which require runtime values; change the imports to regular runtime imports (import { MoonPhase, WeatherType } from '@minecraft/server') so those symbols exist at runtime, or keep type-only imports and change the type expressions to import type queries (e.g. use "keyof import('@minecraft/server')['MoonPhase']" and similarly for WeatherType) so the compiler can resolve them in strict mode; update the usages of MoonPhase and WeatherType accordingly. ``` </details> <!-- fingerprinting:phantom:poseidon:hawk:e952bee7-c87e-4feb-ae9b-da7e287d4354 --> <!-- 4e71b3a2 --> <!-- This is an auto-generated comment by CodeRabbit -->
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!9
No description provided.