Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TP 1 Terminé #4

Open
wants to merge 10 commits into
base: master
Choose a base branch
from
Open

TP 1 Terminé #4

wants to merge 10 commits into from

Conversation

arthurdeschamps
Copy link

Les principales fonctionnalités ainsi que quelques détails sont implémentés. Je n'ai détecté aucun bug jusqu'à maintenant, j'espère qu'il n'y en a pas de caché.

Quelques fonctionnalités importantes:

  • Gestion des combats avec input de l'utilisateur et gestion automatique de l'ordinateur (par des techniques utilisant l'aléatoire à 100% ou alors en utilisant des "principes" comme par exemple choisir le pokemon qui a le plus de points de vies pour remplacer un pokemon KO, favoriser l'attaque par rapport aux autres actions , etc
  • Laisser l'utilisateur créer des pokemons avant le combat et en générer des aléatoires pour l'ordinateur (même nombre pour les deux)
  • Gestion des dégâts infligés correspondant presque entièrement à Bulbapedia (a part les variables liées au temps, au terrain ou aux objets par exemple, soit la variable other)
  • Affichage à chaque tour de l'état du combat avec pokemon dans le champ de bataille, en dehors, leurs stats, leur points de vie restants, etc
  • Gestion des points d'actions restants pour chaque attaque (diminution des powerpoints, disparition de l'option "attack" lorsqu'il ne reste aucune attaque avec des powerpoints, etc)
  • Possibilité de s'enfuir pour l'utilisateur comme pour l'ordinateur suivant une formule probabiliste
  • Possibilité de switcher deux Pokemon

Fonctionnalités manquantes:

  • Gestion des items (l'action "item" proposée retournera toujours que le sac ne contient aucun objet, que ce soit du côté utilisateur ou du côté ordinateur)
  • Impact du temps sur le combat
  • Impact du terrain sur le combat

Arthur Deschamps and others added 8 commits February 26, 2017 20:45
…tats calculation, typeModifier function, damage (two remaining things to implement : the parameter “other” and the “stages” for critical hits probabilities)
No bug/logic testing yet, so there might be a lot of code to correct
Big todos remaining: battle state and battle
…battle (and track any potential bug or inconsistencie).

swift_exercices file greatly improved and probably working without bugs.

User’s turn is done, but computer’s turn and actions resolving still need to be done.
… or running away.

Still very important things to implement: Switch pokemons and use items (not sure if that will be ever implemented).
Powerpoints stay constant for now: that’s the first step for future dev.
…cies.

Current bug: computer doesn’t make any action anymore
…revious bug with the opponent not doing his action)

Main features are now implemented.
- Nicknames are now randomly chosen for computer’s pokemons (until the number of pokemons reaches the total amount of available names)
- Changed type of user_action from Any? To Move?, since it’s wether a move or a nil when the action is resolved immediately
- Computer choses the Pokemon with the greatest hitpoints remaining when it comes to make a substitution (or when a Pokemon is dazed)
- Random natures are generated for newly created Pokemons (user or computer)
* dev:
  Done: - Nicknames are now randomly chosen for computer’s pokemons (until the number of pokemons reaches the total amount of available names) - Changed type of user_action from Any? To Move?, since it’s wether a move or a nil when the action is resolved immediately - Computer choses the Pokemon with the greatest hitpoints remaining when it comes to make a substitution (or when a Pokemon is dazed) - Random natures are generated for newly created Pokemons (user or computer)
  Fix: added missing cases during actions resolving (which causes the previous bug with the opponent not doing his action) Main features are now implemented.
  Added possibility to choose a custom Pokemon based on an existing species. Current bug: computer doesn’t make any action anymore
  Moved in init function moves and species definitions. Switch pokemons feature added.
@saucisson
Copy link

Your code does not compile on the continuous integration platform, because it requires the Darwin package, that does not exist on Linux. What functions do you use from this package?

@arthurdeschamps
Copy link
Author

arthurdeschamps commented Mar 15, 2017

I'm using arc4random_uniform and exit that requires Darwin. I'll try to get rid of them and find a replacement.

Functions from Darwin (exit and arc4random_uniform) are now defined  for linux platform
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants