User Tools

Site Tools


mr:fortuneteller_npc

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
mr:fortuneteller_npc [2026/04/07 17:28] – Fix wiki page issues: convert duplicate pages to redirects, correct Russian pickaxe stats, improve mr:fortuneteller_npc code references, fix Spanish section heading Qwen Assistantmr:fortuneteller_npc [2026/04/09 07:28] (current) – external edit 127.0.0.1
Line 1: Line 1:
 +====== Fortuneteller Npc - Code References ======
 +
 +{{ rpd:images:fortuneteller_npc.png|Fortune Teller NPC }}
 +
 +===== Overview =====
 +Fortune Teller NPC is a non-player character that provides item identification services for gold.
 +
 +===== Java Classes =====
 +  * [[https://github.com/NYRDS/remixed-dungeon/blob/master/RemixedDungeon/src/main/java/com/nyrds/pixeldungeon/mobs/npc/FortuneTellerNPC.java|FortuneTellerNPC.java]] - Main NPC class extending ImmortalNPC
 +  * [[https://github.com/NYRDS/remixed-dungeon/blob/master/RemixedDungeon/src/main/java/com/nyrds/pixeldungeon/windows/WndFortuneTeller.java|WndFortuneTeller.java]] - Interaction window for item identification
 +
 +===== JSON Configuration =====
 +This entity is implemented in Java, no JSON configuration exists
 +
 +===== String Resources =====
 +<code xml>
 +<string name="FortuneTellerNPC_Name">fortune-teller</string>
 +<string name="FortuneTellerNPC_Gender">feminine</string>
 +<string name="FortuneTellerNPC_Name_Objective">fortune-teller</string>
 +<string name="FortuneTellerNPC_Desc">This woman is dressed in a long, brightly colored robe. She looks surprisingly young for someone, who mastered arcane arts of fortune-telling. Coming closer, you can hear her mumbling, as she gazes into the crystal ball.</string>
 +<string name="WndFortuneTeller_Instruction">I can identify your items for %d gold. What would you like to do?</string>
 +<string name="WndFortuneTeller_No_Item">You don't have any items to identify.</string>
 +<string name="WndFortuneTeller_IdentifyAll">Identify All</string>
 +<string name="WndFortuneTeller_InvTitle">Select an item to identify</string>
 +</code>
 +
 +===== Lua Scripts =====
 +This entity is implemented in Java, no Lua script exists
 +
 +===== Implementation Details =====
 +  * **Parent Class:** ImmortalNPC (cannot be killed)
 +  * **AI Behavior:** Passive NPC that waits for player interaction
 +  * **Interaction:** Overrides interact(Char hero) method to show WndFortuneTeller window
 +  * **Sprite Direction:** Uses turnTo() to face the hero during interaction
 +
 +===== Identification Mechanics =====
 +  * **Base Cost:** 50 gold per item (GOLD_COST constant)
 +  * **Difficulty Scaling:** Cost multiplied by GameLoop.getDifficultyFactor()
 +  * **Ring of Haggler Discount:** 10% reduction when hero has RingOfHaggler.Haggling buff
 +  * **Single Item:** Opens item selection dialog for WndBag.Mode.UNIDENTIFED items
 +  * **Identify All:** Uses hero.getBelongings().identify() to identify all items at once
 +  * **Gold Check:** Buttons disabled if hero.gold() < cost
 +  * **Identification Method:** Uses ScrollOfIdentify.identify() for consistency
 +
 +===== Related mr Entities =====
 +  * [[mr:wndfortuneteller|WndFortuneTeller]]
 +  * [[mr:ringofhaggler|RingOfHaggler]]
 +  * [[mr:scrollofidentify|ScrollOfIdentify]]