The Scroll of Challenge is a magical item that creates a ring of fire around the hero, which causes all visible enemies to become hostile and attack the hero immediately.
When read, the Scroll of Challenge creates a ring of fire around the hero that immediately attracts the attention of all visible enemies on the level, making them aggressive and causing them to come to attack the hero. This can be useful for clearing out areas when the hero is in a strong position.
<code java>
package com.watabou.pixeldungeon.items.scrolls;
import com.watabou.pixeldungeon.Dungeon; import com.watabou.pixeldungeon.actors.buffs.Buff; import com.watabou.pixeldungeon.actors.buffs.Invisibility; import com.watabou.pixeldungeon.actors.mobs.Mob; import com.watabou.pixeldungeon.effects.Flare; import com.watabou.pixeldungeon.levels.Level; import com.watabou.pixeldungeon.utils.GLog;
public class ScrollOfChallenge extends Scroll {
@Override
protected void doRead() {
new Flare( 5, 32 ).show( curUser.sprite, 2f );
for (Mob mob : Dungeon.level.mobs) {
if (Level.fieldOfView[mob.pos]) {
mob.beckon( curUser.pos );
}
}
Buff.detach( curUser, Invisibility.class );
GLog.n( "The scroll emits a challenging roar that echoes throughout the dungeon!" );
setKnown();
((ScrollOfMagicMapping)curItem).readAnimation();
}
@Override
public String desc() {
return
"When read aloud, the scroll creates a ring of fire around you that will " +
"attract the attention of all visible enemies on the level, making them " +
"immediately aggressive toward you.";
}
}
</code>