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 age, treasure items, and territorial bonuses
Expected Output:
Total hoard value with greed multiplier and territorial advantages
Example:
500-year-old dragon, mountain territory, gold and gems collection → Total value: 750,000gp, greed multiplier: 5x, territorial advantage: mountain gold bonus
Input Format:
Dragon object with age, territory enum, and treasure array