User Tools

Site Tools


mr:dread_knight_mob

Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
mr:dread_knight_mob [2026/10/13 18:47] – Wiki maintenance: fix dread_knight_mob (JSON+Lua refs), fix weapon_item (pt link spelling), fix fire_enchantment (es links), fix healing_spell image refs; translate pt healing_spell Wiki Maintenancemr:dread_knight_mob [2026/10/13 18:50] (current) – external edit 127.0.0.1
Line 1: Line 1:
 +====== Dread Knight Mob - Code References ======
 +
 +===== Implementation Sources =====
 +This entity is defined via JSON with Lua behavior:
 +  * [[https://github.com/NYRDS/remixed-dungeon/blob/master/RemixedDungeon/src/main/assets/mobsDesc/DreadKnight.json|DreadKnight.json]] - Main JSON configuration
 +  * [[https://github.com/NYRDS/remixed-dungeon/blob/master/RemixedDungeon/src/main/assets/scripts/mobs/DreadKnight.lua|DreadKnight.lua]] - Custom behavior script
 +
 +===== JSON Configuration =====
 +<code json>
 +{
 +   "name"          : "DreadKnight_Name",
 +   "name_objective": "DreadKnight_Name_Objective",
 +   "description"   : "DreadKnight_Desc",
 +   "gender"        : "DreadKnight_Gender",
 +   "attackSkill"   : 17,
 +   "defenseSkill"  : 15,
 +   "dmgMin"        : 8,
 +   "dmgMax"        : 16,
 +   "dr"            : 12,
 +   "str"           : 17,
 +   "ht"            : 40,
 +   "exp"           : 8,
 +   "maxLvl"        : 15,
 +   "baseSpeed"     : 1,
 +   "attackDelay"   : 1,
 +   "viewDistance"  : 8,
 +   "walkingType"   : "NORMAL",
 +   "spriteDesc"    : "spritesDesc/DreadKnight.json",
 +   "scriptFile"    : "scripts/mobs/DreadKnight",
 +   "lootChance"    : 0.02,
 +   "loot"          : { "kind": "Gold" },
 +   "undead"        : true,
 +   "isHumanoid"    : true,
 +   "canBePet"      : true,
 +   "friendly"      : false,
 +   "fraction"      : "DUNGEON"
 +}
 +</code>
 +
 +===== Lua Script =====
 +<code lua>
 +local RPD = require "scripts/lib/commonClasses"
 +local mob = require "scripts/lib/mob"
 +
 +return mob.init{
 +    attackProc = function(self, enemy, dmg)
 +        -- 1/4 chance: death stroke + double damage
 +        if enemy ~= nil and math.random(4) == 1 then
 +            RPD.Sfx.DeathStroke:hit(enemy)
 +            return dmg * 2
 +        end
 +        -- 1/10 chance to stun
 +        if enemy ~= nil and math.random(10) == 1 then
 +            RPD.affectBuff(enemy, "Stun", RPD.CharUtils:durationFactor(enemy) * 10)
 +        end
 +        return dmg
 +    end
 +}
 +</code>
 +
 +===== Mob Stats (from JSON and Lua) =====
 +  * **HP**: 40
 +  * **Base Defense Skill**: 15
 +  * **Base Attack Skill**: 17
 +  * **Damage**: 8-16
 +  * **Defense Rating**: 12
 +  * **Experience for Kill**: 8
 +  * **Max Level**: 15
 +  * **Type**: Undead
 +  * **Loot**: Gold (2% chance)
 +
 +===== Special Abilities (from JSON/Lua) =====
 +  * **Double Damage**: 25% chance (Random.Int(4) == 1) to deal double damage with DeathStroke effect
 +  * **Stun**: 10% chance (Random.Int(10) == 1) to apply Stun buff on attack
 +
 +===== JSON Configuration =====
 +This entity has JSON configuration in these files:
 +  * [[https://github.com/NYRDS/remixed-dungeon/blob/master/RemixedDungeon/src/main/assets/spritesDesc/DreadKnight.json|RemixedDungeon/src/main/assets/spritesDesc/DreadKnight.json]] - Sprite animations and effects configuration
 +  * [[https://github.com/NYRDS/remixed-dungeon/blob/master/RemixedDungeon/src/main/assets/levelsDesc/Bestiary.json|RemixedDungeon/src/main/assets/levelsDesc/Bestiary.json]] - Spawn rates in Necropolis levels (necro2, necro3, necro4)
 +
 +===== Sprite Configuration (from JSON) =====
 +<code json>
 +{
 +   "texture" : "mobs/dread_knight.png",
 +   "width" : 12,
 +   "height" : 16,
 +   "idle" : {
 +      "fps" : 3,
 +      "looped" : true,
 +      "frames" : [0, 0, 0, 1, 1]
 +   },
 +   "run" : {
 +      "fps" : 12,
 +      "looped" : true,
 +      "frames" : [2, 3, 4, 5, 6, 7]
 +   },
 +   "attack" : {
 +      "fps" : 10,
 +      "looped" : false,
 +      "frames" : [8, 9, 10]
 +   },
 +   "die" : {
 +      "fps" : 10,
 +      "looped" : false,
 +      "frames" : [11, 12, 13, 14, 15, 16, 17]
 +   }
 +}
 +</code>
 +
 +===== String Resources =====
 +English strings from [[https://github.com/NYRDS/remixed-dungeon/blob/master/RemixedDungeon/src/main/res/values/strings_all.xml|strings_all.xml]]:
 +<code xml>
 +<string name="DreadKnight_Name">dread knight</string>
 +<string name="DreadKnight_Gender">masculine</string>
 +<string name="DreadKnight_Name_Objective">dread knight</string>
 +<string name="DreadKnight_Desc">The dread knight is an ancient warrior who, in life, neither knew good or righteousness. For his sins, he is doomed to everlasting wanderings in this broken body of death. And every moment of his tormented existence is full of pain and suffering, similar to what he inflicted on his victims.</string>
 +</code>
 +
 +===== Spawn Locations (from Bestiary.json) =====
 +  * **Necropolis Level 2**: 0.015 spawn rate
 +  * **Necropolis Level 3**: 0.015 spawn rate
 +  * **Necropolis Level 4**: 0.045 spawn rate
 +
 +===== Lua Scripts =====
 +This entity is implemented in Java, no Lua script exists
 +
 +===== Related Files =====
 +  * [[https://github.com/NYRDS/remixed-dungeon/blob/master/RemixedDungeon/src/main/assets/mobs/dread_knight.png|Sprite Image]]
 +  * [[https://github.com/NYRDS/remixed-dungeon/blob/master/RemixedDungeon/src/main/java/com/nyrds/pixeldungeon/mobs/necropolis/DeathKnight.java|DeathKnight.java]] - Parent mob class (Dread Knight is a rare variant)
 +  * [[https://github.com/NYRDS/remixed-dungeon/blob/master/RemixedDungeon/src/main/java/com/watabou/pixeldungeon/Badges.java|Badges.java]] - Badge tracking for kills
 +  * [[https://github.com/NYRDS/remixed-dungeon/blob/master/RemixedDungeon/src/main/java/com/nyrds/pixeldungeon/mobs/common/MobFactory.java|MobFactory.java]] - Mob registration
 +  * [[https://github.com/NYRDS/remixed-dungeon/blob/master/RemixedDungeon/src/main/java/com/nyrds/pixeldungeon/effects/DeathStroke.java|DeathStroke.java]] - Visual effect on double damage proc
  
mr/dread_knight_mob.txt · Last modified: by 127.0.0.1