Pokemon_game

Pokemon is a franchise created in 1996 (and since derived in the form of video games, anime, manga, etc.) and is set in a fictional world where trainers capture and train charming little creatures (Pokemon) in order to creatures (Pokemon) in order to make them fight in an arena. The objective of this project is to create a (simplified) Pokemon battle system, for which we will consider the following rules / constraints :

  • A trainer will be represented by its name, the set of Pokemon it has already captured and its "deck", i.e. the 3 Pokemon it uses for its battles. A trainer will be able to capture Pokemon, battle other trainers, and use them in his battles. A trainer can capture Pokemon, fight other trainers and change his deck (if he is not fighting).
  • 2 types of battles exist:
  • Player vs. Player (PvP): in a PvP battle, 2 trainers fight against each other. The battle is turn-based. On his turn, a trainer can either use a skill of his active Pokemon, choose to replace his active Pokemon with another Pokemon from his deck, or forfeit (and lose the battle). If the active Pokemon has been knocked out, it is obviously not possible to use any of its skills. The battle ends if all 3 Pokemon in a trainer's deck are KO'd (i.e., their life is 0) or if one of the trainers forfeits.
  • Player vs. Environment (PvE): In a PvE battle, 1 trainer faces 1 Pokemon either to capture it or to train its Pokemon. The battle is turn-based and ends if the Pokemon is KO'd or captured, if all 3 Pokemon in the trainer's deck are KO'd, or if the trainer runs away. The trainer can try to capture the Pokemon as soon as its life drops below 20% with a probability equal to 4(0.2 -V/Vmax) , where V is the Pokemon's current life and Vmax its maximum life.
  • In a battle, all Pokemon start with their life and energy at maximum. A Pokemon can only use a skill if it has enough energy to do so.
  • A Pokemon will be represented by its name, its element (air, water, fire or earth), its level and its A Pokemon will be represented by its name, its element (air, water, fire or earth), its level and experience, its maximum life, its maximum energy and its energy regeneration (gain of energy at each turn of a battle). A Pokemon has 3 to 5 skills that it can use in battle. They are used either to attack the opposing Pokemon, or to defend itself (gain life or energy). A list of Pokemon with their characteristics and skills is provided (as a text file) and will have to be read by your program.
  • All skills have a name, a description, an element and a cost. Attacking skills will have a power and accuracy value while defensive skills will have a healing and energy value (one of the two can be zero). When a defensive skill is used by a Pokemon, a random number between the 2 given values will be generated to determine the amount of life or energy restored by the skill.
  • At the end of a PvP battle, the 3 Pokemon of the winning trainer gain experience in the following way: 10 + average level of the defeated Pokemon.
  • level of the Pokemon. At the end of a PvE battle, the trainer's 3 Pokemon gain experience if the Pokemon was KO (but not if it was captured) in the following way: (10 + level of the defeated Pokemon - level of the Pokemon)/3. If the total experience of a Pokemon is equal to 100 (level + 1), it evolves to the next level and its statistics (life, energy, resistance) increase by a random value (between 1 and 5 for example). It may be necessary to implement an "AI" to allow a Human(s) vs Computer game. Several levels of difficulty can be proposed. An AI will simply consist of a sequence of instructions allowing to simulate a human player (no need to recode AlphaGo or Watson . . . ). For example, the computer will prioritize the most powerful offensive skills, heal itself if necessary or change Pokemon to benefit from the elemental bonus.

The proposed options for this project are:

  1. to have a graphical interface (but a textual console version will still have to exist).
  2. to have a tournament or championship system: a large number of trainers compete in PvP battles either with direct elimination (tournament, the loser is eliminated), or with a points system for each victory (championship, all trainers meet once).
    A save feature (in a text file) to allow to interrupt a game at the end of a fight could be useful. Of course, a game loading function should be provided to ' It is possible to resume the game when desired.
  3. manage skills that act on several rounds or several Pokemon. A Pokemon can be burned, frozen, etc. A Pokemon can be burned, frozen, etc., which will inflict damage for several turns in a row, or conversely, heal itself, recover more energy or increase its resistance for several turns. Skills can also target all Pokemon (of the caster if defensive, of the opponent if offensive), have effects when changing Pokemon, etc. It will also be possible to add reload times for skills (e.g. the same skill can't be used twice in a row).
  4. manage the evolution of Pokemon : when a Pokemon reaches a certain level, it can evolve to a new form and thus have access to new skills (see file pokemon.txt).