예제 #1
0
파일: Client.cs 프로젝트: Nexus87/PokeClone
        public Client(ClientIdentifier id)
        {
            Id = id;

            var stats = new Stats { Atk = 10, Def = 10, HP = 30, SpAtk = 10, SpDef = 10, Speed = 10 };
            var data = new PokemonData { Id = 0, Type1 = PokemonType.Normal, BaseStats = stats };

            var moveData = new MoveData
            {
                Name = "Move",
                Accuracy = 100,
                Damage = 120,
                DamageType = DamageCategory.Physical,
                PokemonType = PokemonType.Normal,
                PP = 20
            };

            for (int i = 0; i < 6; i++)
            {
                var pkmn = new Pokemon(data, stats) { Name = Id.Name + "_Pkmn" + i, Level = i + 20};
                for (int j = 0; j < 2; j++)
                    pkmn.SetMove(j, new Move(moveData));
                pkmn.Stats.HP = 30;
                pkmn.HP = 30;

                pokemons.Add(pkmn);
            }
        }
예제 #2
0
        public static Pokemon CreatePokemon(int numMoves)
        {
            var pkmn = new Pokemon(new PokemonData(), new Stats());
            for (int i = 0; i < numMoves; i++)
                pkmn.SetMove(i, new Move(new MoveData { Name = GetMoveName(i) }));

            return pkmn;
        }