en:rpd:scroll_of_lullaby_item
Table of Contents
Scroll of Lullaby
Description
When read, the Scroll of Lullaby releases magical lullabies that put all enemies within a certain radius to sleep. Sleeping enemies will remain asleep until they take damage or are otherwise disturbed.
Effects
- Area of Effect: All enemies within 5 tiles of the hero
- Sleep Duration: Enemies remain asleep for 5-10 turns
- Peaceful Sleep: Sleeping enemies won't attack unless damaged
- Disturbance: Loud noises or attacks will wake sleeping enemies
Strategy
- Safe Passage: Allows safe passage through dangerous areas
- Escape Mechanism: Useful for escaping dangerous situations
- Timing: Best used when surrounded by multiple enemies
- Caution: Be careful not to wake sleeping enemies
Code References
package com.watabou.pixeldungeon.items.scrolls; import com.watabou.pixeldungeon.Dungeon; import com.watabou.pixeldungeon.actors.buffs.Buff; import com.watabou.pixeldungeon.actors.mobs.Mob; import com.watabou.pixeldungeon.effects.SpellSprite; import com.watabou.pixeldungeon.utils.GLog; public class ScrollOfLullaby extends Scroll { @Override protected void doRead() { for (Mob mob : Dungeon.level.mobs) { if (Dungeon.visible[mob.pos]) { Buff.affect( mob, Sleep.class ); if (mob.state == mob.HUNTING) { mob.state = mob.WANDERING; } mob.sprite.centerEmitter().start( Speck.factory( Speck.NOTE ), 0.3f, 4 ); } } GLog.h( "The scroll utters a soothing melody. You feel very sleepy." ); setKnown(); ((ScrollOfMagicMapping)curItem).readAnimation(); } @Override public String desc() { return "The scroll utters a soothing melody that will put all " + "enemies caught within its range into a deep magical slumber."; } }
- ScrollOfLullaby.java - Main implementation
Related Items
- Scrolls - List of all scrolls
- Scroll of Teleportation - Another escape utility scroll
en/rpd/scroll_of_lullaby_item.txt · Last modified: by 127.0.0.1

