Enhance web interface and item system with user experience improvements

- Fix \!team command to redirect to team builder web page instead of showing IRC list
- Add usage commands to inventory items showing "\!use <item name>" for each item
- Implement Coin Pouch treasure item with 1-3 coin rewards (rare drop rate)
- Fix gym badges leaderboard database query with proper COALESCE and CASE syntax
- Improve inventory item display with styled command instructions and monospace code blocks

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
megaproxy 2025-07-15 20:47:37 +00:00
parent 915aa00bea
commit 88e352ee79
4 changed files with 450 additions and 51 deletions

View file

@ -99,6 +99,22 @@ class Inventory(BaseModule):
self.send_message(channel,
f"🍀 {nickname}: Used {item['name']}! Rare pet encounter rate increased by {effect_value}% for 1 hour!")
elif effect == "money":
# Handle money items (like Coin Pouch)
import random
if "-" in str(effect_value):
# Parse range like "1-3"
min_coins, max_coins = map(int, str(effect_value).split("-"))
coins_gained = random.randint(min_coins, max_coins)
else:
coins_gained = int(effect_value)
# Add money to player
await self.database.add_money(player["id"], coins_gained)
self.send_message(channel,
f"💰 {nickname}: Used {item['name']}! Found {coins_gained} coins inside!")
elif effect == "none":
self.send_message(channel,
f"📦 {nickname}: Used {item['name']}! This item has no immediate effect but may be useful later.")