mr:potion_of_experience_item
Table of Contents
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
<string name="PotionOfExperience_Name">Potion of Experience</string> <string name="PotionOfExperience_Info">The storied experiences of multitudes of battles reduced to liquid form, this draught will instantly raise your experience level.</string>
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)
mr/potion_of_experience_item.txt · Last modified: by 127.0.0.1
