User Tools

Site Tools


mr:piercing_enchantment

Piercing Enchantment - Code References

Java Classes

  • Piercing.java - Main enchantment class implementing the piercing effect
  • Weapon.java - Contains enchantment registration and proc logic (lines 248-252)

JSON Configuration

  • Piercing.json - Sprite configuration for piercing enchantment visual effect

String Resources

<!-- English (values/strings_all.xml) -->
<string name="Piercing_Name_0">Piercing</string>
<string name="Piercing_Name_1">Piercing</string>
<string name="Piercing_Name_2">Piercing</string>

Lua Scripts

This entity is implemented in Java, no Lua script exists

Java Usage Context

  • Enchantment Registration: Registered in Weapon.java as one of 11 possible enchantments (3% chance)
  • Boomerang Exception: Boomerang.java prevents Piercing and Swing enchantments (line 57)
  • Instability Interaction: Instability.java can randomly select Piercing as a replacement enchantment (line 15)
  • Proc Logic: Deals damage in a straight line from the initial target with damage reduction formula: maxDamage = (int)(damage * Math.pow(2, -1d / (level + 1)))

Entity Kind

  • getEntityKind(): Returns “Piercing” (class simple name)
  • Category: Weapon enchantment
  • Damage Reduction: Based on weapon level, higher levels maintain more damage
  • Minimum Damage: Stops piercing when damage falls below 1
mr/piercing_enchantment.txt · Last modified: by 127.0.0.1