====== 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 =====
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();
}
}
===== JSON Configuration =====
This entity is implemented in Java, no JSON configuration exists
===== String Resources =====
Карамелька смерти
Когда, не мудурствуя лукаво, нужно умертвить героя здесь и сейчас.
===== 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