rh-hideout / pokeemerald-expansion

Feature branche for the pokeemerald decompilation. See the wiki for more info.
361 stars 1.08k forks source link

Missing Sheer Force tests #3500

Open AsparagusEduardo opened 11 months ago

AsparagusEduardo commented 11 months ago

Description

Current tests don't fully encompass Sheer Force's effect.

TODO: split this description into multiple headers to write tests from.

Sheer Force raises the base power of all damaging moves that have any additional effects by approximately 30% (a multiplier of 5325/4096), but their additional effects are ignored. Sheer Force also boosts Jet Punch, despite the fact that this move has no additional effects. Sheer Force boosts Order Up even if Commander is not activated, and increases to stats (if any) apply normally.

Reducing the target's stats, increasing the user's stats, inflicting a status condition on the target (volatile or otherwise, but excluding bound), and causing the target to flinch are all considered additional effects, so damaging moves that have a chance (up to and including a 100% chance) to cause these effects will have their power increased, in exchange for ignoring whatever chance they had to cause these effects. Furthermore, Anchor Shot, Ceaseless Edge, Eerie Spell, Genesis Supernova, Secret Power, Sparkling Aria, Spirit Shackle, and Stone Axe are explicitly considered to have added effects that can be removed by Sheer Force. However, Thousand Waves, whose effect is otherwise identical to Anchor Shot and Spirit Shackle, is not.

Sheer Force does not consider recoil or decreasing the user's own stats to be additional effects. Properties of moves—such as having a high critical-hit ratio, being unable to miss, having variable power or powering up, or having a charging turn, among others—are not considered additional effects. Moves that have one of these properties in addition to an additional effect will be powered up and only the additional effect will be negated. For example, Flare Blitz inflicts recoil damage to the user, but also has an additional effect to burn; if the user has Sheer Force, Flare Blitz's damage will be boosted by 30% and the user will take recoil damage, but it cannot burn the target. Effects of Fling caused by holding specific items are not considered additional effects for the purposes of Sheer Force. Scale Shot is not considered to have additional effects for the purposes of Sheer Force.

If (and only if) a move is boosted by the effect of Sheer Force, several effects that normally happen after attacking will be skipped. This includes the effects of Eject Button, Red Card, Shell Bell, Kee Berry, and Maranga Berry; the recoil damage from Life Orb; the Abilities Color Change, Pickpocket, Wimp Out, Emergency Exit, Berserk and Anger Shell; as well as Meloetta's opportunity to switch forms if it acquires Sheer Force and uses Relic Song. Other effects are not negated this way; therefore, if a Pokémon with Sheer Force holding a Life Orb uses a move boosted by Sheer Force, it will gain the passive damage boost (because it isn't a secondary effect of the move nor is it on the list of skipped effects), but the Pokémon will not be damaged by the Life Orb.

Sheer Force does not affect Max Moves, neither powering them up nor removing their secondary effects.

Version

1.6.1 (Default)

Upcoming Version

No response

Discord contact info

AsparagusEduardo

cfmnephrite commented 10 months ago

Sheer Force raises the base power of all damaging moves that have any additional effects by approximately 30% (a multiplier of 5325/4096), but their additional effects are ignored. Sheer Force also boosts Jet Punch, despite the fact that this move has no additional effects. Sheer Force boosts Order Up even if Commander is not activated, and increases to stats (if any) apply normally.

For one thing, it's not all additional effects but only "secondary effects" rather than "primary effects" - that's a distinction that's being built into #3577. Order Up hasn't been developed yet but I think that would be pretty straightforward and can be done in a way consistent with that PR. Since the Jet Punch mistake has been patched now, I think it would be sensible to check whether or not moves have a secondary effect organically rather than whether or not they have a sheerForceBoosted flag set. This would make adding/removing move effects easier as you would no longer need to add/remove a flag which is no longer necessary.

Reducing the target's stats, increasing the user's stats, inflicting a status condition on the target (volatile or otherwise, but excluding bound), and causing the target to flinch are all considered additional effects, so damaging moves that have a chance (up to and including a 100% chance) to cause these effects will have their power increased, in exchange for ignoring whatever chance they had to cause these effects. Furthermore, Anchor Shot, Ceaseless Edge, Eerie Spell, Genesis Supernova, Secret Power, Sparkling Aria, Spirit Shackle, and Stone Axe are explicitly considered to have added effects that can be removed by Sheer Force. However, Thousand Waves, whose effect is otherwise identical to Anchor Shot and Spirit Shackle, is not.

Also pretty easy once #3577 gets approved since you can define effects that are modified by Sheer Force as secondary effects and those that aren't as primary effects. There might be secondary effects with a 100% chance of activating but (by definition) there are no primary effects with a less than 100% chance of happening, so this checks out logically.

Sheer Force does not consider recoil or decreasing the user's own stats to be additional effects. Properties of moves—such as having a high critical-hit ratio, being unable to miss, having variable power or powering up, or having a charging turn, among others—are not considered additional effects. Moves that have one of these properties in addition to an additional effect will be powered up and only the additional effect will be negated. For example, Flare Blitz inflicts recoil damage to the user, but also has an additional effect to burn; if the user has Sheer Force, Flare Blitz's damage will be boosted by 30% and the user will take recoil damage, but it cannot burn the target. Effects of Fling caused by holding specific items are not considered additional effects for the purposes of Sheer Force. Scale Shot is not considered to have additional effects for the purposes of Sheer Force.

Recoil and a high crit rate are not additional effects nor are they handled as such. I don't think it's necessary to check if those are modified by Sheer Force, but we can add simple tests that, say, compare Flare Blitz and Double Edge. I don't think Fling and Scale Shot need special consideration but we can add tests for them anyway.

If (and only if) a move is boosted by the effect of Sheer Force, several effects that normally happen after attacking will be skipped. This includes the effects of Eject Button, Red Card, Shell Bell, Kee Berry, and Maranga Berry; the recoil damage from Life Orb; the Abilities Color Change, Pickpocket, Wimp Out, Emergency Exit, Berserk and Anger Shell; as well as Meloetta's opportunity to switch forms if it acquires Sheer Force and uses Relic Song. Other effects are not negated this way; therefore, if a Pokémon with Sheer Force holding a Life Orb uses a move boosted by Sheer Force, it will gain the passive damage boost (because it isn't a secondary effect of the move nor is it on the list of skipped effects), but the Pokémon will not be damaged by the Life Orb.

Now this is a weird one (especially Meloetta). Is there an exhaustive list of those effects?

Sheer Force does not affect Max Moves, neither powering them up nor removing their secondary effects.

Nothing special here, they should just be treated as moves with primary effects only Nvm I don't want to touch these