All Lucky 7s

All Lucky 7s! is a special Easter Egg in Final Fantasy VII. It is intended to activate when a unit's HP lands on exactly 7,777, but the game triggers it under broader conditions. Whenever activated, it displays the in-battle message "All Lucky 7s!".
==Mechanics==
When All Lucky 7s happens to a player character, they will barrage all enemies uncontrollably, with each of the 64 hits doing 7,777 damage and the character's name flashing in the battle menu (to a damage total of 497,728). Afterward, all subsequent attacks will hit for 7,777 damage until the character's HP changes. (Magic Pot before given an Elixir still takes 0 damage even from All Lucky 7s.) After the battle, the character's HP falls to 1 so that the effect cannot happen indefinitely.
If an enemy is defeated during the barrage of 64 attacks, the character in the status will stop attacking that enemy, but the death animation will not play until the barrage of attacks is finished. If multiple characters fall into the status simultaneously, they will take it in turns to attack. Each character can only unleash the barrage of attacks once per battle, and while they can leave and reenter the status, only the effect of inflicting 7,777 damage will occur the subsequent times. If the effect activates on the Battle Square, the player enters the next battle with 7,777 HP, but without the All Lucky 7s effect. A single command will reactivate it.
If enemies enter a Lucky 7 state, their attacks will do 7,777 damage upon connecting with the player, making it an extremely dangerous state.
If a player or an enemy is in both the All Lucky 7s status and the Poison status, they will take 7,777 damage from the Poison and die. This is because the damage taken from Poison is considered damage the character inflicts to themselves.
thumb|right|335 px
Lucky 7 will trigger even if Petrified (although the player gets a Game Over if all characters are Petrified even if they kill all enemies due to the Lucky 7s effect), or even if Imprisoned by Carry Armor or Turks:Reno. All Lucky 7s will not trigger if Imprisoned by Bottomswell even with Regen on (negating the HP-sap effect). If a character is grabbed by Carry Armor when Lucky 7 activates, a graphical glitch will happen where the character will attack, but will no longer be attached to the arm they were captured by. All Lucky 7s will also not trigger against the cinematic final boss.
Vincent's Limit Break forms behave oddly under Lucky 7s since they have no animation set for the regular physical attack.
==How to trigger==
As the chance of All Lucky 7s happening spontaneously is low, the player can manipulate the character's HP to get it to 7,777 to trigger the status. The best is if one manipulates a character's Max HP to 7,777, but this is difficult to achieve, as HP growth is randomized. If the player has less than 7,777 HP, they can try to get the last two digits of a character's HP to 77 (for example by being hit by Small or Frog enemies), and then use Potions and Hi-Potions to get the HP to 7,777.
An easy way to get to 7,777 HP is in the battle against Emerald Weapon; Emerald Weapon's Aire Tam Storm deals 1,111 damage per equipped Materia; a character with 9,999 HP needs to take 2,222 damage to get to 7,777, which is achieved from Aire Tam Storm by equipping two Materia on said character.
The Cat's Bell accessory can also be used; while it will always leave the character on an even amount of HP and thus cannot directly achieve an HP value ending in 77, it is possible to use it to reach 154 HP (or any other number that, when halved, results in 77) and cast Demi2 or Laser on the character.
If the player runs away from battles until the Chocobuckle attack is doing 1,111 or 2,222 damage, it can be used on a party member with 9,999 HP to trigger All Lucky 7s.
The HP↔MP Materia can also be used to set up All Lucky 7s, as manipulating one's MP to 7777 with it can be easier than manipulating one's HP, as the player can specifically choose how much MP to expend per turn.
==All Lucky 7s with HP higher than 7777==
When determining whether All Lucky 7s should be activated for a character or enemy, the game does not check whether the current HP are equal to 7777. Rather, for performance reasons, it only compares the two least significant bytes of the current HP to the 2-byte integer binary representation of 7777, which is 00011110 01100001.
Mathematically speaking, such comparison is equivalent to checking that
\text{current HP} \equiv 7777 \pmod{65336}
in modular arithmetic. In other words, an HP value will trigger All Lucky 7s provided that, when that HP value is divided by 65,336, the remainder is 7,777. Here, 65336 = 216, reflecting that the 16 least significant bits (the two least significant bytes) are checked.
Because no enemy or character in the game has a max HP of over 1,000,000, the only HP values which can trigger All Lucky 7s are:
Decimal	Calculation 	Binary (3-byte integer representation)	Binary (3-byte integer representation)	Binary (3-byte integer representation)
7,777 	0 × 65536 + 7777 	00000000 	00011110 	01100001
73,313 	1 × 65536 + 7777 	00000001 	00011110 	01100001
138,849	2 × 65536 + 7777 	00000010 	00011110 	01100001
204,385	3 × 65536 + 7777 	00000011 	00011110 	01100001
269,921	4 × 65536 + 7777 	00000100 	00011110 	01100001
335,457	5 × 65536 + 7777 	00000101 	00011110 	01100001
400,993	6 × 65536 + 7777 	00000110 	00011110 	01100001
466,529	7 × 65536 + 7777 	00000111 	00011110 	01100001
532,065	8 × 65536 + 7777 	00001000 	00011110 	01100001
597,601	9 × 65536 + 7777 	00001001 	00011110 	01100001
663,137	10 × 65536 + 7777	00001010 	00011110 	01100001
728,673	11 × 65536 + 7777	00001011 	00011110 	01100001
794,209	12 × 65536 + 7777	00001100 	00011110 	01100001
859,745	13 × 65536 + 7777	00001101 	00011110 	01100001
925,281	14 × 65536 + 7777	00001110 	00011110 	01100001
990,817	15 × 65536 + 7777	00001111 	00011110 	01100001
There are only five enemies with HP greater or equal to 73,313: Ruby Weapon, Emerald Weapon, Ultimate Weapon, Bizarro∙Sephiroth's Body (under certain conditions), Proud Clod (Battle Square variant), and Safer∙Sephiroth (under certain conditions). In particular, since Emerald Weapon has 1,000,000 max HP, it can trigger All Lucky 7s for each of the 16 possible values shown in the table above. However, in a modded game where an enemy can have more than 1,000,000 max HP, any HP value congruent to 7,777 modulo 65,336 can trigger All Lucky 7s, even those not in the above table.
==Etymology==
 Final Fantasy VII has various allusions to the number. All Lucky 7s also likely alludes to the concept of rolling all sevens in a slot machine, which usually indicates a jackpot.
==Allusions==
During a gacha draw in Final Fantasy VII Ever Crisis, Cloud might perform a Cross-slash on the Iron Giant he squares off against; when this occurs, the "damage" is displayed as "77777 Fever", which in turn is an indicator that the player has rolled a 5★ weapon whether or not they already hold weapons of the same name.
Zidane's skill Lucky Seven in Final Fantasy IX likely alludes to the All Lucky 7s status from Final Fantasy VII, as it involves Zidane's HP ending in the number 7 to inflict a random 7, 77, 777 or 7777 damage.
==Notes==
==External links==
*Final Fantasy VII – 7777 FAQ by baxterjn
*All Lucky 7s with Vincent's Limit Break
*All Lucky 7s when Imprisoned
Category:Status effects in Final Fantasy VII