Skip to content

Technician incorrectly checks basePower instead of move.bp #678

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

Closed
hzla opened this issue Jan 15, 2025 · 3 comments
Closed

Technician incorrectly checks basePower instead of move.bp #678

hzla opened this issue Jan 15, 2025 · 3 comments

Comments

@hzla
Copy link

hzla commented Jan 15, 2025

(attacker.hasAbility('Technician') && basePower <= 60)

Technician is checking if basePower is under 60 which could have possibly been boosted in previous checks for helping hand and damage boosting items resulting in technician boosts sometimes not being applied. Should be checking move.bp instead.

@urkerab
Copy link
Contributor

urkerab commented Jan 15, 2025

Bulbapedia seems to think that this is actually correct Gen 4 behaviour, although I don't see any code for it in Pokémon Showdown; maybe I overlooked it.

@hzla
Copy link
Author

hzla commented Jan 15, 2025

Actually you're right, after checking https://github.com/pret/pokeplatinum/blob/5885ad26caff0d608ff66808e2e6507fc968cc4e/src/battle/battle_lib.c#L6697 it seems technician is indeed applied after helping hand, type item boosts, and charge.

@hzla hzla closed this as completed Jan 15, 2025
@hzla
Copy link
Author

hzla commented Jan 15, 2025

Actually sorry, it looks like it's being checked after charge and helping hand, but before type item boosts.

Here is where type item boosts are applied
https://github.com/pret/pokeplatinum/blob/5885ad26caff0d608ff66808e2e6507fc968cc4e/src/battle/battle_lib.c#L6715

Here is where technician is applied beforehand
https://github.com/pret/pokeplatinum/blob/5885ad26caff0d608ff66808e2e6507fc968cc4e/src/battle/battle_lib.c#L6697

@hzla hzla reopened this Jan 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants