Feature/pokemon evolutions update #9
No reviewers
Labels
No labels
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
pokebedrock/pokebedrock-showdown!9
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feature/pokemon-evolutions-update"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Add evoPartyForms, evoNickname, evoWeather fields to SpeciesData
Add evolution fields to pokedex for special evolutions
Summary by CodeRabbit
New Features
Bug Fixes / UX
📝 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
sim/dex-species.tsSpeciestypings: `evoPartySpecies?: stringdata/pokedex.tsProbopass→useItem+evoItem), nickname-gated evo (Malamar), explicitevoWeatherforGoodravariants, addedmeltan.evos, structured biome/min-damage/recoil/party-form/gender gates (e.g.,Runerigus,Wyrdeer,Basculegion,Kingambit).sim/battle-stream.tsformeChange(...), then update the battle Pokémon'sname/fullnameonly when it was not nicknamed before sending updates.sim/pokemon.tsformeChangeis permanent,detailschangenow conditionally appends[from] ${source.id}for non-standard custom effect types; preserves original three-arg signature for excluded effect types or missingsource.Sequence Diagram(s)
(silently omitted)
Estimated code review effort
🎯 4 (Complex) | ⏱️ ~45 minutes
Possibly related PRs
sim/dex-species.tsto add evolution-related fields (nickname/minDamage/minRecoilDamage equivalents), closely related to the typings and fields added here.Poem
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings.
✨ Finishing Touches
🧪 Generate unit tests (beta)
feature/pokemon-evolutions-updateThanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
❤️ Share
Comment
@coderabbitai helpto get the list of available commands and usage tips.Actionable comments posted: 6
🤖 Prompt for all review comments with AI agents
ℹ️ 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
ea21efe692and54a1f9fd16.📒 Files selected for processing (2)
data/pokedex.tssim/dex-species.ts⚠️ 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, andgoodrahisuistill carry the old triggers, so these new source-side fields won’t change the in-repo evolution rules;goodrahisuiis now also contradictory (thunderhere vs rain on the target entry).Also applies to: 12530-12531, 12783-12784, 12802-12803
🤖 Prompt for AI Agents
✅ Addressed in commits
62ea003to 2e1411b⚠️ Potential issue | 🟠 Major
Use canonical item names and update the target-side rules.
evoItemvalues elsewhere in this file use display names like"Thunder Stone"and"Metal Coat"."thunder_stone"and"leaders_crest"break that convention, andprobopass/kingambitstill keep the old target-side evolution requirements.♻️ Suggested names if you want this file to stay schema-consistent
Also applies to: 11216-11217
🤖 Prompt for AI Agents
✅ Addressed in commits
62ea003toa3952d4⚠️ Potential issue | 🟠 Major
evoGenderhere makes the male Basculegion branch unreachable.Basculin-White-Stripedpoints to both"Basculegion"and"Basculegion-F", but a single source-levelevoGender: "F"applies to the whole entry. Any consumer that reads these new fields will gate off the male branch too.🤖 Prompt for AI Agents
✅ Addressed in commits
62ea003to0830d77⚠️ Potential issue | 🟠 Major
Normalize
evoBiomesbefore mixing namespace IDs into this field.Existing
evoBiomesvalues in this file use biome names like"Cold Taiga"and"Roofed Forest". Introducingminecraft:*IDs here makes the field heterogeneous, andrunerigusstill keeps a different target-side condition.🤖 Prompt for AI Agents
⚠️ Potential issue | 🟠 Major
This Keldeo form change has no resolvable evolution target.
Keldeohas noevos, andkeldeoresoluteis still modeled aschangesFrom: "Keldeo"pluschangeEvent: "learnMove". In the current dex model, these newevo*fields are disconnected from the only target form.🤖 Prompt for AI Agents
✅ Addressed in commits
07dbfd2to26afdd3⚠️ Potential issue | 🟠 Major
🧩 Analysis chain
🌐 Web query:
In the current@minecraft/serverAPI, what are the exactWeatherTypemember names and literal values?💡 Result:
In the current
@minecraft/serverScript API,WeatherTypehas 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:
Repository: smell-of-curry/pokebedrock-showdown
Length of output: 200
🏁 Script executed:
Repository: smell-of-curry/pokebedrock-showdown
Length of output: 744
🏁 Script executed:
Repository: smell-of-curry/pokebedrock-showdown
Length of output: 206
Align
evoWeatherwith the enum member casing.evoWeatheris typed askeyof typeof WeatherType, which means it expects capitalized enum members ("Clear","Rain","Thunder"). However,data/pokedex.tsstores lowercase values ("rain","thunder"). This mismatch will cause evolution checks to fail at runtime. Change the data values to use capitalized strings matching the actualWeatherTypeenum members.🤖 Prompt for AI Agents
✅ Addressed in commit
227faea🧹 Nitpick comments (1)
🤖 Prompt for all review comments with AI agents
ℹ️ 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
54a1f9fd16and26afdd3ac8.📒 Files selected for processing (2)
data/pokedex.tssim/dex-species.ts🚧 Files skipped from review as they are similar to previous changes (1)
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
ℹ️ 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
26afdd3ac8and14c7ba8689.📒 Files selected for processing (3)
data/pokedex.tssim/battle-stream.tssim/pokemon.ts🚧 Files skipped from review as they are similar to previous changes (1)
@ -192,6 +192,9 @@ export class BattleStream extends Streams.ObjectReadWriteStream<string> {} :null;⚠️ 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 incorrectidentvalues in downstream protocol messages.Proposed fix
🤖 Prompt for AI Agents
✅ Addressed in commit
ea3b6a3Actionable comments posted: 3
♻️ Duplicate comments (1)
🤖 Prompt for all review comments with AI agents
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
ℹ️ 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
14c7ba8689andb01042d00f.📒 Files selected for processing (4)
data/pokedex.tssim/battle-stream.tssim/dex-species.tssim/pokemon.ts🚧 Files skipped from review as they are similar to previous changes (1)
⚠️ Potential issue | 🟠 Major
🧩 Analysis chain
🏁 Script executed:
Repository: smell-of-curry/pokebedrock-showdown
Length of output: 142
🏁 Script executed:
Repository: smell-of-curry/pokebedrock-showdown
Length of output: 155
🏁 Script executed:
Repository: smell-of-curry/pokebedrock-showdown
Length of output: 137
🏁 Script executed:
Repository: smell-of-curry/pokebedrock-showdown
Length of output: 193
🏁 Script executed:
Repository: smell-of-curry/pokebedrock-showdown
Length of output: 1635
🏁 Script executed:
Repository: smell-of-curry/pokebedrock-showdown
Length of output: 1486
🏁 Script executed:
Repository: smell-of-curry/pokebedrock-showdown
Length of output: 784
🏁 Script executed:
Repository: smell-of-curry/pokebedrock-showdown
Length of output: 1621
🏁 Script executed:
Repository: smell-of-curry/pokebedrock-showdown
Length of output: 2310
🏁 Script executed:
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, andevoMinRecoilDamageare declared insim/dex-species.tsand populated indata/pokedex.ts, but the evolution validator insim/team-validator.tsonly checksevoLevelandevoMove. 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
@ -192,6 +192,9 @@ export class BattleStream extends Streams.ObjectReadWriteStream<string> {} :⚠️ Potential issue | 🟠 Major
🧩 Analysis chain
🏁 Script executed:
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
hadNicknamecompares only againstbattlePokemon.species.name, it misclassifies default (non-nicknamed) Pokémon as "nicknamed" if they occupy a forme where the display name differs fromspecies.name. For example, Greninja in a Bond forme hasname = "Greninja"(the base species default from initialization insim/pokemon.tsline 332) butspecies.name = "Greninja-Bond", causing the check to incorrectly flag it as nicknamed and skip thenameandfullnameupdates during evolution, leaving stale identity in protocol messages.Proposed fix
🤖 Prompt for AI Agents
✅ Addressed in commits
ea3b6a3toe78a4ce@ -2,3 +2,3 @@import { Utils } from '../lib/utils';import { type MoonPhase } from '@minecraft/server';import { type MoonPhase, type WeatherType } from '@minecraft/server';⚠️ Potential issue | 🟠 Major
🧩 Analysis chain
🌐 Web query:
In TypeScript, cankeyof typeof WeatherTypebe used whenWeatherTypeis imported viaimport type? If not, iskeyof typeof import("module").WeatherTypethe 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:
Repository: smell-of-curry/pokebedrock-showdown
Length of output: 1465
🏁 Script executed:
Repository: smell-of-curry/pokebedrock-showdown
Length of output: 649
🏁 Script executed:
Repository: smell-of-curry/pokebedrock-showdown
Length of output: 3118
🏁 Script executed:
Repository: smell-of-curry/pokebedrock-showdown
Length of output: 2699
🏁 Script executed:
Repository: smell-of-curry/pokebedrock-showdown
Length of output: 772
🏁 Script executed:
Repository: smell-of-curry/pokebedrock-showdown
Length of output: 3332
🏁 Script executed:
Repository: smell-of-curry/pokebedrock-showdown
Length of output: 3813
🏁 Script executed:
Repository: smell-of-curry/pokebedrock-showdown
Length of output: 1500
Remove
import typeor use import type queries instead ofkeyof typeof.Line 3 imports
MoonPhaseandWeatherTypeas type-only, but lines 284 and 304 usekeyof typeofwith these symbols. In TypeScript strict mode,typeofrequires 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)
Also applies to: 304-304
🤖 Prompt for AI Agents