====== 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. ==== 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 ==== 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]] {{tag> mr ghost npc reference machine-readable}}