Skip to content

PerseusKyogre09/pokemon-battle-sim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

100 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Pokémon Battle Simulator

A feature-rich Pokémon battle simulator built with Flask, HTML, CSS, and JavaScript. This web application allows players to engage in strategic turn-based battles with authentic Pokémon mechanics, including type advantages, strategic movesets, and dynamic battle animations.

Twitter Follow License

Live Demo

🎮 Features

🎯 Core Gameplay

  • Authentic Pokémon Battles: Experience turn-based battles with official Pokémon mechanics
  • Strategic Movesets: Pokémon come with optimized movesets based on their type and abilities
  • Type Advantages: Full implementation of Pokémon type effectiveness (super effective, not very effective, no effect)
  • STAB (Same Type Attack Bonus): Moves matching the Pokémon's type deal 1.5x damage
  • Critical Hits: Random critical hits add excitement to battles
  • Damage Variance: Moves deal 85-100% of their maximum damage

🖼️ Visuals & Audio

  • Animated Sprites: Gen 5 animated sprites for authentic Pokémon appearance
  • Dynamic Health Bars: Color-changing HP bars based on remaining health
  • Battle Animations: Visual feedback for attacks, damage, and status effects
  • Sound Effects: Authentic Pokémon cries and battle sounds
  • Background Music: Immersive battle music (add your own music files to the music directory)

⚙️ Technical Features

  • Responsive Design: Works on desktop and tablet devices
  • Real-time Updates: Dynamic UI updates without page refreshes
  • Battle Log: Detailed log of all battle events
  • Scalable Architecture: Clean separation of concerns between frontend and backend

🚀 Getting Started

Prerequisites

  • Python 3.8+
  • pip (Python package manager)
  • Modern web browser (Chrome, Firefox, Safari, or Edge)

Installation

  1. Clone the repository

    git clone https://github.com/PersesKyogre09/pokemon-battle-sim.git
    cd pokemon-battle-sim
  2. Install dependencies

    pip install -r requirements.txt
  3. Run the application

    python web_server.py
  4. Open in your browser Visit http://127.0.0.1:5000/ to start playing!

🎮 How to Play

  1. Start a Battle

    • Visit the home page and click "Start Battle"
    • Choose your Pokémon from the selection screen
    • The game will automatically select an opponent for you
  2. Battle Controls

    • Click on a move button to attack
    • Watch the battle log for turn-by-turn updates
    • Monitor HP bars to track battle progress
  3. Winning the Game

    • Reduce your opponent's HP to zero to win
    • If your Pokémon faints, you lose the battle

🛠️ Project Structure

pokemon-battle-sim/
├── data/                  # Data files and type effectiveness charts
├── music/                 # Background music (add your own files here)
├── static/
│   ├── css/              # Stylesheets
│   ├── js/               # Frontend JavaScript
│   └── sounds/           # Sound effects
├── templates/            # HTML templates
│   ├── battle.html       # Main battle interface
│   └── index.html        # Home/selection screen
├── data_loader.py        # Handles loading Pokémon and move data
├── game.py               # Core game logic
├── move.py               # Move class and damage calculation
├── moveset.py            # Strategic moveset generation
├── pokemon.py            # Pokémon class and battle logic
└── web_server.py         # Flask web server and routes

📝 Notes

  • The game uses PokeAPI to fetch Pokémon data, so an internet connection is required
  • For offline play, you'll need to implement a local cache of the required data
  • Add your own music files to the music directory and update the references in templates/battle.html

🤝 Contributing

Contributions are welcome! Feel free to submit issues and pull requests.

📄 License

This project is licensed under the MIT License - see the LICENSE file for details.

Screenshots


🙏 Credits

  • PokeAPI for the comprehensive Pokémon data
  • Flask for the web framework
  • Pokémon Showdown for the moves, typechart logic, and learnsets datasets (MIT license)
  • Pokémon and all related content © Nintendo, Game Freak, and The Pokémon Company
Twitter Follow License

About

A Pokemon Battle Simulator (like showdown) built using Flask. WIP

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors