mr:shadow_lord_mob
Table of Contents
Shadow Lord Mob - Code References
Java Classes
- ShadowLord.java - Main mob implementation
- Package:
com.nyrds.pixeldungeon.mobs.common - Extends:
Boss - Implements:
IZapper - Author: DeadDie (created 13.02.2016)
- Boss.java - Base class
- ShadowLordLevel.java - Dedicated arena level
- Crystal.java - Spawns crystals via
Crystal.makeShadowLordCrystal() - MobFactory.java - Mob registration:
registerMobClass(ShadowLord.class)
JSON Configuration
- spritesDesc/ShadowLord.json - Sprite animation configuration (idle, run, attack, zap, die)
- mobsDesc/ShadowLord.json - Battle music configuration
{
"battleMusic": "ost_boss_5_fight",
"battleMusicFallback": "ost_boss_fight"
}
- levelsDesc/Bestiary.json - Spawn configuration:
“ShadowLordLevel�:{“any�:{“ShadowLord�:1}}
String Resources
<string name="ShadowLord_Name">shadow lord</string> <string name="ShadowLord_Name_Objective">Shadow Lord</string> <string name="ShadowLord_Gender">masculine</string> <string name="ShadowLord_Intro">Prepare yourself!</string> <string name="ShadowLord_Death">Nooooo...</string> <string name="ShadowLord_Desc">This creature is made of pure evil and impenetrable darkness. Many believe that he is the Old God himself, considering how powerful he is. While others assumes that he is but a guardian of the Old God\'s chambers.</string>
Lua Scripts
This entity is implemented in Java, no Lua script exists
Implementation Details
- HP/HT: 260 (set in constructor:
hp(ht(260))) - Base Defense Skill: 40
- Base Attack Skill: 30
- Damage Range: 30-40 (
dmgMin = 30,dmgMax = 40) - Damage Reduction (DR): 40 (
dr = 40) - STR: 15 (
STR(15)) - EXP for Kill: 60 (
expForKill = 60) - Drops:
ScrollOfWeaponUpgrade(guaranteed,collect(new ScrollOfWeaponUpgrade())) - Walking Type:
WalkingType.ABSOLUTE - isHumanoid:
true
Special Abilities
- spawnShadow(): Spawns a
Shadowmob next to the Shadow Lord viaWandOfBlink.appear() - spawnWraith(): Spawns 4
Wraithmobs at empty cells next to the Shadow Lord (Wraith.spawnAt(cell)) - twistLevel(): Transforms the level:
- Calls
LevelTools.makeEmptyLevel(level, false)once per encounter - Builds a maze with
LevelTools.buildShadowLordMaze(level, 6) - Carves a 3×3 area around hero and boss to avoid soft-lock
- Spawns a
Crystalat a random pedestal (Crystal.makeShadowLordCrystal()) - Fills 5×5 area around the crystal with
Darknessblob vialevel.fillAreaWith(Darkness.class, x - 2, y - 2, 5, 5, 1)
- canAttack(): Can attack when
level().distance(getPos(), enemy.getPos()) < 4andBallistica.cast(…)reaches target - fx(): Uses
MagicMissile.purpleLight(…)withAssets.SND_ZAPand hides sprite - damage(): When damaged by an external source and
cooldown < 0:- Switches state to
Fleeing - Blinks away via
CharUtils.blinkAway(…)to a cell at distance > 3 from attacker - Calls
twistLevel() - Sets
cooldown = 10
- act(): Per-turn behavior:
- Decrements
cooldown - When Fleeing and
cooldown < 0: returns toWandering, then with 70% chance spawns a Wraith, otherwise a Shadow; yellsShadowLord_Introstring - Takes 1 damage when standing on
Foliageblob (withSpeck.BONEparticle burst)
- die(): On death:
- Yells
ShadowLord_Deathstring - Calls
LevelTools.makeEmptyLevel(level(), false)to reset the arena - Unseals the level (
level().unseal()) - Validates
Badges.Badge.SHADOW_LORD_SLAINviaBadges.validateBossSlain(…)
Immunities and Resistances
- Inherits from
Bossclass - Special interaction with
Darknessblob (healing source) andFoliageblob (damage source) - No additional immunities declared beyond the
Bossbase class
Code References
- Fleeing.java - AI state entered on damage
- Wandering.java - Default AI state after cooldown expires
- CharUtils.java -
blinkAway()mechanics - Darkness.java - Healing source blob
- Foliage.java - Damage source blob
- Badges.java -
SHADOW_LORD_SLAINbadge validation - ScrollOfWeaponUpgrade.java - Guaranteed drop item
Related mr Entities
- Boss - Parent mob class
- Crystal - Spawned via
Crystal.makeShadowLordCrystal() - Shadow - Summoned minion (
new Shadow()) - Wraith - Summoned minion (
Wraith.spawnAt(cell)) - Scroll of Weapon Upgrade - Guaranteed drop
1)
ht() - hp(
mr/shadow_lord_mob.txt · Last modified: by 127.0.0.1
