Table of Contents

Swing Enchantment

Swing Enchantment

Description

The Swing enchantment allows attacks to hit multiple adjacent enemies at once. When used with weapons that require two hands to wield, it can damage all enemies adjacent to the primary target.

Mechanics

- On a successful hit, the damage is applied to all adjacent enemies around the attacker - Each adjacent enemy receives reduced damage compared to the original hit - The damage reduction is calculated as: maxDamage = (int)(damage * Math.pow(2, -1d / (level + 1))) - Can simultaneously hit up to 8 adjacent enemies (in all 8 directions) if they are all present - The effect is particularly powerful in tight spaces with multiple enemies grouped together

Technical Details

- The damage reduction is based on the weapon's level - Higher-level weapons maintain more of the original damage when affecting multiple targets - The effect activates all adjacent cells around the attacker's position (Level.NEIGHBOURS8) - Each adjacent character (excluding the primary target) receives separate damage calculation - Only hits living characters that are not the primary target

Source Code

- Java: Swing.java - The effect applies damage to all adjacent enemies using Level.NEIGHBOURS8 pattern - Only applies to characters that are alive and not the original target

Configuration Files

- Swing.json - Sprite configuration for swing enchantment visual effect

String Resources

- Swing strings - English names and descriptions - Russian Swing strings - Russian localization

See Also

- Enchantments - List of all weapon enchantments - Weapons - Equipment that can have enchantments