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

CanSpeciesLearnTMHM likely needs fix #2207

Closed
LOuroboros opened this issue Jul 22, 2022 · 3 comments
Closed

CanSpeciesLearnTMHM likely needs fix #2207

LOuroboros opened this issue Jul 22, 2022 · 3 comments
Labels
bug Bug category: items Pertains to items status: unconfirmed This bug has not been reproduced yet

Comments

@LOuroboros
Copy link
Collaborator

LOuroboros commented Jul 22, 2022

A proper test may be needed, but chances are this report is correct.

So, back when TMs 51-100 were reincorporated into the item_expansion and some spooky ternary magic was applied to a couple of files in order to handle those TMs being unusable or something in #1561, the function CanSpeciesLearnTMHM used by the Apprentice system of the Battle Frontier was not updated. As a result, there's a chance this could cause a softlock to Players that engage with said system.

GriffinR 01/09/2022
I also suspect that this can softlock on Apprentices because the usage of CanSpeciesLearnTMHM in GetRandomAlternateMove isn't updated. It still gives it TM item values, when it should be giving it TM item value - first TM item value
If that's relevant to you at all

https://github.com/rh-hideout/pokeemerald-expansion/blob/item_expansion/src/apprentice.c#L375-L381

https://github.com/rh-hideout/pokeemerald-expansion/blob/item_expansion/src/pokemon.c#L6228-L6244

@LOuroboros LOuroboros added bug Bug branch: item_expansion status: unconfirmed This bug has not been reproduced yet category: items Pertains to items labels Jul 22, 2022
@StephenLynx
Copy link

I noticed a commit that subtracts 50 when calling CanMonLearnTMHM, but not CanMonLearnTMHM itself. So all other instances calling that function are still broken, so I'd suggest making CanMonLearnTMHM being the place that performs the subtraction. I'd also recommend the removal of CanSpeciesLearnTMHM, it's only called once and the function that calls it seems to have access to the mon and not just the species: src/aprentice.c line 332, function GetRandomAlternateMove.

@StephenLynx
Copy link

StephenLynx commented Aug 21, 2022

I made a commit on a repo I made: https://github.com/StephenLynx/pokeemerald/commit/9367c85b1a8bca2c01a1807a8557ba14a876603e

I also removed the duplicate code of CanSpeciesLearnTMHM

edit: this commit only updates a few of the learnsets, I couldn't be assed to go through all mons. The others still use the old macro and the HMs will bug.

@AsparagusEduardo
Copy link
Collaborator

#2233

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Bug category: items Pertains to items status: unconfirmed This bug has not been reproduced yet
Projects
None yet
Development

No branches or pull requests

3 participants