User Tools

Site Tools


mr:ice_elemental_mob

Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
mr:ice_elemental_mob [2025/12/25 18:23] – auto lint fix Mikhaelmr:ice_elemental_mob [2026/02/13 12:52] (current) – external edit 127.0.0.1
Line 1: Line 1:
 +====== Ice Elemental Mob - Code References ======
 +
 +===== Java Classes =====
 +  * RemixedDungeon/src/main/java/com/nyrds/pixeldungeon/mobs/elementals/IceElemental.java
 +  * Implements IDepthAdjustable interface for dungeon depth scaling
 +
 +===== JSON Configuration =====
 +  * RemixedDungeon/src/main/assets/spritesDesc/IceElemental.json - Sprite configuration
 +  * RemixedDungeon/src/main/assets/levelsDesc/Bestiary.json - Spawn rate configuration
 +
 +===== String Resources =====
 +<code xml>
 +<string name="IceElemental_Name">ice elemental</string>
 +<string name="IceElemental_Gender">masculine</string>
 +<string name="IceElemental_Desc">Among all the elementals that exist in the dungeon, ice elementals can hardly be considered powerful, but they can truly be called one of the most dangerous ones. The frost aura that emits from their bodies can slow down any enemy.</string>
 +</code>
 +
 +===== Implementation Details =====
 +  * Extends Mob class and implements IDepthAdjustable interface
 +  * Adjusts stats based on dungeon depth
 +  * Immune to Roots, Paralysis, Stun, and ToxicGas
 +  * Has 10% chance to slow enemies when attacking
 +  * Drops Frozen Carpaccio with 10% probability
 +  * Carcass chance is 0%
 +  * Damage range: Min HP/6, Max HP/6
 +  * Base attack skill calculated as baseDefenseSkill/3 + 1
 +  * Base defense skill: depth * 2 + 1
 +  * HP: depth * 10 + 1
 +  * Experience for kill: depth + 1
 +  * Max level: depth + 2
 +  * Damage reduction: experience for kill value
 +
 +===== Lua Scripts =====
 +This entity is implemented in Java, no Lua script exists
 +
 +===== Entity Kind =====
 +getEntityKind(): IceElemental
 +
 +===== Full Class Content =====
 +<code java>
 +package com.nyrds.pixeldungeon.mobs.elementals;
 +
 +import com.nyrds.pixeldungeon.mobs.common.IDepthAdjustable;
 +import com.watabou.pixeldungeon.Dungeon;
 +import com.watabou.pixeldungeon.actors.Char;
 +import com.watabou.pixeldungeon.actors.blobs.ToxicGas;
 +import com.watabou.pixeldungeon.actors.buffs.Buff;
 +import com.watabou.pixeldungeon.actors.buffs.Paralysis;
 +import com.watabou.pixeldungeon.actors.buffs.Roots;
 +import com.watabou.pixeldungeon.actors.buffs.Slow;
 +import com.watabou.pixeldungeon.actors.buffs.Stun;
 +import com.watabou.pixeldungeon.actors.hero.Hero;
 +import com.watabou.pixeldungeon.actors.mobs.Mob;
 +import com.watabou.pixeldungeon.items.food.FrozenCarpaccio;
 +import com.watabou.utils.Random;
 +
 +import org.jetbrains.annotations.NotNull;
 +
 +public class IceElemental extends Mob implements IDepthAdjustable {
 +
 + public IceElemental() {
 + carcassChance = 0;
 + adjustStats(Dungeon.depth);
 +
 + loot(new FrozenCarpaccio(), 0.1f);
 + }
 +
 + public void adjustStats(int depth) {
 + hp(ht(depth * 10 + 1));
 + baseDefenseSkill = depth * 2 + 1;
 + expForKill = depth + 1;
 + maxLvl = depth + 2;
 + dr = expForKill;
 + baseAttackSkill = baseDefenseSkill / 3 + 1;
 + dmgMin = hp()/6;
 + dmgMax = hp()/6;
 +
 +
 + addImmunity(Roots.class);
 + addImmunity(Paralysis.class);
 + addImmunity(Stun.class);
 + addImmunity(ToxicGas.class);
 + }
 +
 + @Override
 + public int attackProc(@NotNull Char enemy, int damage) {
 + //Buff proc
 + if (Random.Int(3) == 1){
 + if(enemy instanceof Hero) {
 + Buff.prolong( enemy, Slow.class, 3 );
 + }
 + }
 + return damage;
 + }
 +}
 +</code>
 +
 +===== Registration =====
 +  * Registered in MobFactory.java at line 234: registerMobClass(IceElemental.class);