public FormPokemons(EvolutionItem _evolitem)
        {
            if (lastForm != null) lastForm.Close();
            lastForm = this;

            evolitem = _evolitem;

            InitializeComponent();
            Initialize();
        }
Ejemplo n.º 2
0
        public void StopActionFromTrainer(Character trainer)
        {
            if (trainer.index == 117)
            {
                FormGame.map = new Map(mapNumber, FormGame.OX - 7, FormGame.OY - 6);
                return;
            }

            trainerDefeated[trainer.index] = true;

            if(trainer.index >= 118 && trainer.index <= 120)
            {
                player.HealTeam();
                characters.Clear();
                actionpoint.Clear();
                LoadTournament(trainer.index - 116);
                return;
            }

            if(trainer.index == 121)
            {
                new FormEndGame(1).Show();
                mainForm.Close();
            }

            if (trainer.index == 9) // first gym
            {
                mainForm.ShowMessage("John the Lumberjack: Aaaaah, not again! I'm surprised. Congratulations! Here, take this badge, you deserve it! Oh, and take this, too. It is a HM: Cut. You can teach your pokemons this move how many times you want. Check your bag.");
                player.TMs.Add(new Attack(15)); // give Cut
                player.badges = 1;
            }

            if (trainer.index == 19) // second gym
            {
                mainForm.ShowMessage("Desmond: Excellent skills! Here is your badge and a pleasant surprise - TM: Calm Mind. But be careful! You can teach your pokemons a HM how many times you want, but after you teach one a TM, you will lose the TM forever. The Calm Mind should help you approach the Haunted House without fear.");
                player.TMs.Add(new Attack(347)); // give Calm Mind
                player.badges = 2;
            }

            if (trainer.index == 25) // third gym
            {
                mainForm.ShowMessage("Magic Stan: I guess you can't be a great magician in a small village like this. But you have talent. Here, take HM: Surf. With it you can surf on water and go towards new horizons!");
                player.TMs.Add(new Attack(57)); // give Surf
                player.badges = 3;
            }

            if (trainer.index == 64) // fourth gym
            {
                mainForm.ShowMessage("Aviana: Oh my God! I was so blinded by power that i didn't notice how polluted our waters were. I should be taking care of these problems right away!");
                player.badges = 4;
            }

            if (trainer.index == 79) // fifth gym
            {
                mainForm.ShowMessage("Farmer: YOOHOO! What a battle! Take a pair of goggles to go in the desert. Oh, and you should take this TM: Dig. Dig in the desert to find hidden secrets.");
                player.TMs.Add(new Attack(91)); // give Dig
                player.badges = 5;
            }

            if (trainer.index == 93) // sixth gym
            {
                mainForm.ShowMessage("Isolde: I feel something strange coming from the north.");
                player.badges = 6;
            }

            if (trainer.index == 99) // seventh gym
            {
                mainForm.ShowMessage("Charles&Clotilde Dubois: Mon dieu! We did not expect that! C'est dommage, you win...");
                player.badges = 7;
            }

            if (trainer.index == 116) // eighth gym
            {
                mainForm.ShowMessage("Edmund the Wise: Oh, you are gifted. I guess this is your last badge. Take it and become the tournament champion!");
                player.badges = 8;
            }

            if (trainer.index == 103) // fake gym
            {
                mainForm.ShowMessage(player.name + ": Oh, you are the leader of Team Rocket!\nGiovanni: How could a prick interfere with my plans?\n\nYou recovered a Master Ball from Team Rocket!");
                Pokeball pball = new Pokeball(4);
                pball.number = 1;
                player.pokeballs.Add(pball);
            }

            if (trainer.index >= 39 && trainer.index <= 43 && trainerDefeated[39] && trainerDefeated[40]
                && trainerDefeated[41] && trainerDefeated[42] && trainerDefeated[43]) // open gates for Lucas the Fighter
            {
                mainForm.ShowMessage("Lucas the Fighter: Hmm, I know you. You beat my older brother, John the Lumberjack. But can you handle my superior strength?");
                structures.Clear();
            }

            if (trainer.index == 38) // Lucas the Fighter
            {
                mainForm.ShowMessage("Lucas the Fighter: What the hell... whatever, you deserve the prize. I will teach your pokemon the best fighting move: Focus Punch. But be careful at its downsides.");
                actionAfterDialog = 3;
            }

            if (trainer.index >= 45 && trainer.index <= 49 && trainerDefeated[45] && trainerDefeated[46]
                && trainerDefeated[47] && trainerDefeated[48] && trainerDefeated[49]) // open gates for Dino Senior
            {
                mainForm.ShowMessage("Dino Senior: Haha, you're a shifty one!");
                structures.Clear();
            }

            if (trainer.index == 44) // Dino Senior
            {
                mainForm.ShowMessage("Dino Senior: Bravos! Take this TM: Draco Meteor. It is a very strong move, but not so many pokemons can learn it.");
                player.TMs.Add(new Attack(434)); // give Draco Meteor
            }

            if (trainer.index >= 54 && trainer.index <= 62) // Get evolution stones from Team Rocket
            {
                EvolutionItem evolitem = new EvolutionItem(trainer.index - 53);
                player.evolutionItems.Add(evolitem);
                mainForm.ShowMessage("You recovered " + evolitem.name + " from Team Rocket!");
            }

            if (trainer.index >= 54 && trainer.index <= 62 && trainerDefeated[54] && trainerDefeated[55]
                && trainerDefeated[56] && trainerDefeated[57] && trainerDefeated[58] && trainerDefeated[59]
                && trainerDefeated[60] && trainerDefeated[61] && trainerDefeated[62]) // Team Rocket Squad 1 defeated
            {
                FormGame.map = new Map(mapNumber, FormGame.OX - 7, FormGame.OY - 6);
            }

            if (trainer.index >= 88 && trainer.index <= 92) // Get other evolution items from Team Rocket
            {
                int aux = (trainer.index - 88) * 3;
                EvolutionItem evolitem1 = new EvolutionItem(aux + 10);
                EvolutionItem evolitem2 = new EvolutionItem(aux + 11);
                EvolutionItem evolitem3 = new EvolutionItem(aux + 12);
                player.evolutionItems.Add(evolitem1);
                player.evolutionItems.Add(evolitem2);
                player.evolutionItems.Add(evolitem3);
                mainForm.ShowMessage("You recovered " + evolitem1.name + ", " + evolitem2.name + " and " + evolitem3.name + " from Team Rocket!");
            }

            if (trainer.index >= 88 && trainer.index <= 92 && trainerDefeated[88] && trainerDefeated[89]
               && trainerDefeated[90] && trainerDefeated[91] && trainerDefeated[92]) // Team Rocket Squad 2 defeated
            {
                FormGame.map = new Map(mapNumber, FormGame.OX - 7, FormGame.OY - 6);
            }
        }