Advertisement
Jose_Beltran

ProyectoPokemon(EnProceso)

Jun 19th, 2019
222
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 1.72 KB | None | 0 0
  1. #include<stdio.h>
  2. #include<stdlib.h>
  3. #include<string.h>
  4.  
  5.  
  6. void MostrarPokemon(int n);
  7. /*void ElegirPokemon();*/
  8.  
  9. typedef struct habilidades{//La estructura de los ataques
  10.     char tipo_habilidad[15];
  11.     int danio;
  12.     int PP;
  13.     char efecto[15];
  14.     int prob_efect;//QUEREMOS INCLUIR 4 ATAQUES A CADA UNO DE NUESTROS POKEMONES, LUEGO IMPRIMIRLOS AL ELEGIR AL POKEMON QUERIDO
  15.    
  16. }ataques;
  17.  
  18. struct pokemon{
  19.     char nombre[15];
  20.     char tipo[15];   //Definimos una estructura llamada pokemon
  21.     int vida;
  22.     int num_habilidades;   
  23.     ataques ataque_pokemon;
  24.    
  25. };
  26.  
  27. struct pokemon lista[10]; //Definimos una estructura type pokemon que sea una lista de n(10 en este caso) pokemon, PODEMOS AUMENTAR EL NUMERO DE POKEMONES QUE QUEREMOS
  28.  
  29. struct pokemon lista[10]={{"Pikachu","Electrico",300,4},
  30. {"Bulbasaur","Planta",350,4},{"Charizard","Fuego",500,4},//Le entregamos valores a cada una de nuestras estructuras de la lista
  31. {"Glaceon","Hielo",400,4},{"Caterpie","Bicho",5000,4},
  32. {"Squirtle","Agua",350,4}
  33. };
  34.  
  35.  
  36.  
  37. int main(){
  38.     MostrarPokemon(6);
  39.     while(hp>=0){
  40.        
  41.        
  42.        
  43.     }
  44.    
  45.    
  46.    
  47.     return 0;
  48. }
  49.  
  50. void MostrarPokemon(int n){//Funcion que muestra los pokemones que se pueden elegir
  51.    
  52.     printf("Los pokemones que puede elegir son: \n\n");
  53.    
  54.         for(n=0;n<6;n++){
  55.         printf("%d.-\nPokemon: %s   tipo: %s \nVida: %d \n\n", n, lista[n].nombre, lista[n].tipo,lista[n].vida);
  56.     }
  57.  
  58.     return;
  59. }
  60.  
  61. /*void ElegirPokemon(){
  62.     int n;
  63.     printf("Ingrese el numero del pokemon que quiere: \n");
  64.     scanf("%d", &n);
  65.     printf("El pokemon que eligio fue:\nPokemon: %s   tipo: %s \nVida: %d \n\n", n, lista[n].nombre, lista[n].tipo,lista[n].vida);
  66.    
  67.    
  68.     return;
  69. }NO ME SIRVIO,EXPERIMENTO EN PROCESO/*
  70.  
  71. /*int resVida(){
  72.    
  73.    
  74.    
  75.    
  76. }
  77. int resPP(){
  78.    
  79.    
  80.    
  81.    
  82. }*/
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement