Example #1
0
        public Pokemon(Player owner, PokemonCustomInfo custom, GameSettings settings)
        {
            Id = settings.NextId();
              Owner = owner;
              TeamId = owner.TeamId;

              Name = custom.Name;
              PokemonType = DataService.GetPokemonType(custom.PokemonTypeId);
              Gender = custom.Gender;
              Lv = custom.Lv;
              Ability = DataService.GetAbility(custom.AbilityId);
              Nature = custom.Nature;

              {
            Moves = new Move[4];
            int i = 0;
            foreach (int moveId in custom.MoveIds)
              if (i < 4) Moves[i++] = new Move(moveId, settings);
            StruggleId = settings.NextId();
            SwitchId = settings.NextId();
              }

              Base = new ReadOnly6D(PokemonType.BaseHp, PokemonType.BaseAtk, PokemonType.BaseDef, PokemonType.BaseSpAtk, PokemonType.BaseSpDef, PokemonType.BaseSpeed);
              Iv = new ReadOnly6D(custom.HpIv, custom.AtkIv, custom.DefIv, custom.SpAtkIv, custom.SpDefIv, custom.SpeedIv);
              Ev = new ReadOnly6D(custom.HpEv, custom.AtkEv, custom.DefEv, custom.SpAtkEv, custom.SpDefEv, custom.SpeedEv);
              Static = new ReadOnly6D(GetState(StatType.Hp), GetState(StatType.Atk), GetState(StatType.Def), GetState(StatType.SpAtk), GetState(StatType.SpDef), GetState(StatType.Speed));

              if (custom.ItemId.HasValue) Item = DataService.GetItem(custom.ItemId.Value);
              State = PokemonState.Normal;
              Hp = new PairValue(Static.Hp, Static.Hp, 48);
        }
Example #2
0
 internal SimPokemon(Pokemon pokemon, PokemonOutward outward)
 {
     this.pokemon = pokemon;
       Outward = outward;
       //Owner = pokemon.Owner;
       Position = outward.Position;
       Moves = new Move[4] { pokemon.Moves[0], pokemon.Moves[1], pokemon.Moves[2], pokemon.Moves[3] };
       IsActive = true;
       foreach (Move m in Moves)
     if (m != null && m.PP.Value > 0) CanUseMove = true;
       CanStruggle = !CanUseMove;
       CanSwitch = true;
 }
Example #3
0
File: Player.cs Project: sunoru/PBO
 bool IPlayerController.UseMove(Move move, Position target)
 {
     //TODO: verify
       sendCommand(new InputCommand(ActionInput.UseMoveAction(move, target)));
       return true;
 }
Example #4
0
 public void Move_Click(Move move)
 {
     MessageBox.Show(move.Id.ToString());
       //if (ControllingPokemon.CanUseMove && move.Available)
       //  controller.UseMove(move);
 }
Example #5
0
 public static ActionInput UseMoveAction(Move move, Position target)
 {
     return new ActionInput(move.Id) { Target = target };
 }
Example #6
0
File: Move.cs Project: sunoru/PBO
 public Move(int id, Move move, GameSettings settings)
 {
     Id = id;
       Type = move.Type;
       PP = new PairValue(5);
 }
Example #7
0
 internal void SetTargetPanel(Move move, Team rival)
 {
 }