Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Receiving a gift mon without space in the party causes the mon to be generated without DVs #1044

Open
Monstarules opened this issue Mar 26, 2023 · 4 comments
Labels

Comments

@Monstarules
Copy link

We discovered this while working on the Modern Ancient Engine implementing the pokecrystal16 engine, and was replicated in Pokémon Orange and vanilla Pokémon Crystal.

In Pokémon Crystal, you cannot receive a gift Pokémon, or purchase a Pokémon from the Game Corner without having space in your party. The reason behind this is that there is no routine to generate DVs when the player receives a gift Pokémon that is sent immediately to the box. In later generations, this was fixed.

@Rangi42
Copy link
Member

Rangi42 commented Mar 26, 2023

To do: test what happens when a givepoke gift mon goes to the current PC box with a full party; and what happens when both the party and current PC box are full.

A valid fix may just be "always check VAR_PARTYCOUNT for PARTY_LENGTH before doing givepoke", if handling the Gen 2 PC would otherwise be too complicated.

@aaaaaa123456789
Copy link
Contributor

As far as I can tell, generating a Pokémon straight into the PC would give it zero DVs, since GivePoke calls LoadEnemyMon in that case out of battle, which I assume will have a value of zero in wBattleMode. I haven't tested this, though. I'm not sure if it can accidentally attempt to load a trainer mon instead, though.

@Idain
Copy link
Contributor

Idain commented May 7, 2023

A valid fix may just be "always check VAR_PARTYCOUNT for PARTY_LENGTH before doing givepoke", if handling the Gen 2 PC would otherwise be too complicated.

Which is funny, since that's what the vanilla game usually does.

@vulcandth
Copy link
Collaborator

Just now read this; yeah, I think i've encountered this before myself.

@Rangi42 Rangi42 changed the title [BUG] Recieving a gift mon without space in the party causes the mon to be generated without DVs [BUG] Receiving a gift mon without space in the party causes the mon to be generated without DVs Oct 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants