mr:lich_mob
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| mr:lich_mob [2025/12/25 18:23] – auto lint fix Mikhael | mr:lich_mob [2026/07/23 16:31] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| + | ====== Lich Mob - Code References ====== | ||
| + | ===== Java Classes ===== | ||
| + | * [[https:// | ||
| + | |||
| + | ===== Java Class Content ===== | ||
| + | <code java> | ||
| + | package com.nyrds.pixeldungeon.mobs.necropolis; | ||
| + | |||
| + | import com.nyrds.pixeldungeon.items.necropolis.BlackSkull; | ||
| + | import com.nyrds.pixeldungeon.items.necropolis.BlackSkullOfMastery; | ||
| + | import com.watabou.pixeldungeon.Badges; | ||
| + | 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.Terror; | ||
| + | import com.watabou.pixeldungeon.actors.buffs.Amok; | ||
| + | import com.watabou.pixeldungeon.actors.buffs.Blindness; | ||
| + | import com.watabou.pixeldungeon.actors.buffs.Sleep; | ||
| + | import com.watabou.pixeldungeon.actors.hero.Hero; | ||
| + | import com.watabou.pixeldungeon.actors.hero.HeroClass; | ||
| + | import com.watabou.pixeldungeon.actors.mobs.Mob; | ||
| + | import com.watabou.pixeldungeon.effects.Speck; | ||
| + | import com.watabou.pixeldungeon.items.Item; | ||
| + | import com.watabou.pixeldungeon.items.keys.SkeletonKey; | ||
| + | import com.watabou.pixeldungeon.levels.Level; | ||
| + | import com.watabou.pixeldungeon.scenes.GameScene; | ||
| + | import com.watabou.pixeldungeon.utils.GLog; | ||
| + | import com.watabou.utils.Ballistica; | ||
| + | import com.watabou.utils.Random; | ||
| + | |||
| + | import org.jetbrains.annotations.NotNull; | ||
| + | |||
| + | public class Lich extends Mob { | ||
| + | { | ||
| + | hp(ht(200)); | ||
| + | baseDefenseSkill = 23; | ||
| + | baseAttackSkill | ||
| + | dmgMin = 12; | ||
| + | dmgMax = 20; | ||
| + | dr = 15; | ||
| + | |||
| + | expForKill = 25; | ||
| + | maxLvl = 35; | ||
| + | |||
| + | addImmunity(Paralysis.class); | ||
| + | addImmunity(ToxicGas.class); | ||
| + | addImmunity(Terror.class); | ||
| + | addImmunity(Amok.class); | ||
| + | addImmunity(Blindness.class); | ||
| + | addImmunity(Sleep.class); | ||
| + | } | ||
| + | // ... (truncated for brevity - see full class at GitHub link) | ||
| + | </ | ||
| + | |||
| + | ===== JSON Configuration ===== | ||
| + | <code json> | ||
| + | { | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | } | ||
| + | </ | ||
| + | |||
| + | <code json> | ||
| + | { | ||
| + | " | ||
| + | " | ||
| + | } | ||
| + | </ | ||
| + | |||
| + | ===== String Resources ===== | ||
| + | <code xml> | ||
| + | <string name=" | ||
| + | <string name=" | ||
| + | <string name=" | ||
| + | <string name=" | ||
| + | <string name=" | ||
| + | <string name=" | ||
| + | <string name=" | ||
| + | <string name=" | ||
| + | <string name=" | ||
| + | </ | ||
| + | |||
| + | ===== Translated String Resources ===== | ||
| + | <code xml> | ||
| + | <!-- Chinese Simplified --> | ||
| + | <string name=" | ||
| + | <string name=" | ||
| + | <string name=" | ||
| + | |||
| + | <!-- Chinese Traditional --> | ||
| + | <string name=" | ||
| + | <string name=" | ||
| + | <string name=" | ||
| + | |||
| + | <!-- French --> | ||
| + | <string name=" | ||
| + | <string name=" | ||
| + | <string name=" | ||
| + | |||
| + | <!-- German --> | ||
| + | <string name=" | ||
| + | <string name=" | ||
| + | <string name=" | ||
| + | |||
| + | <!-- Italian --> | ||
| + | <string name=" | ||
| + | <string name=" | ||
| + | <string name=" | ||
| + | |||
| + | <!-- Japanese --> | ||
| + | <string name=" | ||
| + | <string name=" | ||
| + | <string name=" | ||
| + | |||
| + | <!-- Korean --> | ||
| + | <string name=" | ||
| + | <string name=" | ||
| + | <string name=" | ||
| + | |||
| + | <!-- Polish --> | ||
| + | <string name=" | ||
| + | <string name=" | ||
| + | <string name=" | ||
| + | |||
| + | <!-- Portuguese --> | ||
| + | <string name=" | ||
| + | <string name=" | ||
| + | <string name=" | ||
| + | |||
| + | <!-- Russian --> | ||
| + | <string name=" | ||
| + | <string name=" | ||
| + | <string name=" | ||
| + | |||
| + | <!-- Spanish --> | ||
| + | <string name=" | ||
| + | <string name=" | ||
| + | <string name=" | ||
| + | |||
| + | <!-- Turkish --> | ||
| + | <string name=" | ||
| + | <string name=" | ||
| + | <string name=" | ||
| + | </ | ||
| + | |||
| + | ===== Lua Scripts ===== | ||
| + | This entity is implemented in Java, no Lua script exists | ||
| + | |||
| + | ===== Related mr: Entities ===== | ||
| + | * [[mr: | ||
| + | * [[mr: | ||
| + | * [[mr: | ||
| + | * [[mr: | ||
| + | * [[mr: | ||
| + | * [[mr: | ||
| + | * [[mr: | ||
| + | * [[mr: | ||
| + | * [[mr: | ||
| + | * [[mr: | ||
| + | * [[mr: | ||
| + | |||
| + | ===== Key Methods ===== | ||
| + | * `act()` - Main AI loop, handles skull activation every 5 turns via `activateRandomSkull()` | ||
| + | * `jump()` - Teleportation mechanic with up to 15 attempts to find valid position | ||
| + | * `activateRandomSkull()` - Activates a random runic skull (heal, summon, gas, protection) | ||
| + | * `useSkull(int skullType)` - Applies the effect of a specific skull type | ||
| + | * `spawnSkulls()` - Finds pedestals and spawns 2-4 runic skulls based on difficulty | ||
| + | * `defenseProc(Char enemy, int damage)` - 50% chance to teleport when damaged | ||
| + | * `die(Char cause)` - Clears all runic skulls and removes all other mobs on level | ||
| + | * `canAttack(Char enemy)` - Checks if target is within 4 tiles using Ballistica | ||
| + | |||
| + | ===== Game Constants ===== | ||
| + | * HP: `ht(200)` - Base HP 200 (scales with depth) | ||
| + | * Defense Skill: 23 | ||
| + | * Attack Skill: 35 | ||
| + | * Damage: 12-20 | ||
| + | * Damage Reduction (DR): 15 | ||
| + | * EXP: 25 | ||
| + | * Max Level: 35 | ||
| + | * Skulls by Difficulty: Easy=2, Normal=3, Hard+=4 (SKULLS_BY_DEFAULT) | ||
| + | * Skull Activation Interval: Every 5 turns | ||
| + | * Teleport Attempts: Up to 15 | ||
| + | * Defense Proc Chance: 50% | ||
| + | * Runic Skull Types: RED (heal 7% max HP per skull), BLUE (summon skeleton), GREEN (toxic gas 30 cells per skull), PURPLE (invulnerability) | ||
| + | * Boss Badge: `Badges.LICH_SLAIN` | ||
| + | * Battle Music: `ost_boss_necro_fight` (fallback: `ost_boss_fight`) | ||
| + | * Drops: SkeletonKey (100%), BlackSkull (non-Necromancer) or BlackSkullOfMastery (Necromancer) | ||
