private void GivePokemonCommand()
        {
            PBESpecies species = ReadVarOrEnum <PBESpecies>();
            byte       level   = (byte)ReadVarOrValue();
            var        pkmn    = PartyPokemon.CreatePlayerOwnedMon(species, 0, level);

            Game.Instance.Save.GivePokemon(pkmn);
        }
        private void GivePokemonFormItemCommand()
        {
            PBESpecies species = ReadVarOrEnum <PBESpecies>();
            PBEForm    form    = ReadVarOrEnum <PBEForm>();
            byte       level   = (byte)ReadVarOrValue();
            ItemType   item    = ReadVarOrEnum <ItemType>();
            var        pkmn    = PartyPokemon.CreatePlayerOwnedMon(species, form, level);

            pkmn.Item = item;
            Game.Instance.Save.GivePokemon(pkmn);
        }
Exemplo n.º 3
0
        public void Debug_Create()
        {
            GameStats       = new GameStats();
            Pokedex         = new Pokedex();
            Flags           = new Flags();
            Vars            = new Vars();
            OT              = new OTInfo("Dawn", true);
            PlayerInventory = Inventory <InventorySlotNew> .CreatePlayerInventory();

            PlayerInventory.Add(ItemType.DuskBall, 995);
            PlayerInventory.Add(ItemType.RockyHelmet, 42);
            PlayerInventory.Add(ItemType.Leftovers, 473);
            PlayerInventory.Add(ItemType.Potion, 123);
            PlayerInventory.Add(ItemType.RedScarf, 230);
            PlayerInventory.Add(ItemType.PokeDoll, 130);
            PlayerInventory.Add(ItemType.XSpDef, 120);
            PlayerInventory.Add(ItemType.AirBalloon, 407);
            PlayerInventory.Add(ItemType.PokeBall, 73);
            PlayerInventory.Add(ItemType.DarkGem, 69);
            PlayerInventory.Add(ItemType.FluffyTail, 888);
            PlayerInventory.Add(ItemType.OvalCharm, 1);
            PlayerInventory.Add(ItemType.ShinyCharm, 1);
            ItemData.Debug_GiveAllTMHMs(PlayerInventory);
            Money = 473_123;
            InitPlayerWithDefaultLocation();
            PCBoxes = new PCBoxes();
            Daycare = new Daycare();
            Daycare.StorePokemon(PartyPokemon.CreatePlayerOwnedMon(PBESpecies.Blissey, 0, 47));
            Daycare.StorePokemon(PartyPokemon.CreatePlayerOwnedMon(PBESpecies.Ditto, 0, 82));
            PlayerParty = new Party();
            {
                // To test evolution
                var evomon = PartyPokemon.CreatePlayerOwnedMon(PBESpecies.Burmy, PBEForm.Burmy_Trash, 19);
                evomon.Item = ItemType.Leftovers;
                evomon.EXP  = PBEEXPTables.GetEXPRequired(BaseStats.Get(evomon.Species, evomon.Form, true).GrowthRate, 20) - 1;
                GivePokemon(evomon);
                // To pummel
                var victini = PartyPokemon.CreatePlayerOwnedMon(PBESpecies.Victini, 0, 67);
                victini.Ability         = PBEAbility.Compoundeyes;
                victini.Item            = ItemType.Leftovers;
                victini.Status1         = PBEStatus1.BadlyPoisoned;
                victini.Moveset[0].Move = PBEMove.Bounce;
                victini.Moveset[1].Move = PBEMove.ZenHeadbutt;
                victini.Moveset[2].Move = PBEMove.Surf;
                victini.Moveset[3].Move = PBEMove.VCreate;
                GivePokemon(victini);
            }
            for (int i = 0; i < 44; i++)
            {
                Debug_GiveRandomPokemon(i == 0 || i == 1 || i == 35);
            }

            Overworld.UpdateGiratinaForms(); // Not really necessary, including for debug though
        }
Exemplo n.º 4
0
        private void Debug_GiveRandomPokemon(bool egg)
        {
            (PBESpecies species, PBEForm form) = PBEDataProvider.GlobalRandom.RandomSpecies(true);
            PartyPokemon pkmn;

            if (egg)
            {
                pkmn = PartyPokemon.CreateDefaultEgg(species, form);
            }
            else
            {
                byte level = (byte)PBEDataProvider.GlobalRandom.RandomInt(PkmnConstants.MinLevel, PkmnConstants.MaxLevel);
                pkmn      = PartyPokemon.CreatePlayerOwnedMon(species, form, level);
                pkmn.Item = (ItemType)PBEDataProvider.GlobalRandom.RandomElement(PBEDataUtils.GetValidItems(pkmn.Species, pkmn.Form));
                pkmn.Debug_RandomizeMoves();
            }
            GivePokemon(pkmn);
        }