====== Potion Of Experience Item - Code References ====== ===== Java Classes ===== * **File**: `RemixedDungeon/src/main/java/com/watabou/pixeldungeon/items/potions/PotionOfExperience.java` * **Class**: `com.watabou.pixeldungeon.items.potions.PotionOfExperience` * **Parent Class**: `Potion` * **Key Methods**: * `apply(Char chr)` - Applies the potion effect, granting experience points * `shatter(int cell)` - Handles potion shattering when thrown * `desc()` - Returns the item description from string resources * `price()` - Returns the item price (80 gold when known) * **Implementation Details**: * `labelIndex = 11` - Defines the potion's appearance label * Uses `chr.earnExp(chr.expToLevel() - chr.getExpForLevelUp())` to grant experience for next level ===== JSON Configuration ===== This entity is implemented in Java, no JSON configuration required. ===== String Resources ===== Potion of Experience The storied experiences of multitudes of battles reduced to liquid form, this draught will instantly raise your experience level. ===== Lua Scripts ===== This entity is implemented in Java, no Lua script exists. ===== Related Code References ===== * **Base Potion Class**: `RemixedDungeon/src/main/java/com/watabou/pixeldungeon/items/potions/Potion.java` * **Hero Experience**: `RemixedDungeon/src/main/java/com/watabou/pixeldungeon/actors/hero/Hero.java` (expToLevel, getExpForLevelUp methods) * **Character Class**: `RemixedDungeon/src/main/java/com/watabou/pixeldungeon/actors/Char.java` (earnExp method)