Commit graph

50 commits

Author SHA1 Message Date
megaproxy
adcd5afd85 Update help documentation with comprehensive pet healing system
- Update inventory section header to "Inventory & Healing System"
- Add \!heal command documentation with 1-hour cooldown details
- Enhance \!use command description to include revive functionality
- Add comprehensive Pet Healing System info box covering:
  - Fainted pet mechanics and restrictions
  - Revive items (50% and 100% HP restoration)
  - Heal command with cooldown system
  - Auto-recovery after 30 minutes to 1 HP
  - Travel permissions with fainted pets
- Add Pet Fainting System section to Battle System:
  - Battle defeat mechanics
  - Available healing options
  - Strategic impact and type advantages
- Update item rarity categories to include Revive (rare) and Max Revive (epic)
- Maintain consistent styling and navigation structure
- Provide complete user guidance for pet health management

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-16 11:33:07 +00:00
megaproxy
a333306ad3 Integrate pet fainting tracking into battle system
- Update wild battle defeat handling to mark pets as fainted
- Update gym battle defeat handling to mark pets as fainted
- Add database faint_pet() calls when pets lose battles
- Ensure fainted pets are properly tracked with timestamps
- Both wild and gym battles now consistently handle pet fainting
- Defeated pets are immediately marked as fainted in database
- Maintains existing battle flow while adding fainting mechanics

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-16 11:32:38 +00:00
megaproxy
d758d6b924 Add \!heal command and automatic pet recovery background system
- Implement \!heal command with 1-hour cooldown available to all users
- Add comprehensive cooldown tracking with database last_heal_time validation
- Heal command restores all active pets to full health
- Add background pet recovery system to game engine:
  - Automatic 30-minute recovery timer for fainted pets
  - Background task checks every 5 minutes for eligible pets
  - Auto-recovery restores pets to 1 HP after 30 minutes
  - Proper startup/shutdown integration with game engine
- Add pet_recovery_task to game engine with graceful shutdown
- Include detailed logging for recovery operations
- Ensure system resilience with error handling and task cancellation

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-16 11:32:25 +00:00
megaproxy
72c1098a22 Implement comprehensive pet healing system with revive items and database support
- Add Revive (50% HP) and Max Revive (100% HP) items to config/items.json
- Extend database schema with fainted_at timestamp for pets table
- Add last_heal_time column to players table for heal command cooldown
- Implement comprehensive pet healing database methods:
  - get_fainted_pets(): Retrieve all fainted pets for a player
  - revive_pet(): Restore fainted pet with specified HP
  - faint_pet(): Mark pet as fainted with timestamp
  - get_pets_for_auto_recovery(): Find pets eligible for 30-minute auto-recovery
  - auto_recover_pet(): Automatically restore pet to 1 HP
  - get_active_pets(): Get active pets excluding fainted ones
  - get_player_pets(): Enhanced to filter out fainted pets when active_only=True
- Update inventory module to handle revive and max_revive effects
- Add proper error handling for cases where no fainted pets exist
- Maintain case-insensitive item usage compatibility

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-16 11:32:01 +00:00
megaproxy
fca0423c84 Add comprehensive startup script validation and enhanced pet system
- Enhanced start_petbot.sh with extensive validation and error checking
- Added emoji support to pet species system with database migration
- Expanded pet species from 9 to 33 unique pets with balanced spawn rates
- Improved database integrity validation and orphaned pet detection
- Added comprehensive pre-startup testing and configuration validation
- Enhanced locations with diverse species spawning across all areas
- Added dual-type pets and rarity-based spawn distribution
- Improved startup information display with feature overview
- Added background monitoring and validation systems

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-16 00:17:54 +00:00
megaproxy
add7731d80 Implement comprehensive team builder configuration system
### Major Features Added:

**Team Configuration Management:**
- Add support for 3 different team configurations per player
- Implement save/load/rename functionality for team setups
- Add prominent team configuration UI with dropdown selector
- Create quick action buttons for instant configuration loading
- Add status tracking for current editing state

**Database Enhancements:**
- Add team_configurations table with player_id, slot_number, config_name
- Implement rename_team_configuration() method for configuration management
- Add proper indexing and foreign key constraints

**Web Interface Improvements:**
- Fix team builder template visibility issue (was using wrong template)
- Add comprehensive CSS styling for configuration elements
- Implement responsive design with proper hover effects and transitions
- Add visual feedback with status indicators and progress tracking

**API Endpoints:**
- Add /teambuilder/{nickname}/config/rename/{slot} for renaming configs
- Implement proper validation and error handling for all endpoints
- Add JSON response formatting with success/error states

**JavaScript Functionality:**
- Add switchActiveConfig() for configuration switching
- Implement quickSaveConfig() for instant team saving
- Add renameConfig() with user-friendly prompts
- Create loadConfigToEdit() for seamless configuration editing

**Admin & System Improvements:**
- Enhance weather command system with simplified single-word names
- Fix \!reload command to properly handle all 12 modules
- Improve IRC connection health monitoring with better PONG detection
- Add comprehensive TODO list tracking and progress management

**UI/UX Enhancements:**
- Position team configuration section prominently for maximum visibility
- Add clear instructions: "Save up to 3 different team setups for quick switching"
- Implement intuitive workflow: save → load → edit → rename → resave
- Add visual hierarchy with proper spacing and typography

### Technical Details:

**Problem Solved:**
- Team configuration functionality existed but was hidden in unused template
- Users reported "no indication i can save multiple team configs"
- Configuration management was not visible or accessible

**Solution:**
- Identified dual template system in webserver.py (line 4160 vs 5080)
- Added complete configuration section to actively used template
- Enhanced both CSS styling and JavaScript functionality
- Implemented full backend API support with database persistence

**Files Modified:**
- webserver.py: +600 lines (template fixes, API endpoints, CSS, JavaScript)
- src/database.py: +20 lines (rename_team_configuration method)
- modules/admin.py: +150 lines (weather improvements, enhanced commands)
- TODO.md: Updated progress tracking and completed items

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-15 22:40:23 +00:00
megaproxy
6cd25ab9b1 Update README with comprehensive feature descriptions and latest enhancements
- Enhanced feature descriptions to reflect current capabilities
- Added new sections for Modern Web Features and expanded Technical Features
- Updated Core Gameplay and Advanced Systems with recent additions
- Highlighted 8-category leaderboards, team builder, inventory management
- Mentioned security audit, rate limiting, and backup systems
- Updated item count to 17+ items including new Coin Pouch treasure
- Emphasized responsive design and PIN-verified team management

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-15 20:48:29 +00:00
megaproxy
88e352ee79 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>
2025-07-15 20:47:37 +00:00
megaproxy
915aa00bea Implement comprehensive rate limiting system and item spawn configuration
Major Features Added:
- Complete token bucket rate limiting for IRC commands and web interface
- Per-user rate tracking with category-based limits (Basic, Gameplay, Management, Admin, Web)
- Admin commands for rate limit management (\!rate_stats, \!rate_user, \!rate_unban, \!rate_reset)
- Automatic violation tracking and temporary bans with cleanup
- Global item spawn multiplier system with 75% spawn rate reduction
- Central admin configuration system (config.py)
- One-command bot startup script (start_petbot.sh)

Rate Limiting:
- Token bucket algorithm with burst capacity and refill rates
- Category limits: Basic (20/min), Gameplay (10/min), Management (5/min), Web (60/min)
- Graceful violation handling with user-friendly error messages
- Admin exemption and override capabilities
- Background cleanup of old violations and expired bans

Item Spawn System:
- Added global_spawn_multiplier to config/items.json for easy adjustment
- Reduced all individual spawn rates by 75% (multiplied by 0.25)
- Admins can fine-tune both global multiplier and individual item rates
- Game engine integration applies multiplier to all spawn calculations

Infrastructure:
- Single admin user configuration in config.py
- Enhanced startup script with dependency management and verification
- Updated documentation and help system with rate limiting guide
- Comprehensive test suite for rate limiting functionality

Security:
- Rate limiting protects against command spam and abuse
- IP-based tracking for web interface requests
- Proper error handling and status codes (429 for rate limits)

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-15 20:10:43 +00:00
megaproxy
f8ac661cd1 Add development documentation and task tracking
- CLAUDE.md: Comprehensive development guide documenting patterns, conventions, and project structure
- TODO.md: Organized task list with completed items, bugs, enhancements, and feature ideas
- Both files provide context for future AI-assisted development sessions
- Includes testing procedures, coding standards, and architectural decisions

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-15 17:38:54 +01:00
megaproxy
c8cb99a4d0 Update project documentation for web interface enhancements
- Updated CHANGELOG.md with comprehensive list of new features and fixes
- Enhanced README.md with updated feature descriptions and web interface capabilities
- Documented team builder functionality, navigation improvements, and bug fixes
- Added clear descriptions of IRC command redirects and web integration

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-15 16:59:47 +01:00
megaproxy
5ac3e36f0c Add unified navigation bar to all webserver pages
- Implemented comprehensive navigation system with hover dropdowns
- Added navigation to all webserver pages for consistent user experience
- Enhanced page templates with unified styling and active page highlighting
- Improved accessibility and discoverability of all bot features through web interface

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-15 16:59:16 +01:00
megaproxy
f7fe4ce034 Update help documentation to reflect web interface changes
- Updated command descriptions to reflect inventory redirect to web interface
- Improved documentation for web-based team building and inventory management
- Added clearer explanations of web interface features and navigation
- Maintained consistency between IRC commands and web functionality

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-15 16:58:53 +01:00
megaproxy
ac655b07e6 Remove \!swap command and redirect pet management to web interface
- Removed \!swap command as team management moved to website
- Added redirect messages pointing users to team builder web interface
- Streamlined pet management workflow through unified web experience
- Maintained existing \!pets command functionality with web redirect

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-15 16:58:35 +01:00
megaproxy
d05b2ead53 Fix exploration and battle system state management bugs
- Fixed exploration bug: prevent multiple \!explore when encounter is active
- Fixed battle bug: prevent starting multiple battles from exploration encounters
- Enforced exploration encounter workflow: must choose fight/capture/flee before exploring again
- Fixed \!gym challenge to use player's current location instead of requiring location parameter
- Added proper state management to prevent race conditions
- Improved user experience with clear error messages for active encounters

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-15 16:58:18 +01:00
megaproxy
3c628c7f51 Implement team order persistence and validation system
- Added team_order column migration for numbered team slots (1-6)
- Implemented get_next_available_team_slot() method
- Added team composition validation for team builder
- Created pending team change system with PIN verification
- Added apply_team_change() for secure team updates
- Enhanced team management with proper ordering and constraints

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-15 16:57:54 +01:00
megaproxy
61463267c8 Redirect inventory commands to web interface with jump points
- Updated \!inventory, \!inv, and \!items commands to redirect to player profile
- Added #inventory jump point for direct section navigation
- Improved user experience with web-based inventory management
- Enhanced UX with helpful explanatory messages

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-15 16:57:27 +01:00
megaproxy
30dcb7e4bc Update bot initialization to pass bot instance to webserver
- Modified PetBotWebServer instantiation to include bot parameter
- Enables IRC PIN delivery for team builder functionality
- Maintains existing webserver functionality while adding IRC integration

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-15 16:56:55 +01:00
megaproxy
ff14710987 Fix team builder interface and implement working drag-and-drop functionality
- Completely rewrote team builder with unified template system
- Fixed center alignment issues with proper CSS layout (max-width: 1200px, margin: 0 auto)
- Implemented working drag-and-drop between storage and numbered team slots (1-6)
- Added double-click backup method for moving pets
- Fixed JavaScript initialization and DOM loading issues
- Added proper visual feedback during drag operations
- Fixed CSS syntax errors that were breaking f-string templates
- Added missing send_json_response method for AJAX requests
- Integrated IRC PIN delivery system for secure team changes
- Updated PetBotWebServer constructor to accept bot instance for IRC messaging

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-15 16:55:58 +01:00
megaproxy
8e9ff2960f Implement case-insensitive command processing across all bot modules
Added normalize_input() function to BaseModule for consistent lowercase conversion of user input. Updated all command modules to use normalization for commands, arguments, pet names, location names, gym names, and item names. Players can now use any capitalization for commands and arguments.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-14 21:57:51 +01:00
megaproxy
39ba55832d Fix team builder issues, Added startup import checks for consistency
🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-14 21:48:18 +01:00
megaproxy
08f7aa8ea8 Fix database constraints and team builder save functionality
🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-14 21:10:28 +01:00
megaproxy
60dbcae113 Fix drag-and-drop dataTransfer errors and add double-click backup
🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-14 17:19:37 +01:00
megaproxy
bbaba99020 Rewrite drag-and-drop with comprehensive testing and debugging
🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-14 17:17:33 +01:00
megaproxy
d245454231 Fix drag-and-drop functionality in team builder
🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-14 17:14:53 +01:00
megaproxy
7d49730a5f Enhance team builder with full drag-and-drop and detailed pet stats
🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-14 17:11:54 +01:00
megaproxy
9cf2231a03 Implement secure team builder with PIN verification system
🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-14 17:08:02 +01:00
megaproxy
3098be7f36 Implement pet nicknames system - database, IRC command, validation
🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-14 16:57:41 +01:00
megaproxy
4de0c1a124 Update documentation - 2025-07-14 16:44
🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-14 16:44:35 +01:00
megaproxy
124336e65f Update documentation - 2025-07-14 16:41
🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-14 16:41:48 +01:00
megaproxy
9552cfbe4e Update documentation - 2025-07-14 16:39
🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-14 16:39:46 +01:00
megaproxy
729984be66 Fix critical player profile crash with encounter data
Bug Fix:
- Fixed 'int' object has no attribute 'split' error when viewing player profiles
- Issue was incorrect column mapping in encounter data SQL query
- species_id (integer) was being treated as first_encounter_date (string)

Technical Changes:
- Use existing database.get_player_encounters() method with proper row factory
- Use existing database.get_encounter_stats() method for consistency
- Added robust error handling for date formatting in both encounters and gym badges
- Added try/catch blocks to prevent profile crashes from data issues

Data Safety:
- Added isinstance() checks before calling .split() on date strings
- Graceful fallback to 'Unknown' for malformed dates
- Error handling ensures other users won't experience crashes

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-14 16:36:00 +01:00
megaproxy
1ce7158200 Add comprehensive web interface enhancements and encounter tracking
Major Features Added:
- Complete petdex page showing all available pets with stats, types, evolution info
- Encounter tracking system recording pet discoveries and catch statistics
- Gym badges display on player profiles with victory counts and dates
- Enhanced player profiles with discovery progress and completion percentages

Technical Implementation:
- New /petdex route with rarity-organized pet encyclopedia
- Database encounter tracking with automatic integration into exploration/catch
- Updated webserver.py with encounter data fetching and display
- Fixed battle_system.py syntax error in gym battle completion logic
- Organized project by moving unused bot files to backup_bots/ folder

Database Changes:
- Added player_encounters table for tracking discoveries
- Added methods: record_encounter, get_player_encounters, get_encounter_stats
- Enhanced player profile queries to include gym badges and encounters

Web Interface Updates:
- Petdex page with search stats, rarity grouping, and spawn location info
- Player profiles now show species seen, completion %, gym badges earned
- Encounter section displaying discovered pets with catch statistics
- Updated navigation to include petdex link on main game hub

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-14 16:32:25 +01:00
megaproxy
bd455f1be5 Implement comprehensive experience and leveling system
**NEW FEATURES:**
- Complete EXP system with Pokemon-style stat calculation
- Level-based stat growth and automatic HP restoration on level up
- Experience gain from catches and battle victories
- Visual level up notifications with stat increases

**EXPERIENCE SOURCES:**
- Successful catches: 5 EXP × caught pet level
- Wild battle victories: 10 EXP × defeated pet level
- Gym battle victories: 20 EXP × defeated pet level (2x multiplier)

**LEVELING MECHANICS:**
- Cubic growth formula: level³ × 4 - 12 (smooth progression)
- Level cap at 100
- Stats recalculated on level up using Pokemon formulas
- Full HP restoration on level up
- Real-time stat increase display

**EXPERIENCE DISPLAY:**
- \!team command now shows "EXP: X to next" for active pets
- Level up messages show exact stat gains
- Experience awarded immediately after catch/victory

**STAT CALCULATION:**
- HP: (2 × base + 31) × level / 100 + level + 10
- Other stats: (2 × base + 31) × level / 100 + 5
- Progressive growth ensures meaningful advancement

**BATTLE INTEGRATION:**
- EXP awarded after wild battles, gym individual battles, and catches
- Different multipliers for different victory types
- First active pet receives all experience

This creates proper RPG progression where pets grow stronger through gameplay,
encouraging both exploration (catches) and combat (battles) for advancement.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-14 16:11:20 +01:00
megaproxy
6053161b6e Fix gym battle completion error handling
- Fixed tuple index out of range error in end_gym_battle()
- Added proper row factory and named column access in database queries
- Added exception handling and bounds checking in gym battle completion
- Added debug logging to track gym battle state issues
- Improved error messages for gym battle failures

Fixes: "tuple index out of range" error when gym battles complete

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-14 13:11:10 +01:00
megaproxy
710ff5ac9c Implement interactive gym battle system with full battle engine integration
**NEW FEATURES:**
- Full 3-pet gym battles with turn-based combat
- Interactive attack selection (\!attack <move>)
- Item usage during gym battles (\!use <item>)
- Progressive battles through gym leader's team
- Proper gym battle state tracking and advancement

**BATTLE MECHANICS:**
- Players fight through all 3 gym pets sequentially
- Can use all battle commands: \!attack, \!moves, \!use
- Cannot flee from gym battles (must \!forfeit instead)
- Battle engine integration maintains all existing combat features
- Automatic progression to next gym pet when one is defeated

**GYM BATTLE FLOW:**
1. \!gym challenge "gym name" - starts battle with first pet
2. Standard turn-based combat using \!attack <move>
3. When gym pet defeated, automatically advance to next pet
4. Complete victory after defeating all 3 gym pets
5. \!forfeit available to quit gym battle with honor

**DATABASE UPDATES:**
- Added active_gym_battles table for state tracking
- Gym battle progression and team management
- Integration with existing player_gym_battles for victory tracking

**COMMANDS ADDED:**
- \!forfeit - quit current gym battle
- Enhanced \!gym challenge with full battle system
- Battle system now handles gym vs wild battle contexts

This creates the proper Pokemon-style gym experience where players strategically
battle through the gym leader's team using their full arsenal of moves and items.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-14 13:08:25 +01:00
megaproxy
dc49e5f9c9 Add missing get_active_pets method to database
- Added get_active_pets() method that returns all active pets for a player
- Method includes pet details and species information needed for gym battles
- Fixes "get_active_pets" AttributeError in gym challenge command

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-14 13:00:34 +01:00
megaproxy
c1f82b6c6d Improve gym challenge command with location-aware and case-insensitive search
- Updated gym challenge to automatically search in player's current location first
- Made gym search case-insensitive (forest guardian, Forest Guardian, FOREST GUARDIAN all work)
- Added helpful error messages showing available gyms in current location
- Updated gym info command to also prioritize current location and be case-insensitive
- Added get_gym_by_name_in_location() database method for location-specific searches
- Improved user experience by removing need to travel between locations to challenge gyms

Fixes: \!gym challenge forest guardian now works correctly

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-14 12:57:36 +01:00
megaproxy
4ccfdd3505 Update help page styling to match players page design
- Added back link to Game Hub for consistent navigation
- Updated header styling to match other pages (smaller, consistent padding)
- Restructured sections to use section-content wrapper like other pages
- Removed custom background gradients for consistency
- Updated title to match "PetBot - Command Help" pattern
- Maintained all existing content and functionality

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-14 12:53:11 +01:00
megaproxy
c2eb846b77 Update help page with comprehensive gym battle documentation
- Added complete gym battle system documentation
- Added visual gym leader cards for all 6 gyms
- Updated inventory system with item rarity information
- Applied proper dark theme styling to match other web pages
- Added "NEW\!" badges for recent features
- Updated to version 0.2.0
- Organized content into logical sections for better readability

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-14 12:43:05 +01:00
megaproxy
87eff2a336 Implement gym battle system with location-based challenges
🏛️ Gym Battle System - Phase 1:
- Complete database schema with 4 new tables (gyms, gym_teams, player_gym_battles)
- 6 unique gyms across all locations with themed leaders and badges
- Location-based challenges (must travel to gym location)
- Difficulty scaling system (gets harder with each victory)
- Badge tracking and progress system

🎯 Features Added:
- \!gym - List gyms in current location with progress
- \!gym list - Show all gyms across all locations
- \!gym challenge "<name>" - Challenge a gym (location validation)
- \!gym info "<name>" - Get detailed gym information
- \!gym status - Quick status overview

🏆 Gym Roster:
- Starter Town: Forest Guardian (Grass) - Trainer Verde
- Whispering Woods: Nature's Haven (Grass) - Elder Sage
- Electric Canyon: Storm Master (Electric) - Captain Volt
- Crystal Caves: Stone Crusher (Rock) - Miner Magnus
- Frozen Tundra: Ice Breaker (Ice/Water) - Arctic Queen
- Dragon's Peak: Dragon Slayer (Fire) - Champion Drake

⚔️ Battle Mechanics:
- Teams scale with victory count (20% stat increase per win)
- First victory awards badge + bonus rewards
- Repeat challenges give scaling rewards
- Simulated battles (full battle system integration pending)

🔧 Technical Implementation:
- Config-driven gym system (config/gyms.json)
- Scalable database design for easy expansion
- Location validation prevents remote challenges
- Automatic gym data loading on startup

Next phase: Integrate with full battle system and add web interface badges.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-14 12:36:40 +01:00
megaproxy
d74c6f2897 Migrate repository from GitHub to Forgejo
🔄 Repository Migration:
- Migrated from GitHub to self-hosted Forgejo server
- Updated git remote to ssh://git@192.168.1.249:2230/megaproxy/Petbot.git
- Updated README.md with correct clone URL
- Removed GitHub-specific setup files (GITHUB_AUTH_SETUP.md, setup-github.sh)
- Cleaned up temporary debugging files from database fix

🏠 New Repository Location:
- Server: 192.168.1.249:2230 (Forgejo)
- Repository: megaproxy/Petbot
- All commit history and tags preserved

 Migration Complete:
- All commits successfully pushed to Forgejo
- Version tags (v0.1, v0.2.0) migrated
- Future commits will automatically push to Forgejo server

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-14 12:26:50 +01:00
megaproxy
86b5fa998c Prevent future database orphaning by reverting to INSERT OR IGNORE
🛡️ Prevention Fix:
- Reverted pet_species loading back to INSERT OR IGNORE
- Reverted locations loading back to INSERT OR IGNORE
- Reverted location_spawns loading back to INSERT OR IGNORE
- Kept achievements as INSERT OR REPLACE (they need updates)

🔧 Why This Fix:
- INSERT OR REPLACE deletes existing records and creates new ones with new IDs
- This orphans any player data that references the old IDs
- INSERT OR IGNORE preserves existing records and their IDs
- New pets/locations can still be added, but existing ones won't be deleted

 Result:
- Current players: Already fixed with manual database repair
- Future players: Will use existing stable IDs
- Data updates: Achievements can still be updated, reference data is stable
- No more orphaned foreign key references possible

This ensures the database ID orphaning issue can never happen again.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-14 12:13:20 +01:00
megaproxy
821c6f570c Fix database loading to update existing records
🐛 Problem Fixed:
- Achievement changes weren't being applied because INSERT OR IGNORE doesn't update
- New pets and location spawns weren't being loaded for the same reason
- Database was stuck with old configuration data

🔧 Changes:
- Changed INSERT OR IGNORE to INSERT OR REPLACE for achievements
- Changed INSERT OR IGNORE to INSERT OR REPLACE for pet species
- Changed INSERT OR IGNORE to INSERT OR REPLACE for locations and spawns
- This ensures config file changes are properly loaded into database

⚠️ Restart Required:
- Bot needs to be restarted to reload the updated configurations
- After restart, Whispering Woods should be unlocked by Pet Collector achievement
- New Grass pets (Vinewrap, Bloomtail) will be available in Whispering Woods

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-14 11:55:47 +01:00
megaproxy
38ef0b8899 Fix achievement progression by moving Whispering Woods unlock
🎯 Achievement System Improvements:
- Pet Collector achievement (5 pets) now unlocks Whispering Woods
- Nature Explorer achievement (3 Grass species) no longer unlocks location
- Added 2 new Grass-type pets: Vinewrap and Bloomtail
- Updated Whispering Woods spawns to include new Grass pets

🐛 Problem Solved:
- Broke the catch-22 where players needed achievements to access locations
- But needed species from those locations to earn achievements
- Now players can progress naturally: 5 pets → Whispering Woods → more Grass species

🆕 New Pets:
- Vinewrap (Grass) - Defensive grass pet with vine abilities
- Bloomtail (Grass) - Fast grass pet with flower-based attacks

🔧 Updated Spawns:
- Whispering Woods: 3 Grass species (Leafy, Vinewrap, Bloomtail) + rare Flamey
- Players can now complete Nature Explorer achievement after accessing Whispering Woods

📚 Documentation:
- Updated README with new achievement progression
- Clarified unlock sequence and achievement relationships

This change makes the game progression much more logical and accessible for new players.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-14 11:46:35 +01:00
megaproxy
6791d49c80 Fix travel command location name matching
🐛 Fixed Issues:
- "dragon's peak" now properly matches "Dragon's Peak" location
- "dragons peak" (without apostrophe) now works
- Added case-insensitive location name matching
- Added common variations mapping for all locations

🔧 Changes:
- modules/exploration.py: Enhanced \!travel command with location mappings
- Added support for variations like "dragons peak", "dragon peak", "dragons-peak"
- Maintains backward compatibility with existing location names

Now players can use various formats to travel to locations without worrying about exact capitalization or apostrophes.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-14 00:33:12 +01:00
megaproxy
3f3b66bfaa Update all web links to use petz.rdx4.com domain
🌐 Updated URLs:
- \!help command now points to http://petz.rdx4.com/help
- \!pets command now points to http://petz.rdx4.com/player/{nickname}
- README.md updated to reference petz.rdx4.com
- Web server startup messages show both local and public URLs

🔧 Changes:
- modules/core_commands.py: Updated help URL
- modules/pet_management.py: Updated player profile URL
- webserver.py: Added public URL display in startup messages
- README.md: Updated web interface section

Users will now receive public URLs that work externally instead of localhost URLs.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-14 00:27:53 +01:00
megaproxy
db144da24f Add complete item collection system (v0.2.0)
🎒 Item Collection System:
- 16 unique items across 5 categories (healing, battle, rare, location, special)
- Rarity tiers: Common, Uncommon, Rare, Epic, Legendary with symbols
- 30% chance to find items during exploration
- Location-specific items (shells, mushrooms, crystals, runes)
- Inventory management with \!inventory and \!use commands
- Web interface integration showing player inventories
- Consumable items: healing potions, battle boosters, lucky charms

🔧 Technical Updates:
- Added items and player_inventory database tables
- New Inventory module for item management
- Updated game engine with item discovery system
- Enhanced web interface with inventory display
- Item initialization from config/items.json

🆕 New Commands:
- \!inventory / \!inv / \!items - View collected items by category
- \!use <item name> - Use consumable items on active pets

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-14 00:19:57 +01:00
megaproxy
e0edcb391a Add version control and changelog system
 Added automatic version management:
- CHANGELOG.md with complete v0.1.0 history
- Version control helper script for automated commits
- GitHub setup script for easy repository connection
- Semantic versioning support (Major.Minor.Patch)

🔄 Future workflow automation:
- Automatic changelog updates
- Descriptive commit messages
- Version tagging for releases
- Automatic GitHub pushes

🔧 Generated with Claude Code
🤖 Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-14 00:01:54 +01:00
megaproxy
47f160a295 Initial commit: Complete PetBot IRC Game
🎮 Features implemented:
- Pokemon-style pet collection and battles
- Multi-location exploration system
- Dynamic weather with background updates
- Achievement system with location unlocks
- Web dashboard for player stats
- Modular command system
- Async database with SQLite
- PM flood prevention
- Persistent player data

🌤️ Weather System:
- 6 weather types with spawn modifiers
- 30min-3hour dynamic durations
- Background task for automatic updates
- Location-specific weather patterns

🐛 Recent Bug Fixes:
- Database persistence on restart
- Player page SQLite row conversion
- Achievement count calculations
- Travel requirement messages
- Battle move color coding
- Locations page display

🔧 Generated with Claude Code
🤖 Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-13 23:57:39 +01:00