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>
This commit is contained in:
commit
47f160a295
31 changed files with 6235 additions and 0 deletions
51
config/achievements.json
Normal file
51
config/achievements.json
Normal file
|
|
@ -0,0 +1,51 @@
|
|||
[
|
||||
{
|
||||
"name": "Nature Explorer",
|
||||
"description": "Catch 3 different Grass-type pets",
|
||||
"requirement_type": "catch_type",
|
||||
"requirement_data": "3:Grass",
|
||||
"unlock_location": "Whispering Woods"
|
||||
},
|
||||
{
|
||||
"name": "Spark Collector",
|
||||
"description": "Catch 2 different Electric-type pets",
|
||||
"requirement_type": "catch_type",
|
||||
"requirement_data": "2:Electric",
|
||||
"unlock_location": "Electric Canyon"
|
||||
},
|
||||
{
|
||||
"name": "Rock Hound",
|
||||
"description": "Catch 3 different Rock-type pets",
|
||||
"requirement_type": "catch_type",
|
||||
"requirement_data": "3:Rock",
|
||||
"unlock_location": "Crystal Caves"
|
||||
},
|
||||
{
|
||||
"name": "Ice Breaker",
|
||||
"description": "Catch 5 different Water or Ice-type pets",
|
||||
"requirement_type": "catch_type",
|
||||
"requirement_data": "5:Water",
|
||||
"unlock_location": "Frozen Tundra"
|
||||
},
|
||||
{
|
||||
"name": "Dragon Tamer",
|
||||
"description": "Catch 15 pets total and have 3 Fire-type pets",
|
||||
"requirement_type": "catch_total",
|
||||
"requirement_data": "15",
|
||||
"unlock_location": "Dragon's Peak"
|
||||
},
|
||||
{
|
||||
"name": "Pet Collector",
|
||||
"description": "Catch your first 5 pets",
|
||||
"requirement_type": "catch_total",
|
||||
"requirement_data": "5",
|
||||
"unlock_location": null
|
||||
},
|
||||
{
|
||||
"name": "Advanced Trainer",
|
||||
"description": "Catch 10 pets total",
|
||||
"requirement_type": "catch_total",
|
||||
"requirement_data": "10",
|
||||
"unlock_location": null
|
||||
}
|
||||
]
|
||||
66
config/locations.json
Normal file
66
config/locations.json
Normal file
|
|
@ -0,0 +1,66 @@
|
|||
[
|
||||
{
|
||||
"name": "Starter Town",
|
||||
"description": "A peaceful town where all trainers begin their journey",
|
||||
"level_min": 1,
|
||||
"level_max": 3,
|
||||
"spawns": [
|
||||
{"species": "Leafy", "spawn_rate": 0.35, "min_level": 1, "max_level": 2},
|
||||
{"species": "Flamey", "spawn_rate": 0.35, "min_level": 1, "max_level": 2},
|
||||
{"species": "Aqua", "spawn_rate": 0.3, "min_level": 1, "max_level": 2}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Whispering Woods",
|
||||
"description": "Ancient woods filled with grass and nature pets",
|
||||
"level_min": 2,
|
||||
"level_max": 6,
|
||||
"spawns": [
|
||||
{"species": "Leafy", "spawn_rate": 0.5, "min_level": 2, "max_level": 5},
|
||||
{"species": "Flamey", "spawn_rate": 0.2, "min_level": 3, "max_level": 4},
|
||||
{"species": "Aqua", "spawn_rate": 0.3, "min_level": 2, "max_level": 4}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Electric Canyon",
|
||||
"description": "A charged valley crackling with energy",
|
||||
"level_min": 4,
|
||||
"level_max": 9,
|
||||
"spawns": [
|
||||
{"species": "Sparky", "spawn_rate": 0.6, "min_level": 4, "max_level": 7},
|
||||
{"species": "Rocky", "spawn_rate": 0.4, "min_level": 5, "max_level": 8}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Crystal Caves",
|
||||
"description": "Deep underground caverns with rock and crystal pets",
|
||||
"level_min": 6,
|
||||
"level_max": 12,
|
||||
"spawns": [
|
||||
{"species": "Rocky", "spawn_rate": 0.7, "min_level": 6, "max_level": 10},
|
||||
{"species": "Sparky", "spawn_rate": 0.3, "min_level": 7, "max_level": 9}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Frozen Tundra",
|
||||
"description": "An icy wasteland where only the strongest survive",
|
||||
"level_min": 10,
|
||||
"level_max": 16,
|
||||
"spawns": [
|
||||
{"species": "Hydrox", "spawn_rate": 0.4, "min_level": 10, "max_level": 14},
|
||||
{"species": "Rocky", "spawn_rate": 0.3, "min_level": 11, "max_level": 15},
|
||||
{"species": "Sparky", "spawn_rate": 0.3, "min_level": 12, "max_level": 14}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Dragon's Peak",
|
||||
"description": "The ultimate challenge - legendary pets roam these heights",
|
||||
"level_min": 15,
|
||||
"level_max": 25,
|
||||
"spawns": [
|
||||
{"species": "Blazeon", "spawn_rate": 0.5, "min_level": 15, "max_level": 20},
|
||||
{"species": "Hydrox", "spawn_rate": 0.3, "min_level": 16, "max_level": 22},
|
||||
{"species": "Rocky", "spawn_rate": 0.2, "min_level": 18, "max_level": 25}
|
||||
]
|
||||
}
|
||||
]
|
||||
56
config/moves.json
Normal file
56
config/moves.json
Normal file
|
|
@ -0,0 +1,56 @@
|
|||
[
|
||||
{
|
||||
"name": "Tackle",
|
||||
"type": "Normal",
|
||||
"category": "Physical",
|
||||
"power": 40,
|
||||
"accuracy": 100,
|
||||
"pp": 35,
|
||||
"description": "A physical attack in which the user charges and slams into the target."
|
||||
},
|
||||
{
|
||||
"name": "Ember",
|
||||
"type": "Fire",
|
||||
"category": "Special",
|
||||
"power": 40,
|
||||
"accuracy": 100,
|
||||
"pp": 25,
|
||||
"description": "The target is attacked with small flames."
|
||||
},
|
||||
{
|
||||
"name": "Water Gun",
|
||||
"type": "Water",
|
||||
"category": "Special",
|
||||
"power": 40,
|
||||
"accuracy": 100,
|
||||
"pp": 25,
|
||||
"description": "The target is blasted with a forceful shot of water."
|
||||
},
|
||||
{
|
||||
"name": "Vine Whip",
|
||||
"type": "Grass",
|
||||
"category": "Physical",
|
||||
"power": 45,
|
||||
"accuracy": 100,
|
||||
"pp": 25,
|
||||
"description": "The target is struck with slender, whiplike vines."
|
||||
},
|
||||
{
|
||||
"name": "Thunder Shock",
|
||||
"type": "Electric",
|
||||
"category": "Special",
|
||||
"power": 40,
|
||||
"accuracy": 100,
|
||||
"pp": 30,
|
||||
"description": "A jolt of electricity crashes down on the target."
|
||||
},
|
||||
{
|
||||
"name": "Rock Throw",
|
||||
"type": "Rock",
|
||||
"category": "Physical",
|
||||
"power": 50,
|
||||
"accuracy": 90,
|
||||
"pp": 15,
|
||||
"description": "The user picks up and hurls a rock at the target."
|
||||
}
|
||||
]
|
||||
79
config/pets.json
Normal file
79
config/pets.json
Normal file
|
|
@ -0,0 +1,79 @@
|
|||
[
|
||||
{
|
||||
"name": "Flamey",
|
||||
"type1": "Fire",
|
||||
"type2": null,
|
||||
"base_hp": 45,
|
||||
"base_attack": 52,
|
||||
"base_defense": 43,
|
||||
"base_speed": 65,
|
||||
"evolution_level": null,
|
||||
"rarity": 1
|
||||
},
|
||||
{
|
||||
"name": "Aqua",
|
||||
"type1": "Water",
|
||||
"type2": null,
|
||||
"base_hp": 44,
|
||||
"base_attack": 48,
|
||||
"base_defense": 65,
|
||||
"base_speed": 43,
|
||||
"evolution_level": null,
|
||||
"rarity": 1
|
||||
},
|
||||
{
|
||||
"name": "Leafy",
|
||||
"type1": "Grass",
|
||||
"type2": null,
|
||||
"base_hp": 45,
|
||||
"base_attack": 49,
|
||||
"base_defense": 49,
|
||||
"base_speed": 45,
|
||||
"evolution_level": null,
|
||||
"rarity": 1
|
||||
},
|
||||
{
|
||||
"name": "Sparky",
|
||||
"type1": "Electric",
|
||||
"type2": null,
|
||||
"base_hp": 35,
|
||||
"base_attack": 55,
|
||||
"base_defense": 40,
|
||||
"base_speed": 90,
|
||||
"evolution_level": null,
|
||||
"rarity": 2
|
||||
},
|
||||
{
|
||||
"name": "Rocky",
|
||||
"type1": "Rock",
|
||||
"type2": null,
|
||||
"base_hp": 40,
|
||||
"base_attack": 80,
|
||||
"base_defense": 100,
|
||||
"base_speed": 25,
|
||||
"evolution_level": null,
|
||||
"rarity": 2
|
||||
},
|
||||
{
|
||||
"name": "Blazeon",
|
||||
"type1": "Fire",
|
||||
"type2": null,
|
||||
"base_hp": 65,
|
||||
"base_attack": 80,
|
||||
"base_defense": 60,
|
||||
"base_speed": 95,
|
||||
"evolution_level": null,
|
||||
"rarity": 3
|
||||
},
|
||||
{
|
||||
"name": "Hydrox",
|
||||
"type1": "Water",
|
||||
"type2": "Ice",
|
||||
"base_hp": 70,
|
||||
"base_attack": 65,
|
||||
"base_defense": 90,
|
||||
"base_speed": 60,
|
||||
"evolution_level": null,
|
||||
"rarity": 3
|
||||
}
|
||||
]
|
||||
10
config/settings.example.json
Normal file
10
config/settings.example.json
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
{
|
||||
"server": "irc.libera.chat",
|
||||
"port": 6667,
|
||||
"nickname": "PetBot",
|
||||
"channel": "#petz",
|
||||
"command_prefix": "!",
|
||||
"admin_users": ["your_nickname_here"],
|
||||
"web_port": 8080,
|
||||
"database_path": "data/petbot.db"
|
||||
}
|
||||
46
config/types.json
Normal file
46
config/types.json
Normal file
|
|
@ -0,0 +1,46 @@
|
|||
{
|
||||
"effectiveness": {
|
||||
"Fire": {
|
||||
"strong_against": ["Grass", "Ice"],
|
||||
"weak_against": ["Water", "Rock"],
|
||||
"immune_to": [],
|
||||
"resists": ["Fire", "Grass"]
|
||||
},
|
||||
"Water": {
|
||||
"strong_against": ["Fire", "Rock"],
|
||||
"weak_against": ["Electric", "Grass"],
|
||||
"immune_to": [],
|
||||
"resists": ["Water", "Fire", "Ice"]
|
||||
},
|
||||
"Grass": {
|
||||
"strong_against": ["Water", "Rock"],
|
||||
"weak_against": ["Fire", "Ice"],
|
||||
"immune_to": [],
|
||||
"resists": ["Water", "Electric", "Grass"]
|
||||
},
|
||||
"Electric": {
|
||||
"strong_against": ["Water"],
|
||||
"weak_against": ["Rock"],
|
||||
"immune_to": [],
|
||||
"resists": ["Electric"]
|
||||
},
|
||||
"Rock": {
|
||||
"strong_against": ["Fire", "Electric"],
|
||||
"weak_against": ["Water", "Grass"],
|
||||
"immune_to": [],
|
||||
"resists": ["Fire", "Normal"]
|
||||
},
|
||||
"Ice": {
|
||||
"strong_against": ["Grass"],
|
||||
"weak_against": ["Fire", "Rock"],
|
||||
"immune_to": [],
|
||||
"resists": ["Ice"]
|
||||
},
|
||||
"Normal": {
|
||||
"strong_against": [],
|
||||
"weak_against": ["Rock"],
|
||||
"immune_to": [],
|
||||
"resists": []
|
||||
}
|
||||
}
|
||||
}
|
||||
48
config/weather_patterns.json
Normal file
48
config/weather_patterns.json
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
{
|
||||
"weather_types": {
|
||||
"Sunny": {
|
||||
"description": "Bright sunshine increases Fire and Grass-type spawns",
|
||||
"spawn_modifier": 1.5,
|
||||
"affected_types": ["Fire", "Grass"],
|
||||
"duration_minutes": [60, 120]
|
||||
},
|
||||
"Rainy": {
|
||||
"description": "Heavy rain boosts Water-type spawns significantly",
|
||||
"spawn_modifier": 2.0,
|
||||
"affected_types": ["Water"],
|
||||
"duration_minutes": [45, 90]
|
||||
},
|
||||
"Thunderstorm": {
|
||||
"description": "Electric storms double Electric-type spawn rates",
|
||||
"spawn_modifier": 2.0,
|
||||
"affected_types": ["Electric"],
|
||||
"duration_minutes": [30, 60]
|
||||
},
|
||||
"Blizzard": {
|
||||
"description": "Harsh snowstorm increases Ice and Water-type spawns",
|
||||
"spawn_modifier": 1.7,
|
||||
"affected_types": ["Ice", "Water"],
|
||||
"duration_minutes": [60, 120]
|
||||
},
|
||||
"Earthquake": {
|
||||
"description": "Ground tremors bring Rock-type pets to the surface",
|
||||
"spawn_modifier": 1.8,
|
||||
"affected_types": ["Rock"],
|
||||
"duration_minutes": [30, 90]
|
||||
},
|
||||
"Calm": {
|
||||
"description": "Perfect weather with normal spawn rates",
|
||||
"spawn_modifier": 1.0,
|
||||
"affected_types": [],
|
||||
"duration_minutes": [90, 180]
|
||||
}
|
||||
},
|
||||
"location_weather_chances": {
|
||||
"Starter Town": ["Sunny", "Calm", "Rainy"],
|
||||
"Whispering Woods": ["Sunny", "Rainy", "Calm"],
|
||||
"Electric Canyon": ["Thunderstorm", "Sunny", "Calm"],
|
||||
"Crystal Caves": ["Earthquake", "Calm"],
|
||||
"Frozen Tundra": ["Blizzard", "Calm"],
|
||||
"Dragon's Peak": ["Thunderstorm", "Sunny", "Calm"]
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue