mr:black_rat_mob
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
- getEntityKind() value: BlackRat
Java Implementation
- Implementation: Custom mob implemented via JSON configuration using CustomMob.java base class
- Base class: CustomMob.java
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
- Script file: ScriptedThief.lua
- Behavior: Based on thief behavior (steals items from hero when attacking)
String Resources
- No specific string resources - uses properties from JSON configuration
- Name: Black Rat
- Description: Just a common house rat, not marsupial
mr/black_rat_mob.txt · Last modified: by 127.0.0.1
