Button mashing

Button mashing is a mechanic in Xenoblade Chronicles 2 and Xenoblade Chronicles 3 that allows players to reduce the duration of certain negative effects on the controlled party member.

Mechanics
When the player is in a state that allows mashing to end it early, moving the control stick and pressing the A, B, X, or Y buttons will decrease the state's remaining duration by (in XC2) or  (in XC3). However, there are gates and lockouts that reduce the amount of mashing that counts when not done "correctly".


 * A control stick input only counts if it's at least 70% of maximum tilt. In addition, it must be in a sufficiently different direction: either at least 120 degrees away from the previous direction that counted as a mash, or at least 60 degrees away from the direction on the previous frame (skipping frames that don't pass the 70% tilt gate). Therefore, spinning the stick in circles at human speed produces 3 inputs per full rotation, while moving the stick in two directions that are at right angles (going to neutral between each) provides 1 input per movement.
 * When a button is pressed, it sets a lockout value to 3, and will not produce another input until this expires. Pressing any of the other three buttons reduces this value by 1, while if no other button is pressed on a frame, it is instead reduced by 0.3. Therefore, mashing only a single button provides inputs no faster than one every, while mashing every button in sequence can produce up to one input per frame.
 * In XC2, each button must be released before it can register a new press. In XC3, holding down a button causes it to trigger the moment its lockout ends - which if multiple/all buttons are held, quickly results in a feedback loop that makes actual mashing completely pointless.

AI-controlled party members do not attempt to mash. This can be mitigated in XC3 by quickly swapping between characters to do their mashing for them.

Xenoblade Chronicles 2
While the game provides no hint that this mechanic exists, it certainly does.

Xenoblade Chronicles 3
The game displays icons of a control stick being tilted and a button being pressed while mashing is allowed.