internal OnboardPokemon(Pokemon pokemon, int x) { this.pokemon = pokemon; conditions = new ConditionsDictionary(); Owner = pokemon.Owner; Type1 = pokemon.PokemonType.Type1; Type2 = pokemon.PokemonType.Type2; Gender = pokemon.Gender; Ability = pokemon.Ability; Base = new SixD(pokemon.Base); Iv = new SixD(pokemon.Iv); Ev = new SixD(pokemon.Ev); Static = new SixD(pokemon.Static); Lv5D = new SixD(); Moves = new Move[4] { pokemon.Moves[0], pokemon.Moves[1], pokemon.Moves[2], pokemon.Moves[3] }; Position = new Position(pokemon.TeamId,x); //幻影new完后覆盖属性 Outward = new PokemonOutward(this, pokemon.Hp); Outward.Name = pokemon.Name; Outward.Gender = Gender; Outward.ImageId = pokemon.PokemonType.Id; }
internal PokemonOutward(OnboardPokemon pm, PairValue hp) { _listeners = new List<IPokemonEvent>(); OwnerId = pm.Owner.Id; Id = pm.Id; Hp = hp; Lv = pm.Lv; Position = pm.Position; }
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 static ActionInput UseMoveAction(Move move, Position target) { return new ActionInput(move.Id) { Target = target }; }