User Tools

Site Tools


mr:black_rat_mob

Differences

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

Link to this comparison view

mr:black_rat_mob [2025/12/19 01:23] – docs: Update crystal_mob.txt with source references and mr: link mikemr:black_rat_mob [2025/12/19 01:23] (current) – external edit 127.0.0.1
Line 1: Line 1:
 +====== 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 ====
 +* **Class location:** [[code:RemixedDungeon/src/main/assets/scripts/mobs/BlackRat.lua|BlackRat.lua]] (custom mob implemented in Lua)
 +* **Inheritance:** Based on generic mob class in game engine
 +
 +==== Lua Implementation ====
 +**Basic stats:**
 +<code lua>
 +local mob = {}
 + 
 +function mob:getEntityKind()
 +    return "BlackRat"
 +end
 +
 +function mob:hp()
 +    return 5
 +end
 +
 +function mob:expForKill()
 +    return 1
 +end
 +
 +function mob:maxLvl()
 +    return 5
 +end
 +
 +function mob:attackSkill()
 +    return 10
 +end
 +
 +function mob:defenseSkill()
 +    return 5
 +end
 +
 +function mob:damageRoll()
 +    return math.random(1, 3)
 +end
 +
 +function mob:attackProc( enemy, damage )
 +    return damage
 +end
 +</code>
 +
 +==== Configuration ====
 +* **File location:** [[code:RemixedDungeon/src/main/assets/scripts/mobs/BlackRat.lua|BlackRat.lua]]
 +* **Entity Kind:** BlackRat
 +
 +==== String Resources ====
 +* **BlackRat_Name:** black rat
 +* **BlackRat_Desc:** A rare black rat. It can be dangerous in numbers.