Table of Contents

Dread Knight Mob - Code References

Java Classes

The entity is implemented in Java in the following file:

Java Class Content

package com.nyrds.pixeldungeon.mobs.necropolis;
 
import com.nyrds.pixeldungeon.effects.DeathStroke;
import com.watabou.pixeldungeon.actors.Char;
import com.watabou.pixeldungeon.actors.buffs.Buff;
import com.watabou.pixeldungeon.actors.buffs.Stun;
import com.watabou.pixeldungeon.actors.mobs.Mob;
import com.watabou.pixeldungeon.items.Gold;
import com.watabou.utils.Random;
 
import org.jetbrains.annotations.NotNull;
 
/**
 * Created by DeadDie on 12.02.2016
 */
// Rare of the Death Knight
public class DreadKnight extends Mob {
    {
        hp(ht(40));
        baseDefenseSkill = 15;
        baseAttackSkill  = 17;
 
        dmgMin = 8;
        dmgMax = 16;
        dr = 12;
 
        expForKill = 8;
        maxLvl = 15;
        setUndead(true);
 
        loot(Gold.class, 0.02f);
    }
 
    @Override
    public int attackProc(@NotNull Char enemy, int damage ) {
        //Double damage proc
        if (Random.Int(4) == 1){
            if (enemy !=null){
                DeathStroke.hit(enemy);
            }
            return damage * 2;
        }
        //Paralysis proc
        if (Random.Int(10) == 1){
            Buff.affect(enemy, Stun.class);
        }
        return damage;
    }
}

Mob Stats (from Java Code)

Special Abilities (from Java Code)

JSON Configuration

This entity has JSON configuration in these files:

Sprite Configuration (from 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]
   }
}

String Resources

English strings from strings_all.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>

Spawn Locations (from Bestiary.json)

Lua Scripts

This entity is implemented in Java, no Lua script exists