User Tools

Site Tools


mr:item

Item - Code References

Java Classes

JSON Configuration

This entity type is implemented in Java, no shared JSON configuration exists. Individual items may have JSON configs in `mobsDesc/` or `levelObjects/` for specific purposes.

String Resources

<string name="Item_Name">Item</string>
<string name="Item_Info">A generic item.</string>

Lua Scripts

Items requiring custom behavior use Lua scripts in `scripts/items/` directory extending the item library via `require “scripts/lib/item�`.

Code Details

  • Base class: `com.watabou.pixeldungeon.items.Item`
  • Key methods: `collect()`, `detach()`, `price()`, `isKnown()`, `doPickUp()`, `doDrop()`, `execute()`
  • Properties: `image` (sprite index), `labelIndex` (potion/scroll identification), `defaultAction`, `cursed`, `cursedKnown`
  • Identification system: Items start unidentified; identified via Scroll of Identify or other means
  • Cursed items: Cannot be unequipped until uncursed
  • Upgrade system: Weapons and armor can be upgraded with Scroll of Upgrade (+1 to +10+, with risks)
  • Glyphs/Enchantments: Weapons and armor can be enchanted with glyphs for special effects
mr/item.txt · Last modified: by 127.0.0.1