en:rpd:doom_interface
Table of Contents
Doom Interface
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
- NamedEntityKind.java (parent interface)
- ArtifactBuff.java (common parent for doom buffs)
- Hero.java (handles doom buff death logic)
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();
}
} ```
Related Pages
- Artifact Buff - Base class for artifact buffs (often implements Doom)
- Stone Walking Buff - Example doom buff implementation
- Buff Mechanics - General buff system
- Badges - Achievement system (often validated in onHeroDeath)
en/rpd/doom_interface.txt · Last modified: by 127.0.0.1

