mr:item
Table of Contents
Item - Code References
Java Classes
- Item.java - Base item class
- EquipableItem.java - Equipable items (weapons, armor, rings)
- Weapon.java - Weapon base class
- Armor.java - Armor base class
- Ring.java - Ring base class
- Potion.java - Potion base class
- Scroll.java - Scroll base class
- Wand.java - Wand base class
- Artifact.java - Artifact base class
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�`.
Related mr Entities
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
