예제 #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 void SetPokemon(ClientIdentifier id, PokemonWrapper pokemon)
 {
     throw new NotImplementedException();
 }
예제 #3
0
 public void SetHP(ClientIdentifier id, int hp)
 {
     throw new NotImplementedException();
 }
예제 #4
0
파일: Client.cs 프로젝트: Nexus87/PokeClone
 public Client(ClientIdentifier id, List<Pokemon> pokemons)
 {
     Id = id;
     this.pokemons.AddRange(pokemons);
 }
예제 #5
0
 private void ExecuteMoveCommand(CommandExecuter executer, bool critical = false, float typeModifier = 1, ClientIdentifier target = null, StatusCondition newCondition = StatusCondition.Normal)
 {
     if (target == null)
         target = factory.PlayerID;
     var command = new MoveCommand(target, target, factory.CreateMove());
     calculator.IsCritical = critical;
     calculator.TypeModifier = typeModifier;
     calculator.StatusCondition = newCondition;
     executer.DispatchCommand(command);
 }
예제 #6
0
 private void ExecuteMoveCommand(CommandExecuter executer, ClientIdentifier clientIdentifier, int damage)
 {
     var command = new MoveCommand(clientIdentifier, clientIdentifier, factory.CreateMove());
     calculator.Damage = damage;
     executer.DispatchCommand(command);
 }
예제 #7
0
        private void SetNewCharacter(WaitForCharState state, ClientIdentifier id, Pokemon pokemon = null){
            if(pokemon == null)
                pokemon = TestFactory.CreatePokemon();

            state.SetCharacter(id, pokemon);
        }
예제 #8
0
 public TestFactory()
 {
     PlayerID = new ClientIdentifier();
     AIID = new ClientIdentifier();
     BattleData = new BattleData(PlayerID, AIID);
 }
예제 #9
0
 public bool Equals(ClientIdentifier id)
 {
     return Guid.Equals(id.Guid);
 }