Draconic Treasure Inventory Control

Par 7
Question 14intermediateSheet 1750822302

Deep Breath

A D&D dungeon master converted the inventory system to ancient dragon hoarding algorithms. Five-thousand-year-old wyrms apparently know more about asset management than modern accountants. The former developer disappeared into a mountain cave leaving behind scales and a cryptic riddle about compound interest. Your task: Manage dragon treasure hoards using ancient draconic wisdom and greed calculations.

Why You're Doing This

You're building an asset valuation system with age-based multipliers and territorial bonuses. This tests compound interest calculations, risk assessment, and resource allocation with fantasy constraints. It's like portfolio management but with more fire breathing and territorial disputes.

Take the W

  • Applies age-based greed multipliers correctly
  • Values different treasure types appropriately
  • Handles territorial disputes and sharing

Hard L

  • Allows negative treasure values
  • Ignores dragon age in calculations
  • Permits mathematically impossible hoard sizes

Edge Cases

  • Dragon younger than economic understanding age
  • Hoard larger than physically possible mountain cave
  • Territory claimed by multiple dragon types simultaneously
  • Cursed treasure that reduces total hoard value
  • Dragon retirement requiring hoard liquidation
Input Format:
Dragon object with age, territory enum, and treasure array
Expected Output:
Hoard valuation with multipliers and bonuses
Example:
{age: 500, territory: 'MOUNTAIN', treasures: [{type: 'gold', value: 100}]} → {total_value: 500, multiplier: 5.0, territorial_bonus: 'mountain_gold_20%'}
Hints
  • 💡 Dragon age multipliers: young=1x, adult=2x, ancient=5x, wyrm=10x
  • 💡 Treasure preferences: gold > gems > magic_items > mundane_items
  • 💡 Territory bonuses: red+mountain, blue+coast, green+forest, white+arctic