====== Luck Enchantment ====== {{ rpd:images:enchant_luck.png|Luck Enchantment }} ==== Description ==== The Luck enchantment can deal additional damage with each hit. The effect is based on the weapon's level and provides a chance for extra damage beyond the normal attack damage. ==== Mechanics ==== - Each hit has a chance to deal additional damage based on the weapon's level - For each level of the weapon, it makes an additional damage roll that could exceed the original damage - The higher the weapon level, the more potential for additional damage - The effect is variable and not guaranteed to increase damage every hit ==== Technical Details ==== - Additional damage = max(0, attacker.damageRoll() - i) for i from 1 to (weapon level + 1) - This means it tries multiple times to exceed the original damage, taking the highest extra damage value - The calculation is: for each level+1 attempts, it takes the maximum damage that exceeds the original damage by i points ==== Source Code ==== - Java: [[https://github.com/NYRDS/remixed-dungeon/blob/master/RemixedDungeon/src/main/java/com/watabou/pixeldungeon/items/weapon/enchantments/Luck.java|Luck.java]] - The effect compares multiple damage rolls and applies the highest bonus damage - The enchantment glows green (RGB: 0x00FF00) to indicate its luck property ==== Configuration Files ==== - [[https://github.com/NYRDS/remixed-dungeon/blob/master/RemixedDungeon/src/main/assets/spritesDesc/Luck.json|Luck.json]] - Sprite configuration for luck enchantment visual effect ==== String Resources ==== - [[https://github.com/NYRDS/remixed-dungeon/blob/master/RemixedDungeon/src/main/res/values/strings_all.xml#L3750-L3755|Luck strings]] - English names and descriptions - [[https://github.com/NYRDS/remixed-dungeon/blob/master/RemixedDungeon/src/main/res/values-ru/strings_all.xml#L3750-L3755|Russian Luck strings]] - Russian localization ==== See Also ==== - [[en:rpd:enchantments|Enchantments]] - List of all weapon enchantments - [[en:rpd:weapons|Weapons]] - Equipment that can have enchantments {{tag> rpd items enchantments luck damage}}