mr:crystal_mob
Table of Contents
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: StandardPainter.java (spawns via MobFactory.mobByName)
- Mob Factory: 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: scripts/mobs/Crystal.lua
- Shadow Lord spawning: scripts/mobs/ShadowLord.lua
- Common classes binding: 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/crystal_mob.txt · Last modified: by 127.0.0.1
