public void GivePokemon(PartyPokemon pkmn) { Pokedex.SetCaught(pkmn.Species, pkmn.Form, pkmn.Gender, pkmn.Shiny, pkmn.PID); // Try to add to party first, then pc boxes if (PlayerParty.Add(pkmn) == -1 && PCBoxes.Add(pkmn) == -1) { throw new Exception(); } }
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 }