Final Attack (ファイナルアタック, Fainaru Atakku?) is a gameplay term in the Final Fantasy series. The term refers to a part of a unit's attack script that has it instantly execute a specific action upon being killed. In terms of game coding, the final attack can be a specific attack, or the final attack script can be used to initiate a cutscene meant to be viewed upon the unit dying.
When a monster revives itself using the final attack script, it is treated as if it had never died; monsters with a final attack script to revive themselves typically are not meant to be killed. For example, the player's goal is to defeat Wrexsoul, not the Soul Savers, so simultaneously killing the Soul Savers would hypothetically end the battle with Wrexsoul still "alive", but due to the final attack script, they are not treated as being dead during the time they revive themselves, and so the battle continues. In the same way, the player is intended to defeat the demon form of the Chadarnook, not the goddess form, so the final attack script to revive itself keeps the player from winning by killing the goddess form.
There are ways around this script. Certain Death attacks will stall a enemy's final attack script for one turn. They are Banish, Odin, Raiden, Oblivion, Snare, Banisher. For most normal enemies, disabling their final attack only does that and nothing more, but against certain bosses glitches can arise. Against Wrexsoul and the Soul Savers, if the player kills a Soul Saver with Snare or Banish, their final attack to revive themselves will not execute and they will remain dead. If both Soul Savers are killed this way, and Wrexsoul removes/has removed itself from the battle, the battle will end as the game considers the player to have defeated the enemy party.
Against Deathgaze, if the player uses the Vanish-Doom Bug in the Super Nintendo to kill him with Banish. It would prevent the game from recognizing him as beaten. Contrary to popular belief, this does not cause the player to permanently miss the Bahamut magicite; while they won't get it for that battle, Deathgaze's death script never running also means Deathgaze is not flagged as defeated, and continues to appear at random, so he will still give the magicite whenever he is beaten 'properly'.
Several enemies execute a final attack when their HP is reduced to 0. Enemies such as the Dragon Zombie and Ultimate Weapon will cast a powerful spell in an attempt to wipe out the party. Other enemies that include a final attack script are 2-Faced, Bottomswell, Gargoyle, Hojo, and Helletic Hojo.
Dragon Zombie is special in that it will only use its final attack, Pandora's Box, once per save file, due to a global variable coded into the attack; however, the global variable is also used in the Jenova∙SYNTHESIS battle, meaning that after this battle, fighting another Dragon Zombie would have it use its final attack again, normally impossible since the Jenova∙SYNTHESIS battle is past the Point of No Return.
The player can utilize the final attack script as part of the Final Attack Materia, won from the Battle Square after winning the Special Battle once. For each level the Materia gains, the attached Materia will be used upon death, up to a maximum of five times. This can be further extended if the player equips the same Materia again to another Final Attack Materia on the same character, up to eight times.
Final Attack can be paired with all Magic and Summon Materia, Steal, Sense, Throw, Morph, Deathblow, Manipulate, Mime and Master Command. If paired with Master Magic/Summon/Command, a random ability contained in the Materia is chosen. If paired with Command Materia, the ability highlighted in the menu is used for the final attack. If paired with a Magic Materia, the highest spell the Materia has learned will be used. If the character has two copies of the same materia paired with Quadar Magic and Final Attack, the party member will use the Materia four times when killed. This applies to Master Materia as well. For example, if Cloud is killed with Master Summon paired with Quadra Magic and Phoenix paired with Final Attack, he will cast Phoenix four times when killed.
Final Attack will hit either the enemy or allies, depending on the ability's default target. Abilities that target enemies choose a random enemy, unless the attack is area-of-effect. All supportive single-target spells target the character using the final attack.
Final attack will only trigger when the character is killed by an enemy. If the player kills themselves, even if done by a confused ally, or are killed by Poison or Death Sentence, the final attack will not trigger.
In Final Fantasy IX, two bosses are notable for using final attacks upon their "death": Beatrix and Kuja. While the player has technically won against these opponents by reducing their HP to 0, they use a powerful attack that reduces the entire party's HP to 1, or ends the battle instantly, respectively. Thus, for storyline purposes, neither of these opponents can technically be defeated.
Maliris uses the attack Raining Swords when defeated as a final attempt to defeat the player. If all the characters' HP is depleted by this attack, it's Game Over even if Maliris also dies.
Only two enemies have access to a final attack. The Behemoth King casts Meteor when it is killed, and the Catoblepas casts Ultima when it dies. However, if either enemy is defeated by a Counterattack or Zanmato, the final attack will not be executed. In the case of the Behemoth King in the PAL/International versions, if it is Captured on the final attack, then it will not cast Meteor.
Some opponents, such as the Behemoth foe fought in the KS99 BCNM Horns of War, use final attacks upon their death.