User Tools

Site Tools


mr:rpd:death_enchantment

mr:death_enchantment

Machine-readable reference for the Death weapon enchantment in Remixed Dungeon.

Entity Type

Weapon Enchantment

Lua Implementation

  • Script: `scripts/enchants/Death.lua`
  • File: `RemixedDungeon/src/main/assets/scripts/enchants/Death.lua`
  • Note: Formerly implemented in Java (`com.watabou.pixeldungeon.items.weapon.enchantments.Death`), migrated to Lua

Proc Chance Formula

Calculated in `proc()` function:

  • Formula: `RPD.Random:Int(level + 100) >= 92`
  • Level 0: 8% chance (values 92-99 out of 0-99)
  • Level 1: 9% chance (values 92-99 out of 0-100)
  • Level 2: 10% chance (values 92-99 out of 0-101)
  • General: `(8 + level)%` approximately
  • Level Calculation: `math.max(0, weapon:level())` - negative levels treated as 0

Effect

When proc triggers:

  • Instant Kill: `defender:damage(defender:hp(), enchant)` - deals damage equal to defender's current HP
  • Visual Effect: `defender:getSprite():emitter():burst(RPD.Sfx.ShadowParticle.UP, 5)` - black shadow particles
  • Returns: `true` (proc occurred)

When proc does not trigger:

  • Returns: `false` (no special effect)

Visual Appearance

  • Glow Color: `0x000000` (pure black glow)
  • Config: `glowing = { color = 0x000000 }` in `desc()` return table

Badge Integration

  • Grim Weapon Badge: `RPD.Badges:validateGrimWeapon()` called when:
    • Death enchantment kills an enemy
    • Attacker is a `Hero` instance
    • Enemy dies as a result of the enchantment (not from other damage sources)

Enemy Resistance

  • Some enemies have resistance to death effects
  • Example: `Warlock` mob has resistance to death-related effects
  • Resistance is handled by the target's resistance system

Affected Items

  • Can be applied to any weapon that supports enchantments
  • Applied via:
    • `ScrollOfUpgrade` - can appear on upgraded weapons
    • `ScrollOfEnchantment` - available as possible enchantment
    • Shop purchases - may appear on pre-enchanted weapons

String Resources

  • Name key: `Death_Name`
  • Description key: `Death_Info`
  • Located in: `RemixedDungeon/src/main/res/values/strings_all.xml`

Code References

  • Part of the weapon enchantment system (defined in `scripts/enchants/`)
  • Similar instant-kill or high-impact enchantments in the same directory
  • See `Weapon.java` for enchantment kind registration

Wiki Pages

mr/rpd/death_enchantment.txt · Last modified: by 127.0.0.1