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

Fix Instruct bypassing AtkCanceler, Entry Hazards targeting wrong side of the field if opponent fainted #5262

Merged
merged 6 commits into from
Aug 27, 2024

Conversation

PhallenTree
Copy link

@PhallenTree PhallenTree commented Aug 26, 2024

  • Fixes Instruct bypassing AtkCanceler checks (Instruct allowed the target to act while asleep, flinched, etc.) and its interaction with First Turn Only moves (Fake Out, First Impression, Mat Block).
  • Also fixes Instruct's animation using the attacker and target of the called move.

Added some Instruct tests to confirm some interactions such as:

A Pokémon can successfully be instructed to repeat a move when under the effect of Torment or to use a status move while holding an Assault Vest. When instructed to use Fake Out, Mat Block, or First Impression, the target will attempt to use the move and PP will be deducted from it, but the move will fail. When instructed to use a move that would be prevented by Disable, Heal Block, Gravity, Throat Chop, Taunt, or Imprison, the target will attempt to use it, but the move will fail without PP being deducted.

The instructed move will target the same Pokémon slot as the previously used move, as long as a Pokémon is present in that slot.

Instructed moves retain their original priority, regardless of the priority of Instruct - for example, Quick Attack still fails in Psychic Terrain when Instruct is used at 0 priority to call it.

  • Fixes Entry Hazards being setup on the wrong side of the field if the opponent fainted before the entry hazards being setup (happened because it would cause it to target battler = 2 or battler = 3 in Singles)
    Added the 2 tests from Sticky web is placed on the wrong side after Explosion / Memento #5259.

  • Removes unused BattleScript_AuroraVeilEnds and STRINGID_AURORAVEILENDS (Aurora Veil uses BattleScript_SideStatusWoreOff)

Issue(s) that this PR fixes

Fixes #5259

Discord contact info

PhallenTree

src/battle_util.c Outdated Show resolved Hide resolved
@hedara90 hedara90 added the bugfix Bugfixes label Aug 26, 2024
@AlexOn1ine AlexOn1ine added the category: battle-mechanic Pertains to battle mechanics label Aug 26, 2024
data/battle_scripts_1.s Outdated Show resolved Hide resolved
Copy link
Collaborator

@AlexOn1ine AlexOn1ine left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

@AlexOn1ine AlexOn1ine merged commit 930cac6 into rh-hideout:master Aug 27, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugfix Bugfixes category: battle-mechanic Pertains to battle mechanics
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Sticky web is placed on the wrong side after Explosion / Memento
3 participants