rpd:scroll_of_challenge_item
Differences
This shows you the differences between two versions of the page.
| rpd:scroll_of_challenge_item [2025/12/24 21:04] – Create Scroll of Challenge item page with code references mike | rpd:scroll_of_challenge_item [2025/12/24 21:11] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| + | ====== Scroll of Challenge ====== | ||
| + | {{ rpd: | ||
| + | |||
| + | 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. | ||
| + | |||
| + | ==== Description ==== | ||
| + | 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. | ||
| + | |||
| + | ==== Effects ==== | ||
| + | * **Area of Effect**: Affects all visible enemies on the current level | ||
| + | * **Instant Aggro**: Makes all enemies immediately hostile toward the hero | ||
| + | * **Aggressive Behavior**: Enemies will ignore other targets and prioritize attacking the hero | ||
| + | * **Duration**: | ||
| + | |||
| + | ==== Strategy ==== | ||
| + | * **Area Clearing**: Excellent for clearing out large areas when the hero is in a defensible position | ||
| + | * **Preparation**: | ||
| + | * **Escape Planning**: Should have a plan for escaping if the situation becomes overwhelming | ||
| + | * **Advantage Positioning**: | ||
| + | |||
| + | ==== 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.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, | ||
| + | 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 | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | } | ||
| + | } | ||
| + | ''</ | ||
| + | |||
| + | * [[https:// | ||
| + | |||
| + | ==== Related Items ==== | ||
| + | * [[rpd: | ||
| + | * [[rpd: | ||
| + | |||
| + | {{tag> rpd items scrolls challenge}} | ||
