Online pokemon game.
- Pick your pokemon.
- Pick your enemy pokemons.
- Start fighting!
- Different pokemon have different attack stats and defense stats, and both of them increase when leveling up.
- The attach damage should be a range rather than a fixed number.
//Calculate my damage;
myDamage = Math.floor(Math.cbrt(myLevel) * DMIM * (0.8 + 0.4 * Math.random()) * myPokemon.attack * DFI / (enemyPokemon.defense + DFI));
enemyHp = enemyHp - myDamage;
//Calculate enemy damage;
enemyDamage = Math.floor(DMIE * (0.8 + 0.4 * Math.random()) * enemyPokemon.attack * DFI / (myPokemon.defense + DFI));
myHp = myHp - enemyDamage;
DMIM : Damage index of me; DMIE : Damage index of enemy;() DFI : Defence index;
- HTML
- CSS
- Bootstrap.js
- javaScript/jQuery
- Get a local clone of the repo
git clone https://github.com/andrewlin618/Pokemon-Fight.git
- You can change the Pokemon's attributes in 'javascript/pokemonInfo.js';
- Open index.html in your browser;
- Enjoy the game!
- LinkedIn: Andrew Lin
- Email:
andrewlin618@gmail.com