User Tools

Site Tools


mr:bishop_npc

Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
mr:bishop_npc [2026/08/28 23:55] – wiki maintenance: fix 5 random pages compliance issues Hermes Agentmr:bishop_npc [2026/08/28 23:57] (current) – external edit 127.0.0.1
Line 1: Line 1:
 +====== Bishop NPC - Code References ======
 +
 +===== Java Classes =====
 +This entity is implemented in Lua/JSON, no Java class exists. See:
 +  * [[https://github.com/NYRDS/remixed-dungeon/blob/master/RemixedDungeon/src/main/assets/mobsDesc/BishopNPC.json|BishopNPC.json]] (mob config)
 +  * [[https://github.com/NYRDS/remixed-dungeon/blob/master/RemixedDungeon/src/main/assets/scripts/npc/Bishop.lua|Bishop.lua]] (NPC behavior)
 +  * [[https://github.com/NYRDS/remixed-dungeon/blob/master/RemixedDungeon/src/main/assets/spritesDesc/BishopNPC.json|BishopNPC spriteDesc.json]] (sprite)
 +
 +===== JSON Configuration =====
 +<code json>
 +{
 +   "baseSpeed"     : 0,
 +   "spriteDesc"    : "spritesDesc/BishopNPC.json",
 +   "scriptFile"    : "scripts/npc/Bishop",
 +   "friendly"      : true,
 +   "movable"       : false,
 +   "aiState"       : "Passive",
 +   "fraction"      : "NEUTRAL",
 +   "immortal"      : true,
 +   "isHumanoid"    : true
 +}
 +</code>
 +
 +  * `baseSpeed: 0` — Cannot move
 +  * `spriteDesc: spritesDesc/BishopNPC.json` — Sprite configuration (texture `mobs/town_bishop3.png`, 16x18, idle/run/attack/die frames)
 +  * `scriptFile: scripts/npc/Bishop` — Lua script reference
 +  * `friendly: true` — Friendly to player
 +  * `movable: false` — Cannot be moved by other actors
 +  * `aiState: Passive` — Passive AI state (replaced by `NpcDefault` in `spawn` of the Lua script)
 +  * `fraction: NEUTRAL` — Neutral faction
 +  * `immortal: true` — Cannot be killed through normal means; `die` handler in Lua still runs if the NPC is somehow destroyed, which kills the hero and reduces hero max HP
 +  * `isHumanoid: true` — Humanoid mob type
 +
 +===== Level Placement =====
 +  * [[https://github.com/NYRDS/remixed-dungeon/blob/master/RemixedDungeon/src/main/assets/levelsDesc/Church.json|Church.json]] — level placement (`"kind": "BishopNPC"`)
 +  * [[https://github.com/NYRDS/remixed-dungeon/blob/master/RemixedDungeon/src/main/assets/levelsDesc/Church_2021_03.json|Church_2021_03.json]] — alternative level placement
 +  * [[https://github.com/NYRDS/remixed-dungeon/blob/master/RemixedDungeon/src/main/assets/levelsDesc/TownChurch.json|TownChurch.json]] — additional church variant
 +
 +===== String Resources =====
 +<code xml>
 +<string name="BishopNPC_Name">Bishop</string>
 +<string name="BishopNPC_Name_Objective">Bishop</string>
 +<string name="BishopNPC_Gender">masculine</string>
 +<string name="BishopNPC_Desc">Bishop of the Holy Church of Santa the Depth Lord</string>
 +<string name="Bishop_title">Bishop</string>
 +<string name="Bishop_text">Days and nights I pray for you my child.</string>
 +<string name="Bishop_lesser_bless">Lesser bless - %d g</string>
 +<string name="Bishop_great_bless">Great bless - %d g</string>
 +<string name="Bishop_remove_curse">Remove curse - %d g</string>
 +<string name="Bishop_not_interested">Leave</string>
 +<string name="Bishop_no_money">You can\'t pay for it.</string>
 +<string name="Bishop_bye">I will pray for you my child.</string>
 +</code>
 +
 +  * `Bishop_lesser_bless` / `Bishop_great_bless` / `Bishop_remove_curse` are formatted with the dynamic price (see Lua `interact`)
 +  * `WndPriest_Instruction2` (in `strings_all.xml`) is the text that refers the player to the Bishop for blessings and curse removal
 +
 +===== Lua Scripts =====
 +  * [[https://github.com/NYRDS/remixed-dungeon/blob/master/RemixedDungeon/src/main/assets/scripts/npc/Bishop.lua|Bishop.lua]] — NPC behavior script
 +  * Key functions:
 +    * `interact(self, chr)` — Opens `RPD.chooseOption` with title `Bishop_title`, prompt `Bishop_text`, and four service options
 +    * `die(self, cause)` — Halves the hero's max HP and kills the hero; plays the cursed sound and emits `ShadowParticle.CURSE`
 +    * `spawn(me, level)` — Sets AI to `"NpcDefault"`
 +  * Services offered (prices scale with `RPD.RemixedDungeon:getDifficultyFactor() * 1.05^(client:lvl()-1)`):
 +    * **Lesser Blessing**: base `100 * priceFactor` gold — applies `RPD.Buffs.Blessed` for 100 turns
 +    * **Greater Blessing**: base `500 * priceFactor` gold — applies `RPD.Buffs.Blessed` for 500 turns, then again for 500 turns
 +    * **Remove Curse**: base `200 * priceFactor` gold — uses `ScrollOfRemoveCurse:uncurse()` on the client's belongings and emits `ShadowParticle.UP`
 +  * Failure path: any service that the client cannot afford causes the NPC to say `Bishop_no_money`; choosing "not interested" makes the NPC say `Bishop_bye`
  
mr/bishop_npc.txt · Last modified: by 127.0.0.1