====== Acidic Mob - Code References ======
===== Entity Name =====
acidic_mob
===== JSON Configuration =====
{
"aiState" : "Kite",
"name" : "Acidic_Name",
"name_objective": "Acidic_Name_Objective",
"description" : "Acidic_Desc",
"gender" : "Acidic_Gender",
"attackSkill" : 36,
"defenseSkill" : 24,
"dmgMin" : 20,
"dmgMax" : 32,
"dr" : 16,
"str" : 17,
"ht" : 95,
"exp" : 14,
"maxLvl" : 25,
"baseSpeed" : 1,
"attackDelay" : 1,
"attackRange" : 10,
"viewDistance" : 8,
"walkingType" : "NORMAL",
"spriteDesc" : "spritesDesc/Acidic.json",
"scriptFile" : "scripts/mobs/Acidic",
"resistances" : ["Leech", "Poison"],
"canBePet" : true,
"friendly" : false,
"fraction" : "DUNGEON"
}
===== Lua Script =====
[[https://github.com/NYRDS/remixed-dungeon/blob/master/RemixedDungeon/src/main/assets/scripts/mobs/Acidic.lua|Acidic.lua]] - Main mob behavior implementation
-- java Acidic (batch 7): a Scorpio whose carapace splashes acid back at the
-- attacker (defenseProc reflect on top of the inherited Scorpio kit, aiState
-- Kite + kiteRanged for the never-close-in policy).
return mob.init{
stats = function(self)
local data = mob.restoreData(self)
if data.rolled then
return
end
if not self:getBelongings():isBackpackEmpty() then
data.rolled = true
return
end
data.rolled = true
data.kiteRanged = true
if math.random(8) == 1 then
self:collect(RPD.item("PotionOfHealing"))
elseif math.random(6) == 1 then
self:collect(RPD.item("MysteryMeat"))
end
end,
spawn = function(self, level)
self:setViewDistance(level:getViewDistance() + 1)
end,
zapProc = function(self, enemy, dmg)
if enemy ~= nil and math.random(2) == 1 then
RPD.Buffs.Buff:prolong(enemy, "Cripple", 10)
end
return dmg
end,
defenceProc = function(self, enemy, dmg)
-- Random.IntRange(0, damage) is inclusive on both ends
if enemy ~= nil then
local reflect = math.random(0, dmg)
if reflect > 0 then
enemy:damage(reflect, self)
end
end
return dmg
end,
}
===== String Resources =====
English (values/strings_all.xml):
acidic scorpio
masculine
acidic scorpio
These huge arachnid-like demonic creatures avoid close combat by all means, firing crippling serrated spikes from long distances.
Russian (values-ru/strings_all.xml):
кислотный скорпион
masculine
кислотного скорпиона
Эти огромные членистоногие создания стараются избегать ближнего боя, выстреливая ядовитые иглы с большим расстояния.
===== Java Classes =====
* [[https://github.com/NYRDS/remixed-dungeon/blob/master/RemixedDungeon/src/main/java/com/watabou/pixeldungeon/actors/mobs/Scorpio.java|Scorpio.java]] - Base parent class (Acidic inherits from Scorpio via JSON configuration)
* [[https://github.com/NYRDS/remixed-dungeon/blob/master/RemixedDungeon/src/main/java/com/nyrds/pixeldungeon/mobs/common/CustomMob.java|CustomMob.java]] - Handles JSON-defined mob properties
* [[https://github.com/NYRDS/remixed-dungeon/blob/master/RemixedDungeon/src/main/java/com/nyrds/pixeldungeon/mobs/common/MobFactory.java|MobFactory.java]] - Registers "Acidic" entity kind (line 76)
===== Sprite Configuration =====
[[https://github.com/NYRDS/remixed-dungeon/blob/master/RemixedDungeon/src/main/assets/spritesDesc/Acidic.json|spritesDesc/Acidic.json]] - Sprite animation configuration
===== Spawn Configuration =====
[[https://github.com/NYRDS/remixed-dungeon/blob/master/RemixedDungeon/src/main/assets/levelsDesc/Bestiary.json|Bestiary.json]] - Mob spawn rates (Halls levels 23-24)
===== Related mr Entities =====
* [[mr:scorpio_mob|Scorpio Mob]] - Parent mob type
{{tag> mr mobs code_reference}}