====== mr:ghost_npc ====== Machine-readable reference page for the Sad Ghost (quest-giver NPC) in Remixed Dungeon. Note: this page previously existed as "mr:ghost_mob" and incorrectly described a nonexistent combat mob; all facts below are grounded in the actual implementation. {{ rpd:images:ghost_sprite.png|Ghost NPC }} ==== Java Implementation ==== **Class File**: * File: [[https://github.com/NYRDS/remixed-dungeon/blob/master/RemixedDungeon/src/main/java/com/watabou/pixeldungeon/actors/mobs/npcs/Ghost.java|Ghost.java]] * Path: com/watabou/pixeldungeon/actors/mobs/npcs/Ghost.java * Entity Kind: Ghost * Type: **NPC** (extends NPC, not a combat mob) * Sprite config: spritesDesc/Ghost.json **Note**: There is no combat mob named Ghost in the codebase. The generated entity list (entities/mobs.txt) contains "Ghost", but the class is an NPC quest-giver spawned on SewerLevel via ''Ghost.Quest.spawn()''. ==== NPC Properties ==== **Basic Stats** (from the Ghost.java constructor and method overrides): * HP: not damageable — ''damage()'' is overridden to a no-op * defenseSkill: 1000 (''defenseSkill()'' returns a constant) * Speed: 0.5 (''speed()'' returns 0.5f) * Flying: true * EXP: none * Immunities: Paralysis, Stun, Roots (addImmunity in constructor; ''add(Buff)'' always returns false) **Lua Definition**: * No Lua script - implemented in Java ==== Behavior ==== * Wandering AI state by default * Once the quest is given, 10% chance per turn to follow the hero's control target position * Teleports randomly if interacted with again before the quest item is obtained ==== Quest Mechanics ==== * Spawned on SewerLevel when depth > 1 with probability ''Random.Int(5 - depth) == 0'' * Two quest variants chosen at random (''Quest.alternative''): * **Rose Quest**: find the Dried Rose; it drops after killing mobs (''Random.Int(left2kill) == 0'', left2kill starts at 8) * **Revenge Quest**: slay the Fetid Rat spawned by ''Ghost.Quest.process()'' * Reward: weapon and armor via ''Treasury.bestOf(category, 4)'', identified * **Necromancer Interaction**: Necromancer heroes can persuade/dominate the ghost via WndSadGhostNecro (''persuade'' flag bypasses the item requirement) * Journal entry: Journal.Feature.GHOST ==== Inner Class: Ghost.FetidRat ==== * HP: 15, defenseSkill 5, attackSkill 12, dmg 2-6, dr 2, expForKill 0 * Emits ParalyticGas on ''defenseProc'' * Carries RatSkull; immune to Paralysis ==== String Resources ==== **English (values/strings_all.xml)**: * [[https://github.com/NYRDS/remixed-dungeon/blob/master/RemixedDungeon/src/main/res/values/strings_all.xml|Ghost_Name]] - "sad ghost" * [[https://github.com/NYRDS/remixed-dungeon/blob/master/RemixedDungeon/src/main/res/values/strings_all.xml|Ghost_Desc]] - description * Ghost_Rose1 / Ghost_Rose2 - rose quest dialogue * Ghost_Rat1 / Ghost_Rat2 - revenge quest dialogue * Ghost_Defense - "evaded" **Russian (values-ru/strings_all.xml)**: * Ghost_Name / Ghost_Info - Russian name and description ==== Wiki Pages ==== **English**: * [[en:rpd:ghost_npc|Ghost NPC]] - Main wiki page **Machine-readable**: * [[mr:ghost_npc|mr:ghost_npc]] - This page ==== Code References ==== * Main implementation: [[https://github.com/NYRDS/remixed-dungeon/blob/master/RemixedDungeon/src/main/java/com/watabou/pixeldungeon/actors/mobs/npcs/Ghost.java|Ghost.java]] * Sprite config: [[https://github.com/NYRDS/remixed-dungeon/blob/master/RemixedDungeon/src/main/assets/spritesDesc/Ghost.json|Ghost.json]] * String resources: [[https://github.com/NYRDS/remixed-dungeon/blob/master/RemixedDungeon/src/main/res/values/strings_all.xml|strings_all.xml]] ==== Content Verification ==== * **Source**: Java class `Ghost.java` in `com.watabou.pixeldungeon.actors.mobs.npcs` (extends NPC, not Mob) * **Stats verified from code**: defenseSkill 1000 (invulnerable), speed 0.5, flying=true, immune to Paralysis/Stun/Roots, no damage taken (damage() is no-op) * **Quest mechanics verified**: Spawns on SewerLevel depth>1 with probability Random.Int(5-depth)==0; two variants (Rose/Revenge); reward from Treasury.bestOf(category,4) identified * **Necromancer interaction**: WndSadGhostNecro window with persuade flag bypasses item requirement * **Inner class FetidRat**: HP 15, defenseSkill 5, attackSkill 12, damage 2-6, DR 2, exp 0, emits ParalyticGas on defenseProc, carries RatSkull, immune to Paralysis * **String resources**: Ghost_Name, Ghost_Desc, Ghost_Rose1/2, Ghost_Rat1/2, Ghost_Defense in values/strings_all.xml and values-ru/strings_all.xml * **Last updated**: Based on code analysis {{tag> mr ghost npc reference machine-readable}}