mr:scroll_of_curse_item
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revision | |||
| mr:scroll_of_curse_item [2026/03/23 11:40] – Fix wiki standards compliance issues on 5 random pages Qwen Assistant | mr:scroll_of_curse_item [2026/03/23 11:41] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| + | ====== Scroll Of Curse Item - Code References ====== | ||
| + | |||
| + | This page contains machine-readable information about the Scroll of Curse item for automated tools and AI assistants. | ||
| + | |||
| + | ===== Java Classes ===== | ||
| + | * **Main Class**: [[https:// | ||
| + | * **Parent Class**: [[https:// | ||
| + | * **Package**: | ||
| + | |||
| + | ===== 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.actors.Char; | ||
| + | import com.watabou.pixeldungeon.actors.buffs.Blindness; | ||
| + | import com.watabou.pixeldungeon.actors.buffs.Buff; | ||
| + | import com.watabou.pixeldungeon.actors.buffs.Charm; | ||
| + | import com.watabou.pixeldungeon.actors.buffs.FlavourBuff; | ||
| + | import com.watabou.pixeldungeon.actors.buffs.Invisibility; | ||
| + | import com.watabou.pixeldungeon.actors.buffs.Roots; | ||
| + | import com.watabou.pixeldungeon.actors.buffs.Slow; | ||
| + | import com.watabou.pixeldungeon.actors.buffs.Vertigo; | ||
| + | import com.watabou.pixeldungeon.actors.buffs.Weakness; | ||
| + | import com.watabou.pixeldungeon.effects.particles.ShadowParticle; | ||
| + | import com.watabou.pixeldungeon.items.Item; | ||
| + | import com.watabou.utils.Random; | ||
| + | |||
| + | import org.jetbrains.annotations.NotNull; | ||
| + | |||
| + | public class ScrollOfCurse extends Scroll { | ||
| + | |||
| + | private static final Class<?> | ||
| + | Blindness.class, | ||
| + | Charm.class, | ||
| + | Roots.class, | ||
| + | Slow.class, | ||
| + | Vertigo.class, | ||
| + | Weakness.class | ||
| + | }; | ||
| + | |||
| + | @SuppressWarnings(" | ||
| + | @Override | ||
| + | protected void doRead(@NotNull Char reader) { | ||
| + | Invisibility.dispel(reader); | ||
| + | |||
| + | reader.getSprite().emitter().burst( ShadowParticle.CURSE, | ||
| + | Sample.INSTANCE.play( Assets.SND_CURSED ); | ||
| + | |||
| + | Class <? extends FlavourBuff> | ||
| + | Buff.prolong( reader, buffClass, 10); | ||
| + | |||
| + | reader.getBelongings().curseEquipped(); | ||
| + | |||
| + | setKnown(); | ||
| + | reader.spend( TIME_TO_READ ); | ||
| + | } | ||
| + | |||
| + | |||
| + | public static void curse(Char hero, Item... items) { | ||
| + | |||
| + | boolean procced = false; | ||
| + | for(Item item:items) { | ||
| + | if(!item.isCursed()) { | ||
| + | item.setCursed(true); | ||
| + | item.setCursedKnown(true); | ||
| + | if(item.isCursed()) { | ||
| + | procced = true; | ||
| + | } | ||
| + | } | ||
| + | } | ||
| + | |||
| + | if (procced) { | ||
| + | hero.getSprite().emitter().start(ShadowParticle.UP, | ||
| + | } | ||
| + | } | ||
| + | |||
| + | @Override | ||
| + | public int price() { | ||
| + | return isKnown() ? 300 * quantity() : super.price(); | ||
| + | } | ||
| + | } | ||
| + | </ | ||
| + | |||
| + | ===== Key Methods ===== | ||
| + | * **doRead(Char reader)**: Main reading effect - applies random negative buff and curses equipped items | ||
| + | * **curse(Char hero, Item... items)**: Static method to curse multiple items | ||
| + | * **price()**: | ||
| + | |||
| + | ===== Applied Buffs (Random Selection) ===== | ||
| + | * [[https:// | ||
| + | * [[https:// | ||
| + | * [[https:// | ||
| + | * [[https:// | ||
| + | * [[https:// | ||
| + | * [[https:// | ||
| + | |||
| + | ===== Buff Duration ===== | ||
| + | * All negative buffs are applied for **10 turns** (via Buff.prolong) | ||
| + | |||
| + | ===== Visual/ | ||
| + | * **Visual**: ShadowParticle.CURSE burst (6 particles) on reader sprite | ||
| + | * **Sound**: Assets.SND_CURSED | ||
| + | * **Curse Effect**: ShadowParticle.UP emitter when items are cursed | ||
| + | |||
| + | ===== JSON Configuration ===== | ||
| + | No dedicated JSON configuration file exists for this item. It is implemented entirely in Java. | ||
| + | |||
| + | ===== String Resources ===== | ||
| + | **English** (values/ | ||
| + | <code xml> | ||
| + | <string name=" | ||
| + | <string name=" | ||
| + | </ | ||
| + | |||
| + | **Russian** (values-ru/ | ||
| + | <code xml> | ||
| + | <string name=" | ||
| + | <string name=" | ||
| + | </ | ||
| + | |||
| + | **Portuguese (Brazilian)** (values-pt-rBR/ | ||
| + | <code xml> | ||
| + | <string name=" | ||
| + | <string name=" | ||
| + | </ | ||
| + | |||
| + | **Spanish** (values-es/ | ||
| + | <code xml> | ||
| + | <string name=" | ||
| + | <string name=" | ||
| + | </ | ||
| + | |||
| + | **French** (values-fr/ | ||
| + | <code xml> | ||
| + | <string name=" | ||
| + | <string name=" | ||
| + | </ | ||
| + | |||
| + | **German** (values-de/ | ||
| + | <code xml> | ||
| + | <string name=" | ||
| + | <string name=" | ||
| + | </ | ||
| + | |||
| + | **Italian** (values-it/ | ||
| + | <code xml> | ||
| + | <string name=" | ||
| + | <string name=" | ||
| + | </ | ||
| + | |||
| + | **Japanese** (values-ja/ | ||
| + | <code xml> | ||
| + | <string name=" | ||
| + | <string name=" | ||
| + | </ | ||
| + | |||
| + | **Korean** (values-ko/ | ||
| + | <code xml> | ||
| + | <string name=" | ||
| + | <string name=" | ||
| + | </ | ||
| + | |||
| + | **Chinese (Simplified)** (values-zh-rCN/ | ||
| + | <code xml> | ||
| + | <string name=" | ||
| + | <string name=" | ||
| + | </ | ||
| + | |||
| + | **Chinese (Traditional)** (values-zh-rTW/ | ||
| + | <code xml> | ||
| + | <string name=" | ||
| + | <string name=" | ||
| + | </ | ||
| + | |||
| + | **Polish** (values-pl/ | ||
| + | <code xml> | ||
| + | <string name=" | ||
| + | <string name=" | ||
| + | </ | ||
| + | |||
| + | **Ukrainian** (values-uk/ | ||
| + | <code xml> | ||
| + | <string name=" | ||
| + | <string name=" | ||
| + | </ | ||
| + | |||
| + | **Hungarian** (values-hu/ | ||
| + | <code xml> | ||
| + | <string name=" | ||
| + | <string name=" | ||
| + | </ | ||
| + | |||
| + | **Turkish** (values-tr/ | ||
| + | <code xml> | ||
| + | <string name=" | ||
| + | <string name=" | ||
| + | </ | ||
| + | |||
| + | **Greek** (values-el/ | ||
| + | <code xml> | ||
| + | <string name=" | ||
| + | <string name=" | ||
| + | </ | ||
| + | |||
| + | **Indonesian** (values-in/ | ||
| + | <code xml> | ||
| + | <string name=" | ||
| + | <string name=" | ||
| + | </ | ||
| + | |||
| + | **Malay** (values-ms/ | ||
| + | <code xml> | ||
| + | <string name=" | ||
| + | <string name=" | ||
| + | </ | ||
| + | |||
| + | ===== Lua Scripts ===== | ||
| + | No Lua scripts exist for this item. It is implemented entirely in Java. | ||
| + | |||
| + | ===== Registration in Item System ===== | ||
| + | **ItemFactory.java** (com.nyrds.pixeldungeon.items.common.ItemFactory): | ||
| + | <code java> | ||
| + | import com.watabou.pixeldungeon.items.scrolls.ScrollOfCurse; | ||
| + | // ... | ||
| + | registerItemClass(ScrollOfCurse.class); | ||
| + | </ | ||
| + | |||
| + | **Scroll.java** (Parent class registration): | ||
| + | <code java> | ||
| + | ScrollOfCurse.class | ||
| + | </ | ||
| + | |||
| + | ===== Related Files ===== | ||
| + | * [[https:// | ||
| + | * [[https:// | ||
| + | * [[https:// | ||
| + | * [[https:// | ||
| + | |||
| + | ===== Game Mechanics ===== | ||
| + | * **Effect Type**: Negative buff application + Item cursing | ||
| + | * **Buff Selection**: | ||
| + | * **Buff Duration**: 10 turns | ||
| + | * **Item Cursing**: Curses all equipped items (armor, weapon, left hand, artifact, left artifact slots) | ||
| + | * **Invisibility Dispelling**: | ||
| + | * **Base Price**: 300 gold (when known) | ||
| + | |||
| + | ===== Tags ===== | ||
| + | {{tag> mr items scrolls curse negative_effect java_implementation}} | ||
mr/scroll_of_curse_item.txt · Last modified: by 127.0.0.1
