Luck

Luck is a hidden statistic that influences the random nature of various activities in Terraria. There are various ways to increase and decrease this statistic, such as Buff potions and Torch placement. Players can estimate their luck value by speaking to the Wizard.

Luck influences many of Terraria's randomly-chosen items and events, such as the chances of valuable and unique item drops, rare enemy spawns, NPC's first appearances (like the Goblin Tinkerer and Wizard), Fairy spawns, and rarer Traveling Merchant/Skeleton Merchant inventory items. See below, Items affected by luck, for a full list.

Influences
Luck is impacted by Ladybugs, the placement of Torches, Lucky (buff), Lantern Nights, and Garden Gnomes. Luck is computed using as the sum of following values:

Ladybug Luck
(Maximum: +0.2 / Minimum: -0.2)

Ladybug luck relates to interactions with, as well as a few other NPCs.
 * If the player touches a ladybug that has been released by a player (intersecting hitboxes), then they will receive "good ladybug luck" for 12 minutes. This duration is doubled for golden ladybugs.
 * If the player touches the ladybug from more than 30 pixels away, it is possible that the number will be slightly reduced, but the difference is barely noticeable.
 * If a player kills a ladybug, they will receive "bad ladybug luck" for 3 minutes. This duration is doubled for golden ladybugs.
 * Regardless of whether it is golden or not, there is also an increased chance of rain for the next 30 seconds.
 * Fishing with a Ladybug/Golden Ladybug is the same as killing it and will trigger all the same effects.
 * If the player kills the Guide, their "good ladybug luck" is active for the next 12 minutes. Conversely, killing any other Town NPC (except for the Clothier) will activate bad ladybug luck for the next 3 minutes.
 * There is no counter stopping players from swapping their luck back and forth, so as long as the player releases and touches a ladybug after killing one, their luck will become good again.

"Good ladybug luck" adds 0.2 to the final luck score, and "bad ladybug luck" adds -0.2 (subtracts 0.2).

Luck Potions
(Maximum: +0.3 / Minimum: 0)

The Lucky (buff) increases luck based on how much time there is left. The values do not stack, so using a will yield +0.3 luck for 5 minutes, then +0.2 luck for 2 minutes, and finally +0.1 luck for 3 minutes.

Lantern Nights
(Maximum: +0.3 / Minimum: 0)

Lantern Nights increase luck by a flat rate of 0.3. This is active everywhere in the world, even underground. However, they will not start if there is a Blood Moon, Pumpkin Moon, Frost Moon, any boss or invasion active, or if Moon Lord is being summoned.

Garden Gnomes
(Maximum: +0.2 / Minimum: 0)

If the player has a garden gnome nearby, luck will be increased by a flat rate of 0.2. The range is estimated to be similar to that of Banners and Campfires.

Final Calculation
The formula used by the game is below: luck = ladybugLuck + torchLuck; luck = luck + (luckPotionAmount * 0.1); if (lanternNight) { luck = luck + 0.3; } if (hasGardenGnomeNearby) { luck = luck + 0.2; }

Luck is recomputed each frame. Starting at 0, the ladybug luck is added to the torch luck. Then the luck potion value is added, and if there is a lantern night, add 0.3 and if there is a Garden Gnome, add 0.2.

Players can max out their luck at 1, but their luck cannot go below -0.7. Each frame, a player's luck is normalized to this range, so bad luck is slightly harder to achieve than good luck.

Impact
Luck has a significant impact on multiple random chances throughout the game. Whenever a random chance is rolled in one of the ways listed below, an additional modifier is applied to the chance that the roll has a positive result:
 * If the player's luck is greater than 0, then there is a (100 * luck)% chance that the chance is doubled.
 * If the player's luck is less than 0, then there is a (-100 * luck)% chance that the chance is halved.
 * If the player's luck is 0, the chance will be the base value.

For example, if the base probability of an event is 10%, then:
 * If the player's luck is 1.0, there is a 100% chance that the probability is doubled, leading to a final probability of 20%.
 * If the player's luck is 0.5, there is a 50% chance that the probability is doubled, leading to a final probability of 15%.
 * If the player's luck is 0.0, the final probability is equal to the base probability, 10%.
 * If the player's luck is -0.5, there is a 50% chance that the probability is halved, leading to a final probability of 7.5%.
 * If the player's luck is -0.7, there is a 70% chance that the probability is halved, leading to a final probability of 6.5%.

As an example, for a drop that has a chance of 2% on killing an enemy, if you kill that enemy 1000 times you would expect 20 of that drop:


 * In an Ice biome with any number of basic torches within ~42 blocks, (and no other modifiers) you would instead get 16 of that drop. If it took an hour to farm for this drop, it now would take an additional 15 minutes.
 * In a Desert biome with any number of basic torches within ~42 block, (and no other modifiers) you would instead get 19 of that drop. if it took an hour to farm for this drop, it now would take an additional 3 minutes.
 * In an Underground Jungle biome with a single Jungle Torch, a single Bone Torch, a garden gnome, with a luck potion with 5 mins duration remaining, on a Lantern Night, you would get 40 of that drop. If it took an hour to farm for this drop, it now would take 30 fewer minutes.

Items affected by luck
In most cases, the player performing the roll influences the luck, however there are some cases (such as shaking trees) that use the closest player's luck.


 * All material drop rates, such as Ichor.
 * Crates, Oysters, and similar items are not affected by luck.
 * All unique item drop rates, such as the Ancient Horn or Slimy Saddle.
 * Chances of items appearing in the Travelling Merchant and Skeleton Merchant inventory.
 * The player with the highest luck will be chosen to influence the inventory.
 * Chances of Coin Portals appearing from Pots.
 * Chances of Gold Critters replacing a regular critter spawn.
 * Chances of spawning a Dungeon Spirit.
 * Chances of enemies dropping Hearts and Mana Stars.
 * Chances of some event enemies dropping more than one heart (Zombie Elf, Scarecrow, Hellhound, Poltergeist).
 * Chances of Food dropping from enemies.
 * Chances of the Bound Wizard and Bound Goblin appearing underground.
 * Chances of Enchanted Nightcrawlers spawning during meteor shower.
 * Chances of a Hardmode Dungeon enemy spawning on the wrong wall type (e.g. Skeleton Commando spawning on Slab Wall).
 * Chances of a Dungeon Slime spawning.
 * Chances of Fairies spawning underground.
 * Chances of Gnomes spawning while the Player is in a Living Tree or in front of "unsafe" Dirt Wall.
 * Chances of Biome Mimics spawning.
 * Chances of Doctor Bones spawning.
 * Chances of Ice Golem spawning.
 * Chances of Pinky spawning in place of a Blue Slime.
 * Damage calculations in many situations are influenced by luck; positive luck will be favorable to the player. Projectiles are influenced by luck, as is enemy melee damage (i.e. touching a Zombie). Player weapons also take luck into account. Thorns Potions do not appear to use luck.
 * The following steps are taken to incorporate luck into a player's damage:
 * The initial damage value is generated.
 * The game checks if the player has > 0 luck, and if so, generates a random number from 0.0 to 1.0. If the random number is less than the player's luck, a second damage value is generated, and the higher of the two numbers is dealt.
 * If the player has < 0 luck, a random number is generated from 0.0 to 1.0. If the random number is less than the absolute value of the player's luck, a second damage value is generated, and the lower of the two numbers is dealt.
 * This is up to a 5% increase/decrease in average damage before defense.
 * Luck affects PvP the same way it affects regular enemies.
 * Players with high luck have better coin drop rates in the same way as damage, for around a 15% increase/decrease at 100% good/bad luck.
 * A list of boss drops that do not scale with luck is listed below:

Wizard Luck status
The Wizard will occasionally give the player a general idea of where their luck value is, in place of his regular dialogue.


 * If Luck is ≥ 0.75


 * If Luck is ≥ 0.5


 * If Luck is ≥ 0.25


 * If Luck is ≥ 0


 * If Luck is < 0


 * If Luck is < -0.2


 * If Luck is < -0.4


 * If Luck is < -0.6

Trivia

 * According to Redigit, the luck system was added to punish those who use the "wrong" torches for each biome.