====== Scroll of Lullaby ====== {{ rpd:images:scroll_lullaby.png|Scroll of Lullaby }} The Scroll of Lullaby is a magical item that puts nearby enemies to sleep. ==== 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."; } } '''' * [[https://github.com/NYRDS/remixed-dungeon/blob/master/RemixedDungeon/src/main/java/com/watabou/pixeldungeon/items/scrolls/ScrollOfLullaby.java|ScrollOfLullaby.java]] - Main implementation ==== Related Items ==== * [[rpd:scrolls|Scrolls]] - List of all scrolls * [[rpd:scroll_of_teleportation_item|Scroll of Teleportation]] - Another escape utility scroll {{tag> rpd items scrolls lullaby}}