PkmnLibSharp/PkmnLibSharpTests/Battling/PokemonBuilder.cs

28 lines
1013 B
C#
Raw Normal View History

2020-08-08 15:07:05 +00:00
using System.Collections.Generic;
using PkmnLibSharp.Battling;
using PkmnLibSharp.Library;
using PkmnLibSharp.Library.Items;
using PkmnLibSharp.Library.Moves;
2020-08-08 15:07:05 +00:00
namespace PkmnLibSharpTests.Battling
{
public class PokemonBuilder : BasePokemonBuilder<Pokemon, LearnedMove>
2020-08-08 15:07:05 +00:00
{
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)
{
2020-08-17 16:51:07 +00:00
var pkmn = new Pokemon(Library, species, forme!, Level, Experience, Uid, Gender, Coloring,
2020-08-08 15:07:05 +00:00
heldItem, Nickname, HiddenAbility, (byte) AbilityIndex, moves, IVs, EVs, nature);
2020-08-17 16:51:07 +00:00
return pkmn;
2020-08-08 15:07:05 +00:00
}
protected override LearnedMove CreateLearnedMove(MoveData move, byte maxUses, MoveLearnMethod learnMethod)
{
return new LearnedMove(move, maxUses, learnMethod);
}
2020-08-08 15:07:05 +00:00
}
}