Esempio n. 1
0
        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);
            }
        }
Esempio n. 2
0
 public void SetPokemon(ClientIdentifier id, PokemonWrapper pokemon)
 {
     throw new NotImplementedException();
 }
Esempio n. 3
0
 public void SetHP(ClientIdentifier id, int hp)
 {
     throw new NotImplementedException();
 }
Esempio n. 4
0
 public Client(ClientIdentifier id, List<Pokemon> pokemons)
 {
     Id = id;
     this.pokemons.AddRange(pokemons);
 }
Esempio n. 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);
 }
Esempio n. 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);
 }
Esempio n. 7
0
        private void SetNewCharacter(WaitForCharState state, ClientIdentifier id, Pokemon pokemon = null){
            if(pokemon == null)
                pokemon = TestFactory.CreatePokemon();

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