Exemple #1
0
        public static void Updates()
        {
            bool end = false;

            while (!end)
            {
                Menu.Action nextact = Menu.GetNextAction();

                switch (nextact)
                {
                case Menu.Action.FIGHT:
                    //debut combat

                    Menu.Fight fight = Menu.GetFight();

                    Combat combat;
                    if (fight == Menu.Fight.WILD)
                    {
                        Trainer wild = new Trainer("Wild pokemon", 0);
                        wild.CatchAPokemon(_index.GetRandomPokemon());
                        combat = new Combat(Trainer, wild, true);
                    }
                    else
                    {
                        combat = new Combat(MyGame.Trainer, MyGame.Opponent, false);
                    }

                    //combatmusic();

                    bool isWon = combat.CombatLoop();

                    //fin combat et retour au menu
                    //music();
                    if (!isWon)
                    {
                        Console.WriteLine("{0} scurried to a pokemon center, \nprotecting the exhausted and fainted pokemon from further harm", Trainer.Name);
                        Trainer.Heal();
                    }
                    break;

                case Menu.Action.SHOP:
                    //storemusic();
                    Menu.Shop myshop = Menu.Getshop();

                    switch (myshop)
                    {
                    case Menu.Shop.SHOP:
                        Console.ReadLine();
                        // music();
                        break;

                    case Menu.Shop.POKECENTER:
                        _trainer.Heal();
                        Console.WriteLine("Your pokemons have been healed");
                        Console.ReadLine();
                        // music();
                        break;

                    case Menu.Shop.HOMEPAGE:
                        //music();
                        Menu.GetNextAction();
                        break;
                    }

                    break;

                case Menu.Action.SHOW:

                    Menu.Stat mystat = Menu.GetStat();
                    switch (mystat)
                    {
                    case Menu.Stat.MYPOKEMON:
                        _trainer.MyPokemon();
                        Console.ReadLine();
                        Menu.GetStat();
                        break;

                    case Menu.Stat.MYID:
                        _trainer.WhoAmI();
                        _trainer.Describe();
                        Console.ReadLine();
                        Menu.GetStat();

                        break;

                    case Menu.Stat.HOMEPAGE:
                        Menu.GetNextAction();
                        break;

                    default:
                        Menu.GetStat();
                        break;
                    }

                    break;

                case Menu.Action.OPTION:
                    Menu.Option nextoption = Menu.GetOption();
                    switch (nextoption)
                    {
                    case Menu.Option.QUIT:
                        end = true;
                        Console.WriteLine("goodbye my friend");
                        break;

                    case Menu.Option.PAUSE:
                        Console.Clear();
                        Console.WriteLine();
                        Console.WriteLine("                 ****************************************************************");
                        Console.WriteLine("                 *                                                              *");
                        Console.WriteLine("                 *                         *GAME PAUSED*                        *");
                        Console.WriteLine("                 *                                                              *");
                        Console.WriteLine("                 *                                                              *");
                        Console.WriteLine("                 ****************************************************************");
                        Console.WriteLine();
                        Console.WriteLine("                                                  <-/");
                        Console.ReadLine();

                        break;

                    case Menu.Option.RESTART:
                        Console.Clear();
                        Welcome();
                        Getmyfirstpokemon();
                        break;

                    case Menu.Option.HOMEPAGE:
                        Menu.GetNextAction();
                        break;

                    default:
                        Menu.GetOption();
                        break;
                    }

                    break;

                default:
                    Menu.GetNextAction();
                    break;
                }
            }
        }
Exemple #2
0
        public static void Getmyfirstpokemon()
        {
            Console.Clear();
            Console.WriteLine();
            Console.WriteLine("      Professor Oak :-Hello there! Welcome to the world of pokémon! My name is Oak!");
            Console.WriteLine();
            Console.WriteLine("                                                  <-/");
            Console.ReadLine();
            Console.Clear();
            Console.WriteLine();
            Console.WriteLine("      Oak: -People call me the pokémon Prof! This world is inhabited by creatures called pokémon! ");
            Console.WriteLine();
            Console.WriteLine("                                                  <-/");
            Console.ReadLine();
            Console.Clear();
            Console.WriteLine();
            Console.WriteLine("      Oak: -For some people, pokémon are pets. Others use them for fights. ");
            Console.WriteLine();
            Console.WriteLine("                                                  <-/");
            Console.ReadLine();
            Console.Clear();
            Console.WriteLine();
            Console.WriteLine("      Oak: -Myself...I study pokémon as a profession.");
            Console.WriteLine();
            Console.WriteLine("                                                  <-/");
            Console.ReadLine();
            Console.Clear();
            Console.WriteLine();
            Console.WriteLine("      Oak: -But first, tell me about yourself.");
            Console.WriteLine();
            Console.WriteLine("                                                  <-/");
            Console.ReadLine();
            Console.Clear();

            Starter();

            Console.WriteLine();
            Console.WriteLine(@"""                                   _\|/^
                                   (_oo /
                                  /-|--/
                                  \ |
                                    /--i
                                   /   L
                                   L""");
            Console.WriteLine();
            Console.WriteLine("      Oak: -This is my grandson, he's been your rival since you both were babies.");
            Console.WriteLine();
            Console.WriteLine("                                                  <-/");
            Console.ReadLine();
            Console.Clear();
            Console.WriteLine("      Oak: -....Erm, what was his name now ?");
            Console.WriteLine();
            Console.Write("      > ");
            _opponent = new Trainer(Console.ReadLine(), _trainer.Age);
            Console.Clear();
            Console.WriteLine();
            Console.WriteLine("      Oak: -That's right! I remember now !, his name is {0}!", _opponent.Name);
            Console.WriteLine("      Oak: -{0}!", _trainer.Name);
            Console.WriteLine("      Oak: -Your very own PoKeMoN legend is about to unfold!");
            Console.WriteLine();
            Console.WriteLine("                                                  <-/");
            Console.ReadLine();
            Console.Clear();
            Console.WriteLine();
            Console.WriteLine("      Oak: -A world of dreams and adventures with PoKeMoN awaits! Let's go !");
            Console.WriteLine("      Oak: -It's now time to choose your first PoKeMoN !");
            Console.WriteLine();

            myfirstpokemon();
            Updates();
        }