User Tools

Site Tools


en:rpd:doom_interface

Doom Interface

Stone Walking Buff (Doom Implementation)

Doom Interface is a marker interface in Remixed Dungeon that identifies “doom-type” buffs - buffs that trigger special effects when the hero dies while affected by them.

Description

The Doom interface extends NamedEntityKind and defines a single method `onHeroDeath()` that is called when the hero dies while the buff is active. This allows buffs to implement custom death effects, such as special game over messages, badge validation, or unique death reasons.

Interface Definition

```java public interface Doom extends NamedEntityKind {

  void onHeroDeath();

} ```

Implementations

Classes implementing Doom must:

  • Extend Buff (or a subclass like ArtifactBuff)
  • Implement the `onHeroDeath()` method to define custom death behavior
  • Implement `getEntityKind()` from NamedEntityKind for entity identification

Known Implementations

  • Stone Walking Buff - Implements Doom via ArtifactBuff
    • On death: Validates “Death in Stone” badge, shows “You have been immured in stone. Forever.” message, uses IMMURED death reason
  • Other doom-type buffs may exist

Code References

Usage in Game Logic

When the hero dies, the game checks all active buffs for Doom implementations: ```java for (Buff buff : hero.buffs()) {

  if (buff instanceof Doom) {
      ((Doom) buff).onHeroDeath();
  }

} ```

en/rpd/doom_interface.txt · Last modified: by 127.0.0.1