Reworks PokemonBuilder.

This commit is contained in:
2020-08-08 17:07:05 +02:00
parent 7f4ccbfe2a
commit 69ab7b197c
14 changed files with 112 additions and 76 deletions

View File

@@ -1,5 +1,4 @@
using System.Linq;
using NUnit.Framework;
using PkmnLibSharp.Battling;
using PkmnLibSharp.Library;
using PkmnLibSharp.Library.GrowthRates;

View File

@@ -0,0 +1,21 @@
using System.Collections.Generic;
using PkmnLibSharp.Battling;
using PkmnLibSharp.Library;
using PkmnLibSharp.Library.Items;
namespace PkmnLibSharpTests.Battling
{
public class PokemonBuilder : BasePokemonBuilder<Pokemon>
{
public PokemonBuilder(BattleLibrary library, string species, byte level) : base(library, species, level)
{
}
protected override Pokemon Finalize(Species species, Forme forme, Item? heldItem, IReadOnlyCollection<LearnedMove> moves, Nature nature)
{
return new Pokemon(Library, species, forme!, Level, Experience, Uid, Gender, Coloring,
heldItem, Nickname, HiddenAbility, (byte) AbilityIndex, moves, IVs, EVs, nature);
}
}
}