====== Crystal Mob - Code References ====== This page contains raw code references and configuration excerpts for the Crystal mob entity. ==== Entity Kind ==== * **getEntityKind() value:** Crystal ==== Java Implementation ==== * **Class location:** This entity is implemented in Lua/JSON, no Java class exists (was `com/nyrds/pixeldungeon/mobs/common/Crystal.java`, deleted batch 17d-5) * **Spawning:** [[https://github.com/NYRDS/remixed-dungeon/blob/master/RemixedDungeon/src/main/java/com/watabou/pixeldungeon/levels/painters/StandardPainter.java|StandardPainter.java]] (spawns via MobFactory.mobByName) * **Mob Factory:** [[https://github.com/NYRDS/remixed-dungeon/blob/master/RemixedDungeon/src/main/java/com/nyrds/pixeldungeon/mobs/common/MobFactory.java|MobFactory.java]] (CRYSTAL constant) * **Parent Class (Lua):** MultiKindMob behavior via kind field ==== JSON Configuration ==== * **Config file:** `mobsDesc/Crystal.json` (batch 17d-5) * **Kind 0/1:** Plain pedestal rooms, random simple wand, auto-hit (attackSkill 1000) * **Kind 2:** Shadow Lord pedestal variant (25% Shadowbolt wand) ==== Lua Scripts ==== * **Main implementation:** [[https://github.com/NYRDS/remixed-dungeon/blob/master/RemixedDungeon/src/main/assets/scripts/mobs/Crystal.lua|scripts/mobs/Crystal.lua]] * **Shadow Lord spawning:** [[https://github.com/NYRDS/remixed-dungeon/blob/master/RemixedDungeon/src/main/assets/scripts/mobs/ShadowLord.lua|scripts/mobs/ShadowLord.lua]] * **Common classes binding:** [[https://github.com/NYRDS/remixed-dungeon/blob/master/RemixedDungeon/src/main/assets/scripts/lib/commonClasses.lua|scripts/lib/commonClasses.lua]] ==== Properties ==== * **movable:** false (immobile) * **carcassChance:** 0 (no corpse) * **immunities:** ScrollOfPsionicBlast, ToxicGas, Paralysis, Stun, ConfusionGas * **attackSkill:** 1000 for kinds 0 & 1; default for kind 2 * **damageRoll:** Random.NormalIntRange(hp() / 2, ht() / 2) * **canBePet:** false * **interfaces:** IDepthAdjustable, IZapper ==== String Resources ==== * **Crystal_Name:** floating crystal * **Crystal_Desc:** Big shining crystal floating in the air. Probably it is filled with powerful magic. * **Crystal_Gender:** neuter * **Crystal_Name_Objective:** floating crystal ==== Wand Handling ==== Crystal mobs carry a wand that they fire at targets in line of sight: * **Kind 0/1:** Random simple wand, upgraded to depth/3 * **Kind 2 (Shadow Lord):** 25% chance of Wand of Shadowbolt upgraded to depth/2, otherwise random simple wand * **Zapping:** Free of charge, fires at anything in LOS ==== Death Effects ==== * Dying on a pedestal clears Darkness around it and grows Foliage * Being stolen from marks the thief ==== Related mr Entities ==== * [[mr:shadow_lord_mob|Shadow Lord (Mob)]] * [[mr:pedestal_level_object|Pedestal (Level Object)]] * [[mr:wand_of_shadowbolt_item|Wand of Shadowbolt (Item)]]