mr:scroll_of_psionic_blast_item
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revision | |||
| mr:scroll_of_psionic_blast_item [2026/02/25 21:27] – Wiki standards compliance fixes for 5 random pages Qwen Assistant | mr:scroll_of_psionic_blast_item [2026/02/25 21:30] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| + | ====== Scroll Of Psionic Blast - Code References ====== | ||
| + | |||
| + | ===== Java Classes ===== | ||
| + | * [[https:// | ||
| + | |||
| + | ===== Full Java Class Content ===== | ||
| + | <code java> | ||
| + | package com.watabou.pixeldungeon.items.scrolls; | ||
| + | |||
| + | import com.nyrds.platform.audio.Sample; | ||
| + | import com.watabou.pixeldungeon.Assets; | ||
| + | import com.watabou.pixeldungeon.Dungeon; | ||
| + | import com.watabou.pixeldungeon.actors.Char; | ||
| + | import com.watabou.pixeldungeon.actors.buffs.Blindness; | ||
| + | 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.scenes.GameScene; | ||
| + | import com.watabou.utils.Random; | ||
| + | |||
| + | import org.jetbrains.annotations.NotNull; | ||
| + | |||
| + | public class ScrollOfPsionicBlast extends Scroll { | ||
| + | |||
| + | @Override | ||
| + | protected void doRead(@NotNull Char reader) { | ||
| + | |||
| + | GameScene.flash( 0xFFFFFF ); | ||
| + | |||
| + | Sample.INSTANCE.play( Assets.SND_BLAST ); | ||
| + | Invisibility.dispel(reader); | ||
| + | |||
| + | // Affect all visible mobs | ||
| + | for (Mob mob : Dungeon.level.getCopyOfMobsArray()) { | ||
| + | if (Dungeon.level.fieldOfView[mob.getPos()]) { | ||
| + | // Blind for 3-6 turns | ||
| + | Buff.prolong( mob, Blindness.class, | ||
| + | // Damage: 1 to 2/3 of max HP | ||
| + | mob.damage( Random.IntRange( 1, mob.ht() * 2 / 3 ), this ); | ||
| + | } | ||
| + | } | ||
| + | |||
| + | // Also affect the reader | ||
| + | Buff.prolong( reader, Blindness.class, | ||
| + | reader.observe(); | ||
| + | |||
| + | setKnown(); | ||
| + | |||
| + | reader.spend( TIME_TO_READ ); | ||
| + | } | ||
| + | |||
| + | @Override | ||
| + | public int price() { | ||
| + | return isKnown() ? 80 * quantity() : super.price(); | ||
| + | } | ||
| + | } | ||
| + | </ | ||
| + | |||
| + | **Effects from code:** | ||
| + | * Visual Effect: Screen flash (0xFFFFFF - white) | ||
| + | * Sound Effect: Assets.SND_BLAST | ||
| + | * Dispels: Invisibility from reader | ||
| + | * Damage: Random.IntRange(1, | ||
| + | * Blindness Duration: Random.Int(3, | ||
| + | * Area of Effect: All creatures visible to reader (fieldOfView) | ||
| + | * Affects: Both mobs and the reader | ||
| + | * Price (known): 80 gold | ||
| + | * Price (unknown): Base scroll price | ||
| + | |||
| + | ===== JSON Configuration ===== | ||
| + | This entity is implemented in Java, no JSON configuration exists | ||
| + | |||
| + | ===== String Resources ===== | ||
| + | English (values/ | ||
| + | <code xml> | ||
| + | <string name=" | ||
| + | <string name=" | ||
| + | <string name=" | ||
| + | <string name=" | ||
| + | <string name=" | ||
| + | <string name=" | ||
| + | </ | ||
| + | |||
| + | Russian (values-ru/ | ||
| + | <code xml> | ||
| + | <string name=" | ||
| + | <string name=" | ||
| + | <string name=" | ||
| + | </ | ||
| + | |||
| + | ===== Lua Scripts ===== | ||
| + | This entity is implemented in Java, no Lua script exists | ||
| + | |||
| + | ===== Related mr Entities ===== | ||
| + | * [[mr: | ||
| + | * [[mr: | ||
| + | * [[mr: | ||
mr/scroll_of_psionic_blast_item.txt · Last modified: (external edit)
