User Tools

Site Tools


en:rpd:ankh_item

Ankh

Ankh

Description

This ancient symbol of immortality grants an ability to return to life after death. Upon resurrection, all items in the hero's inventory are lost, but one random equipped item is preserved as bones that can be retrieved from the location of death.

Special Properties

  • Provides one-time resurrection after death (implemented in Ankh.resurrect method)
  • Upon resurrection, all items in the backpack (inventory) are lost (handled in WndResurrect)
  • Equipped items are NOT preserved directly - instead, one random equipped item is left as bones at the death location (implemented in Bones.leave method)
  • Single use item (removed after use in resurrect method)
  • Stackable (though only one is useful at a time due to loss upon resurrection) (defined in constructor)
  • No upgrade potential (defined in isUpgradable method)
  • Always identified (defined in isIdentified method)
  • Costs 50 gold per unit (defined in price method)
  • Does not work if the hero is killed by a cursed item while trying to equip it (the ankh is consumed but does not prevent the death)

Notes

The Ankh is a powerful but risky item - it can save you from death, but at the cost of losing all your inventory. Only one random equipped item will be recoverable as bones from the place where you died.

Strategy

  • Best used as a last resort when facing certain death
  • Try to keep only essential items in your inventory when entering dangerous areas
  • Since only one equipped item is preserved as bones (not all equipped items), consider which item is most valuable to preserve
  • Don't carry multiple Ankhs since you'll lose them upon resurrection
  • Be cautious when equipping cursed items - if a cursed item kills you during equipping, the Ankh will be consumed but won't prevent the death

Technical Details

When the hero dies and uses an Ankh for resurrection:

  • Dungeon.gameOver() is called, which deletes the current game save via Dungeon.deleteGame(false) in WndResurrect.java#L56
  • The game state is completely removed, including the hero's inventory
  • Bones.leave(hero) preserves one random equipped item (or gold if no useful equipped item exists)
  • The hero is reborn with full HP but in a fresh game state
  • All inventory items (except the one preserved as bones) are permanently lost
  • The ankh use is tracked in statistics via Statistics.ankhsUsed++ as seen in WndResurrect.java#L59

Source Code References

String Resources

JSON Configuration Files

  • Item drop rates: Not configured in JSON files, handled in code through Treasure.getLevelTreasury() and Treasury.getLevelTreasury()

Machine-Readable Data

  • mr:ankh_item - Machine-readable reference page with technical details
en/rpd/ankh_item.txt · Last modified: by 127.0.0.1