Luck

Luck is a 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).

Torch Luck
(Maximum: +0.2 / Minimum: -0.4)

By placing Torches in the correct locations, players can increase their luck. Torch luck is computed by determining two distinct scores: the "positive score" and the "negative score". With a few exceptions, torches placed in their preferred biome will increase the positive score, and if placed in any other location, will increase the negative score.

Torch luck seems to probe for torches in a box of ~42 tiles around the player, not including the tiles the player occupies.

Note that holding a torch in the correct biome also counts as being near it, so players can increase their luck by just holding a correct torch, even if surrounded by incorrect ones.

Torch Luck does not apply in the Dungeon or Lihzahrd Temple.


 * Regular Torches do not yield luck bonuses, and instead will increase negative score by 0.5 if placed in the Desert, Corruption, Crimson, or Hallow. If placed in the Snow biome they increase negative score by 2.
 * Coral Torches will have a negative score of 1 if not placed in water.
 * More than one of the same type of Torch does not affect the score.

After tallying up all Torch types around the player to determine the positive and negative scores, the final contribution to overall luck is determined:


 * If positive score ≥ 1, overall luck gets +0.2.
 * If 0 < positive score < 1, overall luck gets +0.1.
 * If 0 < negative score < 1, overall luck gets -0.1.
 * If 1 ≤ negative score < 2, overall luck gets -0.2.
 * If negative score ≥ 2, overall luck gets -0.4.

Therefore, to maximize luck, players should try to use biome torches whenever possible, as well as avoid using said biome torches in the wrong biomes. If the player is out of said torches, they should aim to use Bone Torches or any torch not listed above (e.g. Ultrabright Torches, Gem Torches) to avoid bad luck. Above all, players should avoid using regular torches in the Snow biome as that reduces luck the most.

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 an 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.

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.
 * 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.
 * 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.
 * Luck affects PvP the same way it affects regular enemies.
 * Players with high luck have better coin drop rates.
 * 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 Red, the luck system was added to punish those who use the "wrong" torches for each biome.
 * At the release of Journey's End, many people got angered at Red's use of torch luck.