Ejemplo n.º 1
0
        public IBattlePokemon Build(ISpecies species)
        {
            Debug.Assert(Weight != null, nameof(Weight) + " != null");
            Debug.Assert(Height != null, nameof(Height) + " != null");
            Debug.Assert(Types != null, nameof(Types) + " != null");
            Debug.Assert(Moves != null, nameof(Moves) + " != null");
            Debug.Assert(Tier != null, nameof(Tier) + " != null");

            var permanentStats = PermanentStatBuilder.BuildCollection(species, Level);
            var battleStats    = BattleStatBuilder.BuildCollection();

            return(new BattlePokemon(
                       Name,
                       Nickname,
                       Level,
                       permanentStats.Health,
                       permanentStats.Attack,
                       permanentStats.Defense,
                       permanentStats.Special,
                       permanentStats.Speed,
                       battleStats.Accuracy,
                       battleStats.Evasion,
                       Weight.Value,
                       Height.Value,
                       Types,
                       Moves,
                       Tier));
        }
Ejemplo n.º 2
0
 public BattlePokemonBuilder(IStatFormula statFormula, string name, int lvl)
 {
     StatFormula          = statFormula;
     Name                 = name;
     Level                = lvl;
     PermanentStatBuilder = new PermanentStatBuilder(statFormula);
     BattleStatBuilder    = new BattleStatBuilder(statFormula);
 }
Ejemplo n.º 3
0
        public BattlePokemonBuilder WithSpecies(ISpecies species, int iv = 0, int ev = 0)
        {
            PermanentStatBuilder
            .Species(species)
            .IndividualValue(iv)
            .EffortValue(ev);

            Weight = species.Weight;
            Height = species.Height;

            Types = species.Types.ToIndexedSet();
            Moves = species.Moves.ToIndexedSet();
            Tier  = species.Tier;

            return(this);
        }