mr:ice_elemental_mob
Differences
This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| mr:ice_elemental_mob [2025/12/25 18:23] – auto lint fix Mikhael | mr: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/ | ||
| + | * Implements IDepthAdjustable interface for dungeon depth scaling | ||
| + | |||
| + | ===== JSON Configuration ===== | ||
| + | * RemixedDungeon/ | ||
| + | * RemixedDungeon/ | ||
| + | |||
| + | ===== String Resources ===== | ||
| + | <code xml> | ||
| + | <string name=" | ||
| + | <string name=" | ||
| + | <string name=" | ||
| + | </ | ||
| + | |||
| + | ===== 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/ | ||
| + | * 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(): | ||
| + | |||
| + | ===== 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(), | ||
| + | } | ||
| + | |||
| + | 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; | ||
| + | } | ||
| + | } | ||
| + | </ | ||
| + | |||
| + | ===== Registration ===== | ||
| + | * Registered in MobFactory.java at line 234: registerMobClass(IceElemental.class); | ||
