User Tools

Site Tools


mr:dread_knight_mob

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)

  • 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 Java Code)

  • 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:

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)

  • 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

mr/dread_knight_mob.txt · Last modified: by 127.0.0.1