User Tools

Site Tools


mr:upgradable_potion_item

Upgradable Potion Item - Code References

Java Classes

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
mr/upgradable_potion_item.txt · Last modified: by 127.0.0.1