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>
This commit is contained in:
parent
6053161b6e
commit
bd455f1be5
4 changed files with 233 additions and 4 deletions
|
|
@ -41,7 +41,19 @@ class PetManagement(BaseModule):
|
|||
# Active pets with star
|
||||
for pet in active_pets:
|
||||
name = pet["nickname"] or pet["species_name"]
|
||||
team_info.append(f"⭐{name} (Lv.{pet['level']}) - {pet['hp']}/{pet['max_hp']} HP")
|
||||
|
||||
# Calculate EXP progress
|
||||
current_exp = pet.get("experience", 0)
|
||||
next_level_exp = self.database.calculate_exp_for_level(pet["level"] + 1)
|
||||
current_level_exp = self.database.calculate_exp_for_level(pet["level"])
|
||||
exp_needed = next_level_exp - current_exp
|
||||
|
||||
if pet["level"] >= 100:
|
||||
exp_display = "MAX"
|
||||
else:
|
||||
exp_display = f"{exp_needed} to next"
|
||||
|
||||
team_info.append(f"⭐{name} (Lv.{pet['level']}) - {pet['hp']}/{pet['max_hp']} HP | EXP: {exp_display}")
|
||||
|
||||
# Inactive pets
|
||||
for pet in inactive_pets[:5]: # Show max 5 inactive
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue