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); }
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; }
bool IPlayerController.UseMove(Move move, Position target) { //TODO: verify sendCommand(new InputCommand(ActionInput.UseMoveAction(move, target))); return true; }
public void Move_Click(Move move) { MessageBox.Show(move.Id.ToString()); //if (ControllingPokemon.CanUseMove && move.Available) // controller.UseMove(move); }
public static ActionInput UseMoveAction(Move move, Position target) { return new ActionInput(move.Id) { Target = target }; }
public Move(int id, Move move, GameSettings settings) { Id = id; Type = move.Type; PP = new PairValue(5); }
internal void SetTargetPanel(Move move, Team rival) { }