PkmnLibSharp/PkmnLibSharpTests/Battling/PokemonBuilder.cs

30 lines
1.1 KiB
C#
Raw Normal View History

using System;
2020-08-08 15:07:05 +00:00
using System.Collections.Generic;
2021-06-26 09:36:38 +00:00
using NUnit.Framework;
2020-08-08 15:07:05 +00:00
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)
{
}
2021-06-27 10:23:26 +00:00
protected override Pokemon Finalize(Species species, Forme forme, Item heldItem, IReadOnlyCollection<LearnedMove> moves, Nature nature)
2020-08-08 15:07:05 +00:00
{
2021-06-26 09:36:38 +00:00
var pkmn = new Pokemon(Library, species, forme, Level, Experience, Uid, Gender, Coloring, heldItem,
Nickname, HiddenAbility, (byte) AbilityIndex, moves, IVs, EVs, nature, IsAllowedExperienceGain, IsEgg);
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
}
}