User Tools

Site Tools


mr:ankh_item

Ankh Item - Code References

Java Classes

JSON Configuration

This entity is implemented in Java, no JSON configuration exists

String Resources

<string name="Ankh_Name">Ankh</string>
<string name="Ankh_Info">This ancient symbol of immortality grants an ability to return to life after death. Upon resurrection all non-equipped items are lost.</string>
<string name="Dungeon_Tips_13">There is no sense in possessing more than one Ankh at the same time, because you will lose them upon resurrecting.</string>
<string name="WndRanking_StaAnkhs">Ankhs Used</string>

Lua Scripts

This entity is implemented in Java, no Lua script exists

Entity Kind

  • Entity Kind: Ankh (returns class simple name via getEntityKind())
  • Item Type: Key/Resurrection item
  • Stackable: Yes (stackable = true)
  • Identified: Always identified (isIdentified() returns true)
  • Upgradable: No (isUpgradable() returns false)
  • Price: 50 gold per unit (price() returns 50 * quantity)
  • Sprite: ItemSpriteSheet.ANKH (index 1)

Resurrection Mechanics

  • Method: public static boolean resurrect(@NotNull Char chr, NamedEntityKind cause)
  • Process:

1. Checks if character has Ankh in belongings

  2. Removes Ankh from belongings
  3. For non-Hero characters: calls chr.resurrect() immediately
  4. For Hero: shows WndResurrect window to give player choice
* **Consumption:** Ankh is consumed on successful resurrection
* **Side Effect:** All non-equipped items are lost upon resurrection
  • The Ankh allows resurrection after death but causes loss of all non-equipped items
  • Only one Ankh should be carried at a time due to consumption on use
  • Implemented as a static method resurrect that can be called for any Char
  • Uses WndResurrect window for hero resurrection to give player choice
  • Statistics track total ankhs used across all runs
mr/ankh_item.txt · Last modified: by 127.0.0.1