====== Immortal NPC ====== **ImmortalNPC** is an abstract class in Remixed Dungeon that extends the base [[en:rpd:npc|NPC]] class. NPCs that inherit from this class have special properties that make them essentially invulnerable to damage and unable to move. {{tag> rpd npcs immortal abstract}} ==== Properties ==== * **Immobile**: Cannot move (movable = false) * **Invulnerable**: Cannot take damage from any attacks (damage method is overridden to do nothing) * **High Defense**: Defense skill is set to 1000 (effectively impossible to hit) * **Low Speed**: Speed is set to 0.5f (slower than normal) * **Buff Immunity**: Cannot receive or be affected by buffs (add(Buff) returns false) * **Defensive**: Uses "wails" as its defense verb (from Ghost_Defense string resource) * **Reset Behavior**: Automatically resets position after actions (reset() returns true) ==== Implemented NPCs ==== NPCs that extend ImmortalNPC include: * [[en:rpd:townguard_npc|Town Guard]] - Provides security in town areas * [[en:rpd:townsfolk_npc|Townsfolk]] - Regular citizens with various messages * [[mr:townsfolk_silent_npc_mob|Silent Townsfolk]] - Quiet townspeople with minimal dialogue * [[en:rpd:townsfolk_movie_npc_mob|Townsfolk Movie NPC]] - References cinema's special service * [[en:rpd:healer_npc|Healer NPC]] - Provides healing services * [[en:rpd:librarian_npc|Librarian NPC]] - Library-related services * [[en:rpd:fortuneteller_npc|Fortune Teller NPC]] - Fortune telling services * [[en:rpd:serviceman_npc|Service Man NPC]] - Service-related functions * [[en:rpd:sociologist_npc|Sociologist NPC]] - Social interaction NPC * [[en:rpd:inquirer_npc|Inquirer NPC]] - Information-seeking NPC * [[en:rpd:scarecrow_npc|Scarecrow NPC]] - Scarecrow that serves as an NPC * [[en:rpd:necromancer_npc|Necromancer NPC]] - Necromancer-related NPC * [[en:rpd:plague_doctor_npc|Plague Doctor NPC]] - Plague-related NPC * [[en:rpd:bella_npc|Bella NPC]] - Bella-related NPC * [[en:rpd:caged_kobold_npc|Caged Kobold]] - Caged Kobold NPC * Other special NPCs in the game ==== Implementation ==== * **Abstract Class**: Cannot be instantiated directly, must be extended * **Protection**: Has special protection against damage and effects * **Purpose**: Designed for safe NPCs that provide services, lore, or other functions without risk of being killed * **Location**: [[https://github.com/NYRDS/remixed-dungeon/blob/master/RemixedDungeon/src/main/java/com/nyrds/pixeldungeon/mobs/npc/ImmortalNPC.java|com/nyrds/pixeldungeon/mobs/npc/ImmortalNPC.java]] ==== Strategy ==== * These NPCs are completely safe to interact with * They cannot be killed or damaged in any way * They remain in fixed positions due to immobility * They serve as permanent fixtures in the game world * Players can interact with them without worry of accidental harm ==== Source Code ==== * Java Class: [[https://github.com/NYRDS/remixed-dungeon/blob/master/RemixedDungeon/src/main/java/com/nyrds/pixeldungeon/mobs/npc/ImmortalNPC.java|ImmortalNPC.java]] * Parent Class: [[https://github.com/NYRDS/remixed-dungeon/blob/master/RemixedDungeon/src/main/java/com/watabou/pixeldungeon/actors/mobs/npcs/NPC.java|NPC.java]] ==== See Also ==== * [[en:rpd:npc|NPCs]] - General information about non-player characters * [[en:rpd:npcs|NPCs]] - List of all NPCs in the game * [[mr:immortal_npc|Technical Details]] - Machine-readable reference page {{tag> rpd npcs immortal abstract}}