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

Shadow Boost #5

Merged
merged 6 commits into from
Feb 2, 2024
Merged

Conversation

BittersweetNSour
Copy link

Implementation of the Shadow Boost mechanic as it functioned in Pokemon XD: Gale of Darkness

Description

The Shadow Boost mechanic in Pokemon XD calculated the stats of opponent Shadow Pokemon as if it were a higher level than displayed. Each opponent Shadow Pokemon has a boostLevel of up to 3, individually designated per mon.

I've reworked it from the previous iteration I submitted a pull request for -- this time, it uses the preexisting CalculateMonStats function rather than creating a nearly identical copy. In order to make it work on such a situational basis, though, I added a second parameter to the function, a boolean determining whether the Pokemon canBeBoosted in the scenario where the function is called. This did require sifting through every instance of the CalculateMonStats function in the entire repo to determine which scenarios warranted TRUE and which ones warranted FALSE, but it is now working cleanly.

As a small side note, this PR also adds more properties to the ShadowData struct in preparation for future features of the Shadow Pokemon mechanic.

One minor issue: when you snag a Shadow Pokemon and it gets added to your party before the battle is over, the Pokemon still retains the boosted stats until the battle ends, and only recalculates without the boost afterwards. However, if we are implementing XD's mechanics properly, then this will be a non-issue, as Shadow Pokemon in XD could not be added to your team until after the battle is over anyway.

@AsparagusEduardo AsparagusEduardo merged commit a0107eb into rh-hideout:shadow Feb 2, 2024
1 check passed
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

Successfully merging this pull request may close these issues.

3 participants