Charge move replacement glitch

The charge move replacement glitch is present in the core series Generation , , , and games. It has been fixed in Generation IX.
The glitch can produce unusual effects when a move is overwritten in the middle of a battle.
==Performing the glitch==
The glitch should be performed in a Double or Triple Battle in which experience is capable of being earned. One Pokémon should be on the verge of leveling up to a level at which it learns a new move, when it already has four move slots occupied, and one of them is a , such as or . Attempt to use the charge move, but have a faster Pokémon move first in the turn and knock out one of the opponents. This results in experience being awarded, and the Pokémon leveling up and learning the new move, which should overwrite the slot of the charge move that it's about to use.
==Effects==
In generations and , overwriting the move slot of a move that's been selected but not yet executed will cause the new move in that slot to be used instead. In more recent games, the Pokémon will use the originally selected move even though it's now been forgotten.
In the case of a charging move, only the charge turn will proceed in the normal manner in the affected generations. On the following turn, instead of completing the charge move, the affected Pokémon will repeat whatever its most recent move was prior to the charging turn, with the same choice of target as was selected on that instance. In any case, if the original charge move was one that came with a semi-invulnerable turn, the second turn will bring the Pokémon back to standard vulnerability, and if the move was , the same applies to the Pokémon that was picked up. However, the repeated move itself will take place before the invulnerability is removed, so if the charge move results in invulnerability and the repeated move is a self-targeting move, it will say that the Pokémon "avoided the attack".
If the Pokémon hasn't used any move since becoming active in the current battle, perhaps because this glitch is being triggered on the first turn, then instead of having a text box appear that says "<Pokémon> used <move>!" the text box will simply say "!", which indicates an attempt to use an empty move (index number 0). This move will target the Pokémon in the player's leftmost slot, and gives a generic failure message if the move user itself is in that slot, or a message about avoiding the attack if the user is in the rightmost slot in a Triple Battle, and therefore the target is out of range. In Generations V-VII, the empty move is a status move with 0% accuracy, and will always miss unless one of the Pokémon has , which will allow it to hit as a 0-power move, disregarding stats and usually dealing exactly 1 damage. In , it instead copies the move data from , a 40 base power Normal-type physical move. In , attempting to use the null move will simply display "But it failed!" with no other text box or messages.
If the move that's repeated this way in place of the charge move's second turn is...
* a move that's no longer in the Pokémon's current moveset, a move with no PP left, or a move that would normally be prevented by Assault Vest:
:::The move can still be used successfully.
* a move that's subject to the effects of , , , , , or :
:::The move is prevented, with the text box displaying the standard notice for whichever applicable effect stopped it. In the case of the empty move (prior to Generation VIII), this method can be used to make the game display its formal name: "<Pokémon> can't use --- after the taunt!" If the charge move that gets replaced is , but the repeated move is not a status move, Taunt will not prevent it.
* a move with altered priority:
:::The move will fire off at whatever priority the replacement move normally has. For example, a charge move that gets replaced with a repeated will use +1 priority; one that gets replaced with will use -6.
* a move with a charging turn, including the same one that was just overwritten:
:::The replacement move will be the second turn of the charge move firing off immediately, without having to spend another charging turn beforehand.
* a :
:::The move will be used, and if it hits, the Pokémon will have to spend a turn recharging as usual.
* a , such as or :
:::The move will be used, and if it hits, the Pokémon will become locked into its rampage.
* a , such as or : 
:::The move that gets repeated is the original container move, not the move that it called. This means that the repeated move can re-evaluate a different move than it called last time.
* or :
:::These moves have an intrinsic check to make sure that they're in the Pokémon's current moveset, otherwise they will fail. Hence, if the original instance of one of these moves succeeded, the repeated version will always fail (unless the Pokémon using this glitch is , and it levels up to learn a new instance of Sketch). If the original instance failed, the repeated move is eligible to succeed; a move that's learned this way will go into the move slot of Mimic or Sketch, not the slot of the charge move that was selected and overwritten.
* :
:::Like Mimic and Sketch, a repeated Transform can only possibly succeed if the initial use failed. In fact, if the initial Transform succeeds, the Pokémon is not subject to this glitch at all: any changes to its moves from leveling up are kept separate from its transformed moveset, and instead of repeating Transform, the charge move will complete its second turn as usual.
* , , or :
:::These moves will produce their usual notice at the beginning of the turn and are subject to their standard mechanics, such as a Focus Punch user losing their focus if they get hit earlier in the same turn and being unable to execute the move.
* :
:::The unfinished charge move is not considered a failure, and Stomping Tantrum will not get increased power, even if Stomping Tantrum itself failed the previous time it was used.
* :
:::Despite the intervening charge turn, the repeated move is considered stale, thus (in Generation VII forward, in which Destiny Bond is subject to a staleness rule) the repeat performance will fail if the previous use succeeded, and vice versa.
* a protection move, such as :
:::Unlike Destiny Bond, repeating one of these moves after the intervening charge turn does not cause it to be considered stale, and it will not have a chance to fail, except that a repeated will fail by the nature of how that move works.
* a generic Z-Move, such as or :
:::Instead of the "<Pokémon> used <move>!" text box, the text box that appears will be completely blank, without even the exclamation point that the empty move provides. Because these moves don't have a fixed power, the Pokémon then uses a version of the Z-Move that has only 1 power, and is always physical even if the previous move was special. Instead of blocking 75% of the damage, fails to block the move in any way. If animations are on, no animation for the move will play and the target's health bar will not appear to change at all, but the damage has been dealt and will be taken into account the next time it takes damage or restores HP, or a turn starts.
* a signature Z-Move, such as or :
:::The blank text box will appear as in the above case, but because these moves have fixed power, the move will be used with its full standard power and damage category. 
* a status Z-Move, other than :
:::The non-Z version of the move will be used. The Pokémon will not receive any additional bonuses from Z-power.
* a damaging Max Move from the final turn of Dynamax:
:::Even though the Pokémon is no longer Dynamaxed, it uses a version of the Max Move similar to the case of Z-Moves, except the power is now 0 rather than 1, the move will not produce the usual Max Move side effects (for example, repeating will not cause an additional Speed drop), and Protect can completely block a Max Move used this way.
* from the final turn of Dynamax:
:::The repeated Max Guard behaves the same way as when Max Guard is used normally, except for the lack of an animation.
==Related articles==
zh:蓄力的招式覆盖错误