Open scheibo opened 5 years ago
I'm not sure what the idea behind using modifiedStats
was, but it seems like we'd still need to use more than one stat table just for Transformed Pokemon. Gen 1 Transform keeps the user's original stats somewhere, and copies the current modified stats of the target, and stores the original stats of the target for the purposes of calculating damage during a critical hit.
I'm not sure what the idea behind using
modifiedStats
was, but it seems like we'd still need to use more than one stat table just for Transformed Pokemon.
We currently have baseStoredStats
(user's original stats) and storedStats
(where the transformed stats would be copied to).
and copies the current modified stats of the target
transformInto
currently copies over volatiles and boosts to handle this, but I think this is where Gen 1 is weird (thanks to the Crystal_ discovery) and where the ordering of how boosts got applied relative to status forcing stat recalculation matters? And thus we need some way of tracking that, hence the current modifiedStats
table?
and stores the original stats of the target for the purposes of calculating damage during a critical hit.
Do we do this today :S? It seems like we'd need another stats table for that.
From what you're saying, it seems we need at least 3 stats tables (user's original, target's modified + original), though I'm not sure the 3 we currently have cover everything.
Yes, I think baseStoredStats
, storedStats
, and a third table would be necessary just for Transform. The current modifiedStats
can be rolled into storedStats
safely.
I also think there's probably a bug with how Transform currently calculates stats but I haven't had time to look into it yet. https://www.smogon.com/forums/threads/gen-1-and-tradebacks-dev-post-bugs-here.3524844/page-14#post-8064239
Originally posted by @Zarel in https://github.com/Zarel/Pokemon-Showdown/pull/5274#issuecomment-470981380