Files
duckhunt/duckhunt.py
ComputerTech312 7aded2ed83 Implement duck item drop system and remove all emojis
Duck Item Drop System:
- Added configurable drop rates per duck type (15%/25%/50%)
- Created weighted drop tables for different items
- Normal ducks: basic items (bullets, magazines, gun brush, sand)
- Fast ducks: useful items including bucket of water
- Golden ducks: rare items (bread, insurance, gun buyback, dry clothes)
- Items automatically added to player inventory
- Added drop notification messages for each duck type
- Integrated seamlessly with existing combat mechanics

Emoji Removal:
- Removed all emojis from source code files
- Updated logging system to use clean text prefixes
- Replaced trophy/medal emojis with #1/#2/#3 rankings
- Updated README.md to remove all emojis
- Professional clean appearance throughout codebase
2025-09-26 19:59:34 +01:00

46 lines
1.1 KiB
Python

"""
DuckHunt IRC Bot - Simplified Entry Point
Commands: !bang, !reload, !shop, !rearm, !disarm
"""
import asyncio
import json
import sys
import os
sys.path.insert(0, os.path.join(os.path.dirname(__file__), 'src'))
from src.duckhuntbot import DuckHuntBot
def main():
"""Main entry point for DuckHunt Bot"""
try:
config_file = 'config.json'
if not os.path.exists(config_file):
print("❌ config.json not found!")
sys.exit(1)
with open(config_file) as f:
config = json.load(f)
bot = DuckHuntBot(config)
bot.logger.info("Starting DuckHunt Bot...")
# Run the bot
asyncio.run(bot.run())
except KeyboardInterrupt:
print("\n🛑 Shutdown interrupted by user")
except FileNotFoundError:
print("❌ config.json not found!")
sys.exit(1)
except Exception as e:
print(f"❌ Error: {e}")
sys.exit(1)
else:
print("👋 DuckHunt Bot stopped gracefully")
if __name__ == '__main__':
main()