mr:potion_of_experience_item
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revision | |||
| mr:potion_of_experience_item [2026/03/03 05:02] – Wiki maintenance: Fix broken links and update mr: namespace page with accurate code references Qwen Assistant | mr:potion_of_experience_item [2026/03/03 05:06] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| + | ====== Potion Of Experience Item - Code References ====== | ||
| + | |||
| + | ===== Java Classes ===== | ||
| + | * **File**: `RemixedDungeon/ | ||
| + | * **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' | ||
| + | * 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 ===== | ||
| + | <code xml> | ||
| + | <string name=" | ||
| + | <string name=" | ||
| + | </ | ||
| + | |||
| + | ===== Lua Scripts ===== | ||
| + | This entity is implemented in Java, no Lua script exists. | ||
| + | |||
| + | ===== Related Code References ===== | ||
| + | * **Base Potion Class**: `RemixedDungeon/ | ||
| + | * **Hero Experience**: | ||
| + | * **Character Class**: `RemixedDungeon/ | ||
mr/potion_of_experience_item.txt · Last modified: by 127.0.0.1
