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)); }
public BattlePokemonBuilder(IStatFormula statFormula, string name, int lvl) { StatFormula = statFormula; Name = name; Level = lvl; PermanentStatBuilder = new PermanentStatBuilder(statFormula); BattleStatBuilder = new BattleStatBuilder(statFormula); }