Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 PokemoncanBeBoosted
in the scenario where the function is called. This did require sifting through every instance of theCalculateMonStats
function in the entire repo to determine which scenarios warrantedTRUE
and which ones warrantedFALSE
, 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.