mr:upgradable_potion_item
Table of Contents
Upgradable Potion Item - Code References
Java Classes
- UpgradablePotion.java - Base class for upgradable potions
- Potion.java - Base potion class
- PotionOfLiquidFlame.java - Example implementation
- PotionOfHealing.java - Example implementation
- PotionOfFrost.java - Example implementation
- PotionOfParalyticGas.java - Example implementation
- PotionOfToxicGas.java - Example implementation
- PotionOfMindVision.java - Example implementation
- PotionOfInvisibility.java - Example implementation
- PotionOfLevitation.java - Example implementation
- PotionOfStrength.java - Example implementation
JSON Configuration
This entity is a base class implemented in Java, no JSON configuration exists
String Resources
No specific string resources for the base class. Subclasses define their own strings.
Lua Scripts
This entity is implemented in Java, no Lua script exists
Implementation Details
- Class: `com.watabou.pixeldungeon.items.potions.UpgradablePotion`
- Extends: `Potion`
- Package: `com.watabou.pixeldungeon.items.potions`
- Purpose: Provides upgrade/degrade mechanics for potions
- Key Method: `qualityFactor()` returns `Math.pow(2, level())` - volume scales exponentially with upgrade level
- Upgrade Behavior: When upgraded, creates a new upgraded potion if quantity > 1
- Degrade Behavior: When degraded, creates a new degraded potion if quantity > 1
- Random Generation: 15% chance to be upgraded once, 2.25% chance to be upgraded twice
- Visual Indicator: `visiblyUpgraded()` returns the potion's level
Known Subclasses
- PotionOfHealing
- PotionOfLiquidFlame
- PotionOfFrost
- PotionOfParalyticGas
- PotionOfToxicGas
- PotionOfMindVision
- PotionOfInvisibility
- PotionOfLevitation
- PotionOfStrength
Related mr Entities
mr/upgradable_potion_item.txt · Last modified: by 127.0.0.1
