User Tools

Site Tools


mr:candy_of_death_item

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
mr:candy_of_death_item [2026/02/15 20:13] – Fix wiki pages identified by random selection Qwen Assistantmr:candy_of_death_item [2026/02/15 20:18] (current) – external edit 127.0.0.1
Line 1: Line 1:
 +====== Candy Of Death Item - Code References ======
 +
 +{{ rpd:images:candy_of_death_item.png|Candy of Death Item }}
 +
 +===== Java Classes =====
 +  * [[https://github.com/NYRDS/remixed-dungeon/blob/master/RemixedDungeon/src/main/java/com/nyrds/pixeldungeon/items/common/debug/CandyOfDeath.java|CandyOfDeath.java]] - Main implementation
 +  * [[https://github.com/NYRDS/remixed-dungeon/blob/master/RemixedDungeon/src/main/java/com/nyrds/pixeldungeon/items/common/ItemFactory.java|ItemFactory.java]] - Registration (line 441)
 +  * [[https://github.com/NYRDS/remixed-dungeon/blob/master/RemixedDungeon/src/main/java/com/nyrds/pixeldungeon/levels/TestLevel.java|TestLevel.java]] - Usage (line 195)
 +
 +===== Java Class Content =====
 +<code java>
 +package com.nyrds.pixeldungeon.items.common.debug;
 +
 +import com.watabou.pixeldungeon.actors.Char;
 +import com.watabou.pixeldungeon.items.food.Food;
 +
 +import org.jetbrains.annotations.NotNull;
 +
 +public class CandyOfDeath extends Food {
 +
 + // DIE, DIE, DIE, DIE
 +
 + public CandyOfDeath() {
 + imageFile = "items/artifacts.png";
 + image = 21;
 + }
 +
 + @Override
 + public void _execute(@NotNull Char chr, @NotNull String action ) {
 + super._execute(chr, action );
 + chr.damage(chr.ht(), this);
 + }
 +
 + @Override
 + public int price() {
 + return 20 * quantity();
 + }
 +
 +}
 +</code>
 +
 +===== JSON Configuration =====
 +This entity is implemented in Java, no JSON configuration exists
 +
 +===== String Resources =====
 +<code xml>
 +<string name="CandyOfDeath_Name">Карамелька смерти</string>
 +<string name="CandyOfDeath_Info">Когда, не мудурствуя лукаво, нужно умертвить героя здесь и сейчас.</string>
 +</code>
 +
 +===== Lua Scripts =====
 +This entity is implemented in Java, no Lua script exists
 +
 +===== Implementation Notes =====
 +  * **Class:** Extends Food
 +  * **Special Ability:** When consumed, damages the character for their full HP (chr.damage(chr.ht(), this))
 +  * **Effect:** Instantly kills the character that eats it
 +  * **Usage:** Debug/development item for testing death mechanics
 +  * **Price:** 20 gold per item
 +  * **Sprite:** Uses index 21 from "items/artifacts.png"
 +
 +===== Entity Kind =====
 +  * Entity Kind: CandyOfDeath
  
mr/candy_of_death_item.txt · Last modified: by 127.0.0.1