Table of Contents

Black Rat Mob - Code References

This page contains raw code references and configuration excerpts for the Black Rat mob entity.

Entity Kind

Java Implementation

JSON Configuration

Main mob configuration: mobsDesc/BlackRat.json

{
   "defenseSkill"  :1,
   "attackSkill"   :10,
   "exp"           :1,
   "maxLvl"        :1,
   "dmgMin"        :1,
   "dmgMax"        :1,
   "dr"            :1,
   "baseSpeed"     :2,
   "attackDelay": 1,
   "ht": 5,
   "viewDistance": 1,
   "lootChance": 1,
   "name": "Black Rat",
   "name_objective": "Black Rat",
   "description": "Just a common house rat, not marsupial",
   "gender": "feminine",
   "spriteDesc": "spritesDesc/BlackRat.json",
   "walkingType": "NORMAL",
   "scriptFile": "scripts/mobs/ScriptedThief",
   "loot": {
      "kind": "RatHide"
   }
}

Sprite configuration: spritesDesc/BlackRat.json

{
  "texture" : "rat.png",
  "width"  : 16,
  "height" : 15,
  "idle"   : { "fps" : 2,  "looped" : true,     "frames" : [0,0,0,1] },
  "run"    : { "fps" : 14, "looped" : true,     "frames" : [6,7,8,9,10] },
  "attack" : { "fps" : 11, "looped" : false,    "frames" : [2,3,4,5,0] },
  "die"    : { "fps" : 11, "looped" : false,    "frames" : [11,12,13,14] },
  "zapEffect" : "Shadow"
}

Lua Implementation

String Resources